CMS 3D CMS Logo

List of all members | Classes | Public Member Functions | Private Types | Private Member Functions | Static Private Member Functions | Private Attributes
PFAnalyzer Class Reference

#include <PFAnalyzer.h>

Inheritance diagram for PFAnalyzer:
DQMEDAnalyzer edm::stream::EDProducer< edm::GlobalCache< DQMEDAnalyzerGlobalCache >, edm::EndRunProducer, edm::EndLuminosityBlockProducer, edm::Accumulator >

Classes

struct  binInfo
 

Public Member Functions

void analyze (const edm::Event &, const edm::EventSetup &) override
 Get the analysis. More...
 
void bookHistograms (DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
 Inizialize parameters for histo binning. More...
 
void dqmBeginRun (const edm::Run &, const edm::EventSetup &) override
 Initialize run-based parameters. More...
 
 PFAnalyzer (const edm::ParameterSet &)
 Constructor. More...
 
 ~PFAnalyzer () override
 Destructor. More...
 
- Public Member Functions inherited from DQMEDAnalyzer
void accumulate (edm::Event const &event, edm::EventSetup const &setup) final
 
void beginLuminosityBlock (edm::LuminosityBlock const &lumi, edm::EventSetup const &setup) final
 
void beginRun (edm::Run const &run, edm::EventSetup const &setup) final
 
void beginStream (edm::StreamID id) final
 
 DQMEDAnalyzer ()
 
void endLuminosityBlock (edm::LuminosityBlock const &lumi, edm::EventSetup const &setup) final
 
void endRun (edm::Run const &run, edm::EventSetup const &setup) final
 
virtual bool getCanSaveByLumi ()
 
- Public Member Functions inherited from edm::stream::EDProducer< edm::GlobalCache< DQMEDAnalyzerGlobalCache >, edm::EndRunProducer, edm::EndLuminosityBlockProducer, edm::Accumulator >
 EDProducer ()=default
 
 EDProducer (const EDProducer &)=delete
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginProcessBlocks () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndProcessBlocks () const final
 
bool hasAbilityToProduceInEndRuns () const final
 
const EDProduceroperator= (const EDProducer &)=delete
 

Private Types

typedef std::vector< double > vDouble
 
typedef std::vector< std::string > vstring
 

Private Member Functions

void bookMESetSelection (std::string, DQMStore::IBooker &)
 
std::vector< std::string > getAllSuffixes (std::vector< std::string > observables, std::vector< std::vector< double >> binnings)
 
binInfo getBinInfo (std::string)
 
std::vector< double > getBinList (std::string binString)
 
int getBinNumber (double binVal, std::vector< double > bins)
 
int getBinNumbers (std::vector< double > binVal, std::vector< std::vector< double >> bins)
 
int getJetBin (const reco::PFJet jetCand, int i)
 
int getPFBin (const reco::PFCandidate pfCand, int i)
 
std::string getSuffix (std::vector< int > binList, std::vector< std::string > observables, std::vector< std::vector< double >> binnings)
 
bool passesEventSelection (const edm::Event &iEvent)
 
std::string stringWithDecimals (int bin, std::vector< double > bins)
 

Static Private Member Functions

static double getAbsEta (const reco::PFCandidate pfCand)
 
static double getDNNEBkgNonIsolated (const reco::PFCandidate pfCand)
 
static double getDNNEBkgPhotonIsolated (const reco::PFCandidate pfCand)
 
static double getDNNEBkgTauIsolated (const reco::PFCandidate pfCand)
 
static double getDNNESigIsolated (const reco::PFCandidate pfCand)
 
static double getDNNESigNonIsolated (const reco::PFCandidate pfCand)
 
static double getECalEFrac (const reco::PFCandidate pfCand)
 
static double getEcalEnergy (const reco::PFCandidate pfCand)
 
static double getECalEnergy (const reco::PFCandidate pfCand)
 
static double getEnergy (const reco::PFCandidate pfCand)
 
static double getEnergySpectrum (const reco::PFCandidate pfCand, const reco::PFJet jet)
 
static double getEoverP (const reco::PFCandidate pfCand)
 
static double getEta (const reco::PFCandidate pfCand)
 
static double getHadCalibration (const reco::PFCandidate pfCand)
 
static double getHCalEFrac (const reco::PFCandidate pfCand)
 
static double getHcalEnergy (const reco::PFCandidate pfCand)
 
static double getHCalEnergy (const reco::PFCandidate pfCand)
 
static double getHcalEnergy_depth1 (const reco::PFCandidate pfCand)
 
static double getHcalEnergy_depth2 (const reco::PFCandidate pfCand)
 
static double getHcalEnergy_depth3 (const reco::PFCandidate pfCand)
 
static double getHcalEnergy_depth4 (const reco::PFCandidate pfCand)
 
static double getHcalEnergy_depth5 (const reco::PFCandidate pfCand)
 
static double getHcalEnergy_depth6 (const reco::PFCandidate pfCand)
 
static double getHcalEnergy_depth7 (const reco::PFCandidate pfCand)
 
static double getHOEnergy (const reco::PFCandidate pfCand)
 
static double getJetPt (const reco::PFJet jet)
 
static double getMVAEMu (const reco::PFCandidate pfCand)
 
static double getMVAEPi (const reco::PFCandidate pfCand)
 
static double getMVAGammaNH (const reco::PFCandidate pfCand)
 
static double getMVAIsolated (const reco::PFCandidate pfCand)
 
static double getMVANothingGamma (const reco::PFCandidate pfCand)
 
static double getMVANothingNH (const reco::PFCandidate pfCand)
 
static double getMVAPiMu (const reco::PFCandidate pfCand)
 
static double getNPFC (const reco::PFCandidateCollection pfCands, reco::PFCandidate::ParticleType pfType)
 
static double getNPFCinJet (const std::vector< reco::PFCandidatePtr > pfCands, reco::PFCandidate::ParticleType pfType)
 
static double getNTracksInBlock (const reco::PFCandidate pfCand)
 
static double getPhi (const reco::PFCandidate pfCand)
 
static double getPt (const reco::PFCandidate pfCand)
 
static double getRawEcalEnergy (const reco::PFCandidate pfCand)
 
static double getRawHcalEnergy (const reco::PFCandidate pfCand)
 
static double getRawHOEnergy (const reco::PFCandidate pfCand)
 
static double getTime (const reco::PFCandidate pfCand)
 
static double getTrackPt (const reco::PFCandidate pfCand)
 

Private Attributes

edm::InputTag highPtJetExpr_
 
std::vector< std::vector< std::string > > m_allJetSuffixes
 
std::vector< std::vector< std::string > > m_allSuffixes
 
std::vector< std::vector< std::vector< double > > > m_binList
 
vstring m_cutList
 
std::string m_directory
 
std::map< std::string, std::function< double(const reco::PFCandidateCollection, reco::PFCandidate::ParticleType pfType)> > m_eventFuncMap
 
vstring m_eventObservableNames
 
vstring m_eventObservables
 
std::vector< std::vector< std::string > > m_fullCutList
 
std::vector< std::vector< std::string > > m_fullJetCutList
 
std::map< std::string, std::function< double(const reco::PFCandidate)> > m_funcMap
 
std::vector< std::vector< std::vector< double > > > m_jetBinList
 
vstring m_jetCutList
 
std::map< std::string, std::function< double(const reco::PFJet)> > m_jetFuncMap
 
std::map< std::string, std::function< double(const std::vector< reco::PFCandidatePtr > pfCands, reco::PFCandidate::ParticleType pfType)> > m_jetWideFuncMap
 
double m_matchingRadius
 
vDouble m_npvBins
 
vstring m_observableNames
 
vstring m_observables
 
std::map< std::string, std::function< double(const reco::PFCandidate, const reco::PFJet)> > m_pfInJetFuncMap
 
vstring m_pfInJetObservableNames
 
vstring m_pfInJetObservables
 
std::vector< std::string > m_pfNames
 
std::map< std::string, MonitorElement * > map_of_MEs
 
edm::ParameterSet parameters_
 
edm::EDGetTokenT< reco::PFJetCollectionpfJetsToken_
 
edm::InputTag srcWeights
 
edm::EDGetTokenT< reco::PFCandidateCollectionthePfCandidateCollection_
 
edm::InputTag theTriggerResultsLabel_
 
edm::EDGetTokenT< GenEventInfoProducttok_ew_
 
edm::EDGetTokenT< edm::TriggerResultstriggerResultsToken_
 
edm::InputTag vertexTag_
 
edm::EDGetTokenT< std::vector< reco::Vertex > > vertexToken_
 
edm::ValueMap< float > const * weights_
 
edm::EDGetTokenT< edm::ValueMap< float > > weightsToken_
 

Additional Inherited Members

- Public Types inherited from DQMEDAnalyzer
typedef dqm::reco::DQMStore DQMStore
 
typedef dqm::reco::MonitorElement MonitorElement
 
- Public Types inherited from edm::stream::EDProducer< edm::GlobalCache< DQMEDAnalyzerGlobalCache >, edm::EndRunProducer, edm::EndLuminosityBlockProducer, edm::Accumulator >
using CacheTypes = CacheContexts< T... >
 
using GlobalCache = typename CacheTypes::GlobalCache
 
using HasAbility = AbilityChecker< T... >
 
using InputProcessBlockCache = typename CacheTypes::InputProcessBlockCache
 
using LuminosityBlockCache = typename CacheTypes::LuminosityBlockCache
 
using LuminosityBlockContext = LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCache >
 
using LuminosityBlockSummaryCache = typename CacheTypes::LuminosityBlockSummaryCache
 
using RunCache = typename CacheTypes::RunCache
 
using RunContext = RunContextT< RunCache, GlobalCache >
 
using RunSummaryCache = typename CacheTypes::RunSummaryCache
 
- Static Public Member Functions inherited from DQMEDAnalyzer
static void globalEndJob (DQMEDAnalyzerGlobalCache const *)
 
static void globalEndLuminosityBlockProduce (edm::LuminosityBlock &lumi, edm::EventSetup const &setup, LuminosityBlockContext const *context)
 
static void globalEndRunProduce (edm::Run &run, edm::EventSetup const &setup, RunContext const *context)
 
static std::unique_ptr< DQMEDAnalyzerGlobalCacheinitializeGlobalCache (edm::ParameterSet const &)
 
- Protected Member Functions inherited from DQMEDAnalyzer
uint64_t meId () const
 
- Protected Attributes inherited from DQMEDAnalyzer
edm::EDPutTokenT< DQMTokenlumiToken_
 
edm::EDPutTokenT< DQMTokenrunToken_
 
unsigned int streamId_
 

Detailed Description

DQM ParticleFlow analysis monitoring

Author
J. Roloff - Brown University

Definition at line 51 of file PFAnalyzer.h.

Member Typedef Documentation

◆ vDouble

typedef std::vector<double> PFAnalyzer::vDouble
private

Definition at line 299 of file PFAnalyzer.h.

◆ vstring

typedef std::vector<std::string> PFAnalyzer::vstring
private

Definition at line 298 of file PFAnalyzer.h.

Constructor & Destructor Documentation

◆ PFAnalyzer()

PFAnalyzer::PFAnalyzer ( const edm::ParameterSet pSet)

Constructor.

Definition at line 12 of file PFAnalyzer.cc.

References spr::find(), getBinList(), getDNNEBkgNonIsolated(), getDNNEBkgPhotonIsolated(), getDNNEBkgTauIsolated(), getDNNESigIsolated(), getDNNESigNonIsolated(), getEcalEnergy(), getEnergy(), getEnergySpectrum(), getEoverP(), getEta(), getHadCalibration(), getHcalEnergy(), getHCalEnergy(), getHcalEnergy_depth1(), getHcalEnergy_depth2(), getHcalEnergy_depth3(), getHcalEnergy_depth4(), getHcalEnergy_depth5(), getHcalEnergy_depth6(), getHcalEnergy_depth7(), getHOEnergy(), getJetPt(), getMVAEMu(), getMVAEPi(), getMVAGammaNH(), getMVAIsolated(), getMVANothingGamma(), getMVANothingNH(), getMVAPiMu(), getNPFC(), getNPFCinJet(), getNTracksInBlock(), edm::ParameterSet::getParameter(), getPhi(), getPt(), getRawEcalEnergy(), getRawHcalEnergy(), getRawHOEnergy(), highPtJetExpr_, mps_fire::i, ProducerED_cfi::InputTag, dqmiolumiharvest::j, m_binList, m_cutList, m_directory, m_eventFuncMap, m_eventObservables, m_fullCutList, m_fullJetCutList, m_funcMap, m_jetBinList, m_jetCutList, m_jetFuncMap, m_jetWideFuncMap, m_npvBins, m_observables, m_pfInJetFuncMap, m_pfInJetObservables, m_pfNames, parameters_, pfJetsToken_, srcWeights, AlCaHLTBitMon_QueryRunRegistry::string, thePfCandidateCollection_, theTriggerResultsLabel_, tok_ew_, triggerResultsToken_, trackerHitRTTI::vector, vertexTag_, vertexToken_, and weightsToken_.

12  {
13  m_directory = "ParticleFlow";
14  parameters_ = pSet.getParameter<edm::ParameterSet>("pfAnalysis");
15 
16  thePfCandidateCollection_ = consumes<reco::PFCandidateCollection>(pSet.getParameter<edm::InputTag>("pfCandidates"));
17  pfJetsToken_ = consumes<reco::PFJetCollection>(pSet.getParameter<edm::InputTag>("pfJetCollection"));
18 
19  theTriggerResultsLabel_ = pSet.getParameter<edm::InputTag>("TriggerResultsLabel");
20  triggerResultsToken_ = consumes<edm::TriggerResults>(edm::InputTag(theTriggerResultsLabel_));
21  highPtJetExpr_ = pSet.getParameter<edm::InputTag>("TriggerName");
22 
23  srcWeights = pSet.getParameter<edm::InputTag>("srcWeights");
24  weightsToken_ = consumes<edm::ValueMap<float>>(srcWeights);
25 
26  m_pfNames = {"allPFC", "neutralHadPFC", "chargedHadPFC", "electronPFC", "muonPFC", "gammaPFC", "hadHFPFC", "emHFPFC"};
27  vertexTag_ = pSet.getParameter<edm::InputTag>("PVCollection");
28  vertexToken_ = consumes<std::vector<reco::Vertex>>(edm::InputTag(vertexTag_));
29 
30  tok_ew_ = consumes<GenEventInfoProduct>(edm::InputTag("generator"));
31 
33  m_eventObservables = parameters_.getParameter<vstring>("eventObservables");
34  m_pfInJetObservables = parameters_.getParameter<vstring>("pfInJetObservables");
36 
37  // List of cuts applied to PFCs that we want to plot
39  // List of jet cuts that we apply for the case of plotting PFCs in jets
41 
42  // Link observable strings to the static functions defined in the header file
43  // Many of these are quite trivial, but this enables a simple way to include a
44  // variety of observables on-the-fly.
45  m_funcMap["pt"] = &getPt;
46  m_funcMap["energy"] = getEnergy;
47  m_funcMap["eta"] = getEta;
48  m_funcMap["phi"] = getPhi;
49 
50  m_funcMap["HCalE_depth1"] = getHcalEnergy_depth1;
51  m_funcMap["HCalE_depth2"] = getHcalEnergy_depth2;
52  m_funcMap["HCalE_depth3"] = getHcalEnergy_depth3;
53  m_funcMap["HCalE_depth4"] = getHcalEnergy_depth4;
54  m_funcMap["HCalE_depth5"] = getHcalEnergy_depth5;
55  m_funcMap["HCalE_depth6"] = getHcalEnergy_depth6;
56  m_funcMap["HCalE_depth7"] = getHcalEnergy_depth7;
57 
58  m_funcMap["ECal_E"] = getEcalEnergy;
59  m_funcMap["RawECal_E"] = getRawEcalEnergy;
60  m_funcMap["HCal_E"] = getHcalEnergy;
61  m_funcMap["RawHCal_E"] = getRawHcalEnergy;
62  m_funcMap["HO_E"] = getHOEnergy;
63  m_funcMap["RawHO_E"] = getRawHOEnergy;
64  m_funcMap["PFHad_calibration"] = getHadCalibration;
65 
66  m_funcMap["MVAIsolated"] = getMVAIsolated;
67  m_funcMap["MVAEPi"] = getMVAEPi;
68  m_funcMap["MVAEMu"] = getMVAEMu;
69  m_funcMap["MVAPiMu"] = getMVAPiMu;
70  m_funcMap["MVANothingGamma"] = getMVANothingGamma;
71  m_funcMap["MVANothingNH"] = getMVANothingNH;
72  m_funcMap["MVAGammaNH"] = getMVAGammaNH;
73 
74  m_funcMap["DNNESigIsolated"] = getDNNESigIsolated;
75  m_funcMap["DNNESigNonIsolated"] = getDNNESigNonIsolated;
76  m_funcMap["DNNEBkgNonIsolated"] = getDNNEBkgNonIsolated;
77  m_funcMap["DNNEBkgTauIsolated"] = getDNNEBkgTauIsolated;
78  m_funcMap["DNNEBkgPhotonIsolated"] = getDNNEBkgPhotonIsolated;
79 
80  m_funcMap["hcalE"] = getHCalEnergy;
81  m_funcMap["eOverP"] = getEoverP;
82  m_funcMap["nTrkInBlock"] = getNTracksInBlock;
83 
84  m_eventFuncMap["NPFC"] = getNPFC;
86 
87  m_pfInJetFuncMap["PFSpectrum"] = getEnergySpectrum;
88 
89  // Link jet observables to static functions in the header file.
90  // This is very similar to m_funcMap, but for jets instead.
91  m_jetFuncMap["pt"] = getJetPt;
92 
93  // Convert the cutList strings into real cuts that can be applied
94  // The format should be three comma separated values
95  // with the first number being the name of the observable
96  // (corresponding to a key in m_funcMap),
97  // the second being the minimum value, and the last being the max.
98  //
99  for (unsigned int i = 0; i < m_cutList.size(); i++) {
100  m_fullCutList.push_back(std::vector<std::string>());
101  while (m_cutList[i].find("]") != std::string::npos) {
102  size_t pos = m_cutList[i].find("]");
103  m_fullCutList[i].push_back(m_cutList[i].substr(1, pos));
104  m_cutList[i].erase(0, pos + 1);
105  }
106  }
107 
108  for (unsigned int i = 0; i < m_fullCutList.size(); i++) {
109  m_binList.push_back(std::vector<std::vector<double>>());
110  for (unsigned int j = 0; j < m_fullCutList[i].size(); j++) {
111  size_t pos = m_fullCutList[i][j].find(";");
112  std::string observableName = m_fullCutList[i][j].substr(0, pos);
113  m_fullCutList[i][j].erase(0, pos + 1);
114 
115  m_binList[i].push_back(getBinList(m_fullCutList[i][j]));
116  m_fullCutList[i][j] = observableName;
117  }
118  }
119 
120  // Convert the jetCutList strings into real cuts that can be applied
121  // The format should be three comma separated values,
122  // with the first number being the name of the observable
123  // (corresponding to a key in m_jetFuncMap),
124  // the second being the minimum value, and the last being the max value.
125  //
126  for (unsigned int i = 0; i < m_jetCutList.size(); i++) {
127  m_fullJetCutList.push_back(std::vector<std::string>());
128  while (m_jetCutList[i].find("]") != std::string::npos) {
129  size_t pos = m_jetCutList[i].find("]");
130  m_fullJetCutList[i].push_back(m_jetCutList[i].substr(1, pos));
131  m_jetCutList[i].erase(0, pos + 1);
132  }
133  }
134 
135  for (unsigned int i = 0; i < m_fullJetCutList.size(); i++) {
136  m_jetBinList.push_back(std::vector<std::vector<double>>());
137  for (unsigned int j = 0; j < m_fullJetCutList[i].size(); j++) {
138  size_t pos = m_fullJetCutList[i][j].find(";");
139  std::string observableName = m_fullJetCutList[i][j].substr(0, pos);
140  m_fullJetCutList[i][j].erase(0, pos + 1);
141 
142  m_jetBinList[i].push_back(getBinList(m_fullJetCutList[i][j]));
143  m_fullJetCutList[i][j] = observableName;
144  }
145  }
146 }
edm::EDGetTokenT< edm::ValueMap< float > > weightsToken_
Definition: PFAnalyzer.h:276
T getParameter(std::string const &) const
Definition: ParameterSet.h:307
std::vector< std::vector< std::vector< double > > > m_jetBinList
Definition: PFAnalyzer.h:330
static double getDNNESigIsolated(const reco::PFCandidate pfCand)
Definition: PFAnalyzer.h:171
std::vector< std::vector< std::vector< double > > > m_binList
Definition: PFAnalyzer.h:321
edm::EDGetTokenT< edm::TriggerResults > triggerResultsToken_
Definition: PFAnalyzer.h:284
static double getRawHOEnergy(const reco::PFCandidate pfCand)
Definition: PFAnalyzer.h:161
vector< string > vstring
Definition: ExoticaDQM.cc:7
static double getDNNEBkgPhotonIsolated(const reco::PFCandidate pfCand)
Definition: PFAnalyzer.h:175
static double getHcalEnergy_depth5(const reco::PFCandidate pfCand)
Definition: PFAnalyzer.h:152
static double getHCalEnergy(const reco::PFCandidate pfCand)
Definition: PFAnalyzer.h:206
edm::InputTag highPtJetExpr_
Definition: PFAnalyzer.h:283
std::map< std::string, std::function< double(const reco::PFJet)> > m_jetFuncMap
Definition: PFAnalyzer.h:80
static double getJetPt(const reco::PFJet jet)
Definition: PFAnalyzer.h:269
edm::ParameterSet parameters_
Definition: PFAnalyzer.h:296
static double getHOEnergy(const reco::PFCandidate pfCand)
Definition: PFAnalyzer.h:160
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:19
std::vector< std::vector< std::string > > m_fullCutList
Definition: PFAnalyzer.h:320
std::vector< double > vDouble
Definition: PFAnalyzer.h:299
static double getMVAEMu(const reco::PFCandidate pfCand)
Definition: PFAnalyzer.h:165
std::vector< std::string > m_pfNames
Definition: PFAnalyzer.h:338
vstring m_jetCutList
Definition: PFAnalyzer.h:328
vDouble m_npvBins
Definition: PFAnalyzer.h:332
static double getNTracksInBlock(const reco::PFCandidate pfCand)
Definition: PFAnalyzer.h:250
static double getEta(const reco::PFCandidate pfCand)
Definition: PFAnalyzer.h:136
vstring m_eventObservables
Definition: PFAnalyzer.h:307
static double getEnergy(const reco::PFCandidate pfCand)
Definition: PFAnalyzer.h:135
static double getDNNEBkgNonIsolated(const reco::PFCandidate pfCand)
Definition: PFAnalyzer.h:173
edm::InputTag vertexTag_
Definition: PFAnalyzer.h:282
static double getHadCalibration(const reco::PFCandidate pfCand)
Definition: PFAnalyzer.h:140
edm::InputTag theTriggerResultsLabel_
Definition: PFAnalyzer.h:281
vstring m_pfInJetObservables
Definition: PFAnalyzer.h:308
std::map< std::string, std::function< double(const reco::PFCandidate, const reco::PFJet)> > m_pfInJetFuncMap
Definition: PFAnalyzer.h:79
static double getHcalEnergy_depth3(const reco::PFCandidate pfCand)
Definition: PFAnalyzer.h:150
std::map< std::string, std::function< double(const std::vector< reco::PFCandidatePtr > pfCands, reco::PFCandidate::ParticleType pfType)> > m_jetWideFuncMap
Definition: PFAnalyzer.h:78
static double getEcalEnergy(const reco::PFCandidate pfCand)
Definition: PFAnalyzer.h:156
static double getRawHcalEnergy(const reco::PFCandidate pfCand)
Definition: PFAnalyzer.h:159
edm::EDGetTokenT< reco::PFJetCollection > pfJetsToken_
Definition: PFAnalyzer.h:273
edm::InputTag srcWeights
Definition: PFAnalyzer.h:274
static double getRawEcalEnergy(const reco::PFCandidate pfCand)
Definition: PFAnalyzer.h:157
std::vector< std::vector< std::string > > m_fullJetCutList
Definition: PFAnalyzer.h:329
static double getEoverP(const reco::PFCandidate pfCand)
Definition: PFAnalyzer.h:185
std::string m_directory
Definition: PFAnalyzer.h:290
static double getMVAPiMu(const reco::PFCandidate pfCand)
Definition: PFAnalyzer.h:166
static double getPhi(const reco::PFCandidate pfCand)
Definition: PFAnalyzer.h:138
std::map< std::string, std::function< double(const reco::PFCandidateCollection, reco::PFCandidate::ParticleType pfType)> > m_eventFuncMap
Definition: PFAnalyzer.h:75
static double getMVAEPi(const reco::PFCandidate pfCand)
Definition: PFAnalyzer.h:164
static double getMVAGammaNH(const reco::PFCandidate pfCand)
Definition: PFAnalyzer.h:169
static double getHcalEnergy_depth4(const reco::PFCandidate pfCand)
Definition: PFAnalyzer.h:151
edm::EDGetTokenT< reco::PFCandidateCollection > thePfCandidateCollection_
Definition: PFAnalyzer.h:271
static double getHcalEnergy(const reco::PFCandidate pfCand)
Definition: PFAnalyzer.h:158
std::vector< double > getBinList(std::string binString)
Definition: PFAnalyzer.cc:399
edm::EDGetTokenT< GenEventInfoProduct > tok_ew_
Definition: PFAnalyzer.h:279
static double getNPFC(const reco::PFCandidateCollection pfCands, reco::PFCandidate::ParticleType pfType)
Definition: PFAnalyzer.h:110
static double getDNNESigNonIsolated(const reco::PFCandidate pfCand)
Definition: PFAnalyzer.h:172
static double getHcalEnergy_depth1(const reco::PFCandidate pfCand)
Definition: PFAnalyzer.h:148
static double getDNNEBkgTauIsolated(const reco::PFCandidate pfCand)
Definition: PFAnalyzer.h:174
static double getMVANothingGamma(const reco::PFCandidate pfCand)
Definition: PFAnalyzer.h:167
static double getNPFCinJet(const std::vector< reco::PFCandidatePtr > pfCands, reco::PFCandidate::ParticleType pfType)
Definition: PFAnalyzer.h:121
static double getMVANothingNH(const reco::PFCandidate pfCand)
Definition: PFAnalyzer.h:168
edm::EDGetTokenT< std::vector< reco::Vertex > > vertexToken_
Definition: PFAnalyzer.h:272
static double getEnergySpectrum(const reco::PFCandidate pfCand, const reco::PFJet jet)
Definition: PFAnalyzer.h:104
static double getHcalEnergy_depth6(const reco::PFCandidate pfCand)
Definition: PFAnalyzer.h:153
std::map< std::string, std::function< double(const reco::PFCandidate)> > m_funcMap
Definition: PFAnalyzer.h:69
vstring m_cutList
Definition: PFAnalyzer.h:319
static double getMVAIsolated(const reco::PFCandidate pfCand)
Definition: PFAnalyzer.h:163
static double getHcalEnergy_depth2(const reco::PFCandidate pfCand)
Definition: PFAnalyzer.h:149
vstring m_observables
Definition: PFAnalyzer.h:306
static double getHcalEnergy_depth7(const reco::PFCandidate pfCand)
Definition: PFAnalyzer.h:154
static double getPt(const reco::PFCandidate pfCand)
Definition: PFAnalyzer.h:134

◆ ~PFAnalyzer()

PFAnalyzer::~PFAnalyzer ( )
override

Destructor.

Definition at line 149 of file PFAnalyzer.cc.

References LogTrace.

149 { LogTrace("PFAnalyzer") << "[PFAnalyzer] Saving the histos"; }
#define LogTrace(id)

Member Function Documentation

◆ analyze()

void PFAnalyzer::analyze ( const edm::Event iEvent,
const edm::EventSetup iSetup 
)
overridevirtual

Get the analysis.

Reimplemented from DQMEDAnalyzer.

Definition at line 528 of file PFAnalyzer.cc.

References plotT0FromHistos::binNumber(), MillePedeFileConverter_cfg::e, HcalObjRepresent::Fill(), CustomPhysics_cfi::gamma, genParticles2HepMC_cfi::genEventInfo, getBinNumber(), getJetBin(), getPFBin(), h, highPtJetExpr_, mps_fire::i, iEvent, edm::HandleBase::isValid(), dqmiolumiharvest::j, isotrackApplyRegressor::k, edm::InputTag::label(), LogDebug, m_allJetSuffixes, m_allSuffixes, m_directory, m_eventFuncMap, m_eventObservableNames, m_fullCutList, m_fullJetCutList, m_funcMap, m_jetWideFuncMap, m_npvBins, m_observableNames, m_observables, m_pfInJetFuncMap, m_pfInJetObservableNames, map_of_MEs, amptDefaultParameters_cff::mu, passesEventSelection(), pfJets_cff::pfJets, pfJetsToken_, edm::Handle< T >::product(), findQualityFiles::size, AlCaHLTBitMon_QueryRunRegistry::string, thePfCandidateCollection_, tok_ew_, L1TEGammaOffline_cfi::triggerNames, triggerResults, triggerResultsToken_, findQualityFiles::v, bphysicsOniaDQM_cfi::vertex, vertexToken_, weights_, weightsToken_, and X.

528  {
530  double eventWeight = 1;
531  if (genEventInfo.isValid()) {
532  eventWeight = genEventInfo->weight();
533  }
534 
535  weights_ = &iEvent.get(weightsToken_);
536 
537  // **** Get the TriggerResults container
540 
541  // Hack to make it pass the lowest unprescaled HLT?
542  Int_t JetHiPass = 0;
543 
544  if (triggerResults.isValid()) {
545  const edm::TriggerNames& triggerNames = iEvent.triggerNames(*triggerResults);
546 
547  const unsigned int nTrig(triggerNames.size());
548  for (unsigned int i = 0; i < nTrig; ++i) {
549  if (triggerNames.triggerName(i).find(highPtJetExpr_.label()) != std::string::npos && triggerResults->accept(i)) {
550  JetHiPass = 1;
551  }
552  }
553  }
554 
555  //Vertex information
557  iEvent.getByToken(vertexToken_, vertexHandle);
558 
559  if (!vertexHandle.isValid()) {
560  LogDebug("") << "PFAnalyzer: Could not find vertex collection" << std::endl;
561  }
562  int numPV = 0;
563 
564  if (vertexHandle.isValid()) {
565  reco::VertexCollection vertex = *(vertexHandle.product());
566  for (reco::VertexCollection::const_iterator v = vertex.begin(); v != vertex.end(); ++v) {
567  if (v->isFake())
568  continue;
569  if (v->ndof() < 4)
570  continue;
571  if (fabs(v->z()) > 24.0)
572  continue;
573  ++numPV;
574  }
575  }
576 
577  int npvBin = getBinNumber(numPV, m_npvBins);
578  if (npvBin < 0)
579  return;
580  std::string npvString = Form("npv_%.0f_%.0f", m_npvBins[npvBin], m_npvBins[npvBin + 1]);
581 
582  if (!JetHiPass)
583  return;
584 
585  // Retrieve the PFCs
587  iEvent.getByToken(thePfCandidateCollection_, pfCollection);
588  if (!pfCollection.isValid()) {
589  edm::LogError("PFAnalyzer") << "invalid collection: PF candidate \n";
590  return;
591  }
592 
594  iEvent.getByToken(pfJetsToken_, pfJets);
595  if (!pfJets.isValid()) {
596  edm::LogError("PFAnalyzer") << "invalid collection: PF jets \n";
597  return;
598  }
599 
600  // Probably we want to define a few different options for how the selection will work
601  // Currently it is just a dummy function, and we hardcode the other cuts.
602  if (pfJets->size() < 2)
603  return;
604  if (pfJets->at(0).pt() < 450)
605  return;
606  if (pfJets->at(0).pt() / pfJets->at(1).pt() > 2)
607  return;
608 
610  return;
611 
612  for (reco::PFCandidateCollection::const_iterator recoPF = pfCollection->begin(); recoPF != pfCollection->end();
613  ++recoPF) {
614  for (unsigned int j = 0; j < m_fullCutList.size(); j++) {
615  int binNumber = getPFBin(*recoPF, j);
616  if (binNumber < 0)
617  continue;
618  if (binNumber >= int(m_allSuffixes[j].size())) {
619  continue;
620  }
621  std::string binString = m_allSuffixes[j][binNumber];
622 
623  // Eventually, we might want the hist name to include the cuts that we are applying,
624  // so I am keepking it as a separate string for now, even though it is redundant.
625  // Make plots of all observables
626  for (unsigned int i = 0; i < m_observables.size(); i++) {
627  std::string histName = Form("%s%s_%s", m_observableNames[i].c_str(), binString.c_str(), npvString.c_str());
628  map_of_MEs[m_directory + "/allPFC_" + histName]->Fill(m_funcMap[m_observableNames[i]](*recoPF), eventWeight);
629 
630  switch (recoPF->particleId()) {
632  map_of_MEs[m_directory + "/chargedHadPFC_" + histName]->Fill(m_funcMap[m_observableNames[i]](*recoPF),
633  eventWeight);
634  break;
635  case reco::PFCandidate::ParticleType::h0:
636  map_of_MEs[m_directory + "/neutralHadPFC_" + histName]->Fill(m_funcMap[m_observableNames[i]](*recoPF),
637  eventWeight);
638  break;
640  map_of_MEs[m_directory + "/electronPFC_" + histName]->Fill(m_funcMap[m_observableNames[i]](*recoPF),
641  eventWeight);
642  break;
644  map_of_MEs[m_directory + "/muonPFC_" + histName]->Fill(m_funcMap[m_observableNames[i]](*recoPF),
645  eventWeight);
646  break;
648  map_of_MEs[m_directory + "/gammaPFC_" + histName]->Fill(m_funcMap[m_observableNames[i]](*recoPF),
649  eventWeight);
650  break;
651  case reco::PFCandidate::ParticleType::h_HF:
652  map_of_MEs[m_directory + "/hadHFPFC_" + histName]->Fill(m_funcMap[m_observableNames[i]](*recoPF),
653  eventWeight);
654  break;
655  case reco::PFCandidate::ParticleType::egamma_HF:
656  map_of_MEs[m_directory + "/emHFPFC_" + histName]->Fill(m_funcMap[m_observableNames[i]](*recoPF),
657  eventWeight);
658  break;
659  default:
660  break;
661  }
662  }
663  }
664  }
665 
666  for (unsigned int i = 0; i < m_eventObservableNames.size(); i++) {
667  std::string histName = Form("%s_%s", m_eventObservableNames[i].c_str(), npvString.c_str());
668  map_of_MEs[m_directory + "/allPFC_" + histName]->Fill(
670  map_of_MEs[m_directory + "/chargedHadPFC_" + histName]->Fill(
672  map_of_MEs[m_directory + "/neutralHadPFC_" + histName]->Fill(
673  m_eventFuncMap[m_eventObservableNames[i]](*pfCollection, reco::PFCandidate::ParticleType::h0), eventWeight);
674  map_of_MEs[m_directory + "/electronPFC_" + histName]->Fill(
676  map_of_MEs[m_directory + "/muonPFC_" + histName]->Fill(
678  map_of_MEs[m_directory + "/gammaPFC_" + histName]->Fill(
680  map_of_MEs[m_directory + "/hadHFPFC_" + histName]->Fill(
681  m_eventFuncMap[m_eventObservableNames[i]](*pfCollection, reco::PFCandidate::ParticleType::h_HF), eventWeight);
682  map_of_MEs[m_directory + "/emHFPFC_" + histName]->Fill(
683  m_eventFuncMap[m_eventObservableNames[i]](*pfCollection, reco::PFCandidate::ParticleType::egamma_HF),
684  eventWeight);
685  }
686 
687  // Plots for generic debugging
688  map_of_MEs[m_directory + "/NPV"]->Fill(numPV, eventWeight);
689  map_of_MEs[m_directory + Form("/jetPtLead_%s", npvString.c_str())]->Fill(pfJets->begin()->pt(), eventWeight);
690  map_of_MEs[m_directory + Form("/jetEtaLead_%s", npvString.c_str())]->Fill(pfJets->begin()->eta(), eventWeight);
691 
692  // Make plots of all observables, this time for PF candidates within jets
693  for (reco::PFJetCollection::const_iterator cjet = pfJets->begin(); cjet != pfJets->end(); ++cjet) {
694  map_of_MEs[m_directory + Form("/jetPt_%s", npvString.c_str())]->Fill(cjet->pt(), eventWeight);
695  map_of_MEs[m_directory + Form("/jetEta_%s", npvString.c_str())]->Fill(cjet->eta(), eventWeight);
696 
697  for (unsigned int k = 0; k < m_fullJetCutList.size(); k++) {
698  int jetBinNumber = getJetBin(*cjet, k);
699  if (jetBinNumber < 0)
700  continue;
701  std::string jetBinString = m_allJetSuffixes[k][jetBinNumber];
702 
703  std::vector<reco::PFCandidatePtr> pfConstits = cjet->getPFConstituents();
704 
705  for (auto recoPF : pfConstits) {
706  for (unsigned int j = 0; j < m_fullCutList.size(); j++) {
707  int binNumber = getPFBin(*recoPF, j);
708  if (binNumber < 0)
709  continue;
710  if (binNumber >= int(m_allSuffixes[j].size())) {
711  continue;
712  }
713  std::string binString = m_allSuffixes[j][binNumber];
714 
715  for (unsigned int i = 0; i < m_observableNames.size(); i++) {
716  std::string histName = Form("%s%s_jetCuts%s_%s",
717  m_observableNames[i].c_str(),
718  binString.c_str(),
719  jetBinString.c_str(),
720  npvString.c_str());
721  map_of_MEs[m_directory + "/allPFC_jetMatched_" + histName]->Fill(m_funcMap[m_observableNames[i]](*recoPF),
722  eventWeight);
723 
724  switch (recoPF->particleId()) {
726  map_of_MEs[m_directory + "/chargedHadPFC_jetMatched_" + histName]->Fill(
727  m_funcMap[m_observableNames[i]](*recoPF), eventWeight);
728  break;
729  case reco::PFCandidate::ParticleType::h0:
730  map_of_MEs[m_directory + "/neutralHadPFC_jetMatched_" + histName]->Fill(
731  m_funcMap[m_observableNames[i]](*recoPF), eventWeight);
732  break;
734  map_of_MEs[m_directory + "/electronPFC_jetMatched_" + histName]->Fill(
735  m_funcMap[m_observableNames[i]](*recoPF), eventWeight);
736  break;
738  map_of_MEs[m_directory + "/muonPFC_jetMatched_" + histName]->Fill(
739  m_funcMap[m_observableNames[i]](*recoPF), eventWeight);
740  break;
742  map_of_MEs[m_directory + "/gammaPFC_jetMatched_" + histName]->Fill(
743  m_funcMap[m_observableNames[i]](*recoPF), eventWeight);
744  break;
745  case reco::PFCandidate::ParticleType::h_HF:
746  map_of_MEs[m_directory + "/hadHFPFC_jetMatched_" + histName]->Fill(
747  m_funcMap[m_observableNames[i]](*recoPF), eventWeight);
748  break;
749  case reco::PFCandidate::ParticleType::egamma_HF:
750  map_of_MEs[m_directory + "/emHFPFC_jetMatched_" + histName]->Fill(
751  m_funcMap[m_observableNames[i]](*recoPF), eventWeight);
752  break;
753  default:
754  break;
755  }
756  }
757 
758  for (unsigned int i = 0; i < m_pfInJetObservableNames.size(); i++) {
759  std::string histName = Form("%s%s_jetCuts%s_%s",
760  m_pfInJetObservableNames[i].c_str(),
761  binString.c_str(),
762  jetBinString.c_str(),
763  npvString.c_str());
764  map_of_MEs[m_directory + "/allPFC_jetMatched_" + histName]->Fill(
765  m_pfInJetFuncMap[m_pfInJetObservableNames[i]](*recoPF, *cjet), eventWeight);
766 
767  switch (recoPF->particleId()) {
769  map_of_MEs[m_directory + "/chargedHadPFC_jetMatched_" + histName]->Fill(
770  m_pfInJetFuncMap[m_pfInJetObservableNames[i]](*recoPF, *cjet), eventWeight);
771  break;
772  case reco::PFCandidate::ParticleType::h0:
773  map_of_MEs[m_directory + "/neutralHadPFC_jetMatched_" + histName]->Fill(
774  m_pfInJetFuncMap[m_pfInJetObservableNames[i]](*recoPF, *cjet), eventWeight);
775  break;
777  map_of_MEs[m_directory + "/electronPFC_jetMatched_" + histName]->Fill(
778  m_pfInJetFuncMap[m_pfInJetObservableNames[i]](*recoPF, *cjet), eventWeight);
779  break;
781  map_of_MEs[m_directory + "/muonPFC_jetMatched_" + histName]->Fill(
782  m_pfInJetFuncMap[m_pfInJetObservableNames[i]](*recoPF, *cjet), eventWeight);
783  break;
785  map_of_MEs[m_directory + "/gammaPFC_jetMatched_" + histName]->Fill(
786  m_pfInJetFuncMap[m_pfInJetObservableNames[i]](*recoPF, *cjet), eventWeight);
787  break;
788  case reco::PFCandidate::ParticleType::h_HF:
789  map_of_MEs[m_directory + "/hadHFPFC_jetMatched_" + histName]->Fill(
790  m_pfInJetFuncMap[m_pfInJetObservableNames[i]](*recoPF, *cjet), eventWeight);
791  break;
792  case reco::PFCandidate::ParticleType::egamma_HF:
793  map_of_MEs[m_directory + "/emHFPFC_jetMatched_" + histName]->Fill(
794  m_pfInJetFuncMap[m_pfInJetObservableNames[i]](*recoPF, *cjet), eventWeight);
795  break;
796  default:
797  break;
798  }
799  }
800  }
801 
802  for (unsigned int i = 0; i < m_eventObservableNames.size(); i++) {
803  std::string histName =
804  Form("%s_jetCuts%s_%s", m_eventObservableNames[i].c_str(), jetBinString.c_str(), npvString.c_str());
805  map_of_MEs[m_directory + "/allPFC_jetMatched_" + histName]->Fill(
807  map_of_MEs[m_directory + "/chargedHadPFC_jetMatched_" + histName]->Fill(
809  map_of_MEs[m_directory + "/neutralHadPFC_jetMatched_" + histName]->Fill(
810  m_jetWideFuncMap[m_eventObservableNames[i]](pfConstits, reco::PFCandidate::ParticleType::h0),
811  eventWeight);
812  map_of_MEs[m_directory + "/electronPFC_jetMatched_" + histName]->Fill(
814  map_of_MEs[m_directory + "/muonPFC_jetMatched_" + histName]->Fill(
816  eventWeight);
817  map_of_MEs[m_directory + "/gammaPFC_jetMatched_" + histName]->Fill(
819  eventWeight);
820  map_of_MEs[m_directory + "/hadHFPFC_jetMatched_" + histName]->Fill(
821  m_jetWideFuncMap[m_eventObservableNames[i]](pfConstits, reco::PFCandidate::ParticleType::h_HF),
822  eventWeight);
823  map_of_MEs[m_directory + "/emHFPFC_jetMatched_" + histName]->Fill(
824  m_jetWideFuncMap[m_eventObservableNames[i]](pfConstits, reco::PFCandidate::ParticleType::egamma_HF),
825  eventWeight);
826  }
827  }
828  }
829  }
830 }
size
Write out results.
edm::EDGetTokenT< edm::ValueMap< float > > weightsToken_
Definition: PFAnalyzer.h:276
int getBinNumber(double binVal, std::vector< double > bins)
Definition: PFAnalyzer.cc:477
edm::EDGetTokenT< edm::TriggerResults > triggerResultsToken_
Definition: PFAnalyzer.h:284
T const * product() const
Definition: Handle.h:70
edm::InputTag highPtJetExpr_
Definition: PFAnalyzer.h:283
#define X(str)
Definition: MuonsGrabber.cc:38
std::vector< Vertex > VertexCollection
collection of Vertex objects
Definition: VertexFwd.h:9
std::string const & label() const
Definition: InputTag.h:36
Log< level::Error, false > LogError
std::vector< std::vector< std::string > > m_allJetSuffixes
Definition: PFAnalyzer.h:287
std::vector< std::vector< std::string > > m_fullCutList
Definition: PFAnalyzer.h:320
int getPFBin(const reco::PFCandidate pfCand, int i)
Definition: PFAnalyzer.cc:509
vstring m_eventObservableNames
Definition: PFAnalyzer.h:311
vDouble m_npvBins
Definition: PFAnalyzer.h:332
int iEvent
Definition: GenABIO.cc:224
std::map< std::string, MonitorElement * > map_of_MEs
Definition: PFAnalyzer.h:293
def binNumber(station, sl)
int getJetBin(const reco::PFJet jetCand, int i)
Definition: PFAnalyzer.cc:518
void Fill(HcalDetId &id, double val, std::vector< TH2F > &depth)
std::map< std::string, std::function< double(const reco::PFCandidate, const reco::PFJet)> > m_pfInJetFuncMap
Definition: PFAnalyzer.h:79
std::map< std::string, std::function< double(const std::vector< reco::PFCandidatePtr > pfCands, reco::PFCandidate::ParticleType pfType)> > m_jetWideFuncMap
Definition: PFAnalyzer.h:78
static std::string const triggerResults
Definition: EdmProvDump.cc:47
edm::EDGetTokenT< reco::PFJetCollection > pfJetsToken_
Definition: PFAnalyzer.h:273
std::vector< std::vector< std::string > > m_fullJetCutList
Definition: PFAnalyzer.h:329
std::string m_directory
Definition: PFAnalyzer.h:290
std::map< std::string, std::function< double(const reco::PFCandidateCollection, reco::PFCandidate::ParticleType pfType)> > m_eventFuncMap
Definition: PFAnalyzer.h:75
bool passesEventSelection(const edm::Event &iEvent)
Definition: PFAnalyzer.cc:365
edm::ValueMap< float > const * weights_
Definition: PFAnalyzer.h:277
bool isValid() const
Definition: HandleBase.h:70
edm::EDGetTokenT< reco::PFCandidateCollection > thePfCandidateCollection_
Definition: PFAnalyzer.h:271
edm::EDGetTokenT< GenEventInfoProduct > tok_ew_
Definition: PFAnalyzer.h:279
std::vector< std::vector< std::string > > m_allSuffixes
Definition: PFAnalyzer.h:286
edm::EDGetTokenT< std::vector< reco::Vertex > > vertexToken_
Definition: PFAnalyzer.h:272
vstring m_observableNames
Definition: PFAnalyzer.h:310
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
Definition: Activities.doc:4
std::map< std::string, std::function< double(const reco::PFCandidate)> > m_funcMap
Definition: PFAnalyzer.h:69
vstring m_pfInJetObservableNames
Definition: PFAnalyzer.h:312
vstring m_observables
Definition: PFAnalyzer.h:306
#define LogDebug(id)

◆ bookHistograms()

void PFAnalyzer::bookHistograms ( DQMStore::IBooker ibooker,
edm::Run const &  iRun,
edm::EventSetup const &   
)
overridevirtual

Inizialize parameters for histo binning.

Implements DQMEDAnalyzer.

Definition at line 152 of file PFAnalyzer.cc.

References PFAnalyzer::binInfo::axisName, spclusmultinvestigator_cfi::binMax, PFAnalyzer::binInfo::binMax, binMin, PFAnalyzer::binInfo::binMin, dqm::implementation::IBooker::book1D(), getAllSuffixes(), getBinInfo(), mps_fire::i, dqmiolumiharvest::j, isotrackApplyRegressor::k, visualization-live-secondInstance_cfg::m, m_allJetSuffixes, m_allSuffixes, m_binList, m_directory, m_eventObservableNames, m_eventObservables, m_fullCutList, m_fullJetCutList, m_jetBinList, m_npvBins, m_observableNames, m_observables, m_pfInJetObservableNames, m_pfInJetObservables, m_pfNames, map_of_MEs, create_idmaps::n, ecalPedestalPCLworker_cfi::nBins, PFAnalyzer::binInfo::nBins, PFAnalyzer::binInfo::observable, AlCaHLTBitMon_ParallelJobs::p, dqm::implementation::NavigatorBase::setCurrentFolder(), and AlCaHLTBitMon_QueryRunRegistry::string.

152  {
153  ibooker.setCurrentFolder(m_directory);
154 
155  for (unsigned int i = 0; i < m_fullCutList.size(); i++) {
157  }
158 
159  for (unsigned int i = 0; i < m_fullJetCutList.size(); i++) {
161  }
162 
163  for (unsigned int npv = 0; npv < m_npvBins.size() - 1; npv++) {
164  std::string npvString = Form("npv_%.0f_%.0f", m_npvBins[npv], m_npvBins[npv + 1]);
165  // TODO: Make it possible to use an arbitrary list of bins instead of evenly space bins?
166  // It is not clear if this is straightforward to do with these classes and CMSSW.
167  // If it is, it should be an easy change to the code.
168  //
169  //
170  // Books a histogram for each histogram in the config file.
171  // The format for the observables should be four comma separated values,
172  // with the first being the observable name (corresponding to one of
173  // the keys in m_funcMap), the second being the number of bins,
174  // and the last two being the min and max value for the histogram respectively.
175  for (unsigned int i = 0; i < m_observables.size(); i++) {
176  std::string cObservable = m_observables[i];
177  PFAnalyzer::binInfo obsInfo = getBinInfo(cObservable);
178 
179  if (npv == 0)
180  m_observableNames.push_back(obsInfo.observable);
181 
182  for (unsigned int j = 0; j < m_allSuffixes.size(); j++) {
183  for (unsigned int n = 0; n < m_allSuffixes[j].size(); n++) {
184  // Loop over all of the different types of PF candidates
185  for (unsigned int m = 0; m < m_pfNames.size(); m++) {
186  // For each observable, we make a couple histograms based on a few generic categorizations.
187  // In all cases, the PFCs that go into these histograms must pass the PFC selection from m_cutList.
188  std::string histName = Form("%s_%s%s_%s",
189  m_pfNames[m].c_str(),
190  obsInfo.observable.c_str(),
191  m_allSuffixes[j][n].c_str(),
192  npvString.c_str());
193  MonitorElement* mHist = ibooker.book1D(
194  histName, Form(";%s;", obsInfo.axisName.c_str()), obsInfo.nBins, obsInfo.binMin, obsInfo.binMax);
195  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(m_directory + "/" + histName, mHist));
196  }
197 
198  for (unsigned int k = 0; k < m_allJetSuffixes.size(); k++) {
199  for (unsigned int p = 0; p < m_allJetSuffixes[k].size(); p++) {
200  for (unsigned int m = 0; m < m_pfNames.size(); m++) {
201  // These histograms are for PFCs passing the basic selection, and which are matched to jets
202  // that pass the jet selection
203  std::string histName = Form("%s_jetMatched_%s%s_jetCuts%s_%s",
204  m_pfNames[m].c_str(),
205  obsInfo.observable.c_str(),
206  m_allSuffixes[j][n].c_str(),
207  m_allJetSuffixes[k][p].c_str(),
208  npvString.c_str());
209  MonitorElement* mHistInJet = ibooker.book1D(
210  histName, Form(";%s;", obsInfo.axisName.c_str()), obsInfo.nBins, obsInfo.binMin, obsInfo.binMax);
211  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(m_directory + "/" + histName, mHistInJet));
212  }
213  }
214  }
215  }
216  }
217  }
218 
219  // Do the same for global observables (things like the number of PFCs in an event, or in a jet, etc)
220  for (unsigned int i = 0; i < m_eventObservables.size(); i++) {
221  std::string cEventObservable = m_eventObservables[i];
222  size_t pos = cEventObservable.find(";");
223  std::string observableName = cEventObservable.substr(0, pos);
224  cEventObservable.erase(0, pos + 1);
225 
226  pos = cEventObservable.find(";");
227  std::string axisString = cEventObservable.substr(0, pos);
228  cEventObservable.erase(0, pos + 1);
229 
230  pos = cEventObservable.find(";");
231  int nBins = atoi(cEventObservable.substr(0, pos).c_str());
232  cEventObservable.erase(0, pos + 1);
233 
234  pos = cEventObservable.find(";");
235  float binMin = atof(cEventObservable.substr(0, pos).c_str());
236  cEventObservable.erase(0, pos + 1);
237 
238  pos = cEventObservable.find(";");
239  float binMax = atof(cEventObservable.substr(0, pos).c_str());
240  cEventObservable.erase(0, pos + 1);
241 
242  pos = cEventObservable.find(";");
243  int nBinsJet = atoi(cEventObservable.substr(0, pos).c_str());
244  cEventObservable.erase(0, pos + 1);
245 
246  pos = cEventObservable.find(";");
247  float binMinJet = atof(cEventObservable.substr(0, pos).c_str());
248  cEventObservable.erase(0, pos + 1);
249 
250  float binMaxJet = atof(cEventObservable.c_str());
251  if (npv == 0)
252  m_eventObservableNames.push_back(observableName);
253 
254  for (unsigned int m = 0; m < m_pfNames.size(); m++) {
255  std::string histName = Form("%s_%s_%s", m_pfNames[m].c_str(), observableName.c_str(), npvString.c_str());
256  MonitorElement* mHist = ibooker.book1D(histName, Form(";%s;", axisString.c_str()), nBins, binMin, binMax);
257  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(m_directory + "/" + histName, mHist));
258  }
259 
260  for (unsigned int k = 0; k < m_allJetSuffixes.size(); k++) {
261  for (unsigned int p = 0; p < m_allJetSuffixes[k].size(); p++) {
262  for (unsigned int m = 0; m < m_pfNames.size(); m++) {
263  // These histograms are for PFCs passing the basic selection, and which are matched to jets
264  // that pass the jet selection
265  std::string histName = Form("%s_jetMatched_%s_jetCuts%s_%s",
266  m_pfNames[m].c_str(),
267  observableName.c_str(),
268  m_allJetSuffixes[k][p].c_str(),
269  npvString.c_str());
270  MonitorElement* mHistInJet =
271  ibooker.book1D(histName, Form(";%s;", axisString.c_str()), nBinsJet, binMinJet, binMaxJet);
272  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(m_directory + "/" + histName, mHistInJet));
273  }
274  }
275  }
276  }
277 
278  for (unsigned int i = 0; i < m_pfInJetObservables.size(); i++) {
279  std::string cPfInJetObservable = m_pfInJetObservables[i];
280  PFAnalyzer::binInfo pfInJetInfo = getBinInfo(cPfInJetObservable);
281  if (npv == 0)
282  m_pfInJetObservableNames.push_back(pfInJetInfo.observable);
283 
284  for (unsigned int j = 0; j < m_allSuffixes.size(); j++) {
285  for (unsigned int n = 0; n < m_allSuffixes[j].size(); n++) {
286  for (unsigned int k = 0; k < m_allJetSuffixes.size(); k++) {
287  for (unsigned int p = 0; p < m_allJetSuffixes[k].size(); p++) {
288  for (unsigned int m = 0; m < m_pfNames.size(); m++) {
289  // These histograms are for PFCs passing the basic selection, and which are matched to jets
290  // that pass the jet selection
291  std::string histName = Form("%s_jetMatched_%s%s_jetCuts%s_%s",
292  m_pfNames[m].c_str(),
293  pfInJetInfo.observable.c_str(),
294  m_allSuffixes[j][n].c_str(),
295  m_allJetSuffixes[k][p].c_str(),
296  npvString.c_str());
297  MonitorElement* mHistInJet = ibooker.book1D(histName,
298  Form(";%s;", pfInJetInfo.axisName.c_str()),
299  pfInJetInfo.nBins,
300  pfInJetInfo.binMin,
301  pfInJetInfo.binMax);
302  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(m_directory + "/" + histName, mHistInJet));
303  }
304  }
305  }
306  }
307  }
308  }
309 
310  // Extra histograms for basic validation of the selection etc.
311  std::string histName = Form("jetPt_%s", npvString.c_str());
312  MonitorElement* mHist = ibooker.book1D(histName, Form(";%s;", "p_{T,jet}"), 2000, 0, 2000);
313  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(m_directory + "/" + histName, mHist));
314 
315  histName = Form("jetPtLead_%s", npvString.c_str());
316  mHist = ibooker.book1D(histName, Form(";%s;", "p_{T, leading jet}"), 2000, 0, 2000);
317  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(m_directory + "/" + histName, mHist));
318 
319  histName = Form("jetEta_%s", npvString.c_str());
320  mHist = ibooker.book1D(histName, Form(";%s;", "#eta_{jet}"), 200, -5, 5);
321  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(m_directory + "/" + histName, mHist));
322 
323  histName = Form("jetEtaLead_%s", npvString.c_str());
324  mHist = ibooker.book1D(histName, Form(";%s;", "#eta_{leading jet}"), 200, -5, 5);
325  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(m_directory + "/" + histName, mHist));
326  }
327 
328  std::string histName = Form("NPV");
329  MonitorElement* mHist = ibooker.book1D(histName, Form(";%s;", "N_PV"), 100, 0, 100);
330  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(m_directory + "/" + histName, mHist));
331 }
std::vector< std::vector< std::vector< double > > > m_jetBinList
Definition: PFAnalyzer.h:330
std::vector< std::vector< std::vector< double > > > m_binList
Definition: PFAnalyzer.h:321
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:36
binInfo getBinInfo(std::string)
Definition: PFAnalyzer.cc:333
std::vector< std::vector< std::string > > m_allJetSuffixes
Definition: PFAnalyzer.h:287
std::vector< std::vector< std::string > > m_fullCutList
Definition: PFAnalyzer.h:320
vstring m_eventObservableNames
Definition: PFAnalyzer.h:311
std::vector< std::string > m_pfNames
Definition: PFAnalyzer.h:338
vDouble m_npvBins
Definition: PFAnalyzer.h:332
std::map< std::string, MonitorElement * > map_of_MEs
Definition: PFAnalyzer.h:293
vstring m_eventObservables
Definition: PFAnalyzer.h:307
vstring m_pfInJetObservables
Definition: PFAnalyzer.h:308
std::vector< std::string > getAllSuffixes(std::vector< std::string > observables, std::vector< std::vector< double >> binnings)
Definition: PFAnalyzer.cc:423
std::vector< std::vector< std::string > > m_fullJetCutList
Definition: PFAnalyzer.h:329
std::string m_directory
Definition: PFAnalyzer.h:290
std::string observable
Definition: PFAnalyzer.h:342
const float binMin[32]
std::vector< std::vector< std::string > > m_allSuffixes
Definition: PFAnalyzer.h:286
std::string axisName
Definition: PFAnalyzer.h:343
vstring m_observableNames
Definition: PFAnalyzer.h:310
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
Definition: DQMStore.h:98
vstring m_pfInJetObservableNames
Definition: PFAnalyzer.h:312
vstring m_observables
Definition: PFAnalyzer.h:306

