CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes
BDHadronTrackMonitoringHarvester Class Reference

#include <BDHadronTrackMonitoringHarvester.h>

Inheritance diagram for BDHadronTrackMonitoringHarvester:
DQMEDHarvester edm::one::EDProducer< edm::EndLuminosityBlockProducer, edm::EndRunProducer, edm::EndProcessBlockProducer, edm::one::WatchLuminosityBlocks, edm::one::WatchRuns, edm::one::SharedResources, edm::Accumulator > edm::one::EDProducerBase edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Member Functions

 BDHadronTrackMonitoringHarvester (const edm::ParameterSet &pSet)
 
 ~BDHadronTrackMonitoringHarvester () override
 
- Public Member Functions inherited from DQMEDHarvester
void accumulate (edm::Event const &ev, edm::EventSetup const &es) final
 
void beginLuminosityBlock (edm::LuminosityBlock const &lumi, edm::EventSetup const &) final
 
void beginRun (edm::Run const &run, edm::EventSetup const &) override
 
virtual void dqmAnalyze (DQMStore::IBooker &, DQMStore::IGetter &, edm::Event const &, edm::EventSetup const &)
 
 DQMEDHarvester (edm::ParameterSet const &iConfig)
 
 DQMEDHarvester ()
 
virtual void dqmEndLuminosityBlock (DQMStore::IBooker &, DQMStore::IGetter &, edm::LuminosityBlock const &, edm::EventSetup const &)
 
virtual void dqmEndRun (DQMStore::IBooker &, DQMStore::IGetter &, edm::Run const &, edm::EventSetup const &)
 
void endLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &) final
 
void endLuminosityBlockProduce (edm::LuminosityBlock &lumi, edm::EventSetup const &es) final
 
void endProcessBlockProduce (edm::ProcessBlock &) final
 
void endRun (edm::Run const &, edm::EventSetup const &) override
 
void endRunProduce (edm::Run &run, edm::EventSetup const &es) final
 
 ~DQMEDHarvester () override=default
 
- Public Member Functions inherited from edm::one::EDProducer< edm::EndLuminosityBlockProducer, edm::EndRunProducer, edm::EndProcessBlockProducer, edm::one::WatchLuminosityBlocks, edm::one::WatchRuns, edm::one::SharedResources, edm::Accumulator >
 EDProducer ()=default
 
 EDProducer (const EDProducer &)=delete
 
SerialTaskQueueglobalLuminosityBlocksQueue () final
 
SerialTaskQueueglobalRunsQueue () final
 
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
 
bool wantsGlobalLuminosityBlocks () const final
 
bool wantsGlobalRuns () const final
 
bool wantsInputProcessBlocks () const final
 
bool wantsProcessBlocks () const final
 
- Public Member Functions inherited from edm::one::EDProducerBase
 EDProducerBase ()
 
ModuleDescription const & moduleDescription () const
 
bool wantsStreamLuminosityBlocks () const
 
bool wantsStreamRuns () const
 
 ~EDProducerBase () override
 
- Public Member Functions inherited from edm::ProducerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
std::vector< edm::ProductResolverIndex > const & indiciesForPutProducts (BranchType iBranchType) const
 
 ProducerBase ()
 
std::vector< edm::ProductResolverIndex > const & putTokenIndexToProductResolverIndex () const
 
std::vector< bool > const & recordProvenanceList () const
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
std::function< void(BranchDescription const &)> registrationCallback () const
 used by the fwk to register list of products More...
 
void resolvePutIndicies (BranchType iBranchType, ModuleToResolverIndicies const &iIndicies, std::string const &moduleLabel)
 
TypeLabelList const & typeLabelList () const
 used by the fwk to register the list of products of this module More...
 
 ~ProducerBase () noexcept(false) override
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
void convertCurrentProcessAlias (std::string const &processName)
 Convert "@currentProcess" in InputTag process names to the actual current process name. More...
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
ESResolverIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
std::vector< ESResolverIndex > const & esGetTokenIndicesVector (edm::Transition iTrans) const
 
std::vector< ESRecordIndex > const & esGetTokenRecordIndicesVector (edm::Transition iTrans) const
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector< ProductResolverIndexAndSkipBit > const & itemsToGetFrom (BranchType iType) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::array< std::vector< ModuleDescription const *> *, NumBranchTypes > &modulesAll, std::vector< ModuleProcessName > &modulesInPreviousProcesses, ProductRegistry const &preg, std::map< std::string, ModuleDescription const *> const &labelsToDesc, std::string const &processName) const
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
void selectInputProcessBlocks (ProductRegistry const &productRegistry, ProcessBlockHelperBase const &processBlockHelperBase)
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProductResolverIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

Private Member Functions

void beginJob () override
 
void dqmEndJob (DQMStore::IBooker &, DQMStore::IGetter &) override
 

Private Attributes

MonitorElementnTrk_absolute_bjet
 
MonitorElementnTrk_absolute_cjet
 
MonitorElementnTrk_absolute_dusgjet
 
MonitorElementnTrk_relative_bjet
 
MonitorElementnTrk_relative_cjet
 
MonitorElementnTrk_relative_dusgjet
 
MonitorElementnTrk_std_bjet
 
MonitorElementnTrk_std_cjet
 
MonitorElementnTrk_std_dusgjet
 

Additional Inherited Members

- Public Types inherited from DQMEDHarvester
typedef dqm::harvesting::DQMStore DQMStore
 
typedef dqm::harvesting::MonitorElement MonitorElement
 
- Public Types inherited from edm::one::EDProducerBase
typedef EDProducerBase ModuleType
 
- Public Types inherited from edm::ProducerBase
template<typename T >
using BranchAliasSetterT = ProductRegistryHelper::BranchAliasSetterT< T >
 
using ModuleToResolverIndicies = std::unordered_multimap< std::string, std::tuple< edm::TypeID const *, const char *, edm::ProductResolverIndex > >
 
typedef ProductRegistryHelper::TypeLabelList TypeLabelList
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from edm::one::EDProducerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- Protected Member Functions inherited from edm::ProducerBase
template<Transition Tr = Transition::Event>
auto produces (std::string instanceName) noexcept
 declare what type of product will make and with which optional label More...
 
template<Transition B>
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
template<BranchType B>
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
template<typename ProductType , Transition B>
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
template<class ProductType >
BranchAliasSetterT< ProductType > produces ()
 
template<typename ProductType , BranchType B>
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
template<typename ProductType , BranchType B>
BranchAliasSetterT< ProductType > produces ()
 
template<class ProductType >
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
template<typename ProductType , Transition B>
BranchAliasSetterT< ProductType > produces ()
 
template<Transition Tr = Transition::Event>
auto produces () noexcept
 
ProducesCollector producesCollector ()
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
template<BranchType B = InEvent>
EDConsumerBaseAdaptor< Bconsumes (edm::InputTag tag) noexcept
 
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 ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
template<Transition Tr = Transition::Event>
constexpr auto esConsumes ()
 
template<Transition Tr = Transition::Event>
auto esConsumes (ESInputTag tag)
 
template<Transition Tr = Transition::Event>
ESGetTokenGeneric esConsumes (eventsetup::EventSetupRecordKey const &iRecord, eventsetup::DataKey const &iKey)
 Used with EventSetupRecord::doGet. More...
 
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)
 
void resetItemsToGetFrom (BranchType iType)
 
- Protected Attributes inherited from DQMEDHarvester
DQMStoredqmstore_
 
edm::GetterOfProducts< DQMTokenjobmegetter_
 
edm::EDPutTokenT< DQMTokenjobToken_
 
edm::GetterOfProducts< DQMTokenlumimegetter_
 
edm::EDPutTokenT< DQMTokenlumiToken_
 
edm::GetterOfProducts< DQMTokenrunmegetter_
 
edm::EDPutTokenT< DQMTokenrunToken_
 

Detailed Description

Top level steering routine for b tag performance harvesting.

Definition at line 20 of file BDHadronTrackMonitoringHarvester.h.

Constructor & Destructor Documentation

◆ BDHadronTrackMonitoringHarvester()

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

Definition at line 15 of file BDHadronTrackMonitoringHarvester.cc.

15 {}

◆ ~BDHadronTrackMonitoringHarvester()

