CMS 3D CMS Logo

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

 Primary4DVertexHarvester (const edm::ParameterSet &iConfig)
 
 ~Primary4DVertexHarvester () 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 noexcept final
 
bool wantsGlobalRuns () const noexcept final
 
bool wantsInputProcessBlocks () const noexcept final
 
bool wantsProcessBlocks () const noexcept final
 
- Public Member Functions inherited from edm::one::EDProducerBase
 EDProducerBase ()
 
ModuleDescription const & moduleDescription () const
 
bool wantsStreamLuminosityBlocks () const noexcept
 
bool wantsStreamRuns () const noexcept
 
 ~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 incrementME (MonitorElement *base, MonitorElement *toBeAdded)
 
void scaleby (MonitorElement *h, double scale)
 

Private Attributes

const std::string folder_
 
MonitorElementmeBarrelAsK_
 
MonitorElementmeBarrelAsP_
 
MonitorElementmeBarrelAsPi_
 
MonitorElementmeBarrelKPurity_
 
MonitorElementmeBarrelNoPID_
 
MonitorElementmeBarrelPIDKAsKEff_
 
MonitorElementmeBarrelPIDKAsPEff_
 
MonitorElementmeBarrelPIDKAsPiEff_
 
MonitorElementmeBarrelPIDKNoPIDEff_
 
MonitorElementmeBarrelPIDPAsKEff_
 
MonitorElementmeBarrelPIDPAsPEff_
 
MonitorElementmeBarrelPIDPAsPiEff_
 
MonitorElementmeBarrelPIDPiAsKEff_
 
MonitorElementmeBarrelPIDPiAsPEff_
 
MonitorElementmeBarrelPIDPiAsPiEff_
 
MonitorElementmeBarrelPIDPiNoPIDEff_
 
MonitorElementmeBarrelPIDPNoPIDEff_
 
MonitorElementmeBarrelPiPurity_
 
MonitorElementmeBarrelPPurity_
 
MonitorElementmeBarrelTrueK_
 
MonitorElementmeBarrelTrueP_
 
MonitorElementmeBarrelTruePi_
 
MonitorElementmeEndcapAsK_
 
MonitorElementmeEndcapAsP_
 
MonitorElementmeEndcapAsPi_
 
MonitorElementmeEndcapKPurity_
 
MonitorElementmeEndcapNoPID_
 
MonitorElementmeEndcapPIDKAsKEff_
 
MonitorElementmeEndcapPIDKAsPEff_
 
MonitorElementmeEndcapPIDKAsPiEff_
 
MonitorElementmeEndcapPIDKNoPIDEff_
 
MonitorElementmeEndcapPIDPAsKEff_
 
MonitorElementmeEndcapPIDPAsPEff_
 
MonitorElementmeEndcapPIDPAsPiEff_
 
MonitorElementmeEndcapPIDPiAsKEff_
 
MonitorElementmeEndcapPIDPiAsPEff_
 
MonitorElementmeEndcapPIDPiAsPiEff_
 
MonitorElementmeEndcapPIDPiNoPIDEff_
 
MonitorElementmeEndcapPIDPNoPIDEff_
 
MonitorElementmeEndcapPiPurity_
 
MonitorElementmeEndcapPPurity_
 
MonitorElementmeEndcapTrueK_
 
MonitorElementmeEndcapTrueP_
 
MonitorElementmeEndcapTruePi_
 
MonitorElementmeTPEtaMatchEff_
 
MonitorElementmeTPEtaSelEff_
 
MonitorElementmeTPPtMatchEff_
 
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 Primary4DVertexHarvester.cc.

Constructor & Destructor Documentation

◆ Primary4DVertexHarvester()

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

Definition at line 95 of file Primary4DVertexHarvester.cc.

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

◆ ~Primary4DVertexHarvester()

Primary4DVertexHarvester::~Primary4DVertexHarvester ( )
override

Definition at line 98 of file Primary4DVertexHarvester.cc.

98 {}

Member Function Documentation

◆ computeEfficiency1D()

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

Definition at line 101 of file Primary4DVertexHarvester.cc.

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

Referenced by dqmEndJob().

101  {
102  for (int ibin = 1; ibin <= den->getNbinsX(); ibin++) {
103  double eff = num->getBinContent(ibin) / den->getBinContent(ibin);
104  double bin_err = sqrt((num->getBinContent(ibin) * (den->getBinContent(ibin) - num->getBinContent(ibin))) /
105  pow(den->getBinContent(ibin), 3));
106  if (den->getBinContent(ibin) == 0) {
107  eff = 0;
108  bin_err = 0;
109  }
110  result->setBinContent(ibin, eff);
111  result->setBinError(ibin, bin_err);
112  }
113 }
T sqrt(T t)
Definition: SSEVec.h:23
virtual int getNbinsX() const
get # of bins in X-axis
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:29
virtual double getBinContent(int binx) const
get content of bin (1-D)

◆ dqmEndJob()

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

Implements DQMEDHarvester.

Definition at line 137 of file Primary4DVertexHarvester.cc.

References dqm::implementation::IBooker::book1D(), dqm::implementation::NavigatorBase::cd(), computeEfficiency1D(), folder_, dqm::implementation::IGetter::get(), dqm::impl::MonitorElement::getNbinsX(), dqm::legacy::MonitorElement::getTH1(), dqm::legacy::MonitorElement::getTH1F(), incrementME(), meBarrelAsK_, meBarrelAsP_, meBarrelAsPi_, meBarrelKPurity_, meBarrelNoPID_, meBarrelPIDKAsKEff_, meBarrelPIDKAsPEff_, meBarrelPIDKAsPiEff_, meBarrelPIDKNoPIDEff_, meBarrelPIDPAsKEff_, meBarrelPIDPAsPEff_, meBarrelPIDPAsPiEff_, meBarrelPIDPiAsKEff_, meBarrelPIDPiAsPEff_, meBarrelPIDPiAsPiEff_, meBarrelPIDPiNoPIDEff_, meBarrelPIDPNoPIDEff_, meBarrelPiPurity_, meBarrelPPurity_, meBarrelTrueK_, meBarrelTrueP_, meBarrelTruePi_, meEndcapAsK_, meEndcapAsP_, meEndcapAsPi_, meEndcapKPurity_, meEndcapNoPID_, meEndcapPIDKAsKEff_, meEndcapPIDKAsPEff_, meEndcapPIDKAsPiEff_, meEndcapPIDKNoPIDEff_, meEndcapPIDPAsKEff_, meEndcapPIDPAsPEff_, meEndcapPIDPAsPiEff_, meEndcapPIDPiAsKEff_, meEndcapPIDPiAsPEff_, meEndcapPIDPiAsPiEff_, meEndcapPIDPiNoPIDEff_, meEndcapPIDPNoPIDEff_, meEndcapPiPurity_, meEndcapPPurity_, meEndcapTrueK_, meEndcapTrueP_, meEndcapTruePi_, meTPEtaMatchEff_, meTPEtaSelEff_, meTPPtMatchEff_, meTPPtSelEff_, isotrackNtupler::scale, and scaleby().

137  {
138  // --- Get the monitoring histograms
139  MonitorElement* meTrackEffPtTot = igetter.get(folder_ + "EffPtTot");
140  MonitorElement* meTrackMatchedTPEffPtTot = igetter.get(folder_ + "MatchedTPEffPtTot");
141  MonitorElement* meTrackMatchedTPEffPtMtd = igetter.get(folder_ + "MatchedTPEffPtMtd");
142  MonitorElement* meTrackEffEtaTot = igetter.get(folder_ + "EffEtaTot");
143  MonitorElement* meTrackMatchedTPEffEtaTot = igetter.get(folder_ + "MatchedTPEffEtaTot");
144  MonitorElement* meTrackMatchedTPEffEtaMtd = igetter.get(folder_ + "MatchedTPEffEtaMtd");
145  MonitorElement* meRecVerNumber = igetter.get(folder_ + "RecVerNumber");
146  MonitorElement* meRecVerZ = igetter.get(folder_ + "recPVZ");
147  MonitorElement* meRecVerT = igetter.get(folder_ + "recPVT");
148  MonitorElement* meSimVerNumber = igetter.get(folder_ + "SimVerNumber");
149  MonitorElement* meSimVerZ = igetter.get(folder_ + "simPVZ");
150  MonitorElement* meSimVerT = igetter.get(folder_ + "simPVT");
151 
152  if (!meTrackEffPtTot || !meTrackMatchedTPEffPtTot || !meTrackMatchedTPEffPtMtd || !meTrackEffEtaTot ||
153  !meTrackMatchedTPEffEtaTot || !meTrackMatchedTPEffEtaMtd || !meRecVerNumber || !meRecVerZ || !meRecVerT ||
154  !meSimVerNumber || !meSimVerZ || !meSimVerT) {
155  edm::LogError("Primary4DVertexHarvester") << "Monitoring histograms not found!" << std::endl;
156  return;
157  }
158 
159  // Normalize z,time multiplicty plots to get correct line densities
160  double scale = meRecVerNumber->getTH1F()->Integral();
161  scale = (scale > 0.) ? 1. / scale : 0.;
162  if (scale > 0.) {
163  scaleby(meRecVerZ, scale);
164  scaleby(meRecVerT, scale);
165  }
166  scale = meSimVerNumber->getTH1F()->Integral();
167  scale = (scale > 0.) ? 1. / scale : 0.;
168  if (scale > 0.) {
169  scaleby(meSimVerZ, scale);
170  scaleby(meSimVerT, scale);
171  }
172 
173  // --- Book histograms
174  ibook.cd(folder_);
175  meTPPtSelEff_ = ibook.book1D("TPPtSelEff",
176  "Track associated to LV selected efficiency TP VS Pt;Pt [GeV];Efficiency",
177  meTrackEffPtTot->getNbinsX(),
178  meTrackEffPtTot->getTH1()->GetXaxis()->GetXmin(),
179  meTrackEffPtTot->getTH1()->GetXaxis()->GetXmax());
180  meTPPtSelEff_->getTH1()->SetMinimum(0.);
181  computeEfficiency1D(meTrackMatchedTPEffPtTot, meTrackEffPtTot, meTPPtSelEff_);
182 
183  meTPEtaSelEff_ = ibook.book1D("TPEtaSelEff",
184  "Track associated to LV selected efficiency TP VS Eta;Eta;Efficiency",
185  meTrackEffEtaTot->getNbinsX(),
186  meTrackEffEtaTot->getTH1()->GetXaxis()->GetXmin(),
187  meTrackEffEtaTot->getTH1()->GetXaxis()->GetXmax());
188  meTPEtaSelEff_->getTH1()->SetMinimum(0.);
189  computeEfficiency1D(meTrackMatchedTPEffEtaTot, meTrackEffEtaTot, meTPEtaSelEff_);
190 
191  meTPPtMatchEff_ = ibook.book1D("TPPtMatchEff",
192  "Track associated to LV matched to TP efficiency VS Pt;Pt [GeV];Efficiency",
193  meTrackMatchedTPEffPtTot->getNbinsX(),
194  meTrackMatchedTPEffPtTot->getTH1()->GetXaxis()->GetXmin(),
195  meTrackMatchedTPEffPtTot->getTH1()->GetXaxis()->GetXmax());
196  meTPPtMatchEff_->getTH1()->SetMinimum(0.);
197  computeEfficiency1D(meTrackMatchedTPEffPtMtd, meTrackMatchedTPEffPtTot, meTPPtMatchEff_);
198 
199  meTPEtaMatchEff_ = ibook.book1D("TPEtaMatchEff",
200  "Track associated to LV matched to TP efficiency VS Eta;Eta;Efficiency",
201  meTrackMatchedTPEffEtaTot->getNbinsX(),
202  meTrackMatchedTPEffEtaTot->getTH1()->GetXaxis()->GetXmin(),
203  meTrackMatchedTPEffEtaTot->getTH1()->GetXaxis()->GetXmax());
204  meTPEtaMatchEff_->getTH1()->SetMinimum(0.);
205  computeEfficiency1D(meTrackMatchedTPEffEtaMtd, meTrackMatchedTPEffEtaTot, meTPEtaMatchEff_);
206 
207  MonitorElement* meBarrelPIDp = igetter.get(folder_ + "BarrelPIDp");
208  MonitorElement* meEndcapPIDp = igetter.get(folder_ + "EndcapPIDp");
209 
210  MonitorElement* meBarrelTruePiNoPID = igetter.get(folder_ + "BarrelTruePiNoPID");
211  MonitorElement* meBarrelTrueKNoPID = igetter.get(folder_ + "BarrelTrueKNoPID");
212  MonitorElement* meBarrelTruePNoPID = igetter.get(folder_ + "BarrelTruePNoPID");
213  MonitorElement* meEndcapTruePiNoPID = igetter.get(folder_ + "EndcapTruePiNoPID");
214  MonitorElement* meEndcapTrueKNoPID = igetter.get(folder_ + "EndcapTrueKNoPID");
215  MonitorElement* meEndcapTruePNoPID = igetter.get(folder_ + "EndcapTruePNoPID");
216 
217  MonitorElement* meBarrelTruePiAsPi = igetter.get(folder_ + "BarrelTruePiAsPi");
218  MonitorElement* meBarrelTrueKAsPi = igetter.get(folder_ + "BarrelTrueKAsPi");
219  MonitorElement* meBarrelTruePAsPi = igetter.get(folder_ + "BarrelTruePAsPi");
220  MonitorElement* meEndcapTruePiAsPi = igetter.get(folder_ + "EndcapTruePiAsPi");
221  MonitorElement* meEndcapTrueKAsPi = igetter.get(folder_ + "EndcapTrueKAsPi");
222  MonitorElement* meEndcapTruePAsPi = igetter.get(folder_ + "EndcapTruePAsPi");
223 
224  MonitorElement* meBarrelTruePiAsK = igetter.get(folder_ + "BarrelTruePiAsK");
225  MonitorElement* meBarrelTrueKAsK = igetter.get(folder_ + "BarrelTrueKAsK");
226  MonitorElement* meBarrelTruePAsK = igetter.get(folder_ + "BarrelTruePAsK");
227  MonitorElement* meEndcapTruePiAsK = igetter.get(folder_ + "EndcapTruePiAsK");
228  MonitorElement* meEndcapTrueKAsK = igetter.get(folder_ + "EndcapTrueKAsK");
229  MonitorElement* meEndcapTruePAsK = igetter.get(folder_ + "EndcapTruePAsK");
230 
231  MonitorElement* meBarrelTruePiAsP = igetter.get(folder_ + "BarrelTruePiAsP");
232  MonitorElement* meBarrelTrueKAsP = igetter.get(folder_ + "BarrelTrueKAsP");
233  MonitorElement* meBarrelTruePAsP = igetter.get(folder_ + "BarrelTruePAsP");
234  MonitorElement* meEndcapTruePiAsP = igetter.get(folder_ + "EndcapTruePiAsP");
235  MonitorElement* meEndcapTrueKAsP = igetter.get(folder_ + "EndcapTrueKAsP");
236  MonitorElement* meEndcapTruePAsP = igetter.get(folder_ + "EndcapTruePAsP");
237 
238  if (!meBarrelPIDp || !meEndcapPIDp || !meBarrelTruePiNoPID || !meBarrelTrueKNoPID || !meBarrelTruePNoPID ||
239  !meEndcapTruePiNoPID || !meEndcapTrueKNoPID || !meEndcapTruePNoPID || !meBarrelTruePiAsPi || !meBarrelTrueKAsPi ||
240  !meBarrelTruePAsPi || !meEndcapTruePiAsPi || !meEndcapTrueKAsPi || !meEndcapTruePAsPi || !meBarrelTruePiAsK ||
241  !meBarrelTrueKAsK || !meBarrelTruePAsK || !meEndcapTruePiAsK || !meEndcapTrueKAsK || !meEndcapTruePAsK ||
242  !meBarrelTruePiAsP || !meBarrelTrueKAsP || !meBarrelTruePAsP || !meEndcapTruePiAsP || !meEndcapTrueKAsP ||
243  !meEndcapTruePAsP) {
244  edm::LogWarning("Primary4DVertexHarvester") << "PID Monitoring histograms not found!" << std::endl;
245  return;
246  }
247 
248  meBarrelTruePi_ = ibook.book1D("BarrelTruePi",
249  "Barrel True Pi P;P [GeV]",
250  meBarrelPIDp->getNbinsX(),
251  meBarrelPIDp->getTH1()->GetXaxis()->GetXmin(),
252  meBarrelPIDp->getTH1()->GetXaxis()->GetXmax());
253  incrementME(meBarrelTruePi_, meBarrelTruePiAsPi);
254  incrementME(meBarrelTruePi_, meBarrelTruePiAsK);
255  incrementME(meBarrelTruePi_, meBarrelTruePiAsP);
256  incrementME(meBarrelTruePi_, meBarrelTruePiNoPID);
257 
258  meEndcapTruePi_ = ibook.book1D("EndcapTruePi",
259  "Endcap True Pi P;P [GeV]",
260  meBarrelPIDp->getNbinsX(),
261  meBarrelPIDp->getTH1()->GetXaxis()->GetXmin(),
262  meBarrelPIDp->getTH1()->GetXaxis()->GetXmax());
263  incrementME(meEndcapTruePi_, meEndcapTruePiAsPi);
264  incrementME(meEndcapTruePi_, meEndcapTruePiAsK);
265  incrementME(meEndcapTruePi_, meEndcapTruePiAsP);
266  incrementME(meEndcapTruePi_, meEndcapTruePiNoPID);
267 
268  meBarrelTrueK_ = ibook.book1D("BarrelTrueK",
269  "Barrel True K P;P [GeV]",
270  meBarrelPIDp->getNbinsX(),
271  meBarrelPIDp->getTH1()->GetXaxis()->GetXmin(),
272  meBarrelPIDp->getTH1()->GetXaxis()->GetXmax());
273  incrementME(meBarrelTrueK_, meBarrelTrueKAsPi);
274  incrementME(meBarrelTrueK_, meBarrelTrueKAsK);
275  incrementME(meBarrelTrueK_, meBarrelTrueKAsP);
276  incrementME(meBarrelTrueK_, meBarrelTrueKNoPID);
277 
278  meEndcapTrueK_ = ibook.book1D("EndcapTrueK",
279  "Endcap True K P;P [GeV]",
280  meBarrelPIDp->getNbinsX(),
281  meBarrelPIDp->getTH1()->GetXaxis()->GetXmin(),
282  meBarrelPIDp->getTH1()->GetXaxis()->GetXmax());
283  incrementME(meEndcapTrueK_, meEndcapTrueKAsPi);
284  incrementME(meEndcapTrueK_, meEndcapTrueKAsK);
285  incrementME(meEndcapTrueK_, meEndcapTrueKAsP);
286  incrementME(meEndcapTrueK_, meEndcapTrueKNoPID);
287 
288  meBarrelTrueP_ = ibook.book1D("BarrelTrueP",
289  "Barrel True P P;P [GeV]",
290  meBarrelPIDp->getNbinsX(),
291  meBarrelPIDp->getTH1()->GetXaxis()->GetXmin(),
292  meBarrelPIDp->getTH1()->GetXaxis()->GetXmax());
293  incrementME(meBarrelTrueP_, meBarrelTruePAsPi);
294  incrementME(meBarrelTrueP_, meBarrelTruePAsK);
295  incrementME(meBarrelTrueP_, meBarrelTruePAsP);
296  incrementME(meBarrelTrueP_, meBarrelTruePNoPID);
297 
298  meEndcapTrueP_ = ibook.book1D("EndcapTrueP",
299  "Endcap True P P;P [GeV]",
300  meBarrelPIDp->getNbinsX(),
301  meBarrelPIDp->getTH1()->GetXaxis()->GetXmin(),
302  meBarrelPIDp->getTH1()->GetXaxis()->GetXmax());
303  incrementME(meEndcapTrueP_, meEndcapTruePAsPi);
304  incrementME(meEndcapTrueP_, meEndcapTruePAsK);
305  incrementME(meEndcapTrueP_, meEndcapTruePAsP);
306  incrementME(meEndcapTrueP_, meEndcapTruePNoPID);
307 
308  meBarrelPIDPiAsPiEff_ = ibook.book1D("BarrelPIDPiAsPiEff",
309  "Barrel True pi as pi id. fraction VS P;P [GeV]",
310  meBarrelPIDp->getNbinsX(),
311  meBarrelPIDp->getTH1()->GetXaxis()->GetXmin(),
312  meBarrelPIDp->getTH1()->GetXaxis()->GetXmax());
313  meBarrelPIDPiAsPiEff_->getTH1()->SetMinimum(0.);
315 
316  meBarrelPIDPiAsKEff_ = ibook.book1D("BarrelPIDPiAsKEff",
317  "Barrel True pi as k id. fraction VS P;P [GeV]",
318  meBarrelPIDp->getNbinsX(),
319  meBarrelPIDp->getTH1()->GetXaxis()->GetXmin(),
320  meBarrelPIDp->getTH1()->GetXaxis()->GetXmax());
321  meBarrelPIDPiAsKEff_->getTH1()->SetMinimum(0.);
323 
324  meBarrelPIDPiAsPEff_ = ibook.book1D("BarrelPIDPiAsPEff",
325  "Barrel True pi as p id. fraction VS P;P [GeV]",
326  meBarrelPIDp->getNbinsX(),
327  meBarrelPIDp->getTH1()->GetXaxis()->GetXmin(),
328  meBarrelPIDp->getTH1()->GetXaxis()->GetXmax());
329  meBarrelPIDPiAsPEff_->getTH1()->SetMinimum(0.);
331 
332  meBarrelPIDPiNoPIDEff_ = ibook.book1D("BarrelPIDPiNoPIDEff",
333  "Barrel True pi no PID id. fraction VS P;P [GeV]",
334  meBarrelPIDp->getNbinsX(),
335  meBarrelPIDp->getTH1()->GetXaxis()->GetXmin(),
336  meBarrelPIDp->getTH1()->GetXaxis()->GetXmax());
337  meBarrelPIDPiNoPIDEff_->getTH1()->SetMinimum(0.);
339 
340  meBarrelPIDKAsPiEff_ = ibook.book1D("BarrelPIDKAsPiEff",
341  "Barrel True k as pi id. fraction VS P;P [GeV]",
342  meBarrelPIDp->getNbinsX(),
343  meBarrelPIDp->getTH1()->GetXaxis()->GetXmin(),
344  meBarrelPIDp->getTH1()->GetXaxis()->GetXmax());
345  meBarrelPIDKAsPiEff_->getTH1()->SetMinimum(0.);
347 
348  meBarrelPIDKAsKEff_ = ibook.book1D("BarrelPIDKAsKEff",
349  "Barrel True k as k id. fraction VS P;P [GeV]",
350  meBarrelPIDp->getNbinsX(),
351  meBarrelPIDp->getTH1()->GetXaxis()->GetXmin(),
352  meBarrelPIDp->getTH1()->GetXaxis()->GetXmax());
353  meBarrelPIDKAsKEff_->getTH1()->SetMinimum(0.);
355 
356  meBarrelPIDKAsPEff_ = ibook.book1D("BarrelPIDKAsPEff",
357  "Barrel True k as p id. fraction VS P;P [GeV]",
358  meBarrelPIDp->getNbinsX(),
359  meBarrelPIDp->getTH1()->GetXaxis()->GetXmin(),
360  meBarrelPIDp->getTH1()->GetXaxis()->GetXmax());
361  meBarrelPIDKAsPEff_->getTH1()->SetMinimum(0.);
363 
364  meBarrelPIDKNoPIDEff_ = ibook.book1D("BarrelPIDKNoPIDEff",
365  "Barrel True k no PID id. fraction VS P;P [GeV]",
366  meBarrelPIDp->getNbinsX(),
367  meBarrelPIDp->getTH1()->GetXaxis()->GetXmin(),
368  meBarrelPIDp->getTH1()->GetXaxis()->GetXmax());
369  meBarrelPIDKNoPIDEff_->getTH1()->SetMinimum(0.);
371 
372  meBarrelPIDPAsPiEff_ = ibook.book1D("BarrelPIDPAsPiEff",
373  "Barrel True p as pi id. fraction VS P;P [GeV]",
374  meBarrelPIDp->getNbinsX(),
375  meBarrelPIDp->getTH1()->GetXaxis()->GetXmin(),
376  meBarrelPIDp->getTH1()->GetXaxis()->GetXmax());
377  meBarrelPIDPAsPiEff_->getTH1()->SetMinimum(0.);
379 
380  meBarrelPIDPAsKEff_ = ibook.book1D("BarrelPIDPAsKEff",
381  "Barrel True p as k id. fraction VS P;P [GeV]",
382  meBarrelPIDp->getNbinsX(),
383  meBarrelPIDp->getTH1()->GetXaxis()->GetXmin(),
384  meBarrelPIDp->getTH1()->GetXaxis()->GetXmax());
385  meBarrelPIDPAsKEff_->getTH1()->SetMinimum(0.);
387 
388  meBarrelPIDPAsPEff_ = ibook.book1D("BarrelPIDPAsPEff",
389  "Barrel True p as p id. fraction VS P;P [GeV]",
390  meBarrelPIDp->getNbinsX(),
391  meBarrelPIDp->getTH1()->GetXaxis()->GetXmin(),
392  meBarrelPIDp->getTH1()->GetXaxis()->GetXmax());
393  meBarrelPIDPAsPEff_->getTH1()->SetMinimum(0.);
395 
396  meBarrelPIDPNoPIDEff_ = ibook.book1D("BarrelPIDPNoPIDEff",
397  "Barrel True p no PID id. fraction VS P;P [GeV]",
398  meBarrelPIDp->getNbinsX(),
399  meBarrelPIDp->getTH1()->GetXaxis()->GetXmin(),
400  meBarrelPIDp->getTH1()->GetXaxis()->GetXmax());
401  meBarrelPIDPNoPIDEff_->getTH1()->SetMinimum(0.);
403 
404  meEndcapPIDPiAsPiEff_ = ibook.book1D("EndcapPIDPiAsPiEff",
405  "Endcap True pi as pi id. fraction VS P;P [GeV]",
406  meBarrelPIDp->getNbinsX(),
407  meBarrelPIDp->getTH1()->GetXaxis()->GetXmin(),
408  meBarrelPIDp->getTH1()->GetXaxis()->GetXmax());
409  meEndcapPIDPiAsPiEff_->getTH1()->SetMinimum(0.);
411 
412  meEndcapPIDPiAsKEff_ = ibook.book1D("EndcapPIDPiAsKEff",
413  "Endcap True pi as k id. fraction VS P;P [GeV]",
414  meBarrelPIDp->getNbinsX(),
415  meBarrelPIDp->getTH1()->GetXaxis()->GetXmin(),
416  meBarrelPIDp->getTH1()->GetXaxis()->GetXmax());
417  meEndcapPIDPiAsKEff_->getTH1()->SetMinimum(0.);
419 
420  meEndcapPIDPiAsPEff_ = ibook.book1D("EndcapPIDPiAsPEff",
421  "Endcap True pi as p id. fraction VS P;P [GeV]",
422  meBarrelPIDp->getNbinsX(),
423  meBarrelPIDp->getTH1()->GetXaxis()->GetXmin(),
424  meBarrelPIDp->getTH1()->GetXaxis()->GetXmax());
425  meEndcapPIDPiAsPEff_->getTH1()->SetMinimum(0.);
427 
428  meEndcapPIDPiNoPIDEff_ = ibook.book1D("EndcapPIDPiNoPIDEff",
429  "Endcap True pi no PID id. fraction VS P;P [GeV]",
430  meBarrelPIDp->getNbinsX(),
431  meBarrelPIDp->getTH1()->GetXaxis()->GetXmin(),
432  meBarrelPIDp->getTH1()->GetXaxis()->GetXmax());
433  meEndcapPIDPiNoPIDEff_->getTH1()->SetMinimum(0.);
435 
436  meEndcapPIDKAsPiEff_ = ibook.book1D("EndcapPIDKAsPiEff",
437  "Endcap True k as pi id. fraction VS P;P [GeV]",
438  meBarrelPIDp->getNbinsX(),
439  meBarrelPIDp->getTH1()->GetXaxis()->GetXmin(),
440  meBarrelPIDp->getTH1()->GetXaxis()->GetXmax());
441  meEndcapPIDKAsPiEff_->getTH1()->SetMinimum(0.);
443 
444  meEndcapPIDKAsKEff_ = ibook.book1D("EndcapPIDKAsKEff",
445  "Endcap True k as k id. fraction VS P;P [GeV]",
446  meBarrelPIDp->getNbinsX(),
447  meBarrelPIDp->getTH1()->GetXaxis()->GetXmin(),
448  meBarrelPIDp->getTH1()->GetXaxis()->GetXmax());
449  meEndcapPIDKAsKEff_->getTH1()->SetMinimum(0.);
451 
452  meEndcapPIDKAsPEff_ = ibook.book1D("EndcapPIDKAsPEff",
453  "Endcap True k as p id. fraction VS P;P [GeV]",
454  meBarrelPIDp->getNbinsX(),
455  meBarrelPIDp->getTH1()->GetXaxis()->GetXmin(),
456  meBarrelPIDp->getTH1()->GetXaxis()->GetXmax());
457  meEndcapPIDKAsPEff_->getTH1()->SetMinimum(0.);
459 
460  meEndcapPIDKNoPIDEff_ = ibook.book1D("EndcapPIDKNoPIDEff",
461  "Endcap True k no PID id. fraction VS P;P [GeV]",
462  meBarrelPIDp->getNbinsX(),
463  meBarrelPIDp->getTH1()->GetXaxis()->GetXmin(),
464  meBarrelPIDp->getTH1()->GetXaxis()->GetXmax());
465  meEndcapPIDKNoPIDEff_->getTH1()->SetMinimum(0.);
467 
468  meEndcapPIDPAsPiEff_ = ibook.book1D("EndcapPIDPAsPiEff",
469  "Endcap True p as pi id. fraction VS P;P [GeV]",
470  meBarrelPIDp->getNbinsX(),
471  meBarrelPIDp->getTH1()->GetXaxis()->GetXmin(),
472  meBarrelPIDp->getTH1()->GetXaxis()->GetXmax());
473  meEndcapPIDPAsPiEff_->getTH1()->SetMinimum(0.);
475 
476  meEndcapPIDPAsKEff_ = ibook.book1D("EndcapPIDPAsKEff",
477  "Endcap True p as k id. fraction VS P;P [GeV]",
478  meBarrelPIDp->getNbinsX(),
479  meBarrelPIDp->getTH1()->GetXaxis()->GetXmin(),
480  meBarrelPIDp->getTH1()->GetXaxis()->GetXmax());
481  meEndcapPIDPAsKEff_->getTH1()->SetMinimum(0.);
483 
484  meEndcapPIDPAsPEff_ = ibook.book1D("EndcapPIDPAsPEff",
485  "Endcap True p as p id. fraction VS P;P [GeV]",
486  meBarrelPIDp->getNbinsX(),
487  meBarrelPIDp->getTH1()->GetXaxis()->GetXmin(),
488  meBarrelPIDp->getTH1()->GetXaxis()->GetXmax());
489  meEndcapPIDPAsPEff_->getTH1()->SetMinimum(0.);
491 
492  meEndcapPIDPNoPIDEff_ = ibook.book1D("EndcapPIDPNoPIDEff",
493  "Endcap True p no PID id. fraction VS P;P [GeV]",
494  meBarrelPIDp->getNbinsX(),
495  meBarrelPIDp->getTH1()->GetXaxis()->GetXmin(),
496  meBarrelPIDp->getTH1()->GetXaxis()->GetXmax());
497  meEndcapPIDPNoPIDEff_->getTH1()->SetMinimum(0.);
499 
500  meBarrelAsPi_ = ibook.book1D("BarrelAsPi",
501  "Barrel Identified Pi P;P [GeV]",
502  meBarrelPIDp->getNbinsX(),
503  meBarrelPIDp->getTH1()->GetXaxis()->GetXmin(),
504  meBarrelPIDp->getTH1()->GetXaxis()->GetXmax());
505  incrementME(meBarrelAsPi_, meBarrelTruePiAsPi);
506  incrementME(meBarrelAsPi_, meBarrelTrueKAsPi);
507  incrementME(meBarrelAsPi_, meBarrelTruePAsPi);
508 
509  meEndcapAsPi_ = ibook.book1D("EndcapAsPi",
510  "Endcap Identified Pi P;P [GeV]",
511  meBarrelPIDp->getNbinsX(),
512  meBarrelPIDp->getTH1()->GetXaxis()->GetXmin(),
513  meBarrelPIDp->getTH1()->GetXaxis()->GetXmax());
514  incrementME(meEndcapAsPi_, meEndcapTruePiAsPi);
515  incrementME(meEndcapAsPi_, meEndcapTrueKAsPi);
516  incrementME(meEndcapAsPi_, meEndcapTruePAsPi);
517 
518  meBarrelAsK_ = ibook.book1D("BarrelAsK",
519  "Barrel Identified K P;P [GeV]",
520  meBarrelPIDp->getNbinsX(),
521  meBarrelPIDp->getTH1()->GetXaxis()->GetXmin(),
522  meBarrelPIDp->getTH1()->GetXaxis()->GetXmax());
523  incrementME(meBarrelAsK_, meBarrelTruePiAsK);
524  incrementME(meBarrelAsK_, meBarrelTrueKAsK);
525  incrementME(meBarrelAsK_, meBarrelTruePAsK);
526 
527  meEndcapAsK_ = ibook.book1D("EndcapAsK",
528  "Endcap Identified K P;P [GeV]",
529  meBarrelPIDp->getNbinsX(),
530  meBarrelPIDp->getTH1()->GetXaxis()->GetXmin(),
531  meBarrelPIDp->getTH1()->GetXaxis()->GetXmax());
532  incrementME(meEndcapAsK_, meEndcapTruePiAsK);
533  incrementME(meEndcapAsK_, meEndcapTrueKAsK);
534  incrementME(meEndcapAsK_, meEndcapTruePAsK);
535 
536  meBarrelAsP_ = ibook.book1D("BarrelAsP",
537  "Barrel Identified P P;P [GeV]",
538  meBarrelPIDp->getNbinsX(),
539  meBarrelPIDp->getTH1()->GetXaxis()->GetXmin(),
540  meBarrelPIDp->getTH1()->GetXaxis()->GetXmax());
541  incrementME(meBarrelAsP_, meBarrelTruePiAsP);
542  incrementME(meBarrelAsP_, meBarrelTrueKAsP);
543  incrementME(meBarrelAsP_, meBarrelTruePAsP);
544 
545  meEndcapAsP_ = ibook.book1D("EndcapAsP",
546  "Endcap Identified P P;P [GeV]",
547  meBarrelPIDp->getNbinsX(),
548  meBarrelPIDp->getTH1()->GetXaxis()->GetXmin(),
549  meBarrelPIDp->getTH1()->GetXaxis()->GetXmax());
550  incrementME(meEndcapAsP_, meEndcapTruePiAsP);
551  incrementME(meEndcapAsP_, meEndcapTrueKAsP);
552  incrementME(meEndcapAsP_, meEndcapTruePAsP);
553 
554  meBarrelNoPID_ = ibook.book1D("BarrelNoPID",
555  "Barrel NoPID P;P [GeV]",
556  meBarrelPIDp->getNbinsX(),
557  meBarrelPIDp->getTH1()->GetXaxis()->GetXmin(),
558  meBarrelPIDp->getTH1()->GetXaxis()->GetXmax());
559  incrementME(meBarrelNoPID_, meBarrelTruePiNoPID);
560  incrementME(meBarrelNoPID_, meBarrelTrueKNoPID);
561  incrementME(meBarrelNoPID_, meBarrelTruePNoPID);
562 
563  meEndcapNoPID_ = ibook.book1D("EndcapNoPID",
564  "Endcap NoPID P;P [GeV]",
565  meBarrelPIDp->getNbinsX(),
566  meBarrelPIDp->getTH1()->GetXaxis()->GetXmin(),
567  meBarrelPIDp->getTH1()->GetXaxis()->GetXmax());
568  incrementME(meEndcapNoPID_, meEndcapTruePiNoPID);
569  incrementME(meEndcapNoPID_, meEndcapTrueKNoPID);
570  incrementME(meEndcapNoPID_, meEndcapTruePNoPID);
571 
572  meBarrelPiPurity_ = ibook.book1D("BarrelPiPurity",
573  "Barrel pi id. fraction true pi VS P;P [GeV]",
574  meBarrelPIDp->getNbinsX(),
575  meBarrelPIDp->getTH1()->GetXaxis()->GetXmin(),
576  meBarrelPIDp->getTH1()->GetXaxis()->GetXmax());
577  meBarrelPiPurity_->getTH1()->SetMinimum(0.);
579 
580  meBarrelKPurity_ = ibook.book1D("BarrelKPurity",
581  "Barrel k id. fraction true k VS P;P [GeV]",
582  meBarrelPIDp->getNbinsX(),
583  meBarrelPIDp->getTH1()->GetXaxis()->GetXmin(),
584  meBarrelPIDp->getTH1()->GetXaxis()->GetXmax());
585  meBarrelKPurity_->getTH1()->SetMinimum(0.);
587 
588  meBarrelPPurity_ = ibook.book1D("BarrelPPurity",
589  "Barrel p id. fraction true p VS P;P [GeV]",
590  meBarrelPIDp->getNbinsX(),
591  meBarrelPIDp->getTH1()->GetXaxis()->GetXmin(),
592  meBarrelPIDp->getTH1()->GetXaxis()->GetXmax());
593  meBarrelPPurity_->getTH1()->SetMinimum(0.);
595 
596  meEndcapPiPurity_ = ibook.book1D("EndcapPiPurity",
597  "Endcap pi id. fraction true pi VS P;P [GeV]",
598  meEndcapPIDp->getNbinsX(),
599  meEndcapPIDp->getTH1()->GetXaxis()->GetXmin(),
600  meEndcapPIDp->getTH1()->GetXaxis()->GetXmax());
601  meEndcapPiPurity_->getTH1()->SetMinimum(0.);
603 
604  meEndcapKPurity_ = ibook.book1D("EndcapKPurity",
605  "Endcap k id. fraction true k VS P;P [GeV]",
606  meEndcapPIDp->getNbinsX(),
607  meEndcapPIDp->getTH1()->GetXaxis()->GetXmin(),
608  meEndcapPIDp->getTH1()->GetXaxis()->GetXmax());
609  meEndcapKPurity_->getTH1()->SetMinimum(0.);
611 
612  meEndcapPPurity_ = ibook.book1D("EndcapPPurity",
613  "Endcap p id. fraction true p VS P;P [GeV]",
614  meEndcapPIDp->getNbinsX(),
615  meEndcapPIDp->getTH1()->GetXaxis()->GetXmin(),
616  meEndcapPIDp->getTH1()->GetXaxis()->GetXmax());
617  meEndcapPPurity_->getTH1()->SetMinimum(0.);
619 }
void scaleby(MonitorElement *h, double scale)
void computeEfficiency1D(MonitorElement *num, MonitorElement *den, MonitorElement *result)
Log< level::Error, false > LogError
void incrementME(MonitorElement *base, MonitorElement *toBeAdded)
virtual TH1F * getTH1F() const
virtual MonitorElement * get(std::string const &fullpath) const
Definition: DQMStore.cc:712
virtual TH1 * getTH1() const
virtual int getNbinsX() const
get # of bins in X-axis
Log< level::Warning, false > LogWarning
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
Definition: DQMStore.h:98

◆ fillDescriptions()

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

Definition at line 622 of file Primary4DVertexHarvester.cc.

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

622  {
624 
625  desc.add<std::string>("folder", "MTD/Vertices/");
626 
627  descriptions.add("Primary4DVertexPostProcessor", desc);
628 }
void add(std::string const &label, ParameterSetDescription const &psetDescription)

◆ incrementME()

void Primary4DVertexHarvester::incrementME ( MonitorElement base,
MonitorElement toBeAdded 
)
private

Definition at line 127 of file Primary4DVertexHarvester.cc.

References edmMakeDummyCfis::base, dqm::impl::MonitorElement::getBinContent(), and mathSSE::sqrt().

Referenced by dqmEndJob().

127  {
128  for (int ibin = 1; ibin <= base->getNbinsX(); ibin++) {
129  double newC = base->getBinContent(ibin) + toBeAdded->getBinContent(ibin);
130  double newE = std::sqrt(newC);
131  base->setBinContent(ibin, newC);
132  base->setBinError(ibin, newE);
133  }
134 }
T sqrt(T t)
Definition: SSEVec.h:23
virtual double getBinContent(int binx) const
get content of bin (1-D)

◆ scaleby()

void Primary4DVertexHarvester::scaleby ( MonitorElement h,
double  scale 
)
private

Definition at line 115 of file Primary4DVertexHarvester.cc.

References h, and isotrackNtupler::scale.

Referenced by dqmEndJob().

115  {
116  double ent = h->getEntries();
117  for (int ibin = 1; ibin <= h->getNbinsX(); ibin++) {
118  double eff = h->getBinContent(ibin) * scale;
119  double bin_err = h->getBinError(ibin) * scale;
120  h->setBinContent(ibin, eff);
121  h->setBinError(ibin, bin_err);
122  }
123  h->setEntries(ent);
124 }
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 Primary4DVertexHarvester::folder_
private

Definition at line 29 of file Primary4DVertexHarvester.cc.

Referenced by dqmEndJob().

◆ meBarrelAsK_

MonitorElement* Primary4DVertexHarvester::meBarrelAsK_
private

Definition at line 46 of file Primary4DVertexHarvester.cc.

Referenced by dqmEndJob().

◆ meBarrelAsP_

MonitorElement* Primary4DVertexHarvester::meBarrelAsP_
private

Definition at line 47 of file Primary4DVertexHarvester.cc.

Referenced by dqmEndJob().

◆ meBarrelAsPi_

MonitorElement* Primary4DVertexHarvester::meBarrelAsPi_
private

Definition at line 45 of file Primary4DVertexHarvester.cc.

Referenced by dqmEndJob().

◆ meBarrelKPurity_

MonitorElement* Primary4DVertexHarvester::meBarrelKPurity_
private

Definition at line 86 of file Primary4DVertexHarvester.cc.

Referenced by dqmEndJob().

◆ meBarrelNoPID_

MonitorElement* Primary4DVertexHarvester::meBarrelNoPID_
private

Definition at line 48 of file Primary4DVertexHarvester.cc.

Referenced by dqmEndJob().

◆ meBarrelPIDKAsKEff_

MonitorElement* Primary4DVertexHarvester::meBarrelPIDKAsKEff_
private

Definition at line 61 of file Primary4DVertexHarvester.cc.

Referenced by dqmEndJob().

◆ meBarrelPIDKAsPEff_

MonitorElement* Primary4DVertexHarvester::meBarrelPIDKAsPEff_
private

Definition at line 62 of file Primary4DVertexHarvester.cc.

Referenced by dqmEndJob().

◆ meBarrelPIDKAsPiEff_

MonitorElement* Primary4DVertexHarvester::meBarrelPIDKAsPiEff_
private

Definition at line 60 of file Primary4DVertexHarvester.cc.

Referenced by dqmEndJob().

◆ meBarrelPIDKNoPIDEff_

MonitorElement* Primary4DVertexHarvester::meBarrelPIDKNoPIDEff_
private

Definition at line 63 of file Primary4DVertexHarvester.cc.

Referenced by dqmEndJob().

◆ meBarrelPIDPAsKEff_

MonitorElement* Primary4DVertexHarvester::meBarrelPIDPAsKEff_
private

Definition at line 66 of file Primary4DVertexHarvester.cc.

Referenced by dqmEndJob().

◆ meBarrelPIDPAsPEff_

MonitorElement* Primary4DVertexHarvester::meBarrelPIDPAsPEff_
private

Definition at line 67 of file Primary4DVertexHarvester.cc.

Referenced by dqmEndJob().

◆ meBarrelPIDPAsPiEff_

MonitorElement* Primary4DVertexHarvester::meBarrelPIDPAsPiEff_
private

Definition at line 65 of file Primary4DVertexHarvester.cc.

Referenced by dqmEndJob().

◆ meBarrelPIDPiAsKEff_

MonitorElement* Primary4DVertexHarvester::meBarrelPIDPiAsKEff_
private

Definition at line 56 of file Primary4DVertexHarvester.cc.

Referenced by dqmEndJob().

◆ meBarrelPIDPiAsPEff_

MonitorElement* Primary4DVertexHarvester::meBarrelPIDPiAsPEff_
private

Definition at line 57 of file Primary4DVertexHarvester.cc.

Referenced by dqmEndJob().

◆ meBarrelPIDPiAsPiEff_

MonitorElement* Primary4DVertexHarvester::meBarrelPIDPiAsPiEff_
private

Definition at line 55 of file Primary4DVertexHarvester.cc.

Referenced by dqmEndJob().

◆ meBarrelPIDPiNoPIDEff_

MonitorElement* Primary4DVertexHarvester::meBarrelPIDPiNoPIDEff_
private

Definition at line 58 of file Primary4DVertexHarvester.cc.

Referenced by dqmEndJob().

◆ meBarrelPIDPNoPIDEff_

MonitorElement* Primary4DVertexHarvester::meBarrelPIDPNoPIDEff_
private

Definition at line 68 of file Primary4DVertexHarvester.cc.

Referenced by dqmEndJob().

◆ meBarrelPiPurity_

MonitorElement* Primary4DVertexHarvester::meBarrelPiPurity_
private

Definition at line 85 of file Primary4DVertexHarvester.cc.

Referenced by dqmEndJob().

◆ meBarrelPPurity_

MonitorElement* Primary4DVertexHarvester::meBarrelPPurity_
private

Definition at line 87 of file Primary4DVertexHarvester.cc.

Referenced by dqmEndJob().

◆ meBarrelTrueK_

MonitorElement* Primary4DVertexHarvester::meBarrelTrueK_
private

Definition at line 38 of file Primary4DVertexHarvester.cc.

Referenced by dqmEndJob().

◆ meBarrelTrueP_

MonitorElement* Primary4DVertexHarvester::meBarrelTrueP_
private

Definition at line 39 of file Primary4DVertexHarvester.cc.

Referenced by dqmEndJob().

◆ meBarrelTruePi_

MonitorElement* Primary4DVertexHarvester::meBarrelTruePi_
private

Definition at line 37 of file Primary4DVertexHarvester.cc.

Referenced by dqmEndJob().

◆ meEndcapAsK_

MonitorElement* Primary4DVertexHarvester::meEndcapAsK_
private

Definition at line 51 of file Primary4DVertexHarvester.cc.

Referenced by dqmEndJob().

◆ meEndcapAsP_

MonitorElement* Primary4DVertexHarvester::meEndcapAsP_
private

Definition at line 52 of file Primary4DVertexHarvester.cc.

Referenced by dqmEndJob().

◆ meEndcapAsPi_

MonitorElement* Primary4DVertexHarvester::meEndcapAsPi_
private

Definition at line 50 of file Primary4DVertexHarvester.cc.

Referenced by dqmEndJob().

◆ meEndcapKPurity_

MonitorElement* Primary4DVertexHarvester::meEndcapKPurity_
private

Definition at line 90 of file Primary4DVertexHarvester.cc.

Referenced by dqmEndJob().

◆ meEndcapNoPID_

MonitorElement* Primary4DVertexHarvester::meEndcapNoPID_
private

Definition at line 53 of file Primary4DVertexHarvester.cc.

Referenced by dqmEndJob().

◆ meEndcapPIDKAsKEff_

MonitorElement* Primary4DVertexHarvester::meEndcapPIDKAsKEff_
private

Definition at line 76 of file Primary4DVertexHarvester.cc.

Referenced by dqmEndJob().

◆ meEndcapPIDKAsPEff_

MonitorElement* Primary4DVertexHarvester::meEndcapPIDKAsPEff_
private

Definition at line 77 of file Primary4DVertexHarvester.cc.

Referenced by dqmEndJob().

◆ meEndcapPIDKAsPiEff_

MonitorElement* Primary4DVertexHarvester::meEndcapPIDKAsPiEff_
private

Definition at line 75 of file Primary4DVertexHarvester.cc.

Referenced by dqmEndJob().

◆ meEndcapPIDKNoPIDEff_

MonitorElement* Primary4DVertexHarvester::meEndcapPIDKNoPIDEff_
private

Definition at line 78 of file Primary4DVertexHarvester.cc.

Referenced by dqmEndJob().

◆ meEndcapPIDPAsKEff_

MonitorElement* Primary4DVertexHarvester::meEndcapPIDPAsKEff_
private

Definition at line 81 of file Primary4DVertexHarvester.cc.

Referenced by dqmEndJob().

◆ meEndcapPIDPAsPEff_

MonitorElement* Primary4DVertexHarvester::meEndcapPIDPAsPEff_
private

Definition at line 82 of file Primary4DVertexHarvester.cc.

Referenced by dqmEndJob().

◆ meEndcapPIDPAsPiEff_

MonitorElement* Primary4DVertexHarvester::meEndcapPIDPAsPiEff_
private

Definition at line 80 of file Primary4DVertexHarvester.cc.

Referenced by dqmEndJob().

◆ meEndcapPIDPiAsKEff_

MonitorElement* Primary4DVertexHarvester::meEndcapPIDPiAsKEff_
private

Definition at line 71 of file Primary4DVertexHarvester.cc.

Referenced by dqmEndJob().

◆ meEndcapPIDPiAsPEff_

MonitorElement* Primary4DVertexHarvester::meEndcapPIDPiAsPEff_
private

Definition at line 72 of file Primary4DVertexHarvester.cc.

Referenced by dqmEndJob().

◆ meEndcapPIDPiAsPiEff_

MonitorElement* Primary4DVertexHarvester::meEndcapPIDPiAsPiEff_
private

Definition at line 70 of file Primary4DVertexHarvester.cc.

Referenced by dqmEndJob().

◆ meEndcapPIDPiNoPIDEff_

MonitorElement* Primary4DVertexHarvester::meEndcapPIDPiNoPIDEff_
private

Definition at line 73 of file Primary4DVertexHarvester.cc.

Referenced by dqmEndJob().

◆ meEndcapPIDPNoPIDEff_

MonitorElement* Primary4DVertexHarvester::meEndcapPIDPNoPIDEff_
private

Definition at line 83 of file Primary4DVertexHarvester.cc.

Referenced by dqmEndJob().

◆ meEndcapPiPurity_

MonitorElement* Primary4DVertexHarvester::meEndcapPiPurity_
private

Definition at line 89 of file Primary4DVertexHarvester.cc.

Referenced by dqmEndJob().

◆ meEndcapPPurity_

MonitorElement* Primary4DVertexHarvester::meEndcapPPurity_
private

Definition at line 91 of file Primary4DVertexHarvester.cc.

Referenced by dqmEndJob().

◆ meEndcapTrueK_

MonitorElement* Primary4DVertexHarvester::meEndcapTrueK_
private

Definition at line 42 of file Primary4DVertexHarvester.cc.

Referenced by dqmEndJob().

◆ meEndcapTrueP_

MonitorElement* Primary4DVertexHarvester::meEndcapTrueP_
private

Definition at line 43 of file Primary4DVertexHarvester.cc.

Referenced by dqmEndJob().

◆ meEndcapTruePi_

MonitorElement* Primary4DVertexHarvester::meEndcapTruePi_
private

Definition at line 41 of file Primary4DVertexHarvester.cc.

Referenced by dqmEndJob().

◆ meTPEtaMatchEff_

MonitorElement* Primary4DVertexHarvester::meTPEtaMatchEff_
private

Definition at line 35 of file Primary4DVertexHarvester.cc.

Referenced by dqmEndJob().

◆ meTPEtaSelEff_

MonitorElement* Primary4DVertexHarvester::meTPEtaSelEff_
private

Definition at line 33 of file Primary4DVertexHarvester.cc.

Referenced by dqmEndJob().

◆ meTPPtMatchEff_

MonitorElement* Primary4DVertexHarvester::meTPPtMatchEff_
private

Definition at line 34 of file Primary4DVertexHarvester.cc.

Referenced by dqmEndJob().

◆ meTPPtSelEff_

MonitorElement* Primary4DVertexHarvester::meTPPtSelEff_
private

Definition at line 32 of file Primary4DVertexHarvester.cc.

Referenced by dqmEndJob().