1 |
heath |
1.1 |
// -*- C++ -*-
|
2 |
|
|
//
|
3 |
|
|
// Package: MinBiasAnalyzer
|
4 |
|
|
// Class: MinBiasAnalyzer
|
5 |
|
|
//
|
6 |
|
|
/**\class MinBiasAnalyzer MinBiasAnalyzer.cc ParticleFlowAnalysis/MinBiasAnalyzer/src/MinBiasAnalyzer.cc
|
7 |
|
|
|
8 |
|
|
Description: <one line class summary>
|
9 |
|
|
|
10 |
|
|
Implementation:
|
11 |
|
|
<Notes on implementation>
|
12 |
|
|
*/
|
13 |
|
|
//
|
14 |
|
|
// Original Author: Gregory Heath
|
15 |
|
|
// Created: Tue May 5 11:54:25 CEST 2009
|
16 |
|
|
// $Id: MinBiasAnalyzer.h,v 1.4 2009/11/25 10:52:32 heath Exp $
|
17 |
|
|
//
|
18 |
|
|
//
|
19 |
|
|
|
20 |
|
|
|
21 |
|
|
// system include files
|
22 |
|
|
#include <memory>
|
23 |
|
|
|
24 |
|
|
// user include files
|
25 |
|
|
#include "FWCore/Framework/interface/Frameworkfwd.h"
|
26 |
|
|
#include "FWCore/Framework/interface/EDAnalyzer.h"
|
27 |
|
|
|
28 |
|
|
#include "FWCore/Framework/interface/Event.h"
|
29 |
|
|
#include "FWCore/Framework/interface/MakerMacros.h"
|
30 |
|
|
|
31 |
|
|
#include "FWCore/ParameterSet/interface/ParameterSet.h"
|
32 |
|
|
|
33 |
|
|
#include "DataFormats/ParticleFlowCandidate/interface/PFCandidate.h"
|
34 |
|
|
#include "DataFormats/ParticleFlowCandidate/interface/PFCandidateFwd.h"
|
35 |
|
|
|
36 |
|
|
#include "HLTrigger/HLTcore/interface/HLTConfigProvider.h"
|
37 |
|
|
|
38 |
|
|
#include "TH1D.h"
|
39 |
|
|
#include "TH2D.h"
|
40 |
|
|
#include "TH3D.h"
|
41 |
|
|
#include <map>
|
42 |
|
|
#include <string>
|
43 |
|
|
//
|
44 |
|
|
// class declaration
|
45 |
|
|
//
|
46 |
|
|
|
47 |
|
|
class MinBiasAnalyzer : public edm::EDAnalyzer {
|
48 |
|
|
public:
|
49 |
|
|
explicit MinBiasAnalyzer(const edm::ParameterSet&);
|
50 |
|
|
~MinBiasAnalyzer();
|
51 |
|
|
|
52 |
|
|
|
53 |
|
|
private:
|
54 |
|
|
virtual void beginJob() ;
|
55 |
|
|
virtual void analyze(const edm::Event&, const edm::EventSetup&);
|
56 |
|
|
virtual void endJob() ;
|
57 |
|
|
|
58 |
|
|
// Define a type consisting of a candidate and some extra info
|
59 |
|
|
// Just an integer flag in the first instance
|
60 |
|
|
enum flagTypes{NULL_FLAG, TRACK_ONLY, ISO_HCAL_CLUSTER, ISO_ECAL_CLUSTER, ISO_EHCAL_CLUSTER, HCAL_CLUSTER, ECAL_CLUSTER, EHCAL_CLUSTER,
|
61 |
|
|
MULTIPLE_TRACKS, MULTIPLE_CLUSTERS, OTHER_BLOCKS, BAD_BLOCKS, NO_ELEMENTS, NUMBER_OF_FLAGS};
|
62 |
|
|
typedef std::pair< reco::PFCandidate, unsigned > flaggedCandidate;
|
63 |
|
|
typedef std::vector< flaggedCandidate > flaggedCandidateList;
|
64 |
|
|
flaggedCandidateList barrelHadrons(const reco::PFCandidateCollection* pfCands);
|
65 |
|
|
|
66 |
|
|
void findTriggerWeight(const edm::Event& iEvent);
|
67 |
|
|
int pIdCode(int pdgId, int q);
|
68 |
|
|
|
69 |
|
|
// ----------member data ---------------------------
|
70 |
|
|
edm::InputTag pfCandidateTag_;
|
71 |
|
|
edm::InputTag gpCandidateTag_;
|
72 |
|
|
edm::InputTag triggerResultsTag_;
|
73 |
|
|
std::vector<std::string> gpTypeList_;
|
74 |
|
|
std::map<std::string, edm::InputTag> gpBarrelSelectionTag_;
|
75 |
|
|
std::map<std::string, edm::InputTag> gpBarrelPFlowMatchTag_;
|
76 |
|
|
|
77 |
|
|
std::map<std::string,TH1D*> histocontainer_;
|
78 |
|
|
std::map<std::string,TH2D*> hist2container_;
|
79 |
|
|
std::map<std::string,TH3D*> hist3container_;
|
80 |
|
|
|
81 |
|
|
std::map<int, int> pdgIdsFound_;
|
82 |
|
|
std::vector< std::pair<double, double> > ptCutsForHist_;
|
83 |
|
|
|
84 |
|
|
// trigger stuff
|
85 |
|
|
double triggerWeight_;
|
86 |
|
|
|
87 |
|
|
std::map<std::string, int> triggerNamesWithPrescale_;
|
88 |
|
|
|
89 |
|
|
HLTConfigProvider hltConfig_;
|
90 |
|
|
|
91 |
|
|
};
|
92 |
|
|
|