BDHadronTrackMonitoringHarvester::~BDHadronTrackMonitoringHarvester ( )
override

Definition at line 17 of file BDHadronTrackMonitoringHarvester.cc.

17 {}

Member Function Documentation

◆ beginJob()

void BDHadronTrackMonitoringHarvester::beginJob ( void  )
overrideprivatevirtual

Reimplemented from DQMEDHarvester.

Definition at line 19 of file BDHadronTrackMonitoringHarvester.cc.

19 {}

◆ dqmEndJob()

void BDHadronTrackMonitoringHarvester::dqmEndJob ( DQMStore::IBooker ibook,
DQMStore::IGetter iget 
)
overrideprivatevirtual

Implements DQMEDHarvester.

Definition at line 21 of file BDHadronTrackMonitoringHarvester.cc.

References dqm::implementation::IBooker::book1D(), dqm::implementation::IGetter::get(), dqm::impl::MonitorElement::getMean(), dqm::impl::MonitorElement::getRMS(), mps_fire::i, SiStripPI::max, dqm::impl::MonitorElement::setBinLabel(), dqm::implementation::NavigatorBase::setCurrentFolder(), RecoBTag::setTDRStyle(), and BDHadronTrackMonitoringAnalyzer::TrkHistCat.

21  {
22  // ***********************
23  //
24  // Book all new histograms.
25  //
26  // ***********************
28  ibook.setCurrentFolder("BDHadronTracks/JetContent");
29 
30  // b jets
31  // absolute average number of tracks
32  nTrk_absolute_bjet = ibook.book1D("nTrk_absolute_bjet", "absolute average number of tracks in b jets", 6, -0.5, 5.5);
33  for (unsigned int i = 0; i < BDHadronTrackMonitoringAnalyzer::TrkHistCat.size(); i++) {
35  }
37  nTrk_absolute_bjet->setAxisTitle("average number of tracks", 2);
38 
39  // relative (in percent) average number of tracks
40  nTrk_relative_bjet = ibook.book1D("nTrk_relative_bjet", "relative average number of tracks in b jets", 6, -0.5, 5.5);
41  for (unsigned int i = 0; i < BDHadronTrackMonitoringAnalyzer::TrkHistCat.size(); i++) {
43  }
45  nTrk_relative_bjet->setAxisTitle("average fraction of tracks", 2);
46 
47  // standard deviation of number of tracks
48  nTrk_std_bjet = ibook.book1D("nTrk_std_bjet", "RMS of number of tracks in b jets", 6, -0.5, 5.5);
49  for (unsigned int i = 0; i < BDHadronTrackMonitoringAnalyzer::TrkHistCat.size(); i++) {
51  }
52  nTrk_std_bjet->setAxisRange(0, 3, 2);
53  nTrk_std_bjet->setAxisTitle("RMS of number of tracks", 2);
54 
55  // c jets
56  nTrk_absolute_cjet = ibook.book1D("nTrk_absolute_cjet", "absolute average number of tracks in c jets", 6, -0.5, 5.5);
57  for (unsigned int i = 0; i < BDHadronTrackMonitoringAnalyzer::TrkHistCat.size(); i++) {
59  }
61  nTrk_absolute_cjet->setAxisTitle("average number of tracks", 2);
62 
63  nTrk_relative_cjet = ibook.book1D("nTrk_relative_cjet", "relative average number of tracks in c jets", 6, -0.5, 5.5);
64  for (unsigned int i = 0; i < BDHadronTrackMonitoringAnalyzer::TrkHistCat.size(); i++) {
66  }
68  nTrk_relative_cjet->setAxisTitle("average fraction of tracks", 2);
69 
70  nTrk_std_cjet = ibook.book1D("nTrk_std_cjet", "RMS of number of tracks in c jets", 6, -0.5, 5.5);
71  for (unsigned int i = 0; i < BDHadronTrackMonitoringAnalyzer::TrkHistCat.size(); i++) {
73  }
74  nTrk_std_cjet->setAxisRange(0, 3, 2);
75  nTrk_std_cjet->setAxisTitle("RMS of number of tracks", 2);
76 
77  // udsg jets
79  ibook.book1D("nTrk_absolute_dusgjet", "absolute average number of tracks in dusg jets", 6, -0.5, 5.5);
80  for (unsigned int i = 0; i < BDHadronTrackMonitoringAnalyzer::TrkHistCat.size(); i++) {
82  }
84  nTrk_absolute_dusgjet->setAxisTitle("average number of tracks", 2);
85 
87  ibook.book1D("nTrk_relative_dusgjet", "relative average number of tracks in dusg jets", 6, -0.5, 5.5);
88  for (unsigned int i = 0; i < BDHadronTrackMonitoringAnalyzer::TrkHistCat.size(); i++) {
90  }
92  nTrk_relative_dusgjet->setAxisTitle("average fraction of tracks", 2);
93 
94  nTrk_std_dusgjet = ibook.book1D("nTrk_std_dusgjet", "RMS of number of tracks in dusg jets", 6, -0.5, 5.5);
95  for (unsigned int i = 0; i < BDHadronTrackMonitoringAnalyzer::TrkHistCat.size(); i++) {
97  }
99  nTrk_std_dusgjet->setAxisTitle("RMS of number of tracks", 2);
100 
101  // ***********************
102  //
103  // get all the old histograms
104  //
105  // ***********************
106 
107  // b jets
108  MonitorElement *nTrk_bjet[6];
109  for (unsigned int i = 0; i < BDHadronTrackMonitoringAnalyzer::TrkHistCat.size(); i++) {
110  nTrk_bjet[i] = iget.get("BDHadronTracks/JetContent/nTrk_bjet_" + BDHadronTrackMonitoringAnalyzer::TrkHistCat[i]);
111  }
112  MonitorElement *nTrkAll_bjet = iget.get("BDHadronTracks/JetContent/nTrkAll_bjet");
113 
114  // c jets
115  MonitorElement *nTrk_cjet[6];
116  for (unsigned int i = 0; i < BDHadronTrackMonitoringAnalyzer::TrkHistCat.size(); i++) {
117  nTrk_cjet[i] = iget.get("BDHadronTracks/JetContent/nTrk_cjet_" + BDHadronTrackMonitoringAnalyzer::TrkHistCat[i]);
118  }
119  MonitorElement *nTrkAll_cjet = iget.get("BDHadronTracks/JetContent/nTrkAll_cjet");
120 
121  // dusg jets
122  MonitorElement *nTrk_dusgjet[6];
123  for (unsigned int i = 0; i < BDHadronTrackMonitoringAnalyzer::TrkHistCat.size(); i++) {
124  nTrk_dusgjet[i] =
125  iget.get("BDHadronTracks/JetContent/nTrk_dusgjet_" + BDHadronTrackMonitoringAnalyzer::TrkHistCat[i]);
126  }
127  MonitorElement *nTrkAll_dusgjet = iget.get("BDHadronTracks/JetContent/nTrkAll_dusgjet");
128 
129  // ***********************
130  //
131  // Calculate contents of new histograms
132  //
133  // ***********************
134 
135  // b jets
136  float mean_bjets[6];
137  float std_bjets[6];
138  float meanAll_bjets;
139  meanAll_bjets = std::max(0.01, nTrkAll_bjet->getMean(1));
140  for (unsigned int i = 0; i < BDHadronTrackMonitoringAnalyzer::TrkHistCat.size(); i++) {
141  mean_bjets[i] = nTrk_bjet[i]->getMean(1); // mean number of tracks per category
142  std_bjets[i] = nTrk_bjet[i]->getRMS(1);
143  nTrk_absolute_bjet->setBinContent(i + 1, mean_bjets[i]);
144  nTrk_relative_bjet->setBinContent(i + 1, mean_bjets[i] / meanAll_bjets);
145  nTrk_std_bjet->setBinContent(i + 1, std_bjets[i]);
146  }
147 
148  // c jets
149  float mean_cjets[6];
150  float std_cjets[6];
151  float meanAll_cjets;
152  meanAll_cjets = std::max(0.01, nTrkAll_cjet->getMean(1));
153  for (unsigned int i = 0; i < BDHadronTrackMonitoringAnalyzer::TrkHistCat.size(); i++) {
154  mean_cjets[i] = nTrk_cjet[i]->getMean(1); // mean number of tracks per category
155  std_cjets[i] = nTrk_cjet[i]->getRMS(1);
156  nTrk_absolute_cjet->setBinContent(i + 1, mean_cjets[i]);
157  nTrk_relative_cjet->setBinContent(i + 1, mean_cjets[i] / meanAll_cjets);
158  nTrk_std_cjet->setBinContent(i + 1, std_cjets[i]);
159  }
160 
161  // dusg jets
162  float mean_dusgjets[6];
163  float std_dusgjets[6];
164  float meanAll_dusgjets;
165  meanAll_dusgjets = std::max(0.01, nTrkAll_dusgjet->getMean(1));
166  for (unsigned int i = 0; i < BDHadronTrackMonitoringAnalyzer::TrkHistCat.size(); i++) {
167  mean_dusgjets[i] = nTrk_dusgjet[i]->getMean(1); // mean number of tracks per category
168  std_dusgjets[i] = nTrk_dusgjet[i]->getRMS(1);
169  nTrk_absolute_dusgjet->setBinContent(i + 1, mean_dusgjets[i]);
170  nTrk_relative_dusgjet->setBinContent(i + 1, mean_dusgjets[i] / meanAll_dusgjets);
171  nTrk_std_dusgjet->setBinContent(i + 1, std_dusgjets[i]);
172  }
173 }
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:36
TStyle * setTDRStyle()
Definition: Tools.cc:343
virtual double getRMS(int axis=1) const
get RMS of histogram along x, y or z axis (axis=1, 2, 3 respectively)
virtual void setAxisRange(double xmin, double xmax, int axis=1)
set x-, y- or z-axis range (axis=1, 2, 3 respectively)
virtual void setBinLabel(int bin, const std::string &label, int axis=1)
set bin label for x, y or z axis (axis=1, 2, 3 respectively)
static const std::vector< std::string > TrkHistCat
virtual void setBinContent(int binx, double content)
set content of bin (1-D)
virtual MonitorElement * get(std::string const &fullpath) const
Definition: DQMStore.cc:712
virtual double getMean(int axis=1) const
get mean value of histogram along x, y or z axis (axis=1, 2, 3 respectively)
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
Definition: DQMStore.h:98
virtual void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)

Member Data Documentation

◆ nTrk_absolute_bjet

MonitorElement* BDHadronTrackMonitoringHarvester::nTrk_absolute_bjet
private

Definition at line 31 of file BDHadronTrackMonitoringHarvester.h.

◆ nTrk_absolute_cjet

MonitorElement* BDHadronTrackMonitoringHarvester::nTrk_absolute_cjet
private

Definition at line 36 of file BDHadronTrackMonitoringHarvester.h.

◆ nTrk_absolute_dusgjet

MonitorElement* BDHadronTrackMonitoringHarvester::nTrk_absolute_dusgjet
private

Definition at line 41 of file BDHadronTrackMonitoringHarvester.h.

◆ nTrk_relative_bjet

MonitorElement * BDHadronTrackMonitoringHarvester::nTrk_relative_bjet
private

Definition at line 31 of file BDHadronTrackMonitoringHarvester.h.

◆ nTrk_relative_cjet

MonitorElement * BDHadronTrackMonitoringHarvester::nTrk_relative_cjet
private

Definition at line 36 of file BDHadronTrackMonitoringHarvester.h.

◆ nTrk_relative_dusgjet

MonitorElement * BDHadronTrackMonitoringHarvester::nTrk_relative_dusgjet
private

Definition at line 41 of file BDHadronTrackMonitoringHarvester.h.

◆ nTrk_std_bjet

MonitorElement * BDHadronTrackMonitoringHarvester::nTrk_std_bjet
private

Definition at line 31 of file BDHadronTrackMonitoringHarvester.h.

◆ nTrk_std_cjet

MonitorElement * BDHadronTrackMonitoringHarvester::nTrk_std_cjet
private

Definition at line 36 of file BDHadronTrackMonitoringHarvester.h.

◆ nTrk_std_dusgjet

MonitorElement * BDHadronTrackMonitoringHarvester::nTrk_std_dusgjet
private

Definition at line 41 of file BDHadronTrackMonitoringHarvester.h.