◆ bookMESetSelection()

void PFAnalyzer::bookMESetSelection ( std::string  DirName,
DQMStore::IBooker ibooker 
)
private

◆ dqmBeginRun()

void PFAnalyzer::dqmBeginRun ( const edm::Run iRun,
const edm::EventSetup iSetup 
)
overridevirtual

Initialize run-based parameters.

Reimplemented from DQMEDAnalyzer.

Definition at line 363 of file PFAnalyzer.cc.

363 {}

◆ getAbsEta()

static double PFAnalyzer::getAbsEta ( const reco::PFCandidate  pfCand)
inlinestaticprivate

Definition at line 137 of file PFAnalyzer.h.

References funct::abs(), and reco::LeafCandidate::eta().

137 { return std::abs(pfCand.eta()); }
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
double eta() const final
momentum pseudorapidity

◆ getAllSuffixes()

std::vector< std::string > PFAnalyzer::getAllSuffixes ( std::vector< std::string >  observables,
std::vector< std::vector< double >>  binnings 
)
private

Definition at line 423 of file PFAnalyzer.cc.

References getSuffix(), mps_fire::i, dqmiolumiharvest::j, isotrackApplyRegressor::k, visualization-live-secondInstance_cfg::m, ecalPedestalPCLworker_cfi::nBins, runBasic_cfi::observables, and findQualityFiles::size.

