CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes
MtdTracksHarvester Class Reference
Inheritance diagram for MtdTracksHarvester:
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

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

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

Private Member Functions

void computeEfficiency1D (MonitorElement *num, MonitorElement *den, MonitorElement *result)
 
void normalize (MonitorElement *h, double scale)
 

Private Attributes

const std::string folder_
 
MonitorElementmeBtlEtaEff_
 
MonitorElementmeBtlPhiEff_
 
MonitorElementmeBtlPtEff_
 
MonitorElementmeEtlEtaEff2_ [2]
 
MonitorElementmeEtlEtaEff_ [2]
 
MonitorElementmeEtlPhiEff2_ [2]
 
MonitorElementmeEtlPhiEff_ [2]
 
MonitorElementmeEtlPtEff2_ [2]
 
MonitorElementmeEtlPtEff_ [2]
 
MonitorElementmeExtraEtaEff_
 
MonitorElementmeExtraEtaEtl2Eff_
 
MonitorElementmeExtraPhiAtBTLEff_
 
MonitorElementmeExtraPtEff_
 
MonitorElementmeExtraPtEtl2Eff_
 
MonitorElementmeMVAEtaMatchEff_
 
MonitorElementmeMVAEtaSelEff_
 
MonitorElementmeMVAPtMatchEff_
 
MonitorElementmeMVAPtSelEff_
 
MonitorElementmeNoTimeFraction_
 
MonitorElementmeTPEtaMatchEff_
 
MonitorElementmeTPEtaMatchEtl2Eff_
 
MonitorElementmeTPEtaSelEff_
 
MonitorElementmeTPmtdEtaMatchEff_
 
MonitorElementmeTPmtdEtaSelEff_
 
MonitorElementmeTPmtdPtMatchEff_
 
MonitorElementmeTPmtdPtSelEff_
 
MonitorElementmeTPPtMatchEff_
 
MonitorElementmeTPPtMatchEtl2Eff_
 
MonitorElementmeTPPtSelEff_
 

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
 
- 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::MtdTracksHarvester ( const edm::ParameterSet iConfig)
explicit

Definition at line 62 of file MtdTracksHarvester.cc.

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

◆ ~MtdTracksHarvester()

MtdTracksHarvester::~MtdTracksHarvester ( )
override

Definition at line 65 of file MtdTracksHarvester.cc.

65 {}

Member Function Documentation

◆ computeEfficiency1D()

void MtdTracksHarvester::computeEfficiency1D ( MonitorElement num,
MonitorElement den,
MonitorElement result 
)
private

Definition at line 68 of file MtdTracksHarvester.cc.

References dqm::impl::MonitorElement::getBinContent(), dqm::impl::MonitorElement::getNbinsX(), EgammaValidation_cff::num, conifer::pow(), mps_fire::result, and mathSSE::sqrt().

Referenced by dqmEndJob().

68  {
69  for (int ibin = 1; ibin <= den->getNbinsX(); ibin++) {
70  double eff = num->getBinContent(ibin) / den->getBinContent(ibin);
71  double bin_err = sqrt((num->getBinContent(ibin) * (den->getBinContent(ibin) - num->getBinContent(ibin))) /
72  pow(den->getBinContent(ibin), 3));
73  if (den->getBinContent(ibin) == 0) {
74  eff = 0;
75  bin_err = 0;
76  }
77  result->setBinContent(ibin, eff);
78  result->setBinError(ibin, bin_err);
79  }
80 }
constexpr int pow(int x)
Definition: conifer.h:24
T sqrt(T t)
Definition: SSEVec.h:19
virtual int getNbinsX() const
get # of bins in X-axis
virtual double getBinContent(int binx) const
get content of bin (1-D)

◆ dqmEndJob()

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

Implements DQMEDHarvester.

Definition at line 94 of file MtdTracksHarvester.cc.

References dqm::implementation::IBooker::book1D(), dqm::implementation::NavigatorBase::cd(), computeEfficiency1D(), folder_, dqm::implementation::IGetter::get(), dqm::impl::MonitorElement::getNbinsX(), dqm::legacy::MonitorElement::getTH1(), mps_fire::i, meBtlEtaEff_, meBtlPhiEff_, meBtlPtEff_, meEtlEtaEff2_, meEtlEtaEff_, meEtlPhiEff2_, meEtlPhiEff_, meEtlPtEff2_, meEtlPtEff_, meExtraEtaEff_, meExtraEtaEtl2Eff_, meExtraPhiAtBTLEff_, meExtraPtEff_, meExtraPtEtl2Eff_, meMVAEtaMatchEff_, meMVAEtaSelEff_, meMVAPtMatchEff_, meMVAPtSelEff_, meNoTimeFraction_, meTPEtaMatchEff_, meTPEtaMatchEtl2Eff_, meTPEtaSelEff_, meTPmtdEtaMatchEff_, meTPmtdEtaSelEff_, meTPmtdPtMatchEff_, meTPmtdPtSelEff_, meTPPtMatchEff_, meTPPtMatchEtl2Eff_, meTPPtSelEff_, and normalize().

94  {
95  // --- Get the monitoring histograms
96  MonitorElement* meBTLTrackEffEtaTot = igetter.get(folder_ + "TrackBTLEffEtaTot");
97  MonitorElement* meBTLTrackEffPhiTot = igetter.get(folder_ + "TrackBTLEffPhiTot");
98  MonitorElement* meBTLTrackEffPtTot = igetter.get(folder_ + "TrackBTLEffPtTot");
99  MonitorElement* meBTLTrackEffEtaMtd = igetter.get(folder_ + "TrackBTLEffEtaMtd");
100  MonitorElement* meBTLTrackEffPhiMtd = igetter.get(folder_ + "TrackBTLEffPhiMtd");
101  MonitorElement* meBTLTrackEffPtMtd = igetter.get(folder_ + "TrackBTLEffPtMtd");
102  MonitorElement* meETLTrackEffEtaTotZneg = igetter.get(folder_ + "TrackETLEffEtaTotZneg");
103  MonitorElement* meETLTrackEffPhiTotZneg = igetter.get(folder_ + "TrackETLEffPhiTotZneg");
104  MonitorElement* meETLTrackEffPtTotZneg = igetter.get(folder_ + "TrackETLEffPtTotZneg");
105  MonitorElement* meETLTrackEffEtaMtdZneg = igetter.get(folder_ + "TrackETLEffEtaMtdZneg");
106  MonitorElement* meETLTrackEffPhiMtdZneg = igetter.get(folder_ + "TrackETLEffPhiMtdZneg");
107  MonitorElement* meETLTrackEffPtMtdZneg = igetter.get(folder_ + "TrackETLEffPtMtdZneg");
108  MonitorElement* meETLTrackEffEta2MtdZneg = igetter.get(folder_ + "TrackETLEffEta2MtdZneg");
109  MonitorElement* meETLTrackEffPhi2MtdZneg = igetter.get(folder_ + "TrackETLEffPhi2MtdZneg");
110  MonitorElement* meETLTrackEffPt2MtdZneg = igetter.get(folder_ + "TrackETLEffPt2MtdZneg");
111  MonitorElement* meETLTrackEffEtaTotZpos = igetter.get(folder_ + "TrackETLEffEtaTotZpos");
112  MonitorElement* meETLTrackEffPhiTotZpos = igetter.get(folder_ + "TrackETLEffPhiTotZpos");
113  MonitorElement* meETLTrackEffPtTotZpos = igetter.get(folder_ + "TrackETLEffPtTotZpos");
114  MonitorElement* meETLTrackEffEtaMtdZpos = igetter.get(folder_ + "TrackETLEffEtaMtdZpos");
115  MonitorElement* meETLTrackEffPhiMtdZpos = igetter.get(folder_ + "TrackETLEffPhiMtdZpos");
116  MonitorElement* meETLTrackEffPtMtdZpos = igetter.get(folder_ + "TrackETLEffPtMtdZpos");
117  MonitorElement* meETLTrackEffEta2MtdZpos = igetter.get(folder_ + "TrackETLEffEta2MtdZpos");
118  MonitorElement* meETLTrackEffPhi2MtdZpos = igetter.get(folder_ + "TrackETLEffPhi2MtdZpos");
119  MonitorElement* meETLTrackEffPt2MtdZpos = igetter.get(folder_ + "TrackETLEffPt2MtdZpos");
120  MonitorElement* meTrackPtTot = igetter.get(folder_ + "TrackPtTot");
121  MonitorElement* meMVATrackEffPtTot = igetter.get(folder_ + "MVAEffPtTot");
122  MonitorElement* meMVATrackMatchedEffPtTot = igetter.get(folder_ + "MVAMatchedEffPtTot");
123  MonitorElement* meMVATrackMatchedEffPtMtd = igetter.get(folder_ + "MVAMatchedEffPtMtd");
124  MonitorElement* meExtraPtMtd = igetter.get(folder_ + "ExtraPtMtd");
125  MonitorElement* meExtraPtEtl2Mtd = igetter.get(folder_ + "ExtraPtEtl2Mtd");
126  MonitorElement* meTrackMatchedTPEffPtTot = igetter.get(folder_ + "MatchedTPEffPtTot");
127  MonitorElement* meTrackMatchedTPEffPtMtd = igetter.get(folder_ + "MatchedTPEffPtMtd");
128  MonitorElement* meTrackMatchedTPEffPtEtl2Mtd = igetter.get(folder_ + "MatchedTPEffPtEtl2Mtd");
129  MonitorElement* meTrackMatchedTPmtdEffPtTot = igetter.get(folder_ + "MatchedTPmtdEffPtTot");
130  MonitorElement* meTrackMatchedTPmtdEffPtMtd = igetter.get(folder_ + "MatchedTPmtdEffPtMtd");
131  MonitorElement* meTrackEtaTot = igetter.get(folder_ + "TrackEtaTot");
132  MonitorElement* meMVATrackEffEtaTot = igetter.get(folder_ + "MVAEffEtaTot");
133  MonitorElement* meMVATrackMatchedEffEtaTot = igetter.get(folder_ + "MVAMatchedEffEtaTot");
134  MonitorElement* meMVATrackMatchedEffEtaMtd = igetter.get(folder_ + "MVAMatchedEffEtaMtd");
135  MonitorElement* meExtraEtaMtd = igetter.get(folder_ + "ExtraEtaMtd");
136  MonitorElement* meExtraEtaEtl2Mtd = igetter.get(folder_ + "ExtraEtaEtl2Mtd");
137  MonitorElement* meTrackMatchedTPEffEtaTot = igetter.get(folder_ + "MatchedTPEffEtaTot");
138  MonitorElement* meTrackMatchedTPEffEtaMtd = igetter.get(folder_ + "MatchedTPEffEtaMtd");
139  MonitorElement* meTrackMatchedTPEffEtaEtl2Mtd = igetter.get(folder_ + "MatchedTPEffEtaEtl2Mtd");
140  MonitorElement* meTrackMatchedTPmtdEffEtaTot = igetter.get(folder_ + "MatchedTPmtdEffEtaTot");
141  MonitorElement* meTrackMatchedTPmtdEffEtaMtd = igetter.get(folder_ + "MatchedTPmtdEffEtaMtd");
142  MonitorElement* meTrackNumHits = igetter.get(folder_ + "TrackNumHits");
143  MonitorElement* meTrackNumHitsNT = igetter.get(folder_ + "TrackNumHitsNT");
144  MonitorElement* meExtraPhiAtBTL = igetter.get(folder_ + "ExtraPhiAtBTL");
145  MonitorElement* meExtraPhiAtBTLmatched = igetter.get(folder_ + "ExtraPhiAtBTLmatched");
146  MonitorElement* meExtraBTLeneInCone = igetter.get(folder_ + "ExtraBTLeneInCone");
147 
148  if (!meBTLTrackEffEtaTot || !meBTLTrackEffPhiTot || !meBTLTrackEffPtTot || !meBTLTrackEffEtaMtd ||
149  !meBTLTrackEffPhiMtd || !meBTLTrackEffPtMtd || !meETLTrackEffEtaTotZneg || !meETLTrackEffPhiTotZneg ||
150  !meETLTrackEffPtTotZneg || !meETLTrackEffEtaMtdZneg || !meETLTrackEffPhiMtdZneg || !meETLTrackEffPtMtdZneg ||
151  !meETLTrackEffEta2MtdZneg || !meETLTrackEffPhi2MtdZneg || !meETLTrackEffPt2MtdZneg || !meETLTrackEffEtaTotZpos ||
152  !meETLTrackEffPhiTotZpos || !meETLTrackEffPtTotZpos || !meETLTrackEffEtaMtdZpos || !meETLTrackEffPhiMtdZpos ||
153  !meETLTrackEffPtMtdZpos || !meETLTrackEffEta2MtdZpos || !meETLTrackEffPhi2MtdZpos || !meETLTrackEffPt2MtdZpos ||
154  !meMVATrackEffPtTot || !meMVATrackMatchedEffPtTot || !meMVATrackMatchedEffPtMtd || !meMVATrackEffEtaTot ||
155  !meMVATrackMatchedEffEtaTot || !meMVATrackMatchedEffEtaMtd || !meTrackMatchedTPEffPtTot ||
156  !meTrackMatchedTPEffPtMtd || !meTrackMatchedTPEffPtEtl2Mtd || !meTrackMatchedTPmtdEffPtTot ||
157  !meTrackMatchedTPmtdEffPtMtd || !meTrackMatchedTPEffEtaTot || !meTrackMatchedTPEffEtaMtd ||
158  !meTrackMatchedTPEffEtaEtl2Mtd || !meTrackMatchedTPmtdEffEtaTot || !meTrackMatchedTPmtdEffEtaMtd ||
159  !meTrackNumHits || !meTrackNumHitsNT || !meTrackPtTot || !meTrackEtaTot) {
160  edm::LogError("MtdTracksHarvester") << "Monitoring histograms not found!" << std::endl;
161  return;
162  }
163 
164  // --- Book histograms
165  ibook.cd(folder_);
166  meBtlEtaEff_ = ibook.book1D("BtlEtaEff",
167  " Track Efficiency VS Eta;#eta;Efficiency",
168  meBTLTrackEffEtaTot->getNbinsX(),
169  meBTLTrackEffEtaTot->getTH1()->GetXaxis()->GetXmin(),
170  meBTLTrackEffEtaTot->getTH1()->GetXaxis()->GetXmax());
171  meBtlEtaEff_->getTH1()->SetMinimum(0.);
172  computeEfficiency1D(meBTLTrackEffEtaMtd, meBTLTrackEffEtaTot, meBtlEtaEff_);
173 
174  meBtlPhiEff_ = ibook.book1D("BtlPhiEff",
175  "Track Efficiency VS Phi;#phi [rad];Efficiency",
176  meBTLTrackEffPhiTot->getNbinsX(),
177  meBTLTrackEffPhiTot->getTH1()->GetXaxis()->GetXmin(),
178  meBTLTrackEffPhiTot->getTH1()->GetXaxis()->GetXmax());
179  meBtlPhiEff_->getTH1()->SetMinimum(0.);
180  computeEfficiency1D(meBTLTrackEffPhiMtd, meBTLTrackEffPhiTot, meBtlPhiEff_);
181 
182  meBtlPtEff_ = ibook.book1D("BtlPtEff",
183  "Track Efficiency VS Pt;Pt [GeV];Efficiency",
184  meBTLTrackEffPtTot->getNbinsX(),
185  meBTLTrackEffPtTot->getTH1()->GetXaxis()->GetXmin(),
186  meBTLTrackEffPtTot->getTH1()->GetXaxis()->GetXmax());
187  meBtlPtEff_->getTH1()->SetMinimum(0.);
188  computeEfficiency1D(meBTLTrackEffPtMtd, meBTLTrackEffPtTot, meBtlPtEff_);
189 
190  meEtlEtaEff_[0] = ibook.book1D("EtlEtaEffZneg",
191  " Track Efficiency VS Eta (-Z);#eta;Efficiency",
192  meETLTrackEffEtaTotZneg->getNbinsX(),
193  meETLTrackEffEtaTotZneg->getTH1()->GetXaxis()->GetXmin(),
194  meETLTrackEffEtaTotZneg->getTH1()->GetXaxis()->GetXmax());
195  meEtlEtaEff_[0]->getTH1()->SetMinimum(0.);
196  computeEfficiency1D(meETLTrackEffEtaMtdZneg, meETLTrackEffEtaTotZneg, meEtlEtaEff_[0]);
197 
198  meEtlPhiEff_[0] = ibook.book1D("EtlPhiEffZneg",
199  "Track Efficiency VS Phi (-Z);#phi [rad];Efficiency",
200  meETLTrackEffPhiTotZneg->getNbinsX(),
201  meETLTrackEffPhiTotZneg->getTH1()->GetXaxis()->GetXmin(),
202  meETLTrackEffPhiTotZneg->getTH1()->GetXaxis()->GetXmax());
203  meEtlPhiEff_[0]->getTH1()->SetMinimum(0.);
204  computeEfficiency1D(meETLTrackEffPhiMtdZneg, meETLTrackEffPhiTotZneg, meEtlPhiEff_[0]);
205 
206  meEtlPtEff_[0] = ibook.book1D("EtlPtEffZneg",
207  "Track Efficiency VS Pt (-Z);Pt [GeV];Efficiency",
208  meETLTrackEffPtTotZneg->getNbinsX(),
209  meETLTrackEffPtTotZneg->getTH1()->GetXaxis()->GetXmin(),
210  meETLTrackEffPtTotZneg->getTH1()->GetXaxis()->GetXmax());
211  meEtlPtEff_[0]->getTH1()->SetMinimum(0.);
212  computeEfficiency1D(meETLTrackEffPtMtdZneg, meETLTrackEffPtTotZneg, meEtlPtEff_[0]);
213 
214  meEtlEtaEff_[1] = ibook.book1D("EtlEtaEffZpos",
215  " Track Efficiency VS Eta (+Z);#eta;Efficiency",
216  meETLTrackEffEtaTotZpos->getNbinsX(),
217  meETLTrackEffEtaTotZpos->getTH1()->GetXaxis()->GetXmin(),
218  meETLTrackEffEtaTotZpos->getTH1()->GetXaxis()->GetXmax());
219  meEtlEtaEff_[1]->getTH1()->SetMinimum(0.);
220  computeEfficiency1D(meETLTrackEffEtaMtdZpos, meETLTrackEffEtaTotZpos, meEtlEtaEff_[1]);
221 
222  meEtlPhiEff_[1] = ibook.book1D("EtlPhiEffZpos",
223  "Track Efficiency VS Phi (+Z);#phi [rad];Efficiency",
224  meETLTrackEffPhiTotZpos->getNbinsX(),
225  meETLTrackEffPhiTotZpos->getTH1()->GetXaxis()->GetXmin(),
226  meETLTrackEffPhiTotZpos->getTH1()->GetXaxis()->GetXmax());
227  meEtlPhiEff_[1]->getTH1()->SetMinimum(0.);
228  computeEfficiency1D(meETLTrackEffPhiMtdZpos, meETLTrackEffPhiTotZpos, meEtlPhiEff_[1]);
229 
230  meEtlPtEff_[1] = ibook.book1D("EtlPtEffZpos",
231  "Track Efficiency VS Pt (+Z);Pt [GeV];Efficiency",
232  meETLTrackEffPtTotZpos->getNbinsX(),
233  meETLTrackEffPtTotZpos->getTH1()->GetXaxis()->GetXmin(),
234  meETLTrackEffPtTotZpos->getTH1()->GetXaxis()->GetXmax());
235  meEtlPtEff_[1]->getTH1()->SetMinimum(0.);
236  computeEfficiency1D(meETLTrackEffPtMtdZpos, meETLTrackEffPtTotZpos, meEtlPtEff_[1]);
237 
238  meEtlEtaEff2_[0] = ibook.book1D("EtlEtaEff2Zneg",
239  " Track Efficiency VS Eta (-Z, 2 hit);#eta;Efficiency",
240  meETLTrackEffEtaTotZneg->getNbinsX(),
241  meETLTrackEffEtaTotZneg->getTH1()->GetXaxis()->GetXmin(),
242  meETLTrackEffEtaTotZneg->getTH1()->GetXaxis()->GetXmax());
243  meEtlEtaEff2_[0]->getTH1()->SetMinimum(0.);
244  computeEfficiency1D(meETLTrackEffEta2MtdZneg, meETLTrackEffEtaTotZneg, meEtlEtaEff2_[0]);
245 
246  meEtlPhiEff2_[0] = ibook.book1D("EtlPhiEff2Zneg",
247  "Track Efficiency VS Phi (-Z, 2 hit);#phi [rad];Efficiency",
248  meETLTrackEffPhiTotZneg->getNbinsX(),
249  meETLTrackEffPhiTotZneg->getTH1()->GetXaxis()->GetXmin(),
250  meETLTrackEffPhiTotZneg->getTH1()->GetXaxis()->GetXmax());
251  meEtlPhiEff2_[0]->getTH1()->SetMinimum(0.);
252  computeEfficiency1D(meETLTrackEffPhi2MtdZneg, meETLTrackEffPhiTotZneg, meEtlPhiEff2_[0]);
253 
254  meEtlPtEff2_[0] = ibook.book1D("EtlPtEff2Zneg",
255  "Track Efficiency VS Pt (-Z, 2 hit);Pt [GeV];Efficiency",
256  meETLTrackEffPtTotZneg->getNbinsX(),
257  meETLTrackEffPtTotZneg->getTH1()->GetXaxis()->GetXmin(),
258  meETLTrackEffPtTotZneg->getTH1()->GetXaxis()->GetXmax());
259  meEtlPtEff2_[0]->getTH1()->SetMinimum(0.);
260  computeEfficiency1D(meETLTrackEffPt2MtdZneg, meETLTrackEffPtTotZneg, meEtlPtEff2_[0]);
261 
262  meEtlEtaEff2_[1] = ibook.book1D("EtlEtaEff2Zpos",
263  "Track Efficiency VS Eta (+Z, 2 hit);#eta;Efficiency",
264  meETLTrackEffEtaTotZpos->getNbinsX(),
265  meETLTrackEffEtaTotZpos->getTH1()->GetXaxis()->GetXmin(),
266  meETLTrackEffEtaTotZpos->getTH1()->GetXaxis()->GetXmax());
267  meEtlEtaEff2_[1]->getTH1()->SetMinimum(0.);
268  computeEfficiency1D(meETLTrackEffEta2MtdZpos, meETLTrackEffEtaTotZpos, meEtlEtaEff2_[1]);
269 
270  meEtlPhiEff2_[1] = ibook.book1D("EtlPhiEff2Zpos",
271  "Track Efficiency VS Phi (+Z, 2 hit);#phi [rad];Efficiency",
272  meETLTrackEffPhiTotZpos->getNbinsX(),
273  meETLTrackEffPhiTotZpos->getTH1()->GetXaxis()->GetXmin(),
274  meETLTrackEffPhiTotZpos->getTH1()->GetXaxis()->GetXmax());
275  meEtlPhiEff2_[1]->getTH1()->SetMinimum(0.);
276  computeEfficiency1D(meETLTrackEffPhi2MtdZpos, meETLTrackEffPhiTotZpos, meEtlPhiEff2_[1]);
277 
278  meEtlPtEff2_[1] = ibook.book1D("EtlPtEff2Zpos",
279  "Track Efficiency VS Pt (+Z, 2 hit);Pt [GeV];Efficiency",
280  meETLTrackEffPtTotZpos->getNbinsX(),
281  meETLTrackEffPtTotZpos->getTH1()->GetXaxis()->GetXmin(),
282  meETLTrackEffPtTotZpos->getTH1()->GetXaxis()->GetXmax());
283  meEtlPtEff2_[1]->getTH1()->SetMinimum(0.);
284  computeEfficiency1D(meETLTrackEffPt2MtdZpos, meETLTrackEffPtTotZpos, meEtlPtEff2_[1]);
285 
286  if (meExtraPtMtd && meExtraPtEtl2Mtd && meExtraEtaMtd && meExtraEtaEtl2Mtd) {
287  meExtraPtEff_ = ibook.book1D("ExtraPtEff",
288  "MTD matching efficiency wrt extrapolated track VS Pt;Pt [GeV];Efficiency",
289  meMVATrackEffPtTot->getNbinsX(),
290  meMVATrackEffPtTot->getTH1()->GetXaxis()->GetXmin(),
291  meMVATrackEffPtTot->getTH1()->GetXaxis()->GetXmax());
292  meExtraPtEff_->getTH1()->SetMinimum(0.);
293  computeEfficiency1D(meExtraPtMtd, meTrackMatchedTPEffPtTot, meExtraPtEff_);
294 
295  meExtraPtEtl2Eff_ = ibook.book1D("ExtraPtEtl2Eff",
296  "MTD matching efficiency (2 ETL) wrt extrapolated track VS Pt;Pt [GeV];Efficiency",
297  meMVATrackEffPtTot->getNbinsX(),
298  meMVATrackEffPtTot->getTH1()->GetXaxis()->GetXmin(),
299  meMVATrackEffPtTot->getTH1()->GetXaxis()->GetXmax());
300  meExtraPtEtl2Eff_->getTH1()->SetMinimum(0.);
301  computeEfficiency1D(meExtraPtEtl2Mtd, meTrackMatchedTPEffPtTot, meExtraPtEtl2Eff_);
302 
303  meExtraEtaEff_ = ibook.book1D("ExtraEtaEff",
304  "MTD matching efficiency wrt extrapolated track VS Eta;Eta;Efficiency",
305  meMVATrackEffEtaTot->getNbinsX(),
306  meMVATrackEffEtaTot->getTH1()->GetXaxis()->GetXmin(),
307  meMVATrackEffEtaTot->getTH1()->GetXaxis()->GetXmax());
308  meExtraEtaEff_->getTH1()->SetMinimum(0.);
309  computeEfficiency1D(meExtraEtaMtd, meTrackMatchedTPEffEtaTot, meExtraEtaEff_);
310 
311  meExtraEtaEtl2Eff_ = ibook.book1D("ExtraEtaEtl2Eff",
312  "MTD matching efficiency (2 ETL) wrt extrapolated track VS Eta;Eta;Efficiency",
313  meMVATrackEffEtaTot->getNbinsX(),
314  meMVATrackEffEtaTot->getTH1()->GetXaxis()->GetXmin(),
315  meMVATrackEffEtaTot->getTH1()->GetXaxis()->GetXmax());
316  meExtraEtaEtl2Eff_->getTH1()->SetMinimum(0.);
317  computeEfficiency1D(meExtraEtaEtl2Mtd, meTrackMatchedTPEffEtaTot, meExtraEtaEtl2Eff_);
318  }
319 
320  meMVAPtSelEff_ = ibook.book1D("MVAPtSelEff",
321  "Track selected efficiency VS Pt;Pt [GeV];Efficiency",
322  meMVATrackEffPtTot->getNbinsX(),
323  meMVATrackEffPtTot->getTH1()->GetXaxis()->GetXmin(),
324  meMVATrackEffPtTot->getTH1()->GetXaxis()->GetXmax());
325  meMVAPtSelEff_->getTH1()->SetMinimum(0.);
326  computeEfficiency1D(meMVATrackMatchedEffPtTot, meMVATrackEffPtTot, meMVAPtSelEff_);
327 
328  meMVAEtaSelEff_ = ibook.book1D("MVAEtaSelEff",
329  "Track selected efficiency VS Eta;Eta;Efficiency",
330  meMVATrackEffEtaTot->getNbinsX(),
331  meMVATrackEffEtaTot->getTH1()->GetXaxis()->GetXmin(),
332  meMVATrackEffEtaTot->getTH1()->GetXaxis()->GetXmax());
333  meMVAEtaSelEff_->getTH1()->SetMinimum(0.);
334  computeEfficiency1D(meMVATrackMatchedEffEtaTot, meMVATrackEffEtaTot, meMVAEtaSelEff_);
335 
336  meMVAPtMatchEff_ = ibook.book1D("MVAPtMatchEff",
337  "Track matched to GEN efficiency VS Pt;Pt [GeV];Efficiency",
338  meMVATrackMatchedEffPtTot->getNbinsX(),
339  meMVATrackMatchedEffPtTot->getTH1()->GetXaxis()->GetXmin(),
340  meMVATrackMatchedEffPtTot->getTH1()->GetXaxis()->GetXmax());
341  meMVAPtMatchEff_->getTH1()->SetMinimum(0.);
342  computeEfficiency1D(meMVATrackMatchedEffPtMtd, meMVATrackMatchedEffPtTot, meMVAPtMatchEff_);
343 
344  meMVAEtaMatchEff_ = ibook.book1D("MVAEtaMatchEff",
345  "Track matched to GEN efficiency VS Eta;Eta;Efficiency",
346  meMVATrackMatchedEffEtaTot->getNbinsX(),
347  meMVATrackMatchedEffEtaTot->getTH1()->GetXaxis()->GetXmin(),
348  meMVATrackMatchedEffEtaTot->getTH1()->GetXaxis()->GetXmax());
349  meMVAEtaMatchEff_->getTH1()->SetMinimum(0.);
350  computeEfficiency1D(meMVATrackMatchedEffEtaMtd, meMVATrackMatchedEffEtaTot, meMVAEtaMatchEff_);
351 
352  meTPPtSelEff_ = ibook.book1D("TPPtSelEff",
353  "Track selected efficiency TP VS Pt;Pt [GeV];Efficiency",
354  meMVATrackEffPtTot->getNbinsX(),
355  meMVATrackEffPtTot->getTH1()->GetXaxis()->GetXmin(),
356  meMVATrackEffPtTot->getTH1()->GetXaxis()->GetXmax());
357  meTPPtSelEff_->getTH1()->SetMinimum(0.);
358  computeEfficiency1D(meTrackMatchedTPEffPtTot, meTrackPtTot, meTPPtSelEff_);
359 
360  meTPEtaSelEff_ = ibook.book1D("TPEtaSelEff",
361  "Track selected efficiency TP VS Eta;Eta;Efficiency",
362  meMVATrackEffEtaTot->getNbinsX(),
363  meMVATrackEffEtaTot->getTH1()->GetXaxis()->GetXmin(),
364  meMVATrackEffEtaTot->getTH1()->GetXaxis()->GetXmax());
365  meTPEtaSelEff_->getTH1()->SetMinimum(0.);
366  computeEfficiency1D(meTrackMatchedTPEffEtaTot, meTrackEtaTot, meTPEtaSelEff_);
367 
368  meTPPtMatchEff_ = ibook.book1D("TPPtMatchEff",
369  "Track matched to TP efficiency VS Pt;Pt [GeV];Efficiency",
370  meTrackMatchedTPEffPtTot->getNbinsX(),
371  meTrackMatchedTPEffPtTot->getTH1()->GetXaxis()->GetXmin(),
372  meTrackMatchedTPEffPtTot->getTH1()->GetXaxis()->GetXmax());
373  meTPPtMatchEff_->getTH1()->SetMinimum(0.);
374  computeEfficiency1D(meTrackMatchedTPEffPtMtd, meTrackMatchedTPEffPtTot, meTPPtMatchEff_);
375 
376  meTPEtaMatchEff_ = ibook.book1D("TPEtaMatchEff",
377  "Track matched to TP efficiency VS Eta;Eta;Efficiency",
378  meTrackMatchedTPEffEtaTot->getNbinsX(),
379  meTrackMatchedTPEffEtaTot->getTH1()->GetXaxis()->GetXmin(),
380  meTrackMatchedTPEffEtaTot->getTH1()->GetXaxis()->GetXmax());
381  meTPEtaMatchEff_->getTH1()->SetMinimum(0.);
382  computeEfficiency1D(meTrackMatchedTPEffEtaMtd, meTrackMatchedTPEffEtaTot, meTPEtaMatchEff_);
383 
384  meTPPtMatchEtl2Eff_ = ibook.book1D("TPPtMatchEtl2Eff",
385  "Track matched to TP efficiency VS Pt, 2 ETL hits;Pt [GeV];Efficiency",
386  meTrackMatchedTPEffPtTot->getNbinsX(),
387  meTrackMatchedTPEffPtTot->getTH1()->GetXaxis()->GetXmin(),
388  meTrackMatchedTPEffPtTot->getTH1()->GetXaxis()->GetXmax());
389  meTPPtMatchEtl2Eff_->getTH1()->SetMinimum(0.);
390  computeEfficiency1D(meTrackMatchedTPEffPtEtl2Mtd, meTrackMatchedTPEffPtTot, meTPPtMatchEtl2Eff_);
391 
392  meTPEtaMatchEtl2Eff_ = ibook.book1D("TPEtaMatchEtl2Eff",
393  "Track matched to TP efficiency VS Eta, 2 ETL hits;Eta;Efficiency",
394  meTrackMatchedTPEffEtaTot->getNbinsX(),
395  meTrackMatchedTPEffEtaTot->getTH1()->GetXaxis()->GetXmin(),
396  meTrackMatchedTPEffEtaTot->getTH1()->GetXaxis()->GetXmax());
397  meTPEtaMatchEtl2Eff_->getTH1()->SetMinimum(0.);
398  computeEfficiency1D(meTrackMatchedTPEffEtaEtl2Mtd, meTrackMatchedTPEffEtaTot, meTPEtaMatchEtl2Eff_);
399 
400  meTPmtdPtSelEff_ = ibook.book1D("TPmtdPtSelEff",
401  "Track selected efficiency TP-mtd hit VS Pt;Pt [GeV];Efficiency",
402  meMVATrackEffPtTot->getNbinsX(),
403  meMVATrackEffPtTot->getTH1()->GetXaxis()->GetXmin(),
404  meMVATrackEffPtTot->getTH1()->GetXaxis()->GetXmax());
405  meTPmtdPtSelEff_->getTH1()->SetMinimum(0.);
406  computeEfficiency1D(meTrackMatchedTPmtdEffPtTot, meTrackPtTot, meTPmtdPtSelEff_);
407 
408  meTPmtdEtaSelEff_ = ibook.book1D("TPmtdEtaSelEff",
409  "Track selected efficiency TPmtd hit VS Eta;Eta;Efficiency",
410  meMVATrackEffEtaTot->getNbinsX(),
411  meMVATrackEffEtaTot->getTH1()->GetXaxis()->GetXmin(),
412  meMVATrackEffEtaTot->getTH1()->GetXaxis()->GetXmax());
413  meTPmtdEtaSelEff_->getTH1()->SetMinimum(0.);
414  computeEfficiency1D(meTrackMatchedTPmtdEffEtaTot, meTrackEtaTot, meTPmtdEtaSelEff_);
415 
416  meTPmtdPtMatchEff_ = ibook.book1D("TPmtdPtMatchEff",
417  "Track matched to TP-mtd hit efficiency VS Pt;Pt [GeV];Efficiency",
418  meTrackMatchedTPmtdEffPtTot->getNbinsX(),
419  meTrackMatchedTPmtdEffPtTot->getTH1()->GetXaxis()->GetXmin(),
420  meTrackMatchedTPmtdEffPtTot->getTH1()->GetXaxis()->GetXmax());
421  meTPmtdPtMatchEff_->getTH1()->SetMinimum(0.);
422  computeEfficiency1D(meTrackMatchedTPmtdEffPtMtd, meTrackMatchedTPmtdEffPtTot, meTPmtdPtMatchEff_);
423 
424  meTPmtdEtaMatchEff_ = ibook.book1D("TPmtdEtaMatchEff",
425  "Track matched to TP-mtd hit efficiency VS Eta;Eta;Efficiency",
426  meTrackMatchedTPmtdEffEtaTot->getNbinsX(),
427  meTrackMatchedTPmtdEffEtaTot->getTH1()->GetXaxis()->GetXmin(),
428  meTrackMatchedTPmtdEffEtaTot->getTH1()->GetXaxis()->GetXmax());
429  meTPmtdEtaMatchEff_->getTH1()->SetMinimum(0.);
430  computeEfficiency1D(meTrackMatchedTPmtdEffEtaMtd, meTrackMatchedTPmtdEffEtaTot, meTPmtdEtaMatchEff_);
431 
432  meNoTimeFraction_ = ibook.book1D("NoTimeFraction",
433  "Fraction of tracks with MTD hits and no time associated; Num. of hits",
434  meTrackNumHits->getNbinsX(),
435  meTrackNumHits->getTH1()->GetXaxis()->GetXmin(),
436  meTrackNumHits->getTH1()->GetXaxis()->GetXmax());
437  meNoTimeFraction_->getTH1()->SetMinimum(0.);
438  computeEfficiency1D(meTrackNumHitsNT, meTrackNumHits, meNoTimeFraction_);
439 
440  meBtlEtaEff_->getTH1()->SetMinimum(0.);
441  meBtlPhiEff_->getTH1()->SetMinimum(0.);
442  meBtlPtEff_->getTH1()->SetMinimum(0.);
443  for (int i = 0; i < 2; i++) {
444  meEtlEtaEff_[i]->getTH1()->SetMinimum(0.);
445  meEtlPhiEff_[i]->getTH1()->SetMinimum(0.);
446  meEtlPtEff_[i]->getTH1()->SetMinimum(0.);
447  meEtlEtaEff2_[i]->getTH1()->SetMinimum(0.);
448  meEtlPhiEff2_[i]->getTH1()->SetMinimum(0.);
449  meEtlPtEff2_[i]->getTH1()->SetMinimum(0.);
450  }
451  meMVAPtSelEff_->getTH1()->SetMinimum(0.);
452  meMVAEtaSelEff_->getTH1()->SetMinimum(0.);
453  meMVAPtMatchEff_->getTH1()->SetMinimum(0.);
454  meMVAEtaMatchEff_->getTH1()->SetMinimum(0.);
455 
456  if (meExtraPtMtd && meExtraPtEtl2Mtd && meExtraEtaMtd && meExtraEtaEtl2Mtd) {
457  meExtraPtEff_ = ibook.book1D("ExtraPtEff",
458  "MTD matching efficiency wrt extrapolated track VS Pt;Pt [GeV];Efficiency",
459  meMVATrackEffPtTot->getNbinsX(),
460  meMVATrackEffPtTot->getTH1()->GetXaxis()->GetXmin(),
461  meMVATrackEffPtTot->getTH1()->GetXaxis()->GetXmax());
462  meExtraPtEff_->getTH1()->SetMinimum(0.);
463  computeEfficiency1D(meExtraPtMtd, meTrackMatchedTPEffPtTot, meExtraPtEff_);
464 
465  meExtraPtEtl2Eff_ = ibook.book1D("ExtraPtEtl2Eff",
466  "MTD matching efficiency (2 ETL) wrt extrapolated track VS Pt;Pt [GeV];Efficiency",
467  meMVATrackEffPtTot->getNbinsX(),
468  meMVATrackEffPtTot->getTH1()->GetXaxis()->GetXmin(),
469  meMVATrackEffPtTot->getTH1()->GetXaxis()->GetXmax());
470  meExtraPtEtl2Eff_->getTH1()->SetMinimum(0.);
471  computeEfficiency1D(meExtraPtEtl2Mtd, meTrackMatchedTPEffPtTot, meExtraPtEtl2Eff_);
472 
473  meExtraEtaEff_ = ibook.book1D("ExtraEtaEff",
474  "MTD matching efficiency wrt extrapolated track VS Eta;Eta;Efficiency",
475  meMVATrackEffEtaTot->getNbinsX(),
476  meMVATrackEffEtaTot->getTH1()->GetXaxis()->GetXmin(),
477  meMVATrackEffEtaTot->getTH1()->GetXaxis()->GetXmax());
478  meExtraEtaEff_->getTH1()->SetMinimum(0.);
479  computeEfficiency1D(meExtraEtaMtd, meTrackMatchedTPEffEtaTot, meExtraEtaEff_);
480 
481  meExtraEtaEtl2Eff_ = ibook.book1D("ExtraEtaEtl2Eff",
482  "MTD matching efficiency (2 ETL) wrt extrapolated track VS Eta;Eta;Efficiency",
483  meMVATrackEffEtaTot->getNbinsX(),
484  meMVATrackEffEtaTot->getTH1()->GetXaxis()->GetXmin(),
485  meMVATrackEffEtaTot->getTH1()->GetXaxis()->GetXmax());
486  meExtraEtaEtl2Eff_->getTH1()->SetMinimum(0.);
487  computeEfficiency1D(meExtraEtaEtl2Mtd, meTrackMatchedTPEffEtaTot, meExtraEtaEtl2Eff_);
488  }
489 
490  if (meExtraPhiAtBTL && meExtraPhiAtBTLmatched && meExtraBTLeneInCone) {
491  meExtraPhiAtBTLEff_ = ibook.book1D("ExtraPhiAtBTLEff",
492  "Efficiency to match hits at BTL surface",
493  meExtraPhiAtBTL->getNbinsX(),
494  meExtraPhiAtBTL->getTH1()->GetXaxis()->GetXmin(),
495  meExtraPhiAtBTL->getTH1()->GetXaxis()->GetXmax());
496  meExtraPhiAtBTLEff_->getTH1()->SetMinimum(0.);
497  computeEfficiency1D(meExtraPhiAtBTLmatched, meExtraPhiAtBTL, meExtraPhiAtBTLEff_);
498 
499  normalize(meExtraBTLeneInCone, 1.);
500  }
501 }
MonitorElement * meExtraPtEff_
MonitorElement * meTPEtaMatchEtl2Eff_
MonitorElement * meTPEtaSelEff_
MonitorElement * meEtlEtaEff2_[2]
MonitorElement * meTPEtaMatchEff_
MonitorElement * meExtraEtaEtl2Eff_
MonitorElement * meMVAEtaMatchEff_
MonitorElement * meExtraPhiAtBTLEff_
Log< level::Error, false > LogError
MonitorElement * meTPmtdEtaMatchEff_
MonitorElement * meTPPtSelEff_
MonitorElement * meEtlPhiEff2_[2]
void computeEfficiency1D(MonitorElement *num, MonitorElement *den, MonitorElement *result)
MonitorElement * meMVAPtSelEff_
MonitorElement * meEtlPhiEff_[2]
MonitorElement * meTPPtMatchEtl2Eff_
MonitorElement * meMVAPtMatchEff_
MonitorElement * meEtlPtEff_[2]
const std::string folder_
MonitorElement * meBtlPtEff_
MonitorElement * meTPmtdEtaSelEff_
void normalize(MonitorElement *h, double scale)
MonitorElement * meTPPtMatchEff_
MonitorElement * meEtlPtEff2_[2]
MonitorElement * meExtraPtEtl2Eff_
MonitorElement * meExtraEtaEff_
MonitorElement * meBtlEtaEff_
virtual MonitorElement * get(std::string const &fullpath) const
Definition: DQMStore.cc:712
virtual TH1 * getTH1() const
MonitorElement * meBtlPhiEff_
virtual int getNbinsX() const
get # of bins in X-axis
MonitorElement * meNoTimeFraction_
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]
MonitorElement * meTPmtdPtSelEff_
MonitorElement * meTPmtdPtMatchEff_

◆ fillDescriptions()

void MtdTracksHarvester::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 504 of file MtdTracksHarvester.cc.

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

504  {
506 
507  desc.add<std::string>("folder", "MTD/Tracks/");
508 
509  descriptions.add("MtdTracksPostProcessor", desc);
510 }
void add(std::string const &label, ParameterSetDescription const &psetDescription)

◆ normalize()

void MtdTracksHarvester::normalize ( MonitorElement h,
double  scale 
)
private

Definition at line 82 of file MtdTracksHarvester.cc.

References h, funct::integral(), and pfClustersFromCombinedCaloHF_cfi::scale.

Referenced by dqmEndJob().

82  {
83  double integral = h->getTH1F()->Integral();
84  double norma = (integral > 0.) ? scale / integral : 0.;
85  for (int ibin = 1; ibin <= h->getNbinsX(); ibin++) {
86  double eff = h->getBinContent(ibin) * norma;
87  double bin_err = h->getBinError(ibin) * norma;
88  h->setBinContent(ibin, eff);
89  h->setBinError(ibin, bin_err);
90  }
91 }
Integral< F, X >::type integral(const F &f)
Definition: Integral.h:70
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
Definition: Activities.doc:4

Member Data Documentation

◆ folder_

const std::string MtdTracksHarvester::folder_
private

Definition at line 27 of file MtdTracksHarvester.cc.

Referenced by dqmEndJob().

◆ meBtlEtaEff_

MonitorElement* MtdTracksHarvester::meBtlEtaEff_
private

Definition at line 30 of file MtdTracksHarvester.cc.

Referenced by dqmEndJob().

◆ meBtlPhiEff_

MonitorElement* MtdTracksHarvester::meBtlPhiEff_
private

Definition at line 31 of file MtdTracksHarvester.cc.

Referenced by dqmEndJob().

◆ meBtlPtEff_

MonitorElement* MtdTracksHarvester::meBtlPtEff_
private

Definition at line 32 of file MtdTracksHarvester.cc.

Referenced by dqmEndJob().

◆ meEtlEtaEff2_

MonitorElement* MtdTracksHarvester::meEtlEtaEff2_[2]
private

Definition at line 36 of file MtdTracksHarvester.cc.

Referenced by dqmEndJob().

◆ meEtlEtaEff_

MonitorElement* MtdTracksHarvester::meEtlEtaEff_[2]
private

Definition at line 33 of file MtdTracksHarvester.cc.

Referenced by dqmEndJob().

◆ meEtlPhiEff2_

MonitorElement* MtdTracksHarvester::meEtlPhiEff2_[2]
private

Definition at line 37 of file MtdTracksHarvester.cc.

Referenced by dqmEndJob().

◆ meEtlPhiEff_

MonitorElement* MtdTracksHarvester::meEtlPhiEff_[2]
private

Definition at line 34 of file MtdTracksHarvester.cc.

Referenced by dqmEndJob().

◆ meEtlPtEff2_

MonitorElement* MtdTracksHarvester::meEtlPtEff2_[2]
private

Definition at line 38 of file MtdTracksHarvester.cc.

Referenced by dqmEndJob().

◆ meEtlPtEff_

MonitorElement* MtdTracksHarvester::meEtlPtEff_[2]
private

Definition at line 35 of file MtdTracksHarvester.cc.

Referenced by dqmEndJob().

◆ meExtraEtaEff_

MonitorElement* MtdTracksHarvester::meExtraEtaEff_
private

Definition at line 56 of file MtdTracksHarvester.cc.

Referenced by dqmEndJob().

◆ meExtraEtaEtl2Eff_

MonitorElement* MtdTracksHarvester::meExtraEtaEtl2Eff_
private

Definition at line 57 of file MtdTracksHarvester.cc.

Referenced by dqmEndJob().

◆ meExtraPhiAtBTLEff_

MonitorElement* MtdTracksHarvester::meExtraPhiAtBTLEff_
private

Definition at line 58 of file MtdTracksHarvester.cc.

Referenced by dqmEndJob().

◆ meExtraPtEff_

MonitorElement* MtdTracksHarvester::meExtraPtEff_
private

Definition at line 54 of file MtdTracksHarvester.cc.

Referenced by dqmEndJob().

◆ meExtraPtEtl2Eff_

MonitorElement* MtdTracksHarvester::meExtraPtEtl2Eff_
private

Definition at line 55 of file MtdTracksHarvester.cc.

Referenced by dqmEndJob().

◆ meMVAEtaMatchEff_

MonitorElement* MtdTracksHarvester::meMVAEtaMatchEff_
private

Definition at line 42 of file MtdTracksHarvester.cc.

Referenced by dqmEndJob().

◆ meMVAEtaSelEff_

MonitorElement* MtdTracksHarvester::meMVAEtaSelEff_
private

Definition at line 40 of file MtdTracksHarvester.cc.

Referenced by dqmEndJob().

◆ meMVAPtMatchEff_

MonitorElement* MtdTracksHarvester::meMVAPtMatchEff_
private

Definition at line 41 of file MtdTracksHarvester.cc.

Referenced by dqmEndJob().

◆ meMVAPtSelEff_

MonitorElement* MtdTracksHarvester::meMVAPtSelEff_
private

Definition at line 39 of file MtdTracksHarvester.cc.

Referenced by dqmEndJob().

◆ meNoTimeFraction_

MonitorElement* MtdTracksHarvester::meNoTimeFraction_
private

Definition at line 53 of file MtdTracksHarvester.cc.

Referenced by dqmEndJob().

◆ meTPEtaMatchEff_

MonitorElement* MtdTracksHarvester::meTPEtaMatchEff_
private

Definition at line 46 of file MtdTracksHarvester.cc.

Referenced by dqmEndJob().

◆ meTPEtaMatchEtl2Eff_

MonitorElement* MtdTracksHarvester::meTPEtaMatchEtl2Eff_
private

Definition at line 48 of file MtdTracksHarvester.cc.

Referenced by dqmEndJob().

◆ meTPEtaSelEff_

MonitorElement* MtdTracksHarvester::meTPEtaSelEff_
private

Definition at line 44 of file MtdTracksHarvester.cc.

Referenced by dqmEndJob().

◆ meTPmtdEtaMatchEff_

MonitorElement* MtdTracksHarvester::meTPmtdEtaMatchEff_
private

Definition at line 52 of file MtdTracksHarvester.cc.

Referenced by dqmEndJob().

◆ meTPmtdEtaSelEff_

MonitorElement* MtdTracksHarvester::meTPmtdEtaSelEff_
private

Definition at line 50 of file MtdTracksHarvester.cc.

Referenced by dqmEndJob().

◆ meTPmtdPtMatchEff_

MonitorElement* MtdTracksHarvester::meTPmtdPtMatchEff_
private

Definition at line 51 of file MtdTracksHarvester.cc.

Referenced by dqmEndJob().

◆ meTPmtdPtSelEff_

MonitorElement* MtdTracksHarvester::meTPmtdPtSelEff_
private

Definition at line 49 of file MtdTracksHarvester.cc.

Referenced by dqmEndJob().

◆ meTPPtMatchEff_

MonitorElement* MtdTracksHarvester::meTPPtMatchEff_
private

Definition at line 45 of file MtdTracksHarvester.cc.

Referenced by dqmEndJob().

◆ meTPPtMatchEtl2Eff_

MonitorElement* MtdTracksHarvester::meTPPtMatchEtl2Eff_
private

Definition at line 47 of file MtdTracksHarvester.cc.

Referenced by dqmEndJob().

◆ meTPPtSelEff_

MonitorElement* MtdTracksHarvester::meTPPtSelEff_
private

Definition at line 43 of file MtdTracksHarvester.cc.

Referenced by dqmEndJob().