CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Attributes
MtdTracksHarvester Class Reference
Inheritance diagram for MtdTracksHarvester:
DQMEDHarvester edm::one::EDProducer< T > edm::one::EDProducerBase edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Member Functions

 MtdTracksHarvester (const edm::ParameterSet &iConfig)
 
 ~MtdTracksHarvester () override
 
- Public Member Functions inherited from DQMEDHarvester
void accumulate (edm::Event const &ev, edm::EventSetup const &es) final
 
void beginJob () override
 
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< T >
 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
 
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)
 
 ~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
 
ESProxyIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
std::vector< ESProxyIndex > 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
 
bool registeredToConsumeMany (TypeID const &, 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::ESRecordsToProxyIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &descriptions)
 
- 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

void dqmEndJob (DQMStore::IBooker &, DQMStore::IGetter &) override
 
- Protected Member Functions inherited from edm::ProducerBase
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< B > consumes (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 ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
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 () noexcept
 
template<Transition Tr = Transition::Event>
auto esConsumes (ESInputTag tag) noexcept
 
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)
 

Private Attributes

const std::string folder_
 
MonitorElementmeBtlEtaEff_
 
MonitorElementmeBtlPhiEff_
 
MonitorElementmeBtlPtEff_
 
MonitorElementmeEtlEtaEff_ [2]
 
MonitorElementmeEtlPhiEff_ [2]
 
MonitorElementmeEtlPtEff_ [2]
 
MonitorElementmeMVAEtaMatchEff_
 
MonitorElementmeMVAEtaSelEff_
 
MonitorElementmeMVAPtMatchEff_
 
MonitorElementmeMVAPtSelEff_
 

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
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
 
- 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

Definition at line 13 of file MtdTracksHarvester.cc.

Constructor & Destructor Documentation

MtdTracksHarvester::MtdTracksHarvester ( const edm::ParameterSet iConfig)
explicit

Definition at line 40 of file MtdTracksHarvester.cc.

41  : folder_(iConfig.getParameter<std::string>("folder")) {}
const std::string folder_
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
MtdTracksHarvester::~MtdTracksHarvester ( )
override

Definition at line 43 of file MtdTracksHarvester.cc.

43 {}

Member Function Documentation

void MtdTracksHarvester::dqmEndJob ( DQMStore::IBooker ibook,
DQMStore::IGetter igetter 
)
overrideprotectedvirtual

Implements DQMEDHarvester.

Definition at line 46 of file MtdTracksHarvester.cc.

References dqm::implementation::IBooker::book1D(), dqm::implementation::NavigatorBase::cd(), folder_, dqm::implementation::IGetter::get(), dqm::impl::MonitorElement::getBinContent(), dqm::impl::MonitorElement::getNbinsX(), dqm::legacy::MonitorElement::getTH1(), mps_fire::i, meBtlEtaEff_, meBtlPhiEff_, meBtlPtEff_, meEtlEtaEff_, meEtlPhiEff_, meEtlPtEff_, meMVAEtaMatchEff_, meMVAEtaSelEff_, meMVAPtMatchEff_, meMVAPtSelEff_, funct::pow(), dqm::impl::MonitorElement::setBinContent(), dqm::impl::MonitorElement::setBinError(), and mathSSE::sqrt().

46  {
47  // --- Get the monitoring histograms
48  MonitorElement* meBTLTrackEffEtaTot = igetter.get(folder_ + "TrackBTLEffEtaTot");
49  MonitorElement* meBTLTrackEffPhiTot = igetter.get(folder_ + "TrackBTLEffPhiTot");
50  MonitorElement* meBTLTrackEffPtTot = igetter.get(folder_ + "TrackBTLEffPtTot");
51  MonitorElement* meBTLTrackEffEtaMtd = igetter.get(folder_ + "TrackBTLEffEtaMtd");
52  MonitorElement* meBTLTrackEffPhiMtd = igetter.get(folder_ + "TrackBTLEffPhiMtd");
53  MonitorElement* meBTLTrackEffPtMtd = igetter.get(folder_ + "TrackBTLEffPtMtd");
54  MonitorElement* meETLTrackEffEtaTotZneg = igetter.get(folder_ + "TrackETLEffEtaTotZneg");
55  MonitorElement* meETLTrackEffPhiTotZneg = igetter.get(folder_ + "TrackETLEffPhiTotZneg");
56  MonitorElement* meETLTrackEffPtTotZneg = igetter.get(folder_ + "TrackETLEffPtTotZneg");
57  MonitorElement* meETLTrackEffEtaMtdZneg = igetter.get(folder_ + "TrackETLEffEtaMtdZneg");
58  MonitorElement* meETLTrackEffPhiMtdZneg = igetter.get(folder_ + "TrackETLEffPhiMtdZneg");
59  MonitorElement* meETLTrackEffPtMtdZneg = igetter.get(folder_ + "TrackETLEffPtMtdZneg");
60  MonitorElement* meETLTrackEffEtaTotZpos = igetter.get(folder_ + "TrackETLEffEtaTotZpos");
61  MonitorElement* meETLTrackEffPhiTotZpos = igetter.get(folder_ + "TrackETLEffPhiTotZpos");
62  MonitorElement* meETLTrackEffPtTotZpos = igetter.get(folder_ + "TrackETLEffPtTotZpos");
63  MonitorElement* meETLTrackEffEtaMtdZpos = igetter.get(folder_ + "TrackETLEffEtaMtdZpos");
64  MonitorElement* meETLTrackEffPhiMtdZpos = igetter.get(folder_ + "TrackETLEffPhiMtdZpos");
65  MonitorElement* meETLTrackEffPtMtdZpos = igetter.get(folder_ + "TrackETLEffPtMtdZpos");
66  MonitorElement* meMVATrackEffPtTot = igetter.get(folder_ + "MVAEffPtTot");
67  MonitorElement* meMVATrackMatchedEffPtTot = igetter.get(folder_ + "MVAMatchedEffPtTot");
68  MonitorElement* meMVATrackMatchedEffPtMtd = igetter.get(folder_ + "MVAMatchedEffPtMtd");
69  MonitorElement* meMVATrackEffEtaTot = igetter.get(folder_ + "MVAEffEtaTot");
70  MonitorElement* meMVATrackMatchedEffEtaTot = igetter.get(folder_ + "MVAMatchedEffEtaTot");
71  MonitorElement* meMVATrackMatchedEffEtaMtd = igetter.get(folder_ + "MVAMatchedEffEtaMtd");
72 
73  if (!meBTLTrackEffEtaTot || !meBTLTrackEffPhiTot || !meBTLTrackEffPtTot || !meBTLTrackEffEtaMtd ||
74  !meBTLTrackEffPhiMtd || !meBTLTrackEffPtMtd || !meETLTrackEffEtaTotZneg || !meETLTrackEffPhiTotZneg ||
75  !meETLTrackEffPtTotZneg || !meETLTrackEffEtaMtdZneg || !meETLTrackEffPhiMtdZneg || !meETLTrackEffPtMtdZneg ||
76  !meETLTrackEffEtaTotZpos || !meETLTrackEffPhiTotZpos || !meETLTrackEffPtTotZpos || !meETLTrackEffEtaMtdZpos ||
77  !meETLTrackEffPhiMtdZpos || !meETLTrackEffPtMtdZpos || !meMVATrackEffPtTot || !meMVATrackMatchedEffPtTot ||
78  !meMVATrackMatchedEffPtMtd || !meMVATrackEffEtaTot || !meMVATrackMatchedEffEtaTot ||
79  !meMVATrackMatchedEffEtaMtd) {
80  edm::LogError("MtdTracksHarvester") << "Monitoring histograms not found!" << std::endl;
81  return;
82  }
83 
84  // --- Book histograms
85  ibook.cd(folder_);
86  meBtlEtaEff_ = ibook.book1D("BtlEtaEff",
87  " Track Efficiency VS Eta;#eta;Efficiency",
88  meBTLTrackEffEtaTot->getNbinsX(),
89  meBTLTrackEffEtaTot->getTH1()->GetXaxis()->GetXmin(),
90  meBTLTrackEffEtaTot->getTH1()->GetXaxis()->GetXmax());
91  meBtlPhiEff_ = ibook.book1D("BtlPhiEff",
92  "Track Efficiency VS Phi;#phi [rad];Efficiency",
93  meBTLTrackEffPhiTot->getNbinsX(),
94  meBTLTrackEffPhiTot->getTH1()->GetXaxis()->GetXmin(),
95  meBTLTrackEffPhiTot->getTH1()->GetXaxis()->GetXmax());
96  meBtlPtEff_ = ibook.book1D("BtlPtEff",
97  "Track Efficiency VS Pt;Pt [GeV];Efficiency",
98  meBTLTrackEffPtTot->getNbinsX(),
99  meBTLTrackEffPtTot->getTH1()->GetXaxis()->GetXmin(),
100  meBTLTrackEffPtTot->getTH1()->GetXaxis()->GetXmax());
101  meEtlEtaEff_[0] = ibook.book1D("EtlEtaEffZneg",
102  " Track Efficiency VS Eta (-Z);#eta;Efficiency",
103  meETLTrackEffEtaTotZneg->getNbinsX(),
104  meETLTrackEffEtaTotZneg->getTH1()->GetXaxis()->GetXmin(),
105  meETLTrackEffEtaTotZneg->getTH1()->GetXaxis()->GetXmax());
106  meEtlPhiEff_[0] = ibook.book1D("EtlPhiEffZneg",
107  "Track Efficiency VS Phi (-Z);#phi [rad];Efficiency",
108  meETLTrackEffPhiTotZneg->getNbinsX(),
109  meETLTrackEffPhiTotZneg->getTH1()->GetXaxis()->GetXmin(),
110  meETLTrackEffPhiTotZneg->getTH1()->GetXaxis()->GetXmax());
111  meEtlPtEff_[0] = ibook.book1D("EtlPtEffZneg",
112  "Track Efficiency VS Pt (-Z);Pt [GeV];Efficiency",
113  meETLTrackEffPtTotZneg->getNbinsX(),
114  meETLTrackEffPtTotZneg->getTH1()->GetXaxis()->GetXmin(),
115  meETLTrackEffPtTotZneg->getTH1()->GetXaxis()->GetXmax());
116  meEtlEtaEff_[1] = ibook.book1D("EtlEtaEffZpos",
117  " Track Efficiency VS Eta (+Z);#eta;Efficiency",
118  meETLTrackEffEtaTotZpos->getNbinsX(),
119  meETLTrackEffEtaTotZpos->getTH1()->GetXaxis()->GetXmin(),
120  meETLTrackEffEtaTotZpos->getTH1()->GetXaxis()->GetXmax());
121  meEtlPhiEff_[1] = ibook.book1D("EtlPhiEffZpos",
122  "Track Efficiency VS Phi (+Z);#phi [rad];Efficiency",
123  meETLTrackEffPhiTotZpos->getNbinsX(),
124  meETLTrackEffPhiTotZpos->getTH1()->GetXaxis()->GetXmin(),
125  meETLTrackEffPhiTotZpos->getTH1()->GetXaxis()->GetXmax());
126  meEtlPtEff_[1] = ibook.book1D("EtlPtEffZpos",
127  "Track Efficiency VS Pt (+Z);Pt [GeV];Efficiency",
128  meETLTrackEffPtTotZpos->getNbinsX(),
129  meETLTrackEffPtTotZpos->getTH1()->GetXaxis()->GetXmin(),
130  meETLTrackEffPtTotZpos->getTH1()->GetXaxis()->GetXmax());
131  meMVAPtSelEff_ = ibook.book1D("MVAPtSelEff",
132  "Track selected efficiency VS Pt;Pt [GeV];Efficiency",
133  meMVATrackEffPtTot->getNbinsX(),
134  meMVATrackEffPtTot->getTH1()->GetXaxis()->GetXmin(),
135  meMVATrackEffPtTot->getTH1()->GetXaxis()->GetXmax());
136  meMVAEtaSelEff_ = ibook.book1D("MVAEtaSelEff",
137  "Track selected efficiency VS Eta;Eta;Efficiency",
138  meMVATrackEffEtaTot->getNbinsX(),
139  meMVATrackEffEtaTot->getTH1()->GetXaxis()->GetXmin(),
140  meMVATrackEffEtaTot->getTH1()->GetXaxis()->GetXmax());
141  meMVAPtMatchEff_ = ibook.book1D("MVAPtMatchEff",
142  "Track matched to GEN efficiency VS Pt;Pt [GeV];Efficiency",
143  meMVATrackMatchedEffPtTot->getNbinsX(),
144  meMVATrackMatchedEffPtTot->getTH1()->GetXaxis()->GetXmin(),
145  meMVATrackMatchedEffPtTot->getTH1()->GetXaxis()->GetXmax());
146  meMVAEtaMatchEff_ = ibook.book1D("MVAEtaMatchEff",
147  "Track matched to GEN efficiency VS Eta;Eta;Efficiency",
148  meMVATrackMatchedEffEtaTot->getNbinsX(),
149  meMVATrackMatchedEffEtaTot->getTH1()->GetXaxis()->GetXmin(),
150  meMVATrackMatchedEffEtaTot->getTH1()->GetXaxis()->GetXmax());
151 
152  meBtlEtaEff_->getTH1()->SetMinimum(0.);
153  meBtlPhiEff_->getTH1()->SetMinimum(0.);
154  meBtlPtEff_->getTH1()->SetMinimum(0.);
155  for (int i = 0; i < 2; i++) {
156  meEtlEtaEff_[i]->getTH1()->SetMinimum(0.);
157  meEtlPhiEff_[i]->getTH1()->SetMinimum(0.);
158  meEtlPtEff_[i]->getTH1()->SetMinimum(0.);
159  }
160  meMVAPtSelEff_->getTH1()->SetMinimum(0.);
161  meMVAEtaSelEff_->getTH1()->SetMinimum(0.);
162  meMVAPtMatchEff_->getTH1()->SetMinimum(0.);
163  meMVAEtaMatchEff_->getTH1()->SetMinimum(0.);
164 
165  // --- Calculate efficiency BTL
166  for (int ibin = 1; ibin <= meBTLTrackEffEtaTot->getNbinsX(); ibin++) {
167  double eff = meBTLTrackEffEtaMtd->getBinContent(ibin) / meBTLTrackEffEtaTot->getBinContent(ibin);
168  double bin_err = sqrt((meBTLTrackEffEtaMtd->getBinContent(ibin) *
169  (meBTLTrackEffEtaTot->getBinContent(ibin) - meBTLTrackEffEtaMtd->getBinContent(ibin))) /
170  pow(meBTLTrackEffEtaTot->getBinContent(ibin), 3));
171  if (meBTLTrackEffEtaTot->getBinContent(ibin) == 0) {
172  eff = 0;
173  bin_err = 0;
174  }
175  meBtlEtaEff_->setBinContent(ibin, eff);
176  meBtlEtaEff_->setBinError(ibin, bin_err);
177  }
178  for (int ibin = 1; ibin <= meBTLTrackEffPhiTot->getNbinsX(); ibin++) {
179  double eff = meBTLTrackEffPhiMtd->getBinContent(ibin) / meBTLTrackEffPhiTot->getBinContent(ibin);
180  double bin_err = sqrt((meBTLTrackEffPhiMtd->getBinContent(ibin) *
181  (meBTLTrackEffPhiTot->getBinContent(ibin) - meBTLTrackEffPhiMtd->getBinContent(ibin))) /
182  pow(meBTLTrackEffPhiTot->getBinContent(ibin), 3));
183  if (meBTLTrackEffPhiTot->getBinContent(ibin) == 0) {
184  eff = 0;
185  bin_err = 0;
186  }
187  meBtlPhiEff_->setBinContent(ibin, eff);
188  meBtlPhiEff_->setBinError(ibin, bin_err);
189  }
190  for (int ibin = 1; ibin <= meBTLTrackEffPtTot->getNbinsX(); ibin++) {
191  double eff = meBTLTrackEffPtMtd->getBinContent(ibin) / meBTLTrackEffPtTot->getBinContent(ibin);
192  double bin_err = sqrt((meBTLTrackEffPtMtd->getBinContent(ibin) *
193  (meBTLTrackEffPtTot->getBinContent(ibin) - meBTLTrackEffPtMtd->getBinContent(ibin))) /
194  pow(meBTLTrackEffPtTot->getBinContent(ibin), 3));
195  if (meBTLTrackEffPtTot->getBinContent(ibin) == 0) {
196  eff = 0;
197  bin_err = 0;
198  }
199  meBtlPtEff_->setBinContent(ibin, eff);
200  meBtlPtEff_->setBinError(ibin, bin_err);
201  }
202  // --- Calculate efficiency ETL
203  for (int ibin = 1; ibin <= meETLTrackEffEtaTotZneg->getNbinsX(); ibin++) {
204  double eff = meETLTrackEffEtaMtdZneg->getBinContent(ibin) / meETLTrackEffEtaTotZneg->getBinContent(ibin);
205  double bin_err =
206  sqrt((meETLTrackEffEtaMtdZneg->getBinContent(ibin) *
207  (meETLTrackEffEtaTotZneg->getBinContent(ibin) - meETLTrackEffEtaMtdZneg->getBinContent(ibin))) /
208  pow(meETLTrackEffEtaTotZneg->getBinContent(ibin), 3));
209  if (meETLTrackEffEtaTotZneg->getBinContent(ibin) == 0) {
210  eff = 0;
211  bin_err = 0;
212  }
213  meEtlEtaEff_[0]->setBinContent(ibin, eff);
214  meEtlEtaEff_[0]->setBinError(ibin, bin_err);
215  }
216 
217  for (int ibin = 1; ibin <= meETLTrackEffEtaTotZpos->getNbinsX(); ibin++) {
218  double eff = meETLTrackEffEtaMtdZpos->getBinContent(ibin) / meETLTrackEffEtaTotZpos->getBinContent(ibin);
219  double bin_err =
220  sqrt((meETLTrackEffEtaMtdZpos->getBinContent(ibin) *
221  (meETLTrackEffEtaTotZpos->getBinContent(ibin) - meETLTrackEffEtaMtdZpos->getBinContent(ibin))) /
222  pow(meETLTrackEffEtaTotZpos->getBinContent(ibin), 3));
223  if (meETLTrackEffEtaTotZpos->getBinContent(ibin) == 0) {
224  eff = 0;
225  bin_err = 0;
226  }
227  meEtlEtaEff_[1]->setBinContent(ibin, eff);
228  meEtlEtaEff_[1]->setBinError(ibin, bin_err);
229  }
230 
231  for (int ibin = 1; ibin <= meETLTrackEffPhiTotZneg->getNbinsX(); ibin++) {
232  double eff = meETLTrackEffPhiMtdZneg->getBinContent(ibin) / meETLTrackEffPhiTotZneg->getBinContent(ibin);
233  double bin_err =
234  sqrt((meETLTrackEffPhiMtdZneg->getBinContent(ibin) *
235  (meETLTrackEffPhiTotZneg->getBinContent(ibin) - meETLTrackEffPhiMtdZneg->getBinContent(ibin))) /
236  pow(meETLTrackEffPhiTotZneg->getBinContent(ibin), 3));
237  if (meETLTrackEffPhiTotZneg->getBinContent(ibin) == 0) {
238  eff = 0;
239  bin_err = 0;
240  }
241  meEtlPhiEff_[0]->setBinContent(ibin, eff);
242  meEtlPhiEff_[0]->setBinError(ibin, bin_err);
243  }
244 
245  for (int ibin = 1; ibin <= meETLTrackEffPhiTotZpos->getNbinsX(); ibin++) {
246  double eff = meETLTrackEffPhiMtdZpos->getBinContent(ibin) / meETLTrackEffPhiTotZpos->getBinContent(ibin);
247  double bin_err =
248  sqrt((meETLTrackEffPhiMtdZpos->getBinContent(ibin) *
249  (meETLTrackEffPhiTotZpos->getBinContent(ibin) - meETLTrackEffPhiMtdZpos->getBinContent(ibin))) /
250  pow(meETLTrackEffPhiTotZpos->getBinContent(ibin), 3));
251  if (meETLTrackEffPhiTotZpos->getBinContent(ibin) == 0) {
252  eff = 0;
253  bin_err = 0;
254  }
255  meEtlPhiEff_[1]->setBinContent(ibin, eff);
256  meEtlPhiEff_[1]->setBinError(ibin, bin_err);
257  }
258 
259  for (int ibin = 1; ibin <= meETLTrackEffPtTotZneg->getNbinsX(); ibin++) {
260  double eff = meETLTrackEffPtMtdZneg->getBinContent(ibin) / meETLTrackEffPtTotZneg->getBinContent(ibin);
261  double bin_err =
262  sqrt((meETLTrackEffPtMtdZneg->getBinContent(ibin) *
263  (meETLTrackEffPtTotZneg->getBinContent(ibin) - meETLTrackEffPtMtdZneg->getBinContent(ibin))) /
264  pow(meETLTrackEffPtTotZneg->getBinContent(ibin), 3));
265  if (meETLTrackEffPtTotZneg->getBinContent(ibin) == 0) {
266  eff = 0;
267  bin_err = 0;
268  }
269  meEtlPtEff_[0]->setBinContent(ibin, eff);
270  meEtlPtEff_[0]->setBinError(ibin, bin_err);
271  }
272 
273  for (int ibin = 1; ibin <= meETLTrackEffPtTotZpos->getNbinsX(); ibin++) {
274  double eff = meETLTrackEffPtMtdZpos->getBinContent(ibin) / meETLTrackEffPtTotZpos->getBinContent(ibin);
275  double bin_err =
276  sqrt((meETLTrackEffPtMtdZpos->getBinContent(ibin) *
277  (meETLTrackEffPtTotZpos->getBinContent(ibin) - meETLTrackEffPtMtdZpos->getBinContent(ibin))) /
278  pow(meETLTrackEffPtTotZpos->getBinContent(ibin), 3));
279  if (meETLTrackEffPtTotZpos->getBinContent(ibin) == 0) {
280  eff = 0;
281  bin_err = 0;
282  }
283  meEtlPtEff_[1]->setBinContent(ibin, eff);
284  meEtlPtEff_[1]->setBinError(ibin, bin_err);
285  }
286 
287  for (int ibin = 1; ibin <= meMVATrackEffPtTot->getNbinsX(); ibin++) {
288  double eff = meMVATrackMatchedEffPtTot->getBinContent(ibin) / meMVATrackEffPtTot->getBinContent(ibin);
289  double bin_err = sqrt((meMVATrackMatchedEffPtTot->getBinContent(ibin) *
290  (meMVATrackEffPtTot->getBinContent(ibin) - meMVATrackMatchedEffPtTot->getBinContent(ibin))) /
291  pow(meMVATrackEffPtTot->getBinContent(ibin), 3));
292  if (meMVATrackEffPtTot->getBinContent(ibin) == 0) {
293  eff = 0;
294  bin_err = 0;
295  }
296  meMVAPtSelEff_->setBinContent(ibin, eff);
297  meMVAPtSelEff_->setBinError(ibin, bin_err);
298  }
299 
300  for (int ibin = 1; ibin <= meMVATrackEffEtaTot->getNbinsX(); ibin++) {
301  double eff = meMVATrackMatchedEffEtaTot->getBinContent(ibin) / meMVATrackEffEtaTot->getBinContent(ibin);
302  double bin_err =
303  sqrt((meMVATrackMatchedEffEtaTot->getBinContent(ibin) *
304  (meMVATrackEffEtaTot->getBinContent(ibin) - meMVATrackMatchedEffEtaTot->getBinContent(ibin))) /
305  pow(meMVATrackEffEtaTot->getBinContent(ibin), 3));
306  if (meMVATrackEffEtaTot->getBinContent(ibin) == 0) {
307  eff = 0;
308  bin_err = 0;
309  }
310  meMVAEtaSelEff_->setBinContent(ibin, eff);
311  meMVAEtaSelEff_->setBinError(ibin, bin_err);
312  }
313 
314  for (int ibin = 1; ibin <= meMVATrackMatchedEffPtTot->getNbinsX(); ibin++) {
315  double eff = meMVATrackMatchedEffPtMtd->getBinContent(ibin) / meMVATrackMatchedEffPtTot->getBinContent(ibin);
316  double bin_err =
317  sqrt((meMVATrackMatchedEffPtMtd->getBinContent(ibin) *
318  (meMVATrackMatchedEffPtTot->getBinContent(ibin) - meMVATrackMatchedEffPtMtd->getBinContent(ibin))) /
319  pow(meMVATrackMatchedEffPtTot->getBinContent(ibin), 3));
320  if (meMVATrackMatchedEffPtTot->getBinContent(ibin) == 0) {
321  eff = 0;
322  bin_err = 0;
323  }
324  meMVAPtMatchEff_->setBinContent(ibin, eff);
325  meMVAPtMatchEff_->setBinError(ibin, bin_err);
326  }
327 
328  for (int ibin = 1; ibin <= meMVATrackMatchedEffEtaTot->getNbinsX(); ibin++) {
329  double eff = meMVATrackMatchedEffEtaMtd->getBinContent(ibin) / meMVATrackMatchedEffEtaTot->getBinContent(ibin);
330  double bin_err =
331  sqrt((meMVATrackMatchedEffEtaMtd->getBinContent(ibin) *
332  (meMVATrackMatchedEffEtaTot->getBinContent(ibin) - meMVATrackMatchedEffEtaMtd->getBinContent(ibin))) /
333  pow(meMVATrackMatchedEffEtaTot->getBinContent(ibin), 3));
334  if (meMVATrackMatchedEffEtaTot->getBinContent(ibin) == 0) {
335  eff = 0;
336  bin_err = 0;
337  }
338  meMVAEtaMatchEff_->setBinContent(ibin, eff);
339  meMVAEtaMatchEff_->setBinError(ibin, bin_err);
340  }
341 }
MonitorElement * meMVAEtaMatchEff_
Log< level::Error, false > LogError
virtual int getNbinsX() const
get # of bins in X-axis
MonitorElement * meMVAPtSelEff_
T sqrt(T t)
Definition: SSEVec.h:19
virtual MonitorElement * get(std::string const &fullpath) const
Definition: DQMStore.cc:673
MonitorElement * meEtlPhiEff_[2]
MonitorElement * meMVAPtMatchEff_
MonitorElement * meEtlPtEff_[2]
const std::string folder_
MonitorElement * meBtlPtEff_
virtual double getBinContent(int binx) const
get content of bin (1-D)
virtual void setBinContent(int binx, double content)
set content of bin (1-D)
MonitorElement * meBtlEtaEff_
MonitorElement * meBtlPhiEff_
virtual void setBinError(int binx, double error)
set uncertainty on content of bin (1-D)
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
Definition: DQMStore.h:98
MonitorElement * meMVAEtaSelEff_
MonitorElement * meEtlEtaEff_[2]
virtual TH1 * getTH1() const
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:29
void MtdTracksHarvester::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 344 of file MtdTracksHarvester.cc.

References edm::ConfigurationDescriptions::add(), edm::ParameterSetDescription::add(), submitPVResolutionJobs::desc, and AlCaHLTBitMon_QueryRunRegistry::string.

344  {
346 
347  desc.add<std::string>("folder", "MTD/Tracks/");
348 
349  descriptions.add("MtdTracksPostProcessor", desc);
350 }
ParameterDescriptionBase * add(U const &iLabel, T const &value)
void add(std::string const &label, ParameterSetDescription const &psetDescription)

Member Data Documentation

const std::string MtdTracksHarvester::folder_
private

Definition at line 24 of file MtdTracksHarvester.cc.

Referenced by dqmEndJob().

MonitorElement* MtdTracksHarvester::meBtlEtaEff_
private

Definition at line 27 of file MtdTracksHarvester.cc.

Referenced by dqmEndJob().

MonitorElement* MtdTracksHarvester::meBtlPhiEff_
private

Definition at line 28 of file MtdTracksHarvester.cc.

Referenced by dqmEndJob().

MonitorElement* MtdTracksHarvester::meBtlPtEff_
private

Definition at line 29 of file MtdTracksHarvester.cc.

Referenced by dqmEndJob().

MonitorElement* MtdTracksHarvester::meEtlEtaEff_[2]
private

Definition at line 30 of file MtdTracksHarvester.cc.

Referenced by dqmEndJob().

MonitorElement* MtdTracksHarvester::meEtlPhiEff_[2]
private

Definition at line 31 of file MtdTracksHarvester.cc.

Referenced by dqmEndJob().

MonitorElement* MtdTracksHarvester::meEtlPtEff_[2]
private

Definition at line 32 of file MtdTracksHarvester.cc.

Referenced by dqmEndJob().

MonitorElement* MtdTracksHarvester::meMVAEtaMatchEff_
private

Definition at line 36 of file MtdTracksHarvester.cc.

Referenced by dqmEndJob().

MonitorElement* MtdTracksHarvester::meMVAEtaSelEff_
private

Definition at line 34 of file MtdTracksHarvester.cc.

Referenced by dqmEndJob().

MonitorElement* MtdTracksHarvester::meMVAPtMatchEff_
private

Definition at line 35 of file MtdTracksHarvester.cc.

Referenced by dqmEndJob().

MonitorElement* MtdTracksHarvester::meMVAPtSelEff_
private

Definition at line 33 of file MtdTracksHarvester.cc.

Referenced by dqmEndJob().