Referenced by bookHistograms().

424  {
425  int nTotalBins = 1;
426  std::vector<int> nBins;
427  for (unsigned int i = 0; i < binnings.size(); i++) {
428  nTotalBins = (binnings[i].size() - 1) * nTotalBins;
429  nBins.push_back(binnings[i].size() - 1);
430  }
431 
432  std::vector<std::vector<int>> binList;
433 
434  for (int i = 0; i < nTotalBins; i++) {
435  binList.push_back(std::vector<int>());
436  }
437 
438  int factor = nTotalBins;
439  int otherFactor = 1;
440  for (unsigned int i = 0; i < binnings.size(); i++) {
441  factor = factor / nBins[i];
442 
443  for (int j = 0; j < nBins[i]; j++) {
444  for (int k = 0; k < factor; k++) {
445  for (int m = 0; m < otherFactor; m++) {
446  binList[m * otherFactor + j * factor + k].push_back(j);
447  }
448  }
449  }
450  otherFactor = otherFactor * nBins[i];
451  }
452 
453  std::vector<std::string> allSuffixes;
454  for (int i = 0; i < nTotalBins; i++) {
455  allSuffixes.push_back(getSuffix(binList[i], observables, binnings));
456  }
457 
458  return allSuffixes;
459 }
size
Write out results.
std::string getSuffix(std::vector< int > binList, std::vector< std::string > observables, std::vector< std::vector< double >> binnings)
Definition: PFAnalyzer.cc:462

◆ getBinInfo()

PFAnalyzer::binInfo PFAnalyzer::getBinInfo ( std::string  observableString)
private

Definition at line 333 of file PFAnalyzer.cc.

References PFAnalyzer::binInfo::axisName, PFAnalyzer::binInfo::binMax, PFAnalyzer::binInfo::binMin, getBinList(), PFAnalyzer::binInfo::nBins, and PFAnalyzer::binInfo::observable.

Referenced by bookHistograms().

333  {
334  PFAnalyzer::binInfo binningDetails;
335 
336  size_t pos = observableString.find(";");
337  binningDetails.observable = observableString.substr(0, pos);
338  observableString.erase(0, pos + 1);
339 
340  std::vector<double> binList = getBinList(observableString);
341  pos = observableString.find(";");
342  binningDetails.axisName = observableString.substr(0, pos);
343  observableString.erase(0, pos + 1);
344 
345  pos = observableString.find(";");
346  binningDetails.nBins = atoi(observableString.substr(0, pos).c_str());
347  observableString.erase(0, pos + 1);
348 
349  pos = observableString.find(";");
350  binningDetails.binMin = atof(observableString.substr(0, pos).c_str());
351  observableString.erase(0, pos + 1);
352 
353  binningDetails.binMax = atof(observableString.c_str());
354 
355  return binningDetails;
356 }
std::string observable
Definition: PFAnalyzer.h:342
std::vector< double > getBinList(std::string binString)
Definition: PFAnalyzer.cc:399
std::string axisName
Definition: PFAnalyzer.h:343

◆ getBinList()

std::vector< double > PFAnalyzer::getBinList ( std::string  binString)
private

Definition at line 399 of file PFAnalyzer.cc.

References mps_fire::i, createfilelist::int, and ecalPedestalPCLworker_cfi::nBins.

Referenced by getBinInfo(), and PFAnalyzer().

399  {
400  std::vector<double> binList;
401 
402  while (binString.find(";") != std::string::npos) {
403  size_t pos = binString.find(";");
404  binList.push_back(atof(binString.substr(0, pos).c_str()));
405  binString.erase(0, pos + 1);
406  }
407  binList.push_back(atof(binString.c_str()));
408 
409  if (binList.size() == 3) {
410  int nBins = int(binList[0]);
411  double minVal = binList[1];
412  double maxVal = binList[2];
413  binList.clear();
414 
415  for (int i = 0; i <= nBins; i++) {
416  binList.push_back(minVal + i * (maxVal - minVal) / nBins);
417  }
418  }
419 
420  return binList;
421 }

◆ getBinNumber()

int PFAnalyzer::getBinNumber ( double  binVal,
std::vector< double >  bins 
)
private

Definition at line 477 of file PFAnalyzer.cc.

References isotrackApplyRegressor::bins, and mps_fire::i.

Referenced by analyze(), and getBinNumbers().

477  {
478  if (binVal < bins[0])
479  return -1;
480  for (unsigned int i = 0; i < bins.size(); i++) {
481  if (binVal < bins[i])
482  return i - 1;
483  }
484 
485  return -1;
486 }

◆ getBinNumbers()

int PFAnalyzer::getBinNumbers ( std::vector< double >  binVal,
std::vector< std::vector< double >>  bins 
)
private

Definition at line 488 of file PFAnalyzer.cc.

References newFWLiteAna::bin, isotrackApplyRegressor::bins, getBinNumber(), mps_fire::i, ecalPedestalPCLworker_cfi::nBins, and findQualityFiles::size.

Referenced by getJetBin(), and getPFBin().

488  {
489  std::vector<int> cbins;
490  std::vector<int> nBins;
491  for (unsigned int i = 0; i < binVal.size(); i++) {
492  int cbin = getBinNumber(binVal[i], bins[i]);
493  if (cbin < 0)
494  return -1;
495  nBins.push_back(bins[i].size() - 1);
496  cbins.push_back(cbin);
497  }
498 
499  int bin = 0;
500  int factor = 1;
501  for (unsigned int i = 0; i < binVal.size(); i++) {
502  bin += cbins[i] * factor;
503  factor = factor * nBins[i];
504  }
505 
506  return bin;
507 }
size
Write out results.
int getBinNumber(double binVal, std::vector< double > bins)
Definition: PFAnalyzer.cc:477

◆ getDNNEBkgNonIsolated()

static double PFAnalyzer::getDNNEBkgNonIsolated ( const reco::PFCandidate  pfCand)
inlinestaticprivate

Definition at line 173 of file PFAnalyzer.h.

References reco::PFCandidate::dnn_e_bkgNonIsolated().

Referenced by PFAnalyzer().

173 { return pfCand.dnn_e_bkgNonIsolated(); }
float dnn_e_bkgNonIsolated() const
Definition: PFCandidate.h:356

◆ getDNNEBkgPhotonIsolated()

static double PFAnalyzer::getDNNEBkgPhotonIsolated ( const reco::PFCandidate  pfCand)
inlinestaticprivate

Definition at line 175 of file PFAnalyzer.h.

References reco::PFCandidate::dnn_e_bkgPhoton().

Referenced by PFAnalyzer().

175 { return pfCand.dnn_e_bkgPhoton(); }
float dnn_e_bkgPhoton() const
Definition: PFCandidate.h:364

◆ getDNNEBkgTauIsolated()

static double PFAnalyzer::getDNNEBkgTauIsolated ( const reco::PFCandidate  pfCand)
inlinestaticprivate

Definition at line 174 of file PFAnalyzer.h.

References reco::PFCandidate::dnn_e_bkgTau().

Referenced by PFAnalyzer().

174 { return pfCand.dnn_e_bkgTau(); }
float dnn_e_bkgTau() const
Definition: PFCandidate.h:360

◆ getDNNESigIsolated()

static double PFAnalyzer::getDNNESigIsolated ( const reco::PFCandidate  pfCand)
inlinestaticprivate

Definition at line 171 of file PFAnalyzer.h.

References reco::PFCandidate::dnn_e_sigIsolated().

Referenced by PFAnalyzer().

171 { return pfCand.dnn_e_sigIsolated(); }
float dnn_e_sigIsolated() const
Definition: PFCandidate.h:348

◆ getDNNESigNonIsolated()

static double PFAnalyzer::getDNNESigNonIsolated ( const reco::PFCandidate  pfCand)
inlinestaticprivate

Definition at line 172 of file PFAnalyzer.h.

References reco::PFCandidate::dnn_e_sigNonIsolated().

Referenced by PFAnalyzer().

172 { return pfCand.dnn_e_sigNonIsolated(); }
float dnn_e_sigNonIsolated() const
Definition: PFCandidate.h:352

◆ getECalEFrac()

static double PFAnalyzer::getECalEFrac ( const reco::PFCandidate  pfCand)
inlinestaticprivate

Definition at line 177 of file PFAnalyzer.h.

References reco::PFCandidate::ecalEnergy(), and reco::LeafCandidate::energy().

177 { return pfCand.ecalEnergy() / pfCand.energy(); }
double ecalEnergy() const
return corrected Ecal energy
Definition: PFCandidate.h:221
double energy() const final
energy

◆ getEcalEnergy()

static double PFAnalyzer::getEcalEnergy ( const reco::PFCandidate  pfCand)
inlinestaticprivate

Definition at line 156 of file PFAnalyzer.h.

References reco::PFCandidate::ecalEnergy().

Referenced by PFAnalyzer().

156 { return pfCand.ecalEnergy(); }
double ecalEnergy() const
return corrected Ecal energy
Definition: PFCandidate.h:221

◆ getECalEnergy()

static double PFAnalyzer::getECalEnergy ( const reco::PFCandidate  pfCand)
inlinestaticprivate

Definition at line 228 of file PFAnalyzer.h.

References MillePedeFileConverter_cfg::e, reco::PFBlockElement::ECAL, bookConverter::elements, reco::PFCandidate::elementsInBlocks(), HBHEDarkening_cff::energy, reco::PFCluster::energy(), and isoTrack_cff::maxElement.

228  {
229  double energy = 0;
230  int maxElement = pfCand.elementsInBlocks().size();
231  for (int e = 0; e < maxElement; ++e) {
232  // Get elements from block
233  reco::PFBlockRef blockRef = pfCand.elementsInBlocks()[e].first;
234  const edm::OwnVector<reco::PFBlockElement>& elements = blockRef->elements();
235  for (unsigned iEle = 0; iEle < elements.size(); iEle++) {
236  if (elements[iEle].index() == pfCand.elementsInBlocks()[e].second) {
237  if (elements[iEle].type() == reco::PFBlockElement::ECAL) { // Element is HB or HE
238  // Get cluster and hits
239  reco::PFClusterRef clusterref = elements[iEle].clusterRef();
240  // When we don't have isolated tracks, this will be a bit useless, since the energy is shared across multiple tracks
241  reco::PFCluster cluster = *clusterref;
242  energy += cluster.energy();
243  }
244  }
245  }
246  }
247  return energy;
248  }
Particle flow cluster, see clustering algorithm in PFClusterAlgo.
Definition: PFCluster.h:42
const ElementsInBlocks & elementsInBlocks() const
Definition: PFCandidate.cc:665
double energy() const
cluster energy
Definition: PFCluster.h:74

◆ getEnergy()

static double PFAnalyzer::getEnergy ( const reco::PFCandidate  pfCand)
inlinestaticprivate

Definition at line 135 of file PFAnalyzer.h.

References reco::LeafCandidate::energy().

Referenced by PFAnalyzer().

135 { return pfCand.energy(); }
double energy() const final
energy

◆ getEnergySpectrum()

static double PFAnalyzer::getEnergySpectrum ( const reco::PFCandidate  pfCand,
const reco::PFJet  jet 
)
inlinestaticprivate

Definition at line 104 of file PFAnalyzer.h.

References metsig::jet, and reco::LeafCandidate::pt().

Referenced by PFAnalyzer().

104  {
105  if (!jet.pt())
106  return -1;
107  return pfCand.pt() / jet.pt();
108  }
double pt() const final
transverse momentum

◆ getEoverP()

static double PFAnalyzer::getEoverP ( const reco::PFCandidate  pfCand)
inlinestaticprivate

Definition at line 185 of file PFAnalyzer.h.

References MillePedeFileConverter_cfg::e, reco::PFBlockElement::ECAL, bookConverter::elements, reco::PFCandidate::elementsInBlocks(), HBHEDarkening_cff::energy, reco::PFCluster::energy(), reco::PFBlockElement::HCAL, isoTrack_cff::maxElement, and reco::LeafCandidate::p().

Referenced by PFAnalyzer().

185  {
186  double energy = 0;
187  int maxElement = pfCand.elementsInBlocks().size();
188  for (int e = 0; e < maxElement; ++e) {
189  // Get elements from block
190  reco::PFBlockRef blockRef = pfCand.elementsInBlocks()[e].first;
191  const edm::OwnVector<reco::PFBlockElement>& elements = blockRef->elements();
192  for (unsigned iEle = 0; iEle < elements.size(); iEle++) {
193  if (elements[iEle].index() == pfCand.elementsInBlocks()[e].second) {
194  if (elements[iEle].type() == reco::PFBlockElement::HCAL ||
195  elements[iEle].type() == reco::PFBlockElement::ECAL) { // Element is HB or HE
196  reco::PFClusterRef clusterref = elements[iEle].clusterRef();
197  reco::PFCluster cluster = *clusterref;
198  energy += cluster.energy();
199  }
200  }
201  }
202  }
203  return energy / pfCand.p();
204  }
Particle flow cluster, see clustering algorithm in PFClusterAlgo.
Definition: PFCluster.h:42
double p() const final
magnitude of momentum vector
const ElementsInBlocks & elementsInBlocks() const
Definition: PFCandidate.cc:665
double energy() const
cluster energy
Definition: PFCluster.h:74

◆ getEta()

static double PFAnalyzer::getEta ( const reco::PFCandidate  pfCand)
inlinestaticprivate

Definition at line 136 of file PFAnalyzer.h.

References reco::LeafCandidate::eta().

Referenced by PFAnalyzer().

136 { return pfCand.eta(); }
double eta() const final
momentum pseudorapidity

◆ getHadCalibration()

static double PFAnalyzer::getHadCalibration ( const reco::PFCandidate  pfCand)
inlinestaticprivate

Definition at line 140 of file PFAnalyzer.h.

References reco::PFCandidate::hcalEnergy(), and reco::PFCandidate::rawHcalEnergy().

Referenced by PFAnalyzer().

140  {
141  if (pfCand.rawHcalEnergy() == 0)
142  return -1;
143  return pfCand.hcalEnergy() / pfCand.rawHcalEnergy();
144  }
double rawHcalEnergy() const
return raw Hcal energy
Definition: PFCandidate.h:236
double hcalEnergy() const
return corrected Hcal energy
Definition: PFCandidate.h:233

◆ getHCalEFrac()

static double PFAnalyzer::getHCalEFrac ( const reco::PFCandidate  pfCand)
inlinestaticprivate

Definition at line 178 of file PFAnalyzer.h.

References reco::LeafCandidate::energy(), and reco::PFCandidate::hcalEnergy().

178 { return pfCand.hcalEnergy() / pfCand.energy(); }
double hcalEnergy() const
return corrected Hcal energy
Definition: PFCandidate.h:233
double energy() const final
energy

◆ getHcalEnergy()

static double PFAnalyzer::getHcalEnergy ( const reco::PFCandidate  pfCand)
inlinestaticprivate

Definition at line 158 of file PFAnalyzer.h.

References reco::PFCandidate::hcalEnergy().

Referenced by PFAnalyzer().

158 { return pfCand.hcalEnergy(); }
double hcalEnergy() const
return corrected Hcal energy
Definition: PFCandidate.h:233

◆ getHCalEnergy()

static double PFAnalyzer::getHCalEnergy ( const reco::PFCandidate  pfCand)
inlinestaticprivate

Definition at line 206 of file PFAnalyzer.h.

References MillePedeFileConverter_cfg::e, bookConverter::elements, reco::PFCandidate::elementsInBlocks(), HBHEDarkening_cff::energy, reco::PFCluster::energy(), reco::PFBlockElement::HCAL, and isoTrack_cff::maxElement.

Referenced by PFAnalyzer().

206  {
207  double energy = 0;
208  int maxElement = pfCand.elementsInBlocks().size();
209  for (int e = 0; e < maxElement; ++e) {
210  // Get elements from block
211  reco::PFBlockRef blockRef = pfCand.elementsInBlocks()[e].first;
212  const edm::OwnVector<reco::PFBlockElement>& elements = blockRef->elements();
213  for (unsigned iEle = 0; iEle < elements.size(); iEle++) {
214  if (elements[iEle].index() == pfCand.elementsInBlocks()[e].second) {
215  if (elements[iEle].type() == reco::PFBlockElement::HCAL) { // Element is HB or HE
216  // Get cluster and hits
217  reco::PFClusterRef clusterref = elements[iEle].clusterRef();
218  reco::PFCluster cluster = *clusterref;
219  //std::vector<std::pair<DetId, float>> hitsAndFracs = cluster.hitsAndFractions();
220  energy += cluster.energy();
221  }
222  }
223  }
224  }
225  return energy;
226  }
Particle flow cluster, see clustering algorithm in PFClusterAlgo.
Definition: PFCluster.h:42
const ElementsInBlocks & elementsInBlocks() const
Definition: PFCandidate.cc:665
double energy() const
cluster energy
Definition: PFCluster.h:74

◆ getHcalEnergy_depth1()

static double PFAnalyzer::getHcalEnergy_depth1 ( const reco::PFCandidate  pfCand)
inlinestaticprivate

Definition at line 148 of file PFAnalyzer.h.

References reco::PFCandidate::hcalDepthEnergyFraction().

Referenced by PFAnalyzer().

148 { return pfCand.hcalDepthEnergyFraction(1); }
float hcalDepthEnergyFraction(unsigned int depth) const
fraction of hcal energy at a given depth (depth = 1 .. 7)
Definition: PFCandidate.h:433

◆ getHcalEnergy_depth2()

static double PFAnalyzer::getHcalEnergy_depth2 ( const reco::PFCandidate  pfCand)
inlinestaticprivate

Definition at line 149 of file PFAnalyzer.h.

References reco::PFCandidate::hcalDepthEnergyFraction().

Referenced by PFAnalyzer().

149 { return pfCand.hcalDepthEnergyFraction(2); }
float hcalDepthEnergyFraction(unsigned int depth) const
fraction of hcal energy at a given depth (depth = 1 .. 7)
Definition: PFCandidate.h:433

◆ getHcalEnergy_depth3()

static double PFAnalyzer::getHcalEnergy_depth3 ( const reco::PFCandidate  pfCand)
inlinestaticprivate

Definition at line 150 of file PFAnalyzer.h.

References reco::PFCandidate::hcalDepthEnergyFraction().

Referenced by PFAnalyzer().

150 { return pfCand.hcalDepthEnergyFraction(3); }
float hcalDepthEnergyFraction(unsigned int depth) const
fraction of hcal energy at a given depth (depth = 1 .. 7)
Definition: PFCandidate.h:433

◆ getHcalEnergy_depth4()

static double PFAnalyzer::getHcalEnergy_depth4 ( const reco::PFCandidate  pfCand)
inlinestaticprivate

Definition at line 151 of file PFAnalyzer.h.

References reco::PFCandidate::hcalDepthEnergyFraction().

Referenced by PFAnalyzer().

151 { return pfCand.hcalDepthEnergyFraction(4); }
float hcalDepthEnergyFraction(unsigned int depth) const
fraction of hcal energy at a given depth (depth = 1 .. 7)
Definition: PFCandidate.h:433

◆ getHcalEnergy_depth5()

static double PFAnalyzer::getHcalEnergy_depth5 ( const reco::PFCandidate  pfCand)
inlinestaticprivate

Definition at line 152 of file PFAnalyzer.h.

References reco::PFCandidate::hcalDepthEnergyFraction().

Referenced by PFAnalyzer().

152 { return pfCand.hcalDepthEnergyFraction(5); }
float hcalDepthEnergyFraction(unsigned int depth) const
fraction of hcal energy at a given depth (depth = 1 .. 7)
Definition: PFCandidate.h:433

◆ getHcalEnergy_depth6()

static double PFAnalyzer::getHcalEnergy_depth6 ( const reco::PFCandidate  pfCand)
inlinestaticprivate

Definition at line 153 of file PFAnalyzer.h.

References reco::PFCandidate::hcalDepthEnergyFraction().

Referenced by PFAnalyzer().

153 { return pfCand.hcalDepthEnergyFraction(6); }
float hcalDepthEnergyFraction(unsigned int depth) const
fraction of hcal energy at a given depth (depth = 1 .. 7)
Definition: PFCandidate.h:433

◆ getHcalEnergy_depth7()

static double PFAnalyzer::getHcalEnergy_depth7 ( const reco::PFCandidate  pfCand)
inlinestaticprivate

Definition at line 154 of file PFAnalyzer.h.

References reco::PFCandidate::hcalDepthEnergyFraction().

Referenced by PFAnalyzer().

154 { return pfCand.hcalDepthEnergyFraction(7); }
float hcalDepthEnergyFraction(unsigned int depth) const
fraction of hcal energy at a given depth (depth = 1 .. 7)
Definition: PFCandidate.h:433

◆ getHOEnergy()

static double PFAnalyzer::getHOEnergy ( const reco::PFCandidate  pfCand)
inlinestaticprivate

Definition at line 160 of file PFAnalyzer.h.

References reco::PFCandidate::hoEnergy().

Referenced by PFAnalyzer().

160 { return pfCand.hoEnergy(); }
double hoEnergy() const
return corrected Hcal energy
Definition: PFCandidate.h:245

◆ getJetBin()

int PFAnalyzer::getJetBin ( const reco::PFJet  jetCand,
int  i 
)
private

Definition at line 518 of file PFAnalyzer.cc.

References getBinNumbers(), mps_fire::i, dqmiolumiharvest::j, m_fullJetCutList, m_jetBinList, and m_jetFuncMap.

Referenced by analyze().

518  {
519  std::vector<double> binVals;
520  for (unsigned int j = 0; j < m_fullJetCutList[i].size(); j++) {
521  binVals.push_back(m_jetFuncMap[m_fullJetCutList[i][j]](jetCand));
522  }
523 
524  return getBinNumbers(binVals, m_jetBinList[i]);
525 }
std::vector< std::vector< std::vector< double > > > m_jetBinList
Definition: PFAnalyzer.h:330
std::map< std::string, std::function< double(const reco::PFJet)> > m_jetFuncMap
Definition: PFAnalyzer.h:80
std::vector< std::vector< std::string > > m_fullJetCutList
Definition: PFAnalyzer.h:329
int getBinNumbers(std::vector< double > binVal, std::vector< std::vector< double >> bins)
Definition: PFAnalyzer.cc:488

◆ getJetPt()

static double PFAnalyzer::getJetPt ( const reco::PFJet  jet)
inlinestaticprivate

Definition at line 269 of file PFAnalyzer.h.

References metsig::jet.

Referenced by PFAnalyzer().

269 { return jet.pt(); }

◆ getMVAEMu()

static double PFAnalyzer::getMVAEMu ( const reco::PFCandidate  pfCand)
inlinestaticprivate

Definition at line 165 of file PFAnalyzer.h.

References reco::PFCandidate::mva_e_mu().

Referenced by PFAnalyzer().

165 { return pfCand.mva_e_mu(); }
float mva_e_mu() const
mva for electron-muon discrimination
Definition: PFCandidate.h:323

◆ getMVAEPi()

static double PFAnalyzer::getMVAEPi ( const reco::PFCandidate  pfCand)
inlinestaticprivate

Definition at line 164 of file PFAnalyzer.h.

References reco::PFCandidate::mva_e_pi().

Referenced by PFAnalyzer().

164 { return pfCand.mva_e_pi(); }
float mva_e_pi() const
mva for electron-pion discrimination
Definition: PFCandidate.h:317

◆ getMVAGammaNH()

static double PFAnalyzer::getMVAGammaNH ( const reco::PFCandidate  pfCand)
inlinestaticprivate

Definition at line 169 of file PFAnalyzer.h.

References reco::PFCandidate::mva_gamma_nh().

Referenced by PFAnalyzer().

169 { return pfCand.mva_gamma_nh(); }
float mva_gamma_nh() const
mva for neutral hadron - gamma discrimination
Definition: PFCandidate.h:372

◆ getMVAIsolated()

static double PFAnalyzer::getMVAIsolated ( const reco::PFCandidate  pfCand)
inlinestaticprivate

Definition at line 163 of file PFAnalyzer.h.

References reco::PFCandidate::mva_Isolated().

Referenced by PFAnalyzer().

163 { return pfCand.mva_Isolated(); }
float mva_Isolated() const
Definition: PFCandidate.h:313

◆ getMVANothingGamma()

static double PFAnalyzer::getMVANothingGamma ( const reco::PFCandidate  pfCand)
inlinestaticprivate

Definition at line 167 of file PFAnalyzer.h.

References reco::PFCandidate::mva_nothing_gamma().

Referenced by PFAnalyzer().

167 { return pfCand.mva_nothing_gamma(); }
float mva_nothing_gamma() const
mva for gamma detection
Definition: PFCandidate.h:335

◆ getMVANothingNH()

static double PFAnalyzer::getMVANothingNH ( const reco::PFCandidate  pfCand)
inlinestaticprivate

Definition at line 168 of file PFAnalyzer.h.

References reco::PFCandidate::mva_nothing_nh().

Referenced by PFAnalyzer().

168 { return pfCand.mva_nothing_nh(); }
float mva_nothing_nh() const
mva for neutral hadron detection
Definition: PFCandidate.h:341

◆ getMVAPiMu()

static double PFAnalyzer::getMVAPiMu ( const reco::PFCandidate  pfCand)
inlinestaticprivate

Definition at line 166 of file PFAnalyzer.h.

References reco::PFCandidate::mva_pi_mu().

Referenced by PFAnalyzer().

166 { return pfCand.mva_pi_mu(); }
float mva_pi_mu() const
mva for pi-muon discrimination
Definition: PFCandidate.h:329

◆ getNPFC()

static double PFAnalyzer::getNPFC ( const reco::PFCandidateCollection  pfCands,
reco::PFCandidate::ParticleType  pfType 
)
inlinestaticprivate

Definition at line 110 of file PFAnalyzer.h.

References X.

Referenced by PFAnalyzer().

110  {
111  int nPF = 0;
112  for (auto pfCand : pfCands) {
113  // We use X to indicate all
114  if (pfCand.particleId() == pfType || pfType == reco::PFCandidate::ParticleType::X) {
115  nPF++;
116  }
117  }
118  return nPF;
119  }
#define X(str)
Definition: MuonsGrabber.cc:38

◆ getNPFCinJet()

static double PFAnalyzer::getNPFCinJet ( const std::vector< reco::PFCandidatePtr pfCands,
reco::PFCandidate::ParticleType  pfType 
)
inlinestaticprivate

Definition at line 121 of file PFAnalyzer.h.

References X.

Referenced by PFAnalyzer().

121  {
122  int nPF = 0;
123  for (auto pfCand : pfCands) {
124  if (!pfCand)
125  continue;
126  // We use X to indicate all
127  if (pfCand->particleId() == pfType || pfType == reco::PFCandidate::ParticleType::X)
128  nPF++;
129  }
130  return nPF;
131  }
#define X(str)
Definition: MuonsGrabber.cc:38

◆ getNTracksInBlock()

static double PFAnalyzer::getNTracksInBlock ( const reco::PFCandidate  pfCand)
inlinestaticprivate

Definition at line 250 of file PFAnalyzer.h.

References MillePedeFileConverter_cfg::e, bookConverter::elements, reco::PFCandidate::elementsInBlocks(), isoTrack_cff::maxElement, l1ctLayer1_cff::nTrack, and reco::PFBlockElement::TRACK.

Referenced by PFAnalyzer().

250  {
251  // We need this function to return a double, even though this is an integer value
252  double nTrack = 0;
253  int maxElement = pfCand.elementsInBlocks().size();
254  for (int e = 0; e < maxElement; ++e) {
255  // Get elements from block
256  reco::PFBlockRef blockRef = pfCand.elementsInBlocks()[e].first;
257  const edm::OwnVector<reco::PFBlockElement>& elements = blockRef->elements();
258  for (unsigned iEle = 0; iEle < elements.size(); iEle++) {
259  if (elements[iEle].index() == pfCand.elementsInBlocks()[e].second) {
260  if (elements[iEle].type() == reco::PFBlockElement::TRACK) { // Element is HB or HE
261  nTrack += 1;
262  }
263  }
264  }
265  }
266  return nTrack;
267  }
const ElementsInBlocks & elementsInBlocks() const
Definition: PFCandidate.cc:665

◆ getPFBin()

int PFAnalyzer::getPFBin ( const reco::PFCandidate  pfCand,
int  i 
)
private

Definition at line 509 of file PFAnalyzer.cc.

References getBinNumbers(), mps_fire::i, dqmiolumiharvest::j, m_binList, m_fullCutList, and m_funcMap.

Referenced by analyze().

509  {
510  std::vector<double> binVals;
511  for (unsigned int j = 0; j < m_fullCutList[i].size(); j++) {
512  binVals.push_back(m_funcMap[m_fullCutList[i][j]](pfCand));
513  }
514 
515  return getBinNumbers(binVals, m_binList[i]);
516 }
std::vector< std::vector< std::vector< double > > > m_binList
Definition: PFAnalyzer.h:321
std::vector< std::vector< std::string > > m_fullCutList
Definition: PFAnalyzer.h:320
int getBinNumbers(std::vector< double > binVal, std::vector< std::vector< double >> bins)
Definition: PFAnalyzer.cc:488
std::map< std::string, std::function< double(const reco::PFCandidate)> > m_funcMap
Definition: PFAnalyzer.h:69

◆ getPhi()

static double PFAnalyzer::getPhi ( const reco::PFCandidate  pfCand)
inlinestaticprivate

Definition at line 138 of file PFAnalyzer.h.

References reco::LeafCandidate::phi().

Referenced by PFAnalyzer().

138 { return pfCand.phi(); }
double phi() const final
momentum azimuthal angle

◆ getPt()

static double PFAnalyzer::getPt ( const reco::PFCandidate  pfCand)
inlinestaticprivate

Definition at line 134 of file PFAnalyzer.h.

References reco::LeafCandidate::pt().

Referenced by PFAnalyzer().

134 { return pfCand.pt(); }
double pt() const final
transverse momentum

◆ getRawEcalEnergy()

static double PFAnalyzer::getRawEcalEnergy ( const reco::PFCandidate  pfCand)
inlinestaticprivate

Definition at line 157 of file PFAnalyzer.h.

References reco::PFCandidate::rawEcalEnergy().

Referenced by PFAnalyzer().

157 { return pfCand.rawEcalEnergy(); }
double rawEcalEnergy() const
return corrected Ecal energy
Definition: PFCandidate.h:224

◆ getRawHcalEnergy()

static double PFAnalyzer::getRawHcalEnergy ( const reco::PFCandidate  pfCand)
inlinestaticprivate

Definition at line 159 of file PFAnalyzer.h.

References reco::PFCandidate::rawHcalEnergy().

Referenced by PFAnalyzer().

159 { return pfCand.rawHcalEnergy(); }
double rawHcalEnergy() const
return raw Hcal energy
Definition: PFCandidate.h:236

◆ getRawHOEnergy()

static double PFAnalyzer::getRawHOEnergy ( const reco::PFCandidate  pfCand)
inlinestaticprivate

Definition at line 161 of file PFAnalyzer.h.

References reco::PFCandidate::rawHoEnergy().

Referenced by PFAnalyzer().

161 { return pfCand.rawHoEnergy(); }
double rawHoEnergy() const
return raw Hcal energy
Definition: PFCandidate.h:248

◆ getSuffix()

std::string PFAnalyzer::getSuffix ( std::vector< int >  binList,
std::vector< std::string >  observables,
std::vector< std::vector< double >>  binnings 
)
private

Definition at line 462 of file PFAnalyzer.cc.

References mps_fire::i, runBasic_cfi::observables, AlCaHLTBitMon_QueryRunRegistry::string, stringWithDecimals(), and Ecal_PulseShapes_cfg::suffix.

Referenced by getAllSuffixes().

464  {
465  std::string suffix = "";
466  for (unsigned int i = 0; i < binList.size(); i++) {
467  if (binList[i] < 0)
468  return "";
469  std::string digitString = stringWithDecimals(binList[i], binnings[i]);
470 
471  suffix = Form("%s_%s_%s", suffix.c_str(), observables[i].c_str(), digitString.c_str());
472  }
473 
474  return suffix;
475 }
std::string stringWithDecimals(int bin, std::vector< double > bins)
Definition: PFAnalyzer.cc:368

◆ getTime()

static double PFAnalyzer::getTime ( const reco::PFCandidate  pfCand)
inlinestaticprivate

Definition at line 146 of file PFAnalyzer.h.

References reco::PFCandidate::time().

146 { return pfCand.time(); }
float time() const
Definition: PFCandidate.h:423

◆ getTrackPt()

static double PFAnalyzer::getTrackPt ( const reco::PFCandidate  pfCand)
inlinestaticprivate

Definition at line 179 of file PFAnalyzer.h.

References edm::Ref< C, T, F >::isNonnull(), DiDispStaMuonMonitor_cfi::pt, and reco::PFCandidate::trackRef().

179  {
180  if (pfCand.trackRef().isNonnull())
181  return (pfCand.trackRef())->pt();
182  return 0;
183  }
bool isNonnull() const
Checks for non-null.
Definition: Ref.h:232
reco::TrackRef trackRef() const
Definition: PFCandidate.cc:437

◆ passesEventSelection()

bool PFAnalyzer::passesEventSelection ( const edm::Event iEvent)
private

Definition at line 365 of file PFAnalyzer.cc.

Referenced by analyze().

365 { return true; }

◆ stringWithDecimals()

std::string PFAnalyzer::stringWithDecimals ( int  bin,
std::vector< double >  bins 
)
private

Definition at line 368 of file PFAnalyzer.cc.

References funct::abs(), newFWLiteAna::bin, isotrackApplyRegressor::bins, change_name::diff, createfilelist::int, funct::pow(), and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by getSuffix().

368  {
369  double diff = bins[bin + 1] - bins[bin];
370  double sigFigs = log10(diff);
371 
372  // We only want to save as many significant digits as we need to.
373  // Currently, we might lose some information, so we should think about
374  // if we want to specify more digits
375  if (sigFigs >= 1) {
376  return Form("%.0f_%.0f", bins[bin], bins[bin + 1]);
377  }
378 
379  int nDecimals = int(-1 * sigFigs) + 1;
380  // We do not want to use decimals since these can mess up histogram retrieval in some cases.
381  // Instead, we use a 'p' to indicate the decimal.
382  double newDigit = abs((bins[bin] - int(bins[bin])) * pow(10, nDecimals));
383  double newDigit2 = (bins[bin + 1] - int(bins[bin + 1])) * pow(10, nDecimals);
384  std::string signStringLow = "";
385  std::string signStringHigh = "";
386  if (bins[bin] < 0)
387  signStringLow = "m";
388  if (bins[bin + 1] < 0)
389  signStringHigh = "m";
390  return Form("%s%.0fp%.0f_%s%.0fp%.0f",
391  signStringLow.c_str(),
392  abs(bins[bin]),
393  newDigit,
394  signStringHigh.c_str(),
395  abs(bins[bin + 1]),
396  newDigit2);
397 }
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:29

Member Data Documentation

◆ highPtJetExpr_

edm::InputTag PFAnalyzer::highPtJetExpr_
private

Definition at line 283 of file PFAnalyzer.h.

Referenced by analyze(), and PFAnalyzer().

◆ m_allJetSuffixes

std::vector<std::vector<std::string> > PFAnalyzer::m_allJetSuffixes
private

Definition at line 287 of file PFAnalyzer.h.

Referenced by analyze(), and bookHistograms().

◆ m_allSuffixes

std::vector<std::vector<std::string> > PFAnalyzer::m_allSuffixes
private

Definition at line 286 of file PFAnalyzer.h.

Referenced by analyze(), and bookHistograms().

◆ m_binList

std::vector<std::vector<std::vector<double> > > PFAnalyzer::m_binList
private

Definition at line 321 of file PFAnalyzer.h.

Referenced by bookHistograms(), getPFBin(), and PFAnalyzer().

◆ m_cutList

vstring PFAnalyzer::m_cutList
private

Definition at line 319 of file PFAnalyzer.h.

Referenced by PFAnalyzer().

◆ m_directory

std::string PFAnalyzer::m_directory
private

Definition at line 290 of file PFAnalyzer.h.

Referenced by analyze(), bookHistograms(), and PFAnalyzer().

◆ m_eventFuncMap

std::map<std::string, std::function<double(const reco::PFCandidateCollection, reco::PFCandidate::ParticleType pfType)> > PFAnalyzer::m_eventFuncMap
private

Definition at line 75 of file PFAnalyzer.h.

Referenced by analyze(), and PFAnalyzer().

◆ m_eventObservableNames

vstring PFAnalyzer::m_eventObservableNames
private

Definition at line 311 of file PFAnalyzer.h.

Referenced by analyze(), and bookHistograms().

◆ m_eventObservables

vstring PFAnalyzer::m_eventObservables
private

Definition at line 307 of file PFAnalyzer.h.

Referenced by bookHistograms(), and PFAnalyzer().

◆ m_fullCutList

std::vector<std::vector<std::string> > PFAnalyzer::m_fullCutList
private

Definition at line 320 of file PFAnalyzer.h.

Referenced by analyze(), bookHistograms(), getPFBin(), and PFAnalyzer().

◆ m_fullJetCutList

std::vector<std::vector<std::string> > PFAnalyzer::m_fullJetCutList
private

Definition at line 329 of file PFAnalyzer.h.

Referenced by analyze(), bookHistograms(), getJetBin(), and PFAnalyzer().

◆ m_funcMap

std::map<std::string, std::function<double(const reco::PFCandidate)> > PFAnalyzer::m_funcMap
private

Definition at line 69 of file PFAnalyzer.h.

Referenced by analyze(), getPFBin(), and PFAnalyzer().

◆ m_jetBinList

std::vector<std::vector<std::vector<double> > > PFAnalyzer::m_jetBinList
private

Definition at line 330 of file PFAnalyzer.h.

Referenced by bookHistograms(), getJetBin(), and PFAnalyzer().

◆ m_jetCutList

vstring PFAnalyzer::m_jetCutList
private

Definition at line 328 of file PFAnalyzer.h.

Referenced by PFAnalyzer().

◆ m_jetFuncMap

std::map<std::string, std::function<double(const reco::PFJet)> > PFAnalyzer::m_jetFuncMap
private

Definition at line 80 of file PFAnalyzer.h.

Referenced by getJetBin(), and PFAnalyzer().

◆ m_jetWideFuncMap

std::map<std::string, std::function<double(const std::vector<reco::PFCandidatePtr> pfCands, reco::PFCandidate::ParticleType pfType)> > PFAnalyzer::m_jetWideFuncMap
private

Definition at line 78 of file PFAnalyzer.h.

Referenced by analyze(), and PFAnalyzer().

◆ m_matchingRadius

double PFAnalyzer::m_matchingRadius
private

Definition at line 336 of file PFAnalyzer.h.

◆ m_npvBins

vDouble PFAnalyzer::m_npvBins
private

Definition at line 332 of file PFAnalyzer.h.

Referenced by analyze(), bookHistograms(), and PFAnalyzer().

◆ m_observableNames

vstring PFAnalyzer::m_observableNames
private

Definition at line 310 of file PFAnalyzer.h.

Referenced by analyze(), and bookHistograms().

◆ m_observables

vstring PFAnalyzer::m_observables
private

Definition at line 306 of file PFAnalyzer.h.

Referenced by analyze(), bookHistograms(), and PFAnalyzer().

◆ m_pfInJetFuncMap

std::map<std::string, std::function<double(const reco::PFCandidate, const reco::PFJet)> > PFAnalyzer::m_pfInJetFuncMap
private

Definition at line 79 of file PFAnalyzer.h.

Referenced by analyze(), and PFAnalyzer().

◆ m_pfInJetObservableNames

vstring PFAnalyzer::m_pfInJetObservableNames
private

Definition at line 312 of file PFAnalyzer.h.

Referenced by analyze(), and bookHistograms().

◆ m_pfInJetObservables

vstring PFAnalyzer::m_pfInJetObservables
private

Definition at line 308 of file PFAnalyzer.h.

Referenced by bookHistograms(), and PFAnalyzer().

◆ m_pfNames

std::vector<std::string> PFAnalyzer::m_pfNames
private

Definition at line 338 of file PFAnalyzer.h.

Referenced by bookHistograms(), and PFAnalyzer().

◆ map_of_MEs

std::map<std::string, MonitorElement*> PFAnalyzer::map_of_MEs
private

Definition at line 293 of file PFAnalyzer.h.

Referenced by analyze(), and bookHistograms().

◆ parameters_

edm::ParameterSet PFAnalyzer::parameters_
private

◆ pfJetsToken_

edm::EDGetTokenT<reco::PFJetCollection> PFAnalyzer::pfJetsToken_
private

Definition at line 273 of file PFAnalyzer.h.

Referenced by analyze(), and PFAnalyzer().

◆ srcWeights

edm::InputTag PFAnalyzer::srcWeights
private

Definition at line 274 of file PFAnalyzer.h.

Referenced by PFAnalyzer().

◆ thePfCandidateCollection_

edm::EDGetTokenT<reco::PFCandidateCollection> PFAnalyzer::thePfCandidateCollection_
private

Definition at line 271 of file PFAnalyzer.h.

Referenced by analyze(), and PFAnalyzer().

◆ theTriggerResultsLabel_

edm::InputTag PFAnalyzer::theTriggerResultsLabel_
private

Definition at line 281 of file PFAnalyzer.h.

Referenced by PFAnalyzer().

◆ tok_ew_

edm::EDGetTokenT<GenEventInfoProduct> PFAnalyzer::tok_ew_
private

Definition at line 279 of file PFAnalyzer.h.

Referenced by analyze(), and PFAnalyzer().

◆ triggerResultsToken_

edm::EDGetTokenT<edm::TriggerResults> PFAnalyzer::triggerResultsToken_
private

Definition at line 284 of file PFAnalyzer.h.

Referenced by analyze(), and PFAnalyzer().

◆ vertexTag_

edm::InputTag PFAnalyzer::vertexTag_
private

Definition at line 282 of file PFAnalyzer.h.

Referenced by PFAnalyzer().

◆ vertexToken_

edm::EDGetTokenT<std::vector<reco::Vertex> > PFAnalyzer::vertexToken_
private

Definition at line 272 of file PFAnalyzer.h.

Referenced by analyze(), and PFAnalyzer().

◆ weights_

edm::ValueMap<float> const* PFAnalyzer::weights_
private

Definition at line 277 of file PFAnalyzer.h.

Referenced by analyze().

◆ weightsToken_

edm::EDGetTokenT<edm::ValueMap<float> > PFAnalyzer::weightsToken_
private

Definition at line 276 of file PFAnalyzer.h.

Referenced by analyze(), and PFAnalyzer().