CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Classes | Public Member Functions | Private Types | Private Member Functions | Private Attributes
BTagPerformanceAnalyzerMC Class Reference

#include <BTagPerformanceAnalyzerMC.h>

Inheritance diagram for BTagPerformanceAnalyzerMC:
DQMEDAnalyzer edm::stream::EDAnalyzer< edm::RunSummaryCache< dqmDetails::NoCache >, edm::LuminosityBlockSummaryCache< dqmDetails::NoCache > > edm::stream::EDAnalyzerBase edm::EDConsumerBase

Classes

struct  JetRefCompare
 

Public Member Functions

virtual void analyze (const edm::Event &iEvent, const edm::EventSetup &iSetup)
 
 BTagPerformanceAnalyzerMC (const edm::ParameterSet &pSet)
 
 ~BTagPerformanceAnalyzerMC ()
 
- Public Member Functions inherited from DQMEDAnalyzer
virtual void beginRun (edm::Run const &, edm::EventSetup const &) final
 
virtual void beginStream (edm::StreamID id) final
 
virtual void dqmBeginRun (edm::Run const &, edm::EventSetup const &)
 
 DQMEDAnalyzer (void)
 
virtual void endLuminosityBlockSummary (edm::LuminosityBlock const &, edm::EventSetup const &, dqmDetails::NoCache *) const final
 
virtual void endRunSummary (edm::Run const &, edm::EventSetup const &, dqmDetails::NoCache *) const final
 
uint32_t streamId () const
 
- Public Member Functions inherited from edm::stream::EDAnalyzer< edm::RunSummaryCache< dqmDetails::NoCache >, edm::LuminosityBlockSummaryCache< dqmDetails::NoCache > >
 EDAnalyzer ()=default
 
- Public Member Functions inherited from edm::stream::EDAnalyzerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzerBase ()
 
ModuleDescription const & moduleDescription () const
 
virtual ~EDAnalyzerBase ()
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
 EDConsumerBase ()
 
ProductHolderIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
std::vector
< ProductHolderIndexAndSkipBit >
const & 
itemsToGetFromEvent () const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesDependentUpon (const std::string &iProcessName, std::vector< const char * > &oModuleLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
bool registeredToConsume (ProductHolderIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

Private Types

typedef std::map
< edm::RefToBase< reco::Jet >
, unsigned int, JetRefCompare
FlavourMap
 
typedef std::pair< reco::Jet,
reco::JetFlavourInfo
JetWithFlavour
 
typedef std::map
< edm::RefToBase< reco::Jet >
, reco::JetFlavour::Leptons,
JetRefCompare
LeptonMap
 

Private Member Functions

void bookHistograms (DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
 
EtaPtBin getEtaPtBin (const int &iEta, const int &iPt)
 
bool getJetWithFlavour (const edm::Event &iEvent, edm::RefToBase< reco::Jet > caloRef, const FlavourMap &_flavours, JetWithFlavour &jetWithFlavour, const reco::JetCorrector *corrector, edm::Handle< edm::Association< reco::GenJetCollection > > genJetsMatched)
 
bool getJetWithGenJet (edm::RefToBase< reco::Jet > jetRef, edm::Handle< edm::Association< reco::GenJetCollection > > genJetsMatched)
 

Private Attributes

std::vector< std::vector
< JetTagPlotter * > > 
binJetTagPlotters
 
std::vector< std::vector
< TagCorrelationPlotter * > > 
binTagCorrelationPlotters
 
std::vector< std::vector
< BaseTagInfoPlotter * > > 
binTagInfoPlotters
 
std::map< BaseTagInfoPlotter
*, size_t > 
binTagInfoPlottersToModuleConfig
 
edm::EDGetTokenT
< reco::JetFlavourMatchingCollection
caloJetToken
 
bool doJEC
 
bool doPUid
 
bool electronPlots
 
std::vector< double > etaRanges
 
bool eventInitialized
 
std::string flavPlots_
 
edm::InputTag genJetsMatchedSrc
 
edm::EDGetTokenT
< edm::Association
< reco::GenJetCollection > > 
genJetsMatchedToken
 
edm::EDGetTokenT
< GenEventInfoProduct
genToken
 
edm::EDGetTokenT
< reco::JetCorrector
jecDataToken
 
edm::EDGetTokenT
< reco::JetCorrector
jecMCToken
 
CorrectJet jetCorrector
 
MatchJet jetMatcher
 
edm::InputTag jetMCSrc
 
AcceptJet jetSelector
 
std::vector< edm::InputTagjetTagInputTags
 
std::vector< edm::EDGetTokenT
< reco::JetTagCollection > > 
jetTagToken
 
edm::EDGetTokenT
< reco::JetFlavourInfoMatchingCollection
jetToken
 
unsigned int mcPlots_
 
std::vector< edm::ParameterSetmoduleConfig
 
bool muonPlots
 
bool ptHatWeight
 
std::vector< double > ptRanges
 
edm::InputTag slInfoTag
 
edm::EDGetTokenT
< reco::SoftLeptonTagInfoCollection
slInfoToken
 
std::vector< std::pair
< edm::InputTag, edm::InputTag > > 
tagCorrelationInputTags
 
std::vector< std::pair
< edm::EDGetTokenT
< reco::JetTagCollection >
, edm::EDGetTokenT
< reco::JetTagCollection > > > 
tagCorrelationToken
 
std::vector< std::vector
< edm::InputTag > > 
tagInfoInputTags
 
std::vector< std::vector
< edm::EDGetTokenT< edm::View
< reco::BaseTagInfo > > > > 
tagInfoToken
 
bool tauPlots
 
std::vector< std::string > tiDataFormatType
 
bool useOldFlavourTool
 

Additional Inherited Members

- Public Types inherited from edm::stream::EDAnalyzer< edm::RunSummaryCache< dqmDetails::NoCache >, edm::LuminosityBlockSummaryCache< dqmDetails::NoCache > >
typedef CacheContexts< T...> CacheTypes
 
typedef CacheTypes::GlobalCache GlobalCache
 
typedef AbilityChecker< T...> HasAbility
 
typedef
CacheTypes::LuminosityBlockCache 
LuminosityBlockCache
 
typedef
LuminosityBlockContextT
< LuminosityBlockCache,
RunCache, GlobalCache
LuminosityBlockContext
 
typedef
CacheTypes::LuminosityBlockSummaryCache 
LuminosityBlockSummaryCache
 
typedef CacheTypes::RunCache RunCache
 
typedef RunContextT< RunCache,
GlobalCache
RunContext
 
typedef CacheTypes::RunSummaryCache RunSummaryCache
 
- Public Types inherited from edm::stream::EDAnalyzerBase
typedef EDAnalyzerAdaptorBase ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from DQMEDAnalyzer
static std::shared_ptr
< dqmDetails::NoCache
globalBeginLuminosityBlockSummary (edm::LuminosityBlock const &, edm::EventSetup const &, LuminosityBlockContext const *)
 
static std::shared_ptr
< dqmDetails::NoCache
globalBeginRunSummary (edm::Run const &, edm::EventSetup const &, RunContext const *)
 
static void globalEndLuminosityBlockSummary (edm::LuminosityBlock const &, edm::EventSetup const &, LuminosityBlockContext const *, dqmDetails::NoCache *)
 
static void globalEndRunSummary (edm::Run const &, edm::EventSetup const &, RunContext const *, dqmDetails::NoCache *)
 
- Static Public Member Functions inherited from edm::stream::EDAnalyzerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 

Detailed Description

Top level steering routine for b tag performance analysis.

Definition at line 27 of file BTagPerformanceAnalyzerMC.h.

Member Typedef Documentation

Definition at line 50 of file BTagPerformanceAnalyzerMC.h.

Definition at line 49 of file BTagPerformanceAnalyzerMC.h.

Definition at line 51 of file BTagPerformanceAnalyzerMC.h.

Constructor & Destructor Documentation

BTagPerformanceAnalyzerMC::BTagPerformanceAnalyzerMC ( const edm::ParameterSet pSet)
explicit

Definition at line 13 of file BTagPerformanceAnalyzerMC.cc.

References binJetTagPlotters, binTagCorrelationPlotters, binTagInfoPlotters, caloJetToken, edm::EDConsumerBase::consumes(), electronPlots, flavPlots_, genJetsMatchedToken, genToken, edm::ParameterSet::getParameter(), HLT_25ns14e33_v1_cff::InputTag, jecDataToken, jecMCToken, jetMatcher, jetTagInputTags, jetTagToken, jetToken, mcPlots_, moduleConfig, muonPlots, MatchJet::setThreshold(), slInfoToken, tagCorrelationInputTags, tagCorrelationToken, tagInfoInputTags, tagInfoToken, tauPlots, and tiDataFormatType.

13  :
15  pSet.getParameter<double>("etaMin"),
16  pSet.getParameter<double>("etaMax"),
17  pSet.getParameter<double>("ptRecJetMin"),
18  pSet.getParameter<double>("ptRecJetMax"),
19  0.0, 99999.0,
20  pSet.getParameter<double>("ratioMin"),
21  pSet.getParameter<double>("ratioMax"),
22  pSet.getParameter<bool>( "doJetID" )
23  ),
24  etaRanges(pSet.getParameter< vector<double> >("etaRanges")),
25  ptRanges(pSet.getParameter< vector<double> >("ptRanges")),
26  useOldFlavourTool(pSet.getParameter<bool>( "useOldFlavourTool" )),
27  doJEC(pSet.getParameter<bool>( "doJEC" )),
28  ptHatWeight(pSet.getParameter< bool >("applyPtHatWeight")),
29  moduleConfig(pSet.getParameter< vector<edm::ParameterSet> >("tagConfig")),
30  flavPlots_(pSet.getParameter< std::string >("flavPlots")),
31  jetMatcher(pSet.getParameter<edm::ParameterSet>("recJetMatching")),
32  doPUid(pSet.getParameter< bool >("doPUid"))
33 {
34  //mcPlots_ : 1=b+c+l+ni; 2=all+1; 3=1+d+u+s+g; 4=3+all . Default is 2. Don't use 0.
35  if(flavPlots_.find("dusg")<15){
36  if(flavPlots_.find("all")<15) mcPlots_ = 4;
37  else mcPlots_ = 3;
38  }
39  else{
40  if(flavPlots_.find("all")<15) mcPlots_ = 2;
41  else mcPlots_ = 1;
42  }
43  double ptRecJetMin = pSet.getParameter<double>("ptRecJetMin");
44  jetMatcher.setThreshold(0.25 * ptRecJetMin);
45  switch(pSet.getParameter<unsigned int>("leptonPlots")) {
46  case 11: electronPlots = true; muonPlots = false; tauPlots = false; break;
47  case 13: muonPlots = true; electronPlots = false; tauPlots = false; break;
48  case 15: tauPlots = true; electronPlots = false; tauPlots = false; break;
49  default: electronPlots = false; muonPlots = false; tauPlots = false;
50  }
51 
52  genToken = mayConsume<GenEventInfoProduct>(edm::InputTag("generator"));
53  genJetsMatchedToken = mayConsume<edm::Association<reco::GenJetCollection>>(pSet.getParameter<InputTag>("genJetsMatched"));
54  jetToken = consumes<JetFlavourInfoMatchingCollection>(pSet.getParameter<InputTag>("jetMCSrc"));
55  caloJetToken = mayConsume<JetFlavourMatchingCollection>(pSet.getParameter<InputTag>("caloJetMCSrc"));
56  slInfoToken = consumes<SoftLeptonTagInfoCollection>(pSet.getParameter<InputTag>("softLeptonInfo"));
57  jecMCToken = consumes<JetCorrector>(pSet.getParameter<edm::InputTag>( "JECsourceMC" ));
58  jecDataToken = mayConsume<JetCorrector>(pSet.getParameter<edm::InputTag>( "JECsourceData" ));
59  for (vector<edm::ParameterSet>::const_iterator iModule = moduleConfig.begin();
60  iModule != moduleConfig.end(); ++iModule) {
61 
62  const string& dataFormatType = iModule->exists("type") ?
63  iModule->getParameter<string>("type") :
64  "JetTag";
65  if (dataFormatType == "JetTag") {
66  const InputTag& moduleLabel = iModule->getParameter<InputTag>("label");
67  jetTagInputTags.push_back(moduleLabel);
68  binJetTagPlotters.push_back(vector<JetTagPlotter*>()) ;
69  jetTagToken.push_back(consumes<JetTagCollection>(moduleLabel));
70  }
71  else if(dataFormatType == "TagCorrelation") {
72  const InputTag& label1 = iModule->getParameter<InputTag>("label1");
73  const InputTag& label2 = iModule->getParameter<InputTag>("label2");
74  tagCorrelationInputTags.push_back(std::pair<edm::InputTag, edm::InputTag>(label1, label2));
75  binTagCorrelationPlotters.push_back(vector<TagCorrelationPlotter*>());
76  tagCorrelationToken.push_back(std::pair< edm::EDGetTokenT<reco::JetTagCollection>, edm::EDGetTokenT<reco::JetTagCollection> >(consumes<JetTagCollection>(label1), consumes<JetTagCollection>(label2)));
77  }
78  else {
79  tagInfoInputTags.push_back(vector<edm::InputTag>());
80  tiDataFormatType.push_back(dataFormatType);
81  binTagInfoPlotters.push_back(vector<BaseTagInfoPlotter*>()) ;
82  std::vector< edm::EDGetTokenT<edm::View<reco::BaseTagInfo>> > tokens;
83  if(dataFormatType == "GenericMVA") {
84  const InputTag& ipinfo = iModule->getParameter<InputTag>("ipTagInfos");
85  const InputTag& svinfo = iModule->getParameter<InputTag>("svTagInfos");
86  tokens.push_back(consumes< View<BaseTagInfo> >(ipinfo));
87  tokens.push_back(consumes< View<BaseTagInfo> >(svinfo));
88  }
89  else {
90  const InputTag& moduleLabel = iModule->getParameter<InputTag>("label");
91  tokens.push_back(consumes< View<BaseTagInfo> >(moduleLabel));
92  }
93  tagInfoToken.push_back(tokens);
94  }
95  }
96 }
std::vector< std::pair< edm::InputTag, edm::InputTag > > tagCorrelationInputTags
T getParameter(std::string const &) const
std::vector< std::vector< TagCorrelationPlotter * > > binTagCorrelationPlotters
edm::EDGetTokenT< edm::Association< reco::GenJetCollection > > genJetsMatchedToken
void setThreshold(const double &energy)
Definition: MatchJet.h:25
edm::EDGetTokenT< reco::JetCorrector > jecMCToken
std::vector< edm::EDGetTokenT< reco::JetTagCollection > > jetTagToken
std::vector< std::pair< edm::EDGetTokenT< reco::JetTagCollection >, edm::EDGetTokenT< reco::JetTagCollection > > > tagCorrelationToken
edm::EDGetTokenT< GenEventInfoProduct > genToken
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
edm::EDGetTokenT< reco::JetFlavourMatchingCollection > caloJetToken
edm::EDGetTokenT< reco::JetFlavourInfoMatchingCollection > jetToken
edm::EDGetTokenT< reco::JetCorrector > jecDataToken
std::vector< std::vector< BaseTagInfoPlotter * > > binTagInfoPlotters
std::vector< edm::ParameterSet > moduleConfig
std::vector< std::vector< edm::InputTag > > tagInfoInputTags
std::vector< std::vector< edm::EDGetTokenT< edm::View< reco::BaseTagInfo > > > > tagInfoToken
std::vector< std::string > tiDataFormatType
edm::EDGetTokenT< reco::SoftLeptonTagInfoCollection > slInfoToken
std::vector< edm::InputTag > jetTagInputTags
std::vector< std::vector< JetTagPlotter * > > binJetTagPlotters
BTagPerformanceAnalyzerMC::~BTagPerformanceAnalyzerMC ( )

Definition at line 209 of file BTagPerformanceAnalyzerMC.cc.

References binJetTagPlotters, binTagCorrelationPlotters, and binTagInfoPlotters.

210 {
211  for (vector<vector<JetTagPlotter*> >::iterator iJetLabel = binJetTagPlotters.begin();
212  iJetLabel != binJetTagPlotters.end(); ++iJetLabel)
213  for (vector<JetTagPlotter*>::iterator iPlotter = iJetLabel->begin(); iPlotter != iJetLabel->end(); ++iPlotter)
214  delete *iPlotter;
215 
216  for (vector<vector<TagCorrelationPlotter*> >::iterator iJetLabel = binTagCorrelationPlotters.begin();
217  iJetLabel != binTagCorrelationPlotters.end(); ++iJetLabel)
218  for (vector<TagCorrelationPlotter* >::iterator iPlotter = iJetLabel->begin(); iPlotter != iJetLabel->end(); ++iPlotter)
219  delete *iPlotter;
220 
221  for (vector<vector<BaseTagInfoPlotter*> >::iterator iJetLabel = binTagInfoPlotters.begin();
222  iJetLabel != binTagInfoPlotters.end(); ++iJetLabel)
223  for (vector<BaseTagInfoPlotter*>::iterator iPlotter = iJetLabel->begin(); iPlotter != iJetLabel->end(); ++iPlotter)
224  delete *iPlotter;
225 
226 }
std::vector< std::vector< TagCorrelationPlotter * > > binTagCorrelationPlotters
std::vector< std::vector< BaseTagInfoPlotter * > > binTagInfoPlotters
std::vector< std::vector< JetTagPlotter * > > binJetTagPlotters

Member Function Documentation

void BTagPerformanceAnalyzerMC::analyze ( const edm::Event iEvent,
const edm::EventSetup iSetup 
)
virtual

needed for lepton specific plots

needed for lepton specific plots

Implements edm::stream::EDAnalyzerBase.

Definition at line 228 of file BTagPerformanceAnalyzerMC.cc.

References funct::abs(), edm::AssociationVector< KeyRefProd, CVal, KeyRef, SizeType, KeyReferenceHelper >::begin(), binJetTagPlotters, binTagCorrelationPlotters, binTagInfoPlotters, binTagInfoPlottersToModuleConfig, caloJetToken, reco::JetCorrector::correction(), mvaPFMET_cff::corrector, doJEC, doPUid, reco::JetFlavour::Leptons::electron, metsig::electron, electronPlots, edm::AssociationVector< KeyRefProd, CVal, KeyRef, SizeType, KeyReferenceHelper >::end(), eventInitialized, Exception, genJetsMatchedToken, genToken, edm::Event::getByToken(), getJetWithFlavour(), i, edm::ProductID::id(), beam_dqm_sourceclient-live_cfg::inputTag, edm::HandleBase::isValid(), patTestJEC_cfi::jec, jecDataToken, jecMCToken, reco::BaseTagInfo::jet(), jetSelector, jetTagInputTags, jetTagToken, jetToken, HLT_25ns14e33_v1_cff::labels, HLT_25ns14e33_v1_cff::leptons, LogDebug, moduleConfig, reco::JetFlavour::Leptons::muon, metsig::muon, muonPlots, benchmark_cfg::pdgId, edm::Handle< T >::product(), ptHatWeight, edm::AssociationVector< KeyRefProd, CVal, KeyRef, SizeType, KeyReferenceHelper >::size(), edm::RefVector< C, T, F >::size(), findQualityFiles::size, slInfoToken, tagCorrelationInputTags, tagCorrelationToken, tagInfoInputTags, BaseTagInfoPlotter::tagInfoRequirements(), tagInfoToken, reco::JetFlavour::Leptons::tau, metsig::tau, tauPlots, tiDataFormatType, useOldFlavourTool, and puppiForMET_cff::weight.

229 {
230  eventInitialized = false;
231 
232  float weight = 1; // event weight
233 
234  if (ptHatWeight) {
235 
236  /* APPLY PTHAT EVENT WEIGHT */
237 
238  edm::Handle<GenEventInfoProduct> genInfoHandle;
239  iEvent.getByToken(genToken, genInfoHandle);
240 
241  if( genInfoHandle.isValid() ) {
242  weight = weight*static_cast<float>(genInfoHandle->weight());
243 
244  }
245  }
246 
247  LogDebug("Info") << "Event weight is: " << weight;
248 
249  FlavourMap flavours;
251 
252 
253  if(!useOldFlavourTool) {
255  iEvent.getByToken(jetToken, jetMC);
256  for (JetFlavourInfoMatchingCollection::const_iterator iter = jetMC->begin();
257  iter != jetMC->end(); ++iter) {
258  unsigned int fl = std::abs(iter->second.getPartonFlavour());
259  flavours.insert(std::make_pair(iter->first, fl));
260  const GenParticleRefVector &lep = iter->second.getLeptons();
261  reco::JetFlavour::Leptons lepCount;
262  for (unsigned int i=0; i<lep.size(); i++){
263  if(abs(lep[i]->pdgId())==11) lepCount.electron++;
264  else if(abs(lep[i]->pdgId())==13) lepCount.muon++;
265  else if(abs(lep[i]->pdgId())==15) lepCount.tau++;
266  }
267  leptons.insert(std::make_pair(iter->first, lepCount));
268  }
269  }
270  else {
272  iEvent.getByToken(caloJetToken, jetMC);
273  for (JetFlavourMatchingCollection::const_iterator iter = jetMC->begin();
274  iter != jetMC->end(); ++iter) {
275  unsigned int fl = std::abs(iter->second.getFlavour());
276  flavours.insert(std::make_pair(iter->first, fl));
277  const reco::JetFlavour::Leptons &lep = iter->second.getLeptons();
278  leptons.insert(std::make_pair(iter->first, lep));
279  }
280  }
281 
283  iEvent.getByToken(slInfoToken, infoHandle);
284 
286  if (doPUid) {
287  iEvent.getByToken(genJetsMatchedToken, genJetsMatched);
288  }
289 
290  //Get JEC
291  const JetCorrector* corrector = 0;
292  if(doJEC) {
293  edm::Handle<GenEventInfoProduct> genInfoHandle; //check if data or MC
294  iEvent.getByToken(genToken, genInfoHandle);
295  edm::Handle<JetCorrector> corrHandle;
296  if( !genInfoHandle.isValid() ) iEvent.getByToken( jecDataToken, corrHandle);
297  else iEvent.getByToken( jecMCToken, corrHandle);
298  corrector = corrHandle.product();
299  }
300  //
301 
302 // Look first at the jetTags
303  for (unsigned int iJetLabel = 0; iJetLabel != jetTagInputTags.size(); ++iJetLabel) {
305  iEvent.getByToken(jetTagToken[iJetLabel], tagHandle);
306  const reco::JetTagCollection & tagColl = *(tagHandle.product());
307  LogDebug("Info") << "Found " << tagColl.size() << " B candidates in collection " << jetTagInputTags[iJetLabel];
308 
309  int plotterSize = binJetTagPlotters[iJetLabel].size();
310  for (JetTagCollection::const_iterator tagI = tagColl.begin();
311  tagI != tagColl.end(); ++tagI) {
312  // Identify parton associated to jet.
313 
315  if (flavours[tagI->first] == 5 &&
316  ((electronPlots && !leptons[tagI->first].electron) ||
317  (muonPlots && !leptons[tagI->first].muon) ||
318  (tauPlots && !leptons[tagI->first].tau)))
319  continue;
320  //JEC
321  reco::Jet correctedJet = *(tagI->first);
322  double jec = 1.0;
323  if(doJEC && corrector) {
324  jec = corrector->correction(*(tagI->first));
325  }
326 
327  JetWithFlavour jetWithFlavour;
328  if (!getJetWithFlavour(iEvent, tagI->first, flavours, jetWithFlavour, corrector, genJetsMatched))
329  continue;
330  if (!jetSelector(jetWithFlavour.first, std::abs(jetWithFlavour.second.getPartonFlavour()), infoHandle, jec))
331  continue;
332 
333  for (int iPlotter = 0; iPlotter != plotterSize; ++iPlotter) {
334  bool inBin = false;
335  inBin = binJetTagPlotters[iJetLabel][iPlotter]->etaPtBin().inBin(jetWithFlavour.first, jec);
336  // Fill histograms if in desired pt/rapidity bin.
337  if (inBin)
338  binJetTagPlotters[iJetLabel][iPlotter]->analyzeTag(jetWithFlavour.first, jec, tagI->second, std::abs(jetWithFlavour.second.getPartonFlavour()),weight);
339  }
340  }
341  for (int iPlotter = 0; iPlotter != plotterSize; ++iPlotter) {
342  binJetTagPlotters[iJetLabel][iPlotter]->analyzeTag(weight);
343  }
344  }
345 
346 // Now look at Tag Correlations
347  for (unsigned int iJetLabel = 0; iJetLabel != tagCorrelationInputTags.size(); ++iJetLabel) {
348  const std::pair< edm::EDGetTokenT<reco::JetTagCollection>, edm::EDGetTokenT<reco::JetTagCollection> >& inputTokens = tagCorrelationToken[iJetLabel];
350  iEvent.getByToken(inputTokens.first, tagHandle1);
351  const reco::JetTagCollection& tagColl1 = *(tagHandle1.product());
352 
354  iEvent.getByToken(inputTokens.second, tagHandle2);
355  const reco::JetTagCollection& tagColl2 = *(tagHandle2.product());
356 
357  int plotterSize = binTagCorrelationPlotters[iJetLabel].size();
358  for (JetTagCollection::const_iterator tagI = tagColl1.begin(); tagI != tagColl1.end(); ++tagI) {
359 
360  if (flavours[tagI->first] == 5 &&
361  ((electronPlots && !leptons[tagI->first].electron) ||
362  (muonPlots && !leptons[tagI->first].muon) ||
363  (tauPlots && !leptons[tagI->first].tau)))
364  continue;
365 
366  //JEC
367  reco::Jet correctedJet = *(tagI->first);
368  double jec = 1.0;
369  if(doJEC && corrector) {
370  jec = corrector->correction(*(tagI->first));
371  }
372 
373  JetWithFlavour jetWithFlavour;
374  if (!getJetWithFlavour(iEvent, tagI->first, flavours, jetWithFlavour, corrector, genJetsMatched))
375  continue;
376  if (!jetSelector(jetWithFlavour.first, std::abs(jetWithFlavour.second.getPartonFlavour()), infoHandle, jec))
377  continue;
378 
379  for(int iPlotter = 0; iPlotter != plotterSize; ++iPlotter) {
380  bool inBin = false;
381  inBin = binTagCorrelationPlotters[iJetLabel][iPlotter]->etaPtBin().inBin(jetWithFlavour.first, jec);
382 
383  if(inBin)
384  {
385  double discr2 = tagColl2[tagI->first];
386  binTagCorrelationPlotters[iJetLabel][iPlotter]->analyzeTags(tagI->second, discr2, std::abs(jetWithFlavour.second.getPartonFlavour()),weight);
387  }
388  }
389  }
390  }
391 
392 // Now look at the TagInfos
393 
394  for (unsigned int iJetLabel = 0; iJetLabel != tiDataFormatType.size(); ++iJetLabel) {
395  int plotterSize = binTagInfoPlotters[iJetLabel].size();
396  for (int iPlotter = 0; iPlotter != plotterSize; ++iPlotter)
397  binTagInfoPlotters[iJetLabel][iPlotter]->setEventSetup(iSetup);
398 
399  vector<edm::InputTag> & inputTags = tagInfoInputTags[iJetLabel];
400  if (inputTags.empty()) {
401  // deferred retrieval of input tags
402  BaseTagInfoPlotter *firstPlotter = binTagInfoPlotters[iJetLabel][0];
403  int iModule = binTagInfoPlottersToModuleConfig[firstPlotter];
404  vector<string> labels = firstPlotter->tagInfoRequirements();
405  if (labels.empty())
406  labels.push_back("label");
407  for (vector<string>::const_iterator iLabels = labels.begin();
408  iLabels != labels.end(); ++iLabels) {
410  moduleConfig[iModule].getParameter<InputTag>(*iLabels);
411  inputTags.push_back(inputTag);
412  }
413  }
414 
415  unsigned int nInputTags = inputTags.size();
416  vector< edm::Handle< View<BaseTagInfo> > > tagInfoHandles(nInputTags);
417  edm::ProductID jetProductID;
418  unsigned int nTagInfos = 0;
419  vector<edm::EDGetTokenT<edm::View<reco::BaseTagInfo>> > & tokens = tagInfoToken[iJetLabel];
420  if(nInputTags!=tokens.size()) throw cms::Exception("Configuration") << "Different number of Tag Infos than expected" << endl;
421  for (unsigned int iInputTags = 0; iInputTags < tokens.size(); ++iInputTags) {
422  edm::Handle< View<BaseTagInfo> > & tagInfoHandle = tagInfoHandles[iInputTags];
423  iEvent.getByToken(tokens[iInputTags], tagInfoHandle);
424  unsigned int size = tagInfoHandle->size();
425  LogDebug("Info") << "Found " << size << " B candidates in collection " << inputTags[iInputTags];
426 
427  edm::ProductID thisProductID = (size > 0) ? (*tagInfoHandle)[0].jet().id() : edm::ProductID();
428  if (iInputTags == 0) {
429  jetProductID = thisProductID;
430  nTagInfos = size;
431  } else if (jetProductID != thisProductID)
432  throw cms::Exception("Configuration") << "TagInfos are referencing a different jet collection." << endl;
433  else if (nTagInfos != size)
434  throw cms::Exception("Configuration") << "TagInfo collections are having a different size." << endl;
435  }
436 
437  for (unsigned int iTagInfos = 0; iTagInfos < nTagInfos; ++iTagInfos) {
438  vector<const BaseTagInfo*> baseTagInfos(nInputTags);
439  edm::RefToBase<Jet> jetRef;
440  for (unsigned int iTagInfo = 0; iTagInfo < nInputTags; iTagInfo++) {
441  const BaseTagInfo &baseTagInfo = (*tagInfoHandles[iTagInfo])[iTagInfos];
442  if (iTagInfo == 0)
443  jetRef = baseTagInfo.jet();
444  else if (baseTagInfo.jet() != jetRef)
445  throw cms::Exception("Configuration") << "TagInfos pointing to different jets." << endl;
446  baseTagInfos[iTagInfo] = &baseTagInfo;
447  }
448 
449  // Identify parton associated to jet.
450 
452  if (flavours[jetRef] == 5 &&
453  ((electronPlots && !leptons[jetRef].electron) ||
454  (muonPlots && !leptons[jetRef].muon) ||
455  (tauPlots && !leptons[jetRef].tau)))
456  continue;
457 
458  //JEC
459  reco::Jet correctedJet = *(jetRef);
460  double jec = 1.0;
461  if(doJEC && corrector) {
462  jec = corrector->correction(*(jetRef));
463  }
464 
465  JetWithFlavour jetWithFlavour;
466  if (!getJetWithFlavour(iEvent, jetRef, flavours, jetWithFlavour, corrector, genJetsMatched))
467  continue;
468  if (!jetSelector(jetWithFlavour.first, std::abs(jetWithFlavour.second.getPartonFlavour()), infoHandle, jec))
469  continue;
470 
471  for (int iPlotter = 0; iPlotter != plotterSize; ++iPlotter) {
472  bool inBin = false;
473  inBin = binTagInfoPlotters[iJetLabel][iPlotter]->etaPtBin().inBin(*jetRef, jec);
474  // Fill histograms if in desired pt/rapidity bin.
475  if (inBin)
476  binTagInfoPlotters[iJetLabel][iPlotter]->analyzeTag(baseTagInfos, jec, std::abs(jetWithFlavour.second.getPartonFlavour()),weight);
477  }
478  }
479  }
480 }
#define LogDebug(id)
std::vector< std::pair< edm::InputTag, edm::InputTag > > tagCorrelationInputTags
int i
Definition: DBlmapReader.cc:9
std::vector< std::vector< TagCorrelationPlotter * > > binTagCorrelationPlotters
transient_vector_type::const_iterator const_iterator
edm::EDGetTokenT< edm::Association< reco::GenJetCollection > > genJetsMatchedToken
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:464
Base class for all types of Jets.
Definition: Jet.h:20
edm::EDGetTokenT< reco::JetCorrector > jecMCToken
std::map< edm::RefToBase< reco::Jet >, unsigned int, JetRefCompare > FlavourMap
std::map< edm::RefToBase< reco::Jet >, reco::JetFlavour::Leptons, JetRefCompare > LeptonMap
std::vector< edm::EDGetTokenT< reco::JetTagCollection > > jetTagToken
const_iterator end() const
double correction(const LorentzVector &fJet) const
get correction using Jet information only
Definition: JetCorrector.h:47
std::vector< std::pair< edm::EDGetTokenT< reco::JetTagCollection >, edm::EDGetTokenT< reco::JetTagCollection > > > tagCorrelationToken
edm::EDGetTokenT< GenEventInfoProduct > genToken
std::pair< Jet, reco::JetFlavourInfo > JetWithFlavour
virtual edm::RefToBase< Jet > jet(void) const
returns a polymorphic reference to the tagged jet
Definition: BaseTagInfo.h:24
edm::EDGetTokenT< reco::JetFlavourMatchingCollection > caloJetToken
tuple corrector
Definition: mvaPFMET_cff.py:86
edm::EDGetTokenT< reco::JetFlavourInfoMatchingCollection > jetToken
edm::EDGetTokenT< reco::JetCorrector > jecDataToken
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
std::vector< std::vector< BaseTagInfoPlotter * > > binTagInfoPlotters
std::vector< edm::ParameterSet > moduleConfig
std::vector< std::vector< edm::InputTag > > tagInfoInputTags
bool isValid() const
Definition: HandleBase.h:75
lepton info struct
Definition: JetFlavour.h:25
std::vector< std::vector< edm::EDGetTokenT< edm::View< reco::BaseTagInfo > > > > tagInfoToken
virtual std::vector< std::string > tagInfoRequirements() const
T const * product() const
Definition: Handle.h:81
std::vector< std::string > tiDataFormatType
edm::EDGetTokenT< reco::SoftLeptonTagInfoCollection > slInfoToken
std::vector< edm::InputTag > jetTagInputTags
size_type size() const
Size of the RefVector.
Definition: RefVector.h:99
ProductIndex id() const
Definition: ProductID.h:38
std::vector< std::vector< JetTagPlotter * > > binJetTagPlotters
const_iterator begin() const
std::map< BaseTagInfoPlotter *, size_t > binTagInfoPlottersToModuleConfig
tuple size
Write out results.
bool getJetWithFlavour(const edm::Event &iEvent, edm::RefToBase< reco::Jet > caloRef, const FlavourMap &_flavours, JetWithFlavour &jetWithFlavour, const reco::JetCorrector *corrector, edm::Handle< edm::Association< reco::GenJetCollection > > genJetsMatched)
size_type size() const
void BTagPerformanceAnalyzerMC::bookHistograms ( DQMStore::IBooker ibook,
edm::Run const &  run,
edm::EventSetup const &  es 
)
overrideprivatevirtual

Implements DQMEDAnalyzer.

Definition at line 98 of file BTagPerformanceAnalyzerMC.cc.

References binJetTagPlotters, binTagCorrelationPlotters, binTagInfoPlotters, binTagInfoPlottersToModuleConfig, TagInfoPlotterFactory::buildPlotter(), etaRanges, getEtaPtBin(), edm::InputTag::label(), mcPlots_, moduleConfig, ptRanges, and setTDRStyle().

99 {
100  //
101  // Book all histograms.
102  //
103 
104  // iterate over ranges:
105  const int iEtaStart = -1 ; // this will be the inactive one
106  const int iEtaEnd = etaRanges.size() - 1 ;
107  const int iPtStart = -1 ; // this will be the inactive one
108  const int iPtEnd = ptRanges.size() - 1 ;
109  setTDRStyle();
110 
111  TagInfoPlotterFactory theFactory;
112  int iTag = -1; int iTagCorr = -1; int iInfoTag = -1;
113  for (vector<edm::ParameterSet>::const_iterator iModule = moduleConfig.begin();
114  iModule != moduleConfig.end(); ++iModule) {
115 
116  const string& dataFormatType = iModule->exists("type") ?
117  iModule->getParameter<string>("type") :
118  "JetTag";
119  if (dataFormatType == "JetTag") {
120  iTag++;
121  const string& folderName = iModule->getParameter<string>("folder");
122 
123  // eta loop
124  for ( int iEta = iEtaStart ; iEta < iEtaEnd ; iEta++ ) {
125  // pt loop
126  for ( int iPt = iPtStart ; iPt < iPtEnd ; iPt++ ) {
127 
128  const EtaPtBin& etaPtBin = getEtaPtBin(iEta, iPt);
129 
130  // Instantiate the genertic b tag plotter
131  JetTagPlotter *jetTagPlotter = new JetTagPlotter(folderName, etaPtBin,
132  iModule->getParameter<edm::ParameterSet>("parameters"),mcPlots_,false, ibook);
133  binJetTagPlotters.at(iTag).push_back ( jetTagPlotter ) ;
134 
135  }
136  }
137  } else if(dataFormatType == "TagCorrelation") {
138  iTagCorr++;
139  const InputTag& label1 = iModule->getParameter<InputTag>("label1");
140  const InputTag& label2 = iModule->getParameter<InputTag>("label2");
141 
142  // eta loop
143  for ( int iEta = iEtaStart ; iEta != iEtaEnd ; ++iEta) {
144  // pt loop
145  for( int iPt = iPtStart ; iPt != iPtEnd ; ++iPt) {
146  const EtaPtBin& etaPtBin = getEtaPtBin(iEta, iPt);
147  // Instantiate the generic b tag correlation plotter
148  TagCorrelationPlotter* tagCorrelationPlotter = new TagCorrelationPlotter(label1.label(), label2.label(), etaPtBin,
149  iModule->getParameter<edm::ParameterSet>("parameters"),
150  mcPlots_, ibook);
151  binTagCorrelationPlotters.at(iTagCorr).push_back(tagCorrelationPlotter);
152  }
153  }
154  } else {
155  iInfoTag++;
156  // tag info retrievel is deferred (needs availability of EventSetup)
157  const InputTag& moduleLabel = iModule->getParameter<InputTag>("label");
158  const string& folderName = iModule->getParameter<string>("folder");
159  // eta loop
160  for ( int iEta = iEtaStart ; iEta < iEtaEnd ; iEta++ ) {
161  // pt loop
162  for ( int iPt = iPtStart ; iPt < iPtEnd ; iPt++ ) {
163  const EtaPtBin& etaPtBin = getEtaPtBin(iEta, iPt);
164 
165  // Instantiate the tagInfo plotter
166 
167  BaseTagInfoPlotter *jetTagPlotter = theFactory.buildPlotter(dataFormatType, moduleLabel.label(),
168  etaPtBin, iModule->getParameter<edm::ParameterSet>("parameters"), folderName,
169  mcPlots_,false, ibook);
170  binTagInfoPlotters.at(iInfoTag).push_back ( jetTagPlotter ) ;
171  binTagInfoPlottersToModuleConfig.insert(make_pair(jetTagPlotter, iModule - moduleConfig.begin()));
172  }
173  }
174  }
175  }
176 }
BaseTagInfoPlotter * buildPlotter(const std::string &dataFormatType, const std::string &tagName, const EtaPtBin &etaPtBin, const edm::ParameterSet &pSet, const std::string &folderName, const unsigned int &mc, const bool &wf, DQMStore::IBooker &ibook)
std::vector< std::vector< TagCorrelationPlotter * > > binTagCorrelationPlotters
std::vector< std::vector< BaseTagInfoPlotter * > > binTagInfoPlotters
std::vector< edm::ParameterSet > moduleConfig
EtaPtBin getEtaPtBin(const int &iEta, const int &iPt)
std::string const & label() const
Definition: InputTag.h:43
void setTDRStyle()
Definition: plotscripts.py:87
std::vector< std::vector< JetTagPlotter * > > binJetTagPlotters
std::map< BaseTagInfoPlotter *, size_t > binTagInfoPlottersToModuleConfig
EtaPtBin BTagPerformanceAnalyzerMC::getEtaPtBin ( const int &  iEta,
const int &  iPt 
)
private

Definition at line 178 of file BTagPerformanceAnalyzerMC.cc.

References histoStyle::EtaPtBin, etaRanges, edm::false, ptRanges, and funct::true.

Referenced by bookHistograms().

179 {
180  // DEFINE BTagBin:
181  bool etaActive_ , ptActive_;
182  double etaMin_, etaMax_, ptMin_, ptMax_ ;
183 
184  if ( iEta != -1 ) {
185  etaActive_ = true ;
186  etaMin_ = etaRanges[iEta] ;
187  etaMax_ = etaRanges[iEta+1] ;
188  }
189  else {
190  etaActive_ = false ;
191  etaMin_ = etaRanges[0] ;
192  etaMax_ = etaRanges[etaRanges.size() - 1] ;
193  }
194 
195  if ( iPt != -1 ) {
196  ptActive_ = true ;
197  ptMin_ = ptRanges[iPt] ;
198  ptMax_ = ptRanges[iPt+1] ;
199  }
200  else {
201  ptActive_ = false ;
202  ptMin_ = ptRanges[0] ;
203  ptMax_ = ptRanges[ptRanges.size() - 1] ;
204  }
205  return EtaPtBin(etaActive_ , etaMin_ , etaMax_ ,
206  ptActive_ , ptMin_ , ptMax_ );
207 }
list EtaPtBin
Definition: histoStyle.py:59
volatile std::atomic< bool > shutdown_flag false
bool BTagPerformanceAnalyzerMC::getJetWithFlavour ( const edm::Event iEvent,
edm::RefToBase< reco::Jet caloRef,
const FlavourMap _flavours,
JetWithFlavour jetWithFlavour,
const reco::JetCorrector corrector,
edm::Handle< edm::Association< reco::GenJetCollection > >  genJetsMatched 
)
private

Definition at line 490 of file BTagPerformanceAnalyzerMC.cc.

References doPUid, eventInitialized, reco::flavour(), getJetWithGenJet(), i, edm::ProductID::id(), edm::RefToBase< T >::id(), edm::RefToBase< T >::isNull(), jetCorrector, jetMatcher, LogTrace, edm::makeRefToBaseProdFrom(), MatchJet::matchCollections(), edm::RefToBaseVector< T >::push_back(), CorrectJet::setCorrector(), and edm::View< T >::size().

Referenced by analyze().

494 {
495  edm::ProductID recProdId = jetRef.id();
496  edm::ProductID refProdId = (flavours.begin() == flavours.end())
497  ? recProdId
498  : flavours.begin()->first.id();
499 
500  if (!eventInitialized) {
501  jetCorrector.setCorrector(corrector);
502  if (recProdId != refProdId) {
504  for(FlavourMap::const_iterator iter = flavours.begin();
505  iter != flavours.end(); ++iter)
506  refJets.push_back(iter->first);
507  const edm::RefToBaseProd<Jet> recJetsProd(edm::makeRefToBaseProdFrom(jetRef, iEvent));
509  for(unsigned int i = 0; i < recJetsProd->size(); i++)
510  recJets.push_back(edm::RefToBase<Jet>(recJetsProd, i));
511  jetMatcher.matchCollections(refJets, recJets, corrector);
512  }
513  eventInitialized = true;
514  }
515 
516  if (recProdId != refProdId) {
517  jetRef = jetMatcher(jetRef);
518  if (jetRef.isNull())
519  return false;
520  }
521 
522  jetWithFlavour.first = jetCorrector(*jetRef);
523 
524  auto itFound = flavours.find(jetRef);
525  unsigned int flavour = itFound != flavours.end()? itFound->second : 0;
526 
527  if(doPUid){
528  bool isNotPU = getJetWithGenJet(jetRef, genJetsMatched);
529  if(!isNotPU) flavour=20;
530  }
531 
532  jetWithFlavour.second = reco::JetFlavourInfo(flavour, flavour);
533 
534  LogTrace("Info") << "Found jet with flavour "<<jetWithFlavour.second.getPartonFlavour()<<endl;
535  LogTrace("Info") << jetWithFlavour.first.p()<<" , "<< jetWithFlavour.first.pt()<<" - "<<endl;
536  //<< jetWithFlavour.second.getLorentzVector().P()<<" , "<< jetWithFlavour.second.getLorentzVector().Pt()<<endl;
537 
538  return true;
539 }
int i
Definition: DBlmapReader.cc:9
bool getJetWithGenJet(edm::RefToBase< reco::Jet > jetRef, edm::Handle< edm::Association< reco::GenJetCollection > > genJetsMatched)
void matchCollections(const edm::RefToBaseVector< reco::Jet > &refJets, const edm::RefToBaseVector< reco::Jet > &recJets, const reco::JetCorrector *corrector)
match the collections
Definition: MatchJet.cc:51
Class storing the jet flavour information.
#define LogTrace(id)
void setCorrector(const reco::JetCorrector *corrector)
Returns the corrected jet.
Definition: CorrectJet.h:22
RefToBaseProd< T > makeRefToBaseProdFrom(RefToBase< T > const &iRef, Event const &iEvent)
void push_back(const RefToBase< T > &)
ProductIndex id() const
Definition: ProductID.h:38
int flavour(const Candidate &part)
Definition: pdgIdUtils.h:31
bool BTagPerformanceAnalyzerMC::getJetWithGenJet ( edm::RefToBase< reco::Jet jetRef,
edm::Handle< edm::Association< reco::GenJetCollection > >  genJetsMatched 
)
private

Definition at line 482 of file BTagPerformanceAnalyzerMC.cc.

References doPUid, edm::Ref< C, T, F >::isAvailable(), and edm::Ref< C, T, F >::isNonnull().

Referenced by getJetWithFlavour().

483 {
484  if(!doPUid) return true;
485  reco::GenJetRef genjet = (*genJetsMatched)[jetRef];
486  if (genjet.isNonnull() && genjet.isAvailable()) return true;
487  return false;
488 }
bool isAvailable() const
Definition: Ref.h:576
bool isNonnull() const
Checks for non-null.
Definition: Ref.h:252

Member Data Documentation

std::vector< std::vector<JetTagPlotter*> > BTagPerformanceAnalyzerMC::binJetTagPlotters
private
std::vector< std::vector<TagCorrelationPlotter*> > BTagPerformanceAnalyzerMC::binTagCorrelationPlotters
private
std::vector< std::vector<BaseTagInfoPlotter*> > BTagPerformanceAnalyzerMC::binTagInfoPlotters
private
std::map<BaseTagInfoPlotter*, size_t> BTagPerformanceAnalyzerMC::binTagInfoPlottersToModuleConfig
private

Definition at line 80 of file BTagPerformanceAnalyzerMC.h.

Referenced by analyze(), and bookHistograms().

edm::EDGetTokenT<reco::JetFlavourMatchingCollection> BTagPerformanceAnalyzerMC::caloJetToken
private

Definition at line 98 of file BTagPerformanceAnalyzerMC.h.

Referenced by analyze(), and BTagPerformanceAnalyzerMC().

bool BTagPerformanceAnalyzerMC::doJEC
private

Definition at line 64 of file BTagPerformanceAnalyzerMC.h.

Referenced by analyze().

bool BTagPerformanceAnalyzerMC::doPUid
private

Definition at line 88 of file BTagPerformanceAnalyzerMC.h.

Referenced by analyze(), getJetWithFlavour(), and getJetWithGenJet().

bool BTagPerformanceAnalyzerMC::electronPlots
private

Definition at line 90 of file BTagPerformanceAnalyzerMC.h.

Referenced by analyze(), and BTagPerformanceAnalyzerMC().

std::vector<double> BTagPerformanceAnalyzerMC::etaRanges
private

Definition at line 62 of file BTagPerformanceAnalyzerMC.h.

Referenced by bookHistograms(), and getEtaPtBin().

bool BTagPerformanceAnalyzerMC::eventInitialized
private

Definition at line 89 of file BTagPerformanceAnalyzerMC.h.

Referenced by analyze(), and getJetWithFlavour().

std::string BTagPerformanceAnalyzerMC::flavPlots_
private

Definition at line 82 of file BTagPerformanceAnalyzerMC.h.

Referenced by BTagPerformanceAnalyzerMC().

edm::InputTag BTagPerformanceAnalyzerMC::genJetsMatchedSrc
private

Definition at line 70 of file BTagPerformanceAnalyzerMC.h.

edm::EDGetTokenT<edm::Association<reco::GenJetCollection> > BTagPerformanceAnalyzerMC::genJetsMatchedToken
private

Definition at line 94 of file BTagPerformanceAnalyzerMC.h.

Referenced by analyze(), and BTagPerformanceAnalyzerMC().

edm::EDGetTokenT<GenEventInfoProduct> BTagPerformanceAnalyzerMC::genToken
private

Definition at line 93 of file BTagPerformanceAnalyzerMC.h.

Referenced by analyze(), and BTagPerformanceAnalyzerMC().

edm::EDGetTokenT<reco::JetCorrector> BTagPerformanceAnalyzerMC::jecDataToken
private

Definition at line 96 of file BTagPerformanceAnalyzerMC.h.

Referenced by analyze(), and BTagPerformanceAnalyzerMC().

edm::EDGetTokenT<reco::JetCorrector> BTagPerformanceAnalyzerMC::jecMCToken
private

Definition at line 95 of file BTagPerformanceAnalyzerMC.h.

Referenced by analyze(), and BTagPerformanceAnalyzerMC().

CorrectJet BTagPerformanceAnalyzerMC::jetCorrector
private

Definition at line 85 of file BTagPerformanceAnalyzerMC.h.

Referenced by getJetWithFlavour().

MatchJet BTagPerformanceAnalyzerMC::jetMatcher
private

Definition at line 86 of file BTagPerformanceAnalyzerMC.h.

Referenced by BTagPerformanceAnalyzerMC(), and getJetWithFlavour().

edm::InputTag BTagPerformanceAnalyzerMC::jetMCSrc
private

Definition at line 68 of file BTagPerformanceAnalyzerMC.h.

AcceptJet BTagPerformanceAnalyzerMC::jetSelector
private

Definition at line 61 of file BTagPerformanceAnalyzerMC.h.

Referenced by analyze().

std::vector<edm::InputTag> BTagPerformanceAnalyzerMC::jetTagInputTags
private

Definition at line 75 of file BTagPerformanceAnalyzerMC.h.

Referenced by analyze(), and BTagPerformanceAnalyzerMC().

std::vector< edm::EDGetTokenT<reco::JetTagCollection> > BTagPerformanceAnalyzerMC::jetTagToken
private

Definition at line 100 of file BTagPerformanceAnalyzerMC.h.

Referenced by analyze(), and BTagPerformanceAnalyzerMC().

edm::EDGetTokenT<reco::JetFlavourInfoMatchingCollection> BTagPerformanceAnalyzerMC::jetToken
private

Definition at line 97 of file BTagPerformanceAnalyzerMC.h.

Referenced by analyze(), and BTagPerformanceAnalyzerMC().

unsigned int BTagPerformanceAnalyzerMC::mcPlots_
private

Definition at line 83 of file BTagPerformanceAnalyzerMC.h.

Referenced by bookHistograms(), and BTagPerformanceAnalyzerMC().

std::vector<edm::ParameterSet> BTagPerformanceAnalyzerMC::moduleConfig
private

Definition at line 79 of file BTagPerformanceAnalyzerMC.h.

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

bool BTagPerformanceAnalyzerMC::muonPlots
private

Definition at line 90 of file BTagPerformanceAnalyzerMC.h.

Referenced by analyze(), and BTagPerformanceAnalyzerMC().

bool BTagPerformanceAnalyzerMC::ptHatWeight
private

Definition at line 66 of file BTagPerformanceAnalyzerMC.h.

Referenced by analyze().

std::vector<double> BTagPerformanceAnalyzerMC::ptRanges
private

Definition at line 62 of file BTagPerformanceAnalyzerMC.h.

Referenced by bookHistograms(), and getEtaPtBin().

edm::InputTag BTagPerformanceAnalyzerMC::slInfoTag
private

Definition at line 69 of file BTagPerformanceAnalyzerMC.h.

edm::EDGetTokenT<reco::SoftLeptonTagInfoCollection> BTagPerformanceAnalyzerMC::slInfoToken
private

Definition at line 99 of file BTagPerformanceAnalyzerMC.h.

Referenced by analyze(), and BTagPerformanceAnalyzerMC().

std::vector< std::pair<edm::InputTag, edm::InputTag> > BTagPerformanceAnalyzerMC::tagCorrelationInputTags
private

Definition at line 76 of file BTagPerformanceAnalyzerMC.h.

Referenced by analyze(), and BTagPerformanceAnalyzerMC().

std::vector< std::pair<edm::EDGetTokenT<reco::JetTagCollection>, edm::EDGetTokenT<reco::JetTagCollection> > > BTagPerformanceAnalyzerMC::tagCorrelationToken
private

Definition at line 101 of file BTagPerformanceAnalyzerMC.h.

Referenced by analyze(), and BTagPerformanceAnalyzerMC().

std::vector< std::vector<edm::InputTag> > BTagPerformanceAnalyzerMC::tagInfoInputTags
private

Definition at line 77 of file BTagPerformanceAnalyzerMC.h.

Referenced by analyze(), and BTagPerformanceAnalyzerMC().

std::vector<std::vector <edm::EDGetTokenT<edm::View<reco::BaseTagInfo> > > > BTagPerformanceAnalyzerMC::tagInfoToken
private

Definition at line 102 of file BTagPerformanceAnalyzerMC.h.

Referenced by analyze(), and BTagPerformanceAnalyzerMC().

bool BTagPerformanceAnalyzerMC::tauPlots
private

Definition at line 90 of file BTagPerformanceAnalyzerMC.h.

Referenced by analyze(), and BTagPerformanceAnalyzerMC().

std::vector<std::string> BTagPerformanceAnalyzerMC::tiDataFormatType
private

Definition at line 60 of file BTagPerformanceAnalyzerMC.h.

Referenced by analyze(), and BTagPerformanceAnalyzerMC().

bool BTagPerformanceAnalyzerMC::useOldFlavourTool
private

Definition at line 63 of file BTagPerformanceAnalyzerMC.h.

Referenced by analyze().