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]
 
MonitorElementmeExtraBTLfailExtenderEtaEff_
 
MonitorElementmeExtraBTLfailExtenderPtEff_
 
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 64 of file MtdTracksHarvester.cc.

65  : 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 67 of file MtdTracksHarvester.cc.

67 {}

Member Function Documentation

◆ computeEfficiency1D()

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

Definition at line 70 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().

70  {
71  for (int ibin = 1; ibin <= den->getNbinsX(); ibin++) {
72  double eff = num->getBinContent(ibin) / den->getBinContent(ibin);
73  double bin_err = sqrt((num->getBinContent(ibin) * (den->getBinContent(ibin) - num->getBinContent(ibin))) /
74  pow(den->getBinContent(ibin), 3));
75  if (den->getBinContent(ibin) == 0) {
76  eff = 0;
77  bin_err = 0;
78  }
79  result->setBinContent(ibin, eff);
80  result->setBinError(ibin, bin_err);
81  }
82 }
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 96 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_, meExtraBTLfailExtenderEtaEff_, meExtraBTLfailExtenderPtEff_, meExtraEtaEff_, meExtraEtaEtl2Eff_, meExtraPhiAtBTLEff_, meExtraPtEff_, meExtraPtEtl2Eff_, meMVAEtaMatchEff_, meMVAEtaSelEff_, meMVAPtMatchEff_, meMVAPtSelEff_, meNoTimeFraction_, meTPEtaMatchEff_, meTPEtaMatchEtl2Eff_, meTPEtaSelEff_, meTPmtdEtaMatchEff_, meTPmtdEtaSelEff_, meTPmtdPtMatchEff_, meTPmtdPtSelEff_, meTPPtMatchEff_, meTPPtMatchEtl2Eff_, meTPPtSelEff_, and normalize().

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

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

527  {
529 
530  desc.add<std::string>("folder", "MTD/Tracks/");
531 
532  descriptions.add("MtdTracksPostProcessor", desc);
533 }
void add(std::string const &label, ParameterSetDescription const &psetDescription)

◆ normalize()

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

Definition at line 84 of file MtdTracksHarvester.cc.

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

Referenced by dqmEndJob().

84  {
85  double integral = h->getTH1F()->Integral();
86  double norma = (integral > 0.) ? scale / integral : 0.;
87  for (int ibin = 1; ibin <= h->getNbinsX(); ibin++) {
88  double eff = h->getBinContent(ibin) * norma;
89  double bin_err = h->getBinError(ibin) * norma;
90  h->setBinContent(ibin, eff);
91  h->setBinError(ibin, bin_err);
92  }
93 }
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().

◆ meExtraBTLfailExtenderEtaEff_

MonitorElement* MtdTracksHarvester::meExtraBTLfailExtenderEtaEff_
private

Definition at line 59 of file MtdTracksHarvester.cc.

Referenced by dqmEndJob().

◆ meExtraBTLfailExtenderPtEff_

MonitorElement* MtdTracksHarvester::meExtraBTLfailExtenderPtEff_
private

Definition at line 60 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().