CMS 3D CMS Logo

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

#include <GlobalHitsHistogrammer.h>

Inheritance diagram for GlobalHitsHistogrammer:
DQMEDAnalyzer edm::one::EDProducer< edm::EndRunProducer, edm::one::WatchRuns, edm::EndLuminosityBlockProducer, edm::one::WatchLuminosityBlocks, edm::Accumulator > edm::one::EDProducerBase edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Member Functions

void analyze (const edm::Event &, const edm::EventSetup &) override
 
void bookHistograms (DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
 
 GlobalHitsHistogrammer (const edm::ParameterSet &)
 
 ~GlobalHitsHistogrammer () override
 
- Public Member Functions inherited from DQMEDAnalyzer
void accumulate (edm::Event const &event, edm::EventSetup const &setup) final
 
virtual void analyze (edm::Event const &, edm::EventSetup const &)
 
void beginLuminosityBlock (edm::LuminosityBlock const &lumi, edm::EventSetup const &setup) final
 
void beginRun (edm::Run const &run, edm::EventSetup const &setup) final
 
virtual void dqmBeginLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &)
 
virtual void dqmBeginRun (edm::Run const &, edm::EventSetup const &)
 
 DQMEDAnalyzer ()
 
virtual void dqmEndLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &)
 
virtual void dqmEndRun (edm::Run const &, edm::EventSetup const &)
 
void endLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &) final
 
void endLuminosityBlockProduce (edm::LuminosityBlock &lumi, edm::EventSetup const &setup) final
 
void endRun (edm::Run const &, edm::EventSetup const &) final
 
void endRunProduce (edm::Run &run, edm::EventSetup const &setup) final
 
virtual bool getCanSaveByLumi ()
 
- Public Member Functions inherited from edm::one::EDProducer< edm::EndRunProducer, edm::one::WatchRuns, edm::EndLuminosityBlockProducer, edm::one::WatchLuminosityBlocks, edm::Accumulator >
 EDProducer ()=default
 
SerialTaskQueueglobalLuminosityBlocksQueue () final
 
SerialTaskQueueglobalRunsQueue () final
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndRuns () const final
 
bool wantsGlobalLuminosityBlocks () const final
 
bool wantsGlobalRuns () const final
 
- Public Member Functions inherited from edm::one::EDProducerBase
 EDProducerBase ()
 
ModuleDescription const & moduleDescription () const
 
bool wantsStreamLuminosityBlocks () const
 
bool wantsStreamRuns () const
 
 ~EDProducerBase () override
 
- Public Member Functions inherited from edm::ProducerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
std::vector< edm::ProductResolverIndex > const & indiciesForPutProducts (BranchType iBranchType) const
 
 ProducerBase ()
 
std::vector< edm::ProductResolverIndex > const & putTokenIndexToProductResolverIndex () const
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
std::function< void(BranchDescription const &)> registrationCallback () const
 used by the fwk to register list of products More...
 
void resolvePutIndicies (BranchType iBranchType, ModuleToResolverIndicies const &iIndicies, std::string const &moduleLabel)
 
 ~ProducerBase () noexcept(false) override
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
void convertCurrentProcessAlias (std::string const &processName)
 Convert "@currentProcess" in InputTag process names to the actual current process name. More...
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
ESProxyIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
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::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProxyIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

Private Attributes

unsigned int count
 
bool doOutput
 
std::string fName
 
int frequency
 
bool getAllProvenances
 
edm::InputTag GlobalHitSrc_
 
edm::EDGetTokenT< PGlobalSimHitGlobalHitSrc_Token_
 
std::string label
 
MonitorElementmeCaloEcal [2]
 
MonitorElementmeCaloEcalE [2]
 
MonitorElementmeCaloEcalEta
 
MonitorElementmeCaloEcalPhi
 
MonitorElementmeCaloEcalToF [2]
 
MonitorElementmeCaloHcal [2]
 
MonitorElementmeCaloHcalE [2]
 
MonitorElementmeCaloHcalEta
 
MonitorElementmeCaloHcalPhi
 
MonitorElementmeCaloHcalToF [2]
 
MonitorElementmeCaloPreSh [2]
 
MonitorElementmeCaloPreShE [2]
 
MonitorElementmeCaloPreShEta
 
MonitorElementmeCaloPreShPhi
 
MonitorElementmeCaloPreShToF [2]
 
MonitorElementmeGeantTrkE
 
MonitorElementmeGeantTrkPt
 
MonitorElementmeGeantVtxX [2]
 
MonitorElementmeGeantVtxY [2]
 
MonitorElementmeGeantVtxZ [2]
 
MonitorElementmeMCG4Trk [2]
 
MonitorElementmeMCG4Vtx [2]
 
MonitorElementmeMCRGP [2]
 
MonitorElementmeMuon [2]
 
MonitorElementmeMuonCscToF [2]
 
MonitorElementmeMuonCscZ
 
MonitorElementmeMuonDtR
 
MonitorElementmeMuonDtToF [2]
 
MonitorElementmeMuonEta
 
MonitorElementmeMuonPhi
 
MonitorElementmeMuonRpcBR
 
MonitorElementmeMuonRpcBToF [2]
 
MonitorElementmeMuonRpcFToF [2]
 
MonitorElementmeMuonRpcFZ
 
MonitorElementmeTrackerPx [2]
 
MonitorElementmeTrackerPxBR
 
MonitorElementmeTrackerPxBToF
 
MonitorElementmeTrackerPxEta
 
MonitorElementmeTrackerPxFToF
 
MonitorElementmeTrackerPxFZ
 
MonitorElementmeTrackerPxPhi
 
MonitorElementmeTrackerSi [2]
 
MonitorElementmeTrackerSiBR
 
MonitorElementmeTrackerSiBToF
 
MonitorElementmeTrackerSiEta
 
MonitorElementmeTrackerSiFToF
 
MonitorElementmeTrackerSiFZ
 
MonitorElementmeTrackerSiPhi
 
int nMuonCscHits
 
int nMuonDtHits
 
int nMuonHits
 
int nMuonRpcBrlHits
 
int nMuonRpcFwdHits
 
int nPxlBrlHits
 
int nPxlFwdHits
 
int nPxlHits
 
int nSiBrlHits
 
int nSiFwdHits
 
int nSiHits
 
std::string outputfile
 
bool printProvenanceInfo
 
int verbosity
 
int vtxunit
 

Additional Inherited Members

- Public Types inherited from DQMEDAnalyzer
typedef dqm::reco::DQMStore DQMStore
 
typedef dqm::reco::MonitorElement MonitorElement
 
- Public Types inherited from edm::one::EDProducerBase
typedef EDProducerBase ModuleType
 
- Public Types inherited from edm::ProducerBase
using ModuleToResolverIndicies = std::unordered_multimap< std::string, std::tuple< edm::TypeID const *, const char *, edm::ProductResolverIndex >>
 
typedef ProductRegistryHelper::TypeLabelList TypeLabelList
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from edm::one::EDProducerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- Protected Member Functions inherited from edm::ProducerBase
ProducesCollector producesCollector ()
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
template<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)
 
- Protected Attributes inherited from DQMEDAnalyzer
edm::EDPutTokenT< DQMTokenlumiToken_
 
edm::EDPutTokenT< DQMTokenrunToken_
 

Detailed Description

Class to fill dqm monitor elements from existing EDM file

Author
M. Strang SUNY-Buffalo

Definition at line 73 of file GlobalHitsHistogrammer.h.

Constructor & Destructor Documentation

GlobalHitsHistogrammer::GlobalHitsHistogrammer ( const edm::ParameterSet iPSet)
explicit

Definition at line 11 of file GlobalHitsHistogrammer.cc.

References doOutput, fName, frequency, getAllProvenances, edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), GlobalHitSrc_, GlobalHitSrc_Token_, outputfile, printProvenanceInfo, AlCaHLTBitMon_QueryRunRegistry::string, verbosity, and vtxunit.

12  : fName(""),
13  verbosity(0),
14  frequency(0),
15  vtxunit(0),
16  label(""),
17  getAllProvenances(false),
18  printProvenanceInfo(false),
19  count(0) {
20  std::string MsgLoggerCat = "GlobalHitsHistogrammer_GlobalHitsHistogrammer";
21 
22  // get information from parameter set
23  fName = iPSet.getUntrackedParameter<std::string>("Name");
24  verbosity = iPSet.getUntrackedParameter<int>("Verbosity");
25  frequency = iPSet.getUntrackedParameter<int>("Frequency");
26  vtxunit = iPSet.getUntrackedParameter<int>("VtxUnit");
27  outputfile = iPSet.getParameter<std::string>("OutputFile");
28  doOutput = iPSet.getParameter<bool>("DoOutput");
29  edm::ParameterSet m_Prov = iPSet.getParameter<edm::ParameterSet>("ProvenanceLookup");
30  getAllProvenances = m_Prov.getUntrackedParameter<bool>("GetAllProvenances");
31  printProvenanceInfo = m_Prov.getUntrackedParameter<bool>("PrintProvenanceInfo");
32 
33  // get Labels to use to extract information
34  GlobalHitSrc_ = iPSet.getParameter<edm::InputTag>("GlobalHitSrc");
35  // fix for consumes
36  GlobalHitSrc_Token_ = consumes<PGlobalSimHit>(iPSet.getParameter<edm::InputTag>("GlobalHitSrc"));
37 
38  // use value of first digit to determine default output level (inclusive)
39  // 0 is none, 1 is basic, 2 is fill output, 3 is gather output
40  verbosity %= 10;
41 
42  // print out Parameter Set information being used
43  if (verbosity >= 0) {
44  edm::LogInfo(MsgLoggerCat) << "\n===============================\n"
45  << "Initialized as EDAnalyzer with parameter values:\n"
46  << " Name = " << fName << "\n"
47  << " Verbosity = " << verbosity << "\n"
48  << " Frequency = " << frequency << "\n"
49  << " VtxUnit = " << vtxunit << "\n"
50  << " OutputFile = " << outputfile << "\n"
51  << " DoOutput = " << doOutput << "\n"
52  << " GetProv = " << getAllProvenances << "\n"
53  << " PrintProv = " << printProvenanceInfo << "\n"
54  << " GlobalHitSrc = " << GlobalHitSrc_.label() << ":" << GlobalHitSrc_.instance()
55  << "\n"
56  << "===============================\n";
57  }
58 }
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
std::string const & label() const
Definition: InputTag.h:36
edm::EDGetTokenT< PGlobalSimHit > GlobalHitSrc_Token_
std::string const & instance() const
Definition: InputTag.h:37
GlobalHitsHistogrammer::~GlobalHitsHistogrammer ( )
override

Definition at line 498 of file GlobalHitsHistogrammer.cc.

498 {}

Member Function Documentation

void GlobalHitsHistogrammer::analyze ( const edm::Event iEvent,
const edm::EventSetup iSetup 
)
override

Definition at line 500 of file GlobalHitsHistogrammer.cc.

References count, MillePedeFileConverter_cfg::e, PVValHelper::eta, edm::EventID::event(), dqm::impl::MonitorElement::Fill(), frequency, getAllProvenances, edm::Event::getAllStableProvenance(), edm::Event::getByToken(), PGlobalSimHit::getECalHits(), PGlobalSimHit::getG4Trk(), PGlobalSimHit::getG4Vtx(), PGlobalSimHit::getHCalHits(), PGlobalSimHit::getMuonCscHits(), PGlobalSimHit::getMuonDtHits(), PGlobalSimHit::getMuonRpcBrlHits(), PGlobalSimHit::getMuonRpcFwdHits(), PGlobalSimHit::getnECalHits(), PGlobalSimHit::getnG4Trk(), PGlobalSimHit::getnG4Vtx(), PGlobalSimHit::getnHCalHits(), PGlobalSimHit::getnMuonCscHits(), PGlobalSimHit::getnMuonDtHits(), PGlobalSimHit::getnMuonRpcBrlHits(), PGlobalSimHit::getnMuonRpcFwdHits(), PGlobalSimHit::getnPreShHits(), PGlobalSimHit::getnPxlBrlHits(), PGlobalSimHit::getnPxlFwdHits(), PGlobalSimHit::getnRawGenPart(), PGlobalSimHit::getnSiBrlHits(), PGlobalSimHit::getnSiFwdHits(), PGlobalSimHit::getPreShHits(), PGlobalSimHit::getPxlBrlHits(), PGlobalSimHit::getPxlFwdHits(), PGlobalSimHit::getSiBrlHits(), PGlobalSimHit::getSiFwdHits(), GlobalHitSrc_Token_, mps_fire::i, edm::EventBase::id(), edm::HandleBase::isValid(), dqmiolumiharvest::j, meCaloEcal, meCaloEcalE, meCaloEcalEta, meCaloEcalPhi, meCaloEcalToF, meCaloHcal, meCaloHcalE, meCaloHcalEta, meCaloHcalPhi, meCaloHcalToF, meCaloPreSh, meCaloPreShE, meCaloPreShEta, meCaloPreShPhi, meCaloPreShToF, meGeantTrkE, meGeantTrkPt, meGeantVtxX, meGeantVtxY, meGeantVtxZ, meMCG4Trk, meMCG4Vtx, meMCRGP, meMuon, meMuonCscToF, meMuonCscZ, meMuonDtR, meMuonDtToF, meMuonEta, meMuonPhi, meMuonRpcBR, meMuonRpcBToF, meMuonRpcFToF, meMuonRpcFZ, meTrackerPx, meTrackerPxBR, meTrackerPxBToF, meTrackerPxEta, meTrackerPxFToF, meTrackerPxFZ, meTrackerPxPhi, meTrackerSi, meTrackerSiBR, meTrackerSiBToF, meTrackerSiEta, meTrackerSiFToF, meTrackerSiFZ, meTrackerSiPhi, nevt, nMuonCscHits, nMuonDtHits, nMuonHits, nMuonRpcBrlHits, nMuonRpcFwdHits, nPxlBrlHits, nPxlFwdHits, nPxlHits, nSiBrlHits, nSiFwdHits, nSiHits, phi, printProvenanceInfo, DiDispStaMuonMonitor_cfi::pt, alignCSCRings::r, edm::EventID::run(), AlCaHLTBitMon_QueryRunRegistry::string, verbosity, x, y, and z.

500  {
501  std::string MsgLoggerCat = "GlobalHitsHistogrammer_analyze";
502 
503  // keep track of number of events processed
504  ++count;
505 
506  // get event id information
507  edm::RunNumber_t nrun = iEvent.id().run();
508  edm::EventNumber_t nevt = iEvent.id().event();
509 
510  if (verbosity > 0) {
511  edm::LogInfo(MsgLoggerCat) << "Processing run " << nrun << ", event " << nevt << " (" << count << " events total)";
512  } else if (verbosity == 0) {
513  if (nevt % frequency == 0 || nevt == 1) {
514  edm::LogInfo(MsgLoggerCat) << "Processing run " << nrun << ", event " << nevt << " (" << count
515  << " events total)";
516  }
517  }
518 
519  // look at information available in the event
520  if (getAllProvenances) {
521  std::vector<const edm::StableProvenance *> AllProv;
522  iEvent.getAllStableProvenance(AllProv);
523 
524  if (verbosity >= 0)
525  edm::LogInfo(MsgLoggerCat) << "Number of Provenances = " << AllProv.size();
526 
527  if (printProvenanceInfo && (verbosity >= 0)) {
528  TString eventout("\nProvenance info:\n");
529 
530  for (unsigned int i = 0; i < AllProv.size(); ++i) {
531  eventout += "\n ******************************";
532  eventout += "\n Module : ";
533  eventout += AllProv[i]->moduleLabel();
534  eventout += "\n ProductID : ";
535  eventout += AllProv[i]->productID().id();
536  eventout += "\n ClassName : ";
537  eventout += AllProv[i]->className();
538  eventout += "\n InstanceName : ";
539  eventout += AllProv[i]->productInstanceName();
540  eventout += "\n BranchName : ";
541  eventout += AllProv[i]->branchName();
542  }
543  eventout += "\n ******************************\n";
544  edm::LogInfo(MsgLoggerCat) << eventout << "\n";
545  printProvenanceInfo = false;
546  }
547  getAllProvenances = false;
548  }
549 
550  // fill histograms
551  edm::Handle<PGlobalSimHit> srcGlobalHits;
552  iEvent.getByToken(GlobalHitSrc_Token_, srcGlobalHits);
553  if (!srcGlobalHits.isValid()) {
554  edm::LogWarning(MsgLoggerCat) << "Unable to find PGlobalSimHit in event!";
555  return;
556  }
557 
558  nPxlBrlHits = srcGlobalHits->getnPxlBrlHits();
559  nPxlFwdHits = srcGlobalHits->getnPxlFwdHits();
561  nSiBrlHits = srcGlobalHits->getnSiBrlHits();
562  nSiFwdHits = srcGlobalHits->getnSiFwdHits();
564  nMuonDtHits = srcGlobalHits->getnMuonDtHits();
565  nMuonCscHits = srcGlobalHits->getnMuonCscHits();
566  nMuonRpcBrlHits = srcGlobalHits->getnMuonRpcBrlHits();
567  nMuonRpcFwdHits = srcGlobalHits->getnMuonRpcFwdHits();
569 
570  for (Int_t i = 0; i < 2; ++i) {
571  meMCRGP[i]->Fill((float)srcGlobalHits->getnRawGenPart());
572  meMCG4Vtx[i]->Fill((float)srcGlobalHits->getnG4Vtx());
573  meMCG4Trk[i]->Fill((float)srcGlobalHits->getnG4Trk());
574  meCaloEcal[i]->Fill((float)srcGlobalHits->getnECalHits());
575  meCaloPreSh[i]->Fill((float)srcGlobalHits->getnPreShHits());
576  meCaloHcal[i]->Fill((float)srcGlobalHits->getnHCalHits());
577  meTrackerPx[i]->Fill((float)nPxlHits);
578  meTrackerSi[i]->Fill((float)nSiHits);
579  meMuon[i]->Fill((float)nMuonHits);
580  }
581 
582  // get G4Vertex info
583  std::vector<PGlobalSimHit::Vtx> G4Vtx = srcGlobalHits->getG4Vtx();
584  for (unsigned int i = 0; i < G4Vtx.size(); ++i) {
585  for (int j = 0; j < 2; ++j) {
586  meGeantVtxX[j]->Fill(G4Vtx[i].x);
587  meGeantVtxY[j]->Fill(G4Vtx[i].y);
588  meGeantVtxZ[j]->Fill(G4Vtx[i].z);
589  }
590  }
591 
592  // get G4Track info
593  std::vector<PGlobalSimHit::Trk> G4Trk = srcGlobalHits->getG4Trk();
594  for (unsigned int i = 0; i < G4Trk.size(); ++i) {
595  meGeantTrkPt->Fill(G4Trk[i].pt);
596  meGeantTrkE->Fill(G4Trk[i].e);
597  }
598 
599  // get Ecal info
600  std::vector<PGlobalSimHit::CalHit> ECalHits = srcGlobalHits->getECalHits();
601  for (unsigned int i = 0; i < ECalHits.size(); ++i) {
602  for (Int_t j = 0; j < 2; ++j) {
603  meCaloEcalE[j]->Fill(ECalHits[i].e);
604  meCaloEcalToF[j]->Fill(ECalHits[i].tof);
605  }
606  meCaloEcalPhi->Fill(ECalHits[i].phi);
607  meCaloEcalEta->Fill(ECalHits[i].eta);
608  }
609 
610  // get PreShower info
611  std::vector<PGlobalSimHit::CalHit> PreShHits = srcGlobalHits->getPreShHits();
612  for (unsigned int i = 0; i < PreShHits.size(); ++i) {
613  for (Int_t j = 0; j < 2; ++j) {
614  meCaloPreShE[j]->Fill(PreShHits[i].e);
615  meCaloPreShToF[j]->Fill(PreShHits[i].tof);
616  }
617  meCaloPreShPhi->Fill(PreShHits[i].phi);
618  meCaloPreShEta->Fill(PreShHits[i].eta);
619  }
620 
621  // get Hcal info
622  std::vector<PGlobalSimHit::CalHit> HCalHits = srcGlobalHits->getHCalHits();
623  for (unsigned int i = 0; i < HCalHits.size(); ++i) {
624  for (Int_t j = 0; j < 2; ++j) {
625  meCaloHcalE[j]->Fill(HCalHits[i].e);
626  meCaloHcalToF[j]->Fill(HCalHits[i].tof);
627  }
628  meCaloHcalPhi->Fill(HCalHits[i].phi);
629  meCaloHcalEta->Fill(HCalHits[i].eta);
630  }
631 
632  // get Pixel Barrel info
633  std::vector<PGlobalSimHit::BrlHit> PxlBrlHits = srcGlobalHits->getPxlBrlHits();
634  for (unsigned int i = 0; i < PxlBrlHits.size(); ++i) {
635  meTrackerPxPhi->Fill(PxlBrlHits[i].phi);
636  meTrackerPxEta->Fill(PxlBrlHits[i].eta);
637  meTrackerPxBToF->Fill(PxlBrlHits[i].tof);
638  meTrackerPxBR->Fill(PxlBrlHits[i].r);
639  }
640 
641  // get Pixel Forward info
642  std::vector<PGlobalSimHit::FwdHit> PxlFwdHits = srcGlobalHits->getPxlFwdHits();
643  for (unsigned int i = 0; i < PxlFwdHits.size(); ++i) {
644  meTrackerPxPhi->Fill(PxlFwdHits[i].phi);
645  meTrackerPxEta->Fill(PxlFwdHits[i].eta);
646  meTrackerPxFToF->Fill(PxlFwdHits[i].tof);
647  meTrackerPxFZ->Fill(PxlFwdHits[i].z);
648  }
649 
650  // get Strip Barrel info
651  std::vector<PGlobalSimHit::BrlHit> SiBrlHits = srcGlobalHits->getSiBrlHits();
652  for (unsigned int i = 0; i < SiBrlHits.size(); ++i) {
653  meTrackerSiPhi->Fill(SiBrlHits[i].phi);
654  meTrackerSiEta->Fill(SiBrlHits[i].eta);
655  meTrackerSiBToF->Fill(SiBrlHits[i].tof);
656  meTrackerSiBR->Fill(SiBrlHits[i].r);
657  }
658 
659  // get Strip Forward info
660  std::vector<PGlobalSimHit::FwdHit> SiFwdHits = srcGlobalHits->getSiFwdHits();
661  for (unsigned int i = 0; i < SiFwdHits.size(); ++i) {
662  meTrackerSiPhi->Fill(SiFwdHits[i].phi);
663  meTrackerSiEta->Fill(SiFwdHits[i].eta);
664  meTrackerSiFToF->Fill(SiFwdHits[i].tof);
665  meTrackerSiFZ->Fill(SiFwdHits[i].z);
666  }
667 
668  // get Muon CSC info
669  std::vector<PGlobalSimHit::FwdHit> MuonCscHits = srcGlobalHits->getMuonCscHits();
670  for (unsigned int i = 0; i < MuonCscHits.size(); ++i) {
671  meMuonPhi->Fill(MuonCscHits[i].phi);
672  meMuonEta->Fill(MuonCscHits[i].eta);
673  for (Int_t j = 0; j < 2; ++j) {
674  meMuonCscToF[j]->Fill(MuonCscHits[i].tof);
675  }
676  meMuonCscZ->Fill(MuonCscHits[i].z);
677  }
678 
679  // get Muon DT info
680  std::vector<PGlobalSimHit::BrlHit> MuonDtHits = srcGlobalHits->getMuonDtHits();
681  for (unsigned int i = 0; i < MuonDtHits.size(); ++i) {
682  meMuonPhi->Fill(MuonDtHits[i].phi);
683  meMuonEta->Fill(MuonDtHits[i].eta);
684  for (Int_t j = 0; j < 2; ++j) {
685  meMuonDtToF[j]->Fill(MuonDtHits[i].tof);
686  }
687  meMuonDtR->Fill(MuonDtHits[i].r);
688  }
689 
690  // get Muon RPC forward info
691  std::vector<PGlobalSimHit::FwdHit> MuonRpcFwdHits = srcGlobalHits->getMuonRpcFwdHits();
692  for (unsigned int i = 0; i < MuonRpcFwdHits.size(); ++i) {
693  meMuonPhi->Fill(MuonRpcFwdHits[i].phi);
694  meMuonEta->Fill(MuonRpcFwdHits[i].eta);
695  for (Int_t j = 0; j < 2; ++j) {
696  meMuonRpcFToF[j]->Fill(MuonRpcFwdHits[i].tof);
697  }
698  meMuonRpcFZ->Fill(MuonRpcFwdHits[i].z);
699  }
700 
701  // get Muon RPC barrel info
702  std::vector<PGlobalSimHit::BrlHit> MuonRpcBrlHits = srcGlobalHits->getMuonRpcBrlHits();
703  for (unsigned int i = 0; i < MuonRpcBrlHits.size(); ++i) {
704  meMuonPhi->Fill(MuonRpcBrlHits[i].phi);
705  meMuonEta->Fill(MuonRpcBrlHits[i].eta);
706  for (Int_t j = 0; j < 2; ++j) {
707  meMuonRpcBToF[j]->Fill(MuonRpcBrlHits[i].tof);
708  }
709  meMuonRpcBR->Fill(MuonRpcBrlHits[i].r);
710  }
711 
712  return;
713 }
RunNumber_t run() const
Definition: EventID.h:38
CalVector getPreShHits() const
BrlVector getPxlBrlHits() const
EventNumber_t event() const
Definition: EventID.h:40
MonitorElement * meMCG4Vtx[2]
FwdVector getMuonCscHits() const
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:525
MonitorElement * meCaloHcal[2]
MonitorElement * meCaloEcalE[2]
int getnRawGenPart() const
unsigned long long EventNumber_t
int getnSiFwdHits() const
int getnHCalHits() const
int getnMuonCscHits() const
FwdVector getPxlFwdHits() const
MonitorElement * meMuonRpcBToF[2]
int getnMuonRpcFwdHits() const
MonitorElement * meCaloPreSh[2]
int getnMuonDtHits() const
int getnPreShHits() const
void Fill(long long x)
MonitorElement * meMuonCscToF[2]
MonitorElement * meGeantVtxY[2]
MonitorElement * meMuonDtToF[2]
FwdVector getSiFwdHits() const
MonitorElement * meCaloPreShE[2]
MonitorElement * meMCRGP[2]
TrkVector getG4Trk() const
bool isValid() const
Definition: HandleBase.h:70
int getnPxlFwdHits() const
MonitorElement * meCaloHcalE[2]
BrlVector getMuonDtHits() const
int getnG4Trk() const
MonitorElement * meTrackerSi[2]
VtxVector getG4Vtx() const
MonitorElement * meMCG4Trk[2]
MonitorElement * meCaloEcal[2]
int getnG4Vtx() const
MonitorElement * meCaloPreShToF[2]
int getnMuonRpcBrlHits() const
int getnECalHits() const
edm::EDGetTokenT< PGlobalSimHit > GlobalHitSrc_Token_
edm::EventID id() const
Definition: EventBase.h:59
MonitorElement * meCaloEcalToF[2]
MonitorElement * meMuonRpcFToF[2]
CalVector getHCalHits() const
MonitorElement * meTrackerPx[2]
CalVector getECalHits() const
unsigned int RunNumber_t
int getnSiBrlHits() const
MonitorElement * meGeantVtxZ[2]
BrlVector getMuonRpcBrlHits() const
MonitorElement * meGeantVtxX[2]
BrlVector getSiBrlHits() const
MonitorElement * meCaloHcalToF[2]
int getnPxlBrlHits() const
FwdVector getMuonRpcFwdHits() const
void getAllStableProvenance(std::vector< StableProvenance const * > &provenances) const
Definition: Event.cc:126
void GlobalHitsHistogrammer::bookHistograms ( DQMStore::IBooker ibooker,
edm::Run const &  ,
edm::EventSetup const &   
)
overridevirtual

Implements DQMEDAnalyzer.

Definition at line 60 of file GlobalHitsHistogrammer.cc.

References dqm::dqmstoreimpl::DQMStore::IBooker::book1D(), mps_fire::i, meCaloEcal, meCaloEcalE, meCaloEcalEta, meCaloEcalPhi, meCaloEcalToF, meCaloHcal, meCaloHcalE, meCaloHcalEta, meCaloHcalPhi, meCaloHcalToF, meCaloPreSh, meCaloPreShE, meCaloPreShEta, meCaloPreShPhi, meCaloPreShToF, meGeantTrkE, meGeantTrkPt, meGeantVtxX, meGeantVtxY, meGeantVtxZ, meMCG4Trk, meMCG4Vtx, meMCRGP, meMuon, meMuonCscToF, meMuonCscZ, meMuonDtR, meMuonDtToF, meMuonEta, meMuonPhi, meMuonRpcBR, meMuonRpcBToF, meMuonRpcFToF, meMuonRpcFZ, meTrackerPx, meTrackerPxBR, meTrackerPxBToF, meTrackerPxEta, meTrackerPxFToF, meTrackerPxFZ, meTrackerPxPhi, meTrackerSi, meTrackerSiBR, meTrackerSiBToF, meTrackerSiEta, meTrackerSiFToF, meTrackerSiFZ, meTrackerSiPhi, dqm::impl::MonitorElement::setAxisTitle(), and dqm::dqmstoreimpl::DQMStore::IBooker::setCurrentFolder().

60  {
61  // initialize monitor elements
62  for (Int_t i = 0; i < 2; ++i) {
63  meMCRGP[i] = nullptr;
64  meMCG4Vtx[i] = nullptr;
65  meGeantVtxX[i] = nullptr;
66  meGeantVtxY[i] = nullptr;
67  meGeantVtxZ[i] = nullptr;
68  meMCG4Trk[i] = nullptr;
69  meCaloEcal[i] = nullptr;
70  meCaloEcalE[i] = nullptr;
71  meCaloEcalToF[i] = nullptr;
72  meCaloPreSh[i] = nullptr;
73  meCaloPreShE[i] = nullptr;
74  meCaloPreShToF[i] = nullptr;
75  meCaloHcal[i] = nullptr;
76  meCaloHcalE[i] = nullptr;
77  meCaloHcalToF[i] = nullptr;
78  meTrackerPx[i] = nullptr;
79  meTrackerSi[i] = nullptr;
80  meMuon[i] = nullptr;
81  meMuonDtToF[i] = nullptr;
82  meMuonCscToF[i] = nullptr;
83  meMuonRpcFToF[i] = nullptr;
84  meMuonRpcBToF[i] = nullptr;
85  }
86  meGeantTrkPt = nullptr;
87  meGeantTrkE = nullptr;
88  meCaloEcalPhi = nullptr;
89  meCaloEcalEta = nullptr;
90  meCaloPreShPhi = nullptr;
91  meCaloPreShEta = nullptr;
92  meCaloHcalPhi = nullptr;
93  meCaloHcalEta = nullptr;
94  meTrackerPxPhi = nullptr;
95  meTrackerPxEta = nullptr;
96  meTrackerPxBToF = nullptr;
97  meTrackerPxBR = nullptr;
98  meTrackerPxFToF = nullptr;
99  meTrackerPxFZ = nullptr;
100  meTrackerSiPhi = nullptr;
101  meTrackerSiEta = nullptr;
102  meTrackerSiBToF = nullptr;
103  meTrackerSiBR = nullptr;
104  meTrackerSiFToF = nullptr;
105  meTrackerSiFZ = nullptr;
106  meMuonPhi = nullptr;
107  meMuonEta = nullptr;
108  meMuonDtR = nullptr;
109  meMuonCscZ = nullptr;
110  meMuonRpcBR = nullptr;
111  meMuonRpcFZ = nullptr;
112 
113  // create histograms
114  Char_t hname[200];
115  Char_t htitle[200];
116 
117  // MCGeant
118  ibooker.setCurrentFolder("GlobalHitsV/MCGeant");
119  sprintf(hname, "hMCRGP1");
120  sprintf(htitle, "RawGenParticles");
121  meMCRGP[0] = ibooker.book1D(hname, htitle, 100, 0., 5000.);
122  sprintf(hname, "hMCRGP2");
123  meMCRGP[1] = ibooker.book1D(hname, htitle, 100, 0., 500.);
124  for (Int_t i = 0; i < 2; ++i) {
125  meMCRGP[i]->setAxisTitle("Number of Raw Generated Particles", 1);
126  meMCRGP[i]->setAxisTitle("Count", 2);
127  }
128 
129  sprintf(hname, "hMCG4Vtx1");
130  sprintf(htitle, "G4 Vertices");
131  meMCG4Vtx[0] = ibooker.book1D(hname, htitle, 100, 0., 50000.);
132  sprintf(hname, "hMCG4Vtx2");
133  meMCG4Vtx[1] = ibooker.book1D(hname, htitle, 100, -0.5, 99.5);
134  for (Int_t i = 0; i < 2; ++i) {
135  meMCG4Vtx[i]->setAxisTitle("Number of Vertices", 1);
136  meMCG4Vtx[i]->setAxisTitle("Count", 2);
137  }
138 
139  sprintf(hname, "hMCG4Trk1");
140  sprintf(htitle, "G4 Tracks");
141  meMCG4Trk[0] = ibooker.book1D(hname, htitle, 150, 0., 15000.);
142  sprintf(hname, "hMCG4Trk2");
143  meMCG4Trk[1] = ibooker.book1D(hname, htitle, 150, -0.5, 99.5);
144  for (Int_t i = 0; i < 2; ++i) {
145  meMCG4Trk[i]->setAxisTitle("Number of Tracks", 1);
146  meMCG4Trk[i]->setAxisTitle("Count", 2);
147  }
148 
149  sprintf(hname, "hGeantVtxX1");
150  sprintf(htitle, "Geant vertex x/micrometer");
151  meGeantVtxX[0] = ibooker.book1D(hname, htitle, 100, -8000000., 8000000.);
152  sprintf(hname, "hGeantVtxX2");
153  meGeantVtxX[1] = ibooker.book1D(hname, htitle, 100, -50., 50.);
154  for (Int_t i = 0; i < 2; ++i) {
155  meGeantVtxX[i]->setAxisTitle("x of Vertex (um)", 1);
156  meGeantVtxX[i]->setAxisTitle("Count", 2);
157  }
158 
159  sprintf(hname, "hGeantVtxY1");
160  sprintf(htitle, "Geant vertex y/micrometer");
161  meGeantVtxY[0] = ibooker.book1D(hname, htitle, 100, -8000000, 8000000.);
162  sprintf(hname, "hGeantVtxY2");
163  meGeantVtxY[1] = ibooker.book1D(hname, htitle, 100, -50., 50.);
164  for (Int_t i = 0; i < 2; ++i) {
165  meGeantVtxY[i]->setAxisTitle("y of Vertex (um)", 1);
166  meGeantVtxY[i]->setAxisTitle("Count", 2);
167  }
168 
169  sprintf(hname, "hGeantVtxZ1");
170  sprintf(htitle, "Geant vertex z/millimeter");
171  meGeantVtxZ[0] = ibooker.book1D(hname, htitle, 100, -11000., 11000.);
172  sprintf(hname, "hGeantVtxZ2");
173  meGeantVtxZ[1] = ibooker.book1D(hname, htitle, 100, -250., 250.);
174  for (Int_t i = 0; i < 2; ++i) {
175  meGeantVtxZ[i]->setAxisTitle("z of Vertex (mm)", 1);
176  meGeantVtxZ[i]->setAxisTitle("Count", 2);
177  }
178 
179  sprintf(hname, "hGeantTrkPt");
180  sprintf(htitle, "Geant track pt/GeV");
181  meGeantTrkPt = ibooker.book1D(hname, htitle, 100, 0., 200.);
182  meGeantTrkPt->setAxisTitle("pT of Track (GeV)", 1);
183  meGeantTrkPt->setAxisTitle("Count", 2);
184 
185  sprintf(hname, "hGeantTrkE");
186  sprintf(htitle, "Geant track E/GeV");
187  meGeantTrkE = ibooker.book1D(hname, htitle, 100, 0., 5000.);
188  meGeantTrkE->setAxisTitle("E of Track (GeV)", 1);
189  meGeantTrkE->setAxisTitle("Count", 2);
190 
191  // ECal
192  ibooker.setCurrentFolder("GlobalHitsV/ECals");
193 
194  sprintf(hname, "hCaloEcal1");
195  sprintf(htitle, "Ecal hits");
196  meCaloEcal[0] = ibooker.book1D(hname, htitle, 100, 0., 10000.);
197  sprintf(hname, "hCaloEcal2");
198  meCaloEcal[1] = ibooker.book1D(hname, htitle, 100, -0.5, 99.5);
199 
200  sprintf(hname, "hCaloEcalE1");
201  sprintf(htitle, "Ecal hits, energy/GeV");
202  meCaloEcalE[0] = ibooker.book1D(hname, htitle, 100, 0., 10.);
203  sprintf(hname, "hCaloEcalE2");
204  meCaloEcalE[1] = ibooker.book1D(hname, htitle, 100, 0., 0.1);
205 
206  sprintf(hname, "hCaloEcalToF1");
207  sprintf(htitle, "Ecal hits, ToF/ns");
208  meCaloEcalToF[0] = ibooker.book1D(hname, htitle, 100, 0., 1000.);
209  sprintf(hname, "hCaloEcalToF2");
210  meCaloEcalToF[1] = ibooker.book1D(hname, htitle, 100, 0., 100.);
211 
212  for (Int_t i = 0; i < 2; ++i) {
213  meCaloEcal[i]->setAxisTitle("Number of Hits", 1);
214  meCaloEcal[i]->setAxisTitle("Count", 2);
215  meCaloEcalE[i]->setAxisTitle("Energy of Hits (GeV)", 1);
216  meCaloEcalE[i]->setAxisTitle("Count", 2);
217  meCaloEcalToF[i]->setAxisTitle("Time of Flight of Hits (ns)", 1);
218  meCaloEcalToF[i]->setAxisTitle("Count", 2);
219  }
220 
221  sprintf(hname, "hCaloEcalPhi");
222  sprintf(htitle, "Ecal hits, phi/rad");
223  meCaloEcalPhi = ibooker.book1D(hname, htitle, 100, -3.2, 3.2);
224  meCaloEcalPhi->setAxisTitle("Phi of Hits (rad)", 1);
225  meCaloEcalPhi->setAxisTitle("Count", 2);
226 
227  sprintf(hname, "hCaloEcalEta");
228  sprintf(htitle, "Ecal hits, eta");
229  meCaloEcalEta = ibooker.book1D(hname, htitle, 100, -5.5, 5.5);
230  meCaloEcalEta->setAxisTitle("Eta of Hits", 1);
231  meCaloEcalEta->setAxisTitle("Count", 2);
232 
233  sprintf(hname, "hCaloPreSh1");
234  sprintf(htitle, "PreSh hits");
235  meCaloPreSh[0] = ibooker.book1D(hname, htitle, 100, 0., 10000.);
236  sprintf(hname, "hCaloPreSh2");
237  meCaloPreSh[1] = ibooker.book1D(hname, htitle, 100, -0.5, 99.5);
238 
239  sprintf(hname, "hCaloPreShE1");
240  sprintf(htitle, "PreSh hits, energy/GeV");
241  meCaloPreShE[0] = ibooker.book1D(hname, htitle, 100, 0., 10.);
242  sprintf(hname, "hCaloPreShE2");
243  meCaloPreShE[1] = ibooker.book1D(hname, htitle, 100, 0., 0.1);
244 
245  sprintf(hname, "hCaloPreShToF1");
246  sprintf(htitle, "PreSh hits, ToF/ns");
247  meCaloPreShToF[0] = ibooker.book1D(hname, htitle, 100, 0., 1000.);
248  sprintf(hname, "hCaloPreShToF2");
249  meCaloPreShToF[1] = ibooker.book1D(hname, htitle, 100, 0., 100.);
250 
251  for (Int_t i = 0; i < 2; ++i) {
252  meCaloPreSh[i]->setAxisTitle("Number of Hits", 1);
253  meCaloPreSh[i]->setAxisTitle("Count", 2);
254  meCaloPreShE[i]->setAxisTitle("Energy of Hits (GeV)", 1);
255  meCaloPreShE[i]->setAxisTitle("Count", 2);
256  meCaloPreShToF[i]->setAxisTitle("Time of Flight of Hits (ns)", 1);
257  meCaloPreShToF[i]->setAxisTitle("Count", 2);
258  }
259 
260  sprintf(hname, "hCaloPreShPhi");
261  sprintf(htitle, "PreSh hits, phi/rad");
262  meCaloPreShPhi = ibooker.book1D(hname, htitle, 100, -3.2, 3.2);
263  meCaloPreShPhi->setAxisTitle("Phi of Hits (rad)", 1);
264  meCaloPreShPhi->setAxisTitle("Count", 2);
265 
266  sprintf(hname, "hCaloPreShEta");
267  sprintf(htitle, "PreSh hits, eta");
268  meCaloPreShEta = ibooker.book1D(hname, htitle, 100, -5.5, 5.5);
269  meCaloPreShEta->setAxisTitle("Eta of Hits", 1);
270  meCaloPreShEta->setAxisTitle("Count", 2);
271 
272  // Hcal
273  ibooker.setCurrentFolder("GlobalHitsV/HCals");
274  sprintf(hname, "hCaloHcal1");
275  sprintf(htitle, "Hcal hits");
276  meCaloHcal[0] = ibooker.book1D(hname, htitle, 100, 0., 10000.);
277  sprintf(hname, "hCaloHcal2");
278  meCaloHcal[1] = ibooker.book1D(hname, htitle, 100, -0.5, 99.5);
279 
280  sprintf(hname, "hCaloHcalE1");
281  sprintf(htitle, "Hcal hits, energy/GeV");
282  meCaloHcalE[0] = ibooker.book1D(hname, htitle, 100, 0., 10.);
283  sprintf(hname, "hCaloHcalE2");
284  meCaloHcalE[1] = ibooker.book1D(hname, htitle, 100, 0., 0.1);
285 
286  sprintf(hname, "hCaloHcalToF1");
287  sprintf(htitle, "Hcal hits, ToF/ns");
288  meCaloHcalToF[0] = ibooker.book1D(hname, htitle, 100, 0., 1000.);
289  sprintf(hname, "hCaloHcalToF2");
290  meCaloHcalToF[1] = ibooker.book1D(hname, htitle, 100, 0., 100.);
291 
292  for (Int_t i = 0; i < 2; ++i) {
293  meCaloHcal[i]->setAxisTitle("Number of Hits", 1);
294  meCaloHcal[i]->setAxisTitle("Count", 2);
295  meCaloHcalE[i]->setAxisTitle("Energy of Hits (GeV)", 1);
296  meCaloHcalE[i]->setAxisTitle("Count", 2);
297  meCaloHcalToF[i]->setAxisTitle("Time of Flight of Hits (ns)", 1);
298  meCaloHcalToF[i]->setAxisTitle("Count", 2);
299  }
300 
301  sprintf(hname, "hCaloHcalPhi");
302  sprintf(htitle, "Hcal hits, phi/rad");
303  meCaloHcalPhi = ibooker.book1D(hname, htitle, 100, -3.2, 3.2);
304  meCaloHcalPhi->setAxisTitle("Phi of Hits (rad)", 1);
305  meCaloHcalPhi->setAxisTitle("Count", 2);
306 
307  sprintf(hname, "hCaloHcalEta");
308  sprintf(htitle, "Hcal hits, eta");
309  meCaloHcalEta = ibooker.book1D(hname, htitle, 100, -5.5, 5.5);
310  meCaloHcalEta->setAxisTitle("Eta of Hits", 1);
311  meCaloHcalEta->setAxisTitle("Count", 2);
312 
313  // SiPixels
314  ibooker.setCurrentFolder("GlobalHitsV/SiPixels");
315  sprintf(hname, "hTrackerPx1");
316  sprintf(htitle, "Pixel hits");
317  meTrackerPx[0] = ibooker.book1D(hname, htitle, 100, 0., 10000.);
318  sprintf(hname, "hTrackerPx2");
319  meTrackerPx[1] = ibooker.book1D(hname, htitle, 100, -0.5, 99.5);
320  for (Int_t i = 0; i < 2; ++i) {
321  meTrackerPx[i]->setAxisTitle("Number of Pixel Hits", 1);
322  meTrackerPx[i]->setAxisTitle("Count", 2);
323  }
324 
325  sprintf(hname, "hTrackerPxPhi");
326  sprintf(htitle, "Pixel hits phi/rad");
327  meTrackerPxPhi = ibooker.book1D(hname, htitle, 100, -3.2, 3.2);
328  meTrackerPxPhi->setAxisTitle("Phi of Hits (rad)", 1);
329  meTrackerPxPhi->setAxisTitle("Count", 2);
330 
331  sprintf(hname, "hTrackerPxEta");
332  sprintf(htitle, "Pixel hits eta");
333  meTrackerPxEta = ibooker.book1D(hname, htitle, 100, -3.5, 3.5);
334  meTrackerPxEta->setAxisTitle("Eta of Hits", 1);
335  meTrackerPxEta->setAxisTitle("Count", 2);
336 
337  sprintf(hname, "hTrackerPxBToF");
338  sprintf(htitle, "Pixel barrel hits, ToF/ns");
339  meTrackerPxBToF = ibooker.book1D(hname, htitle, 100, 0., 40.);
340  meTrackerPxBToF->setAxisTitle("Time of Flight of Hits (ns)", 1);
341  meTrackerPxBToF->setAxisTitle("Count", 2);
342 
343  sprintf(hname, "hTrackerPxBR");
344  sprintf(htitle, "Pixel barrel hits, R/cm");
345  meTrackerPxBR = ibooker.book1D(hname, htitle, 100, 0., 50.);
346  meTrackerPxBR->setAxisTitle("R of Hits (cm)", 1);
347  meTrackerPxBR->setAxisTitle("Count", 2);
348 
349  sprintf(hname, "hTrackerPxFToF");
350  sprintf(htitle, "Pixel forward hits, ToF/ns");
351  meTrackerPxFToF = ibooker.book1D(hname, htitle, 100, 0., 50.);
352  meTrackerPxFToF->setAxisTitle("Time of Flight of Hits (ns)", 1);
353  meTrackerPxFToF->setAxisTitle("Count", 2);
354 
355  sprintf(hname, "hTrackerPxFZ");
356  sprintf(htitle, "Pixel forward hits, Z/cm");
357  meTrackerPxFZ = ibooker.book1D(hname, htitle, 200, -100., 100.);
358  meTrackerPxFZ->setAxisTitle("Z of Hits (cm)", 1);
359  meTrackerPxFZ->setAxisTitle("Count", 2);
360 
361  // SiStrips
362  ibooker.setCurrentFolder("GlobalHitsV/SiPixels");
363  sprintf(hname, "hTrackerSi1");
364  sprintf(htitle, "Silicon hits");
365  meTrackerSi[0] = ibooker.book1D(hname, htitle, 100, 0., 10000.);
366  sprintf(hname, "hTrackerSi2");
367  meTrackerSi[1] = ibooker.book1D(hname, htitle, 100, -0.5, 99.5);
368  for (Int_t i = 0; i < 2; ++i) {
369  meTrackerSi[i]->setAxisTitle("Number of Silicon Hits", 1);
370  meTrackerSi[i]->setAxisTitle("Count", 2);
371  }
372 
373  sprintf(hname, "hTrackerSiPhi");
374  sprintf(htitle, "Silicon hits phi/rad");
375  meTrackerSiPhi = ibooker.book1D(hname, htitle, 100, -3.2, 3.2);
376  meTrackerSiPhi->setAxisTitle("Phi of Hits (rad)", 1);
377  meTrackerSiPhi->setAxisTitle("Count", 2);
378 
379  sprintf(hname, "hTrackerSiEta");
380  sprintf(htitle, "Silicon hits eta");
381  meTrackerSiEta = ibooker.book1D(hname, htitle, 100, -3.5, 3.5);
382  meTrackerSiEta->setAxisTitle("Eta of Hits", 1);
383  meTrackerSiEta->setAxisTitle("Count", 2);
384 
385  sprintf(hname, "hTrackerSiBToF");
386  sprintf(htitle, "Silicon barrel hits, ToF/ns");
387  meTrackerSiBToF = ibooker.book1D(hname, htitle, 100, 0., 50.);
388  meTrackerSiBToF->setAxisTitle("Time of Flight of Hits (ns)", 1);
389  meTrackerSiBToF->setAxisTitle("Count", 2);
390 
391  sprintf(hname, "hTrackerSiBR");
392  sprintf(htitle, "Silicon barrel hits, R/cm");
393  meTrackerSiBR = ibooker.book1D(hname, htitle, 100, 0., 200.);
394  meTrackerSiBR->setAxisTitle("R of Hits (cm)", 1);
395  meTrackerSiBR->setAxisTitle("Count", 2);
396 
397  sprintf(hname, "hTrackerSiFToF");
398  sprintf(htitle, "Silicon forward hits, ToF/ns");
399  meTrackerSiFToF = ibooker.book1D(hname, htitle, 100, 0., 75.);
400  meTrackerSiFToF->setAxisTitle("Time of Flight of Hits (ns)", 1);
401  meTrackerSiFToF->setAxisTitle("Count", 2);
402 
403  sprintf(hname, "hTrackerSiFZ");
404  sprintf(htitle, "Silicon forward hits, Z/cm");
405  meTrackerSiFZ = ibooker.book1D(hname, htitle, 200, -300., 300.);
406  meTrackerSiFZ->setAxisTitle("Z of Hits (cm)", 1);
407  meTrackerSiFZ->setAxisTitle("Count", 2);
408 
409  // muon
410  ibooker.setCurrentFolder("GlobalHitsV/Muons");
411  sprintf(hname, "hMuon1");
412  sprintf(htitle, "Muon hits");
413  meMuon[0] = ibooker.book1D(hname, htitle, 100, 0., 10000.);
414  sprintf(hname, "hMuon2");
415  meMuon[1] = ibooker.book1D(hname, htitle, 100, -0.5, 99.5);
416  for (Int_t i = 0; i < 2; ++i) {
417  meMuon[i]->setAxisTitle("Number of Muon Hits", 1);
418  meMuon[i]->setAxisTitle("Count", 2);
419  }
420 
421  sprintf(hname, "hMuonPhi");
422  sprintf(htitle, "Muon hits phi/rad");
423  meMuonPhi = ibooker.book1D(hname, htitle, 100, -3.2, 3.2);
424  meMuonPhi->setAxisTitle("Phi of Hits (rad)", 1);
425  meMuonPhi->setAxisTitle("Count", 2);
426 
427  sprintf(hname, "hMuonEta");
428  sprintf(htitle, "Muon hits eta");
429  meMuonEta = ibooker.book1D(hname, htitle, 100, -3.5, 3.5);
430  meMuonEta->setAxisTitle("Eta of Hits", 1);
431  meMuonEta->setAxisTitle("Count", 2);
432 
433  sprintf(hname, "hMuonCscToF1");
434  sprintf(htitle, "Muon CSC hits, ToF/ns");
435  meMuonCscToF[0] = ibooker.book1D(hname, htitle, 100, 0., 250.);
436  sprintf(hname, "hMuonCscToF2");
437  meMuonCscToF[1] = ibooker.book1D(hname, htitle, 100, 0., 50.);
438  for (Int_t i = 0; i < 2; ++i) {
439  meMuonCscToF[i]->setAxisTitle("Time of Flight of Hits (ns)", 1);
440  meMuonCscToF[i]->setAxisTitle("Count", 2);
441  }
442 
443  sprintf(hname, "hMuonCscZ");
444  sprintf(htitle, "Muon CSC hits, Z/cm");
445  meMuonCscZ = ibooker.book1D(hname, htitle, 200, -1500., 1500.);
446  meMuonCscZ->setAxisTitle("Z of Hits (cm)", 1);
447  meMuonCscZ->setAxisTitle("Count", 2);
448 
449  sprintf(hname, "hMuonDtToF1");
450  sprintf(htitle, "Muon DT hits, ToF/ns");
451  meMuonDtToF[0] = ibooker.book1D(hname, htitle, 100, 0., 250.);
452  sprintf(hname, "hMuonDtToF2");
453  meMuonDtToF[1] = ibooker.book1D(hname, htitle, 100, 0., 50.);
454  for (Int_t i = 0; i < 2; ++i) {
455  meMuonDtToF[i]->setAxisTitle("Time of Flight of Hits (ns)", 1);
456  meMuonDtToF[i]->setAxisTitle("Count", 2);
457  }
458 
459  sprintf(hname, "hMuonDtR");
460  sprintf(htitle, "Muon DT hits, R/cm");
461  meMuonDtR = ibooker.book1D(hname, htitle, 100, 0., 1500.);
462  meMuonDtR->setAxisTitle("R of Hits (cm)", 1);
463  meMuonDtR->setAxisTitle("Count", 2);
464 
465  sprintf(hname, "hMuonRpcFToF1");
466  sprintf(htitle, "Muon RPC forward hits, ToF/ns");
467  meMuonRpcFToF[0] = ibooker.book1D(hname, htitle, 100, 0., 250.);
468  sprintf(hname, "hMuonRpcFToF2_4305");
469  meMuonRpcFToF[1] = ibooker.book1D(hname, htitle, 100, 0., 50.);
470  for (Int_t i = 0; i < 2; ++i) {
471  meMuonRpcFToF[i]->setAxisTitle("Time of Flight of Hits (ns)", 1);
472  meMuonRpcFToF[i]->setAxisTitle("Count", 2);
473  }
474 
475  sprintf(hname, "hMuonRpcFZ");
476  sprintf(htitle, "Muon RPC forward hits, Z/cm");
477  meMuonRpcFZ = ibooker.book1D(hname, htitle, 201, -1500., 1500.);
478  meMuonRpcFZ->setAxisTitle("Z of Hits (cm)", 1);
479  meMuonRpcFZ->setAxisTitle("Count", 2);
480 
481  sprintf(hname, "hMuonRpcBToF1");
482  sprintf(htitle, "Muon RPC barrel hits, ToF/ns");
483  meMuonRpcBToF[0] = ibooker.book1D(hname, htitle, 100, 0., 250.);
484  sprintf(hname, "hMuonRpcBToF2");
485  meMuonRpcBToF[1] = ibooker.book1D(hname, htitle, 100, 0., 50.);
486  for (Int_t i = 0; i < 2; ++i) {
487  meMuonRpcBToF[i]->setAxisTitle("Time of Flight of Hits (ns)", 1);
488  meMuonRpcBToF[i]->setAxisTitle("Count", 2);
489  }
490 
491  sprintf(hname, "hMuonRpcBR");
492  sprintf(htitle, "Muon RPC barrel hits, R/cm");
493  meMuonRpcBR = ibooker.book1D(hname, htitle, 100, 0., 1500.);
494  meMuonRpcBR->setAxisTitle("R of Hits (cm)", 1);
495  meMuonRpcBR->setAxisTitle("Count", 2);
496 }
MonitorElement * meMCG4Vtx[2]
MonitorElement * meCaloHcal[2]
MonitorElement * meCaloEcalE[2]
MonitorElement * meMuonRpcBToF[2]
MonitorElement * meCaloPreSh[2]
MonitorElement * meMuonCscToF[2]
MonitorElement * meGeantVtxY[2]
MonitorElement * meMuonDtToF[2]
MonitorElement * meCaloPreShE[2]
MonitorElement * meMCRGP[2]
MonitorElement * meCaloHcalE[2]
MonitorElement * meTrackerSi[2]
MonitorElement * meMCG4Trk[2]
MonitorElement * meCaloEcal[2]
MonitorElement * meCaloPreShToF[2]
MonitorElement * meCaloEcalToF[2]
MonitorElement * meMuonRpcFToF[2]
MonitorElement * meTrackerPx[2]
MonitorElement * meGeantVtxZ[2]
MonitorElement * meGeantVtxX[2]
MonitorElement * meCaloHcalToF[2]
virtual void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)

Member Data Documentation

unsigned int GlobalHitsHistogrammer::count
private

Definition at line 181 of file GlobalHitsHistogrammer.h.

Referenced by analyze().

bool GlobalHitsHistogrammer::doOutput
private

Definition at line 93 of file GlobalHitsHistogrammer.h.

Referenced by GlobalHitsHistogrammer().

std::string GlobalHitsHistogrammer::fName
private

Definition at line 84 of file GlobalHitsHistogrammer.h.

Referenced by GlobalHitsHistogrammer().

int GlobalHitsHistogrammer::frequency
private

Definition at line 86 of file GlobalHitsHistogrammer.h.

Referenced by analyze(), and GlobalHitsHistogrammer().

bool GlobalHitsHistogrammer::getAllProvenances
private

Definition at line 89 of file GlobalHitsHistogrammer.h.

Referenced by analyze(), and GlobalHitsHistogrammer().

edm::InputTag GlobalHitsHistogrammer::GlobalHitSrc_
private

Definition at line 95 of file GlobalHitsHistogrammer.h.

Referenced by GlobalHitsHistogrammer().

edm::EDGetTokenT<PGlobalSimHit> GlobalHitsHistogrammer::GlobalHitSrc_Token_
private

Definition at line 96 of file GlobalHitsHistogrammer.h.

Referenced by analyze(), and GlobalHitsHistogrammer().

std::string GlobalHitsHistogrammer::label
private
MonitorElement* GlobalHitsHistogrammer::meCaloEcal[2]
private

Definition at line 110 of file GlobalHitsHistogrammer.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* GlobalHitsHistogrammer::meCaloEcalE[2]
private

Definition at line 111 of file GlobalHitsHistogrammer.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* GlobalHitsHistogrammer::meCaloEcalEta
private

Definition at line 114 of file GlobalHitsHistogrammer.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* GlobalHitsHistogrammer::meCaloEcalPhi
private

Definition at line 113 of file GlobalHitsHistogrammer.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* GlobalHitsHistogrammer::meCaloEcalToF[2]
private

Definition at line 112 of file GlobalHitsHistogrammer.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* GlobalHitsHistogrammer::meCaloHcal[2]
private

Definition at line 125 of file GlobalHitsHistogrammer.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* GlobalHitsHistogrammer::meCaloHcalE[2]
private

Definition at line 126 of file GlobalHitsHistogrammer.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* GlobalHitsHistogrammer::meCaloHcalEta
private

Definition at line 129 of file GlobalHitsHistogrammer.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* GlobalHitsHistogrammer::meCaloHcalPhi
private

Definition at line 128 of file GlobalHitsHistogrammer.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* GlobalHitsHistogrammer::meCaloHcalToF[2]
private

Definition at line 127 of file GlobalHitsHistogrammer.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* GlobalHitsHistogrammer::meCaloPreSh[2]
private

Definition at line 117 of file GlobalHitsHistogrammer.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* GlobalHitsHistogrammer::meCaloPreShE[2]
private

Definition at line 118 of file GlobalHitsHistogrammer.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* GlobalHitsHistogrammer::meCaloPreShEta
private

Definition at line 121 of file GlobalHitsHistogrammer.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* GlobalHitsHistogrammer::meCaloPreShPhi
private

Definition at line 120 of file GlobalHitsHistogrammer.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* GlobalHitsHistogrammer::meCaloPreShToF[2]
private

Definition at line 119 of file GlobalHitsHistogrammer.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* GlobalHitsHistogrammer::meGeantTrkE
private

Definition at line 106 of file GlobalHitsHistogrammer.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* GlobalHitsHistogrammer::meGeantTrkPt
private

Definition at line 105 of file GlobalHitsHistogrammer.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* GlobalHitsHistogrammer::meGeantVtxX[2]
private

Definition at line 101 of file GlobalHitsHistogrammer.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* GlobalHitsHistogrammer::meGeantVtxY[2]
private

Definition at line 102 of file GlobalHitsHistogrammer.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* GlobalHitsHistogrammer::meGeantVtxZ[2]
private

Definition at line 103 of file GlobalHitsHistogrammer.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* GlobalHitsHistogrammer::meMCG4Trk[2]
private

Definition at line 104 of file GlobalHitsHistogrammer.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* GlobalHitsHistogrammer::meMCG4Vtx[2]
private

Definition at line 100 of file GlobalHitsHistogrammer.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* GlobalHitsHistogrammer::meMCRGP[2]
private

Definition at line 99 of file GlobalHitsHistogrammer.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* GlobalHitsHistogrammer::meMuon[2]
private

Definition at line 157 of file GlobalHitsHistogrammer.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* GlobalHitsHistogrammer::meMuonCscToF[2]
private

Definition at line 169 of file GlobalHitsHistogrammer.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* GlobalHitsHistogrammer::meMuonCscZ
private

Definition at line 170 of file GlobalHitsHistogrammer.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* GlobalHitsHistogrammer::meMuonDtR
private

Definition at line 165 of file GlobalHitsHistogrammer.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* GlobalHitsHistogrammer::meMuonDtToF[2]
private

Definition at line 164 of file GlobalHitsHistogrammer.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* GlobalHitsHistogrammer::meMuonEta
private

Definition at line 159 of file GlobalHitsHistogrammer.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* GlobalHitsHistogrammer::meMuonPhi
private

Definition at line 158 of file GlobalHitsHistogrammer.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* GlobalHitsHistogrammer::meMuonRpcBR
private

Definition at line 178 of file GlobalHitsHistogrammer.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* GlobalHitsHistogrammer::meMuonRpcBToF[2]
private

Definition at line 177 of file GlobalHitsHistogrammer.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* GlobalHitsHistogrammer::meMuonRpcFToF[2]
private

Definition at line 175 of file GlobalHitsHistogrammer.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* GlobalHitsHistogrammer::meMuonRpcFZ
private

Definition at line 176 of file GlobalHitsHistogrammer.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* GlobalHitsHistogrammer::meTrackerPx[2]
private

Definition at line 136 of file GlobalHitsHistogrammer.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* GlobalHitsHistogrammer::meTrackerPxBR
private

Definition at line 140 of file GlobalHitsHistogrammer.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* GlobalHitsHistogrammer::meTrackerPxBToF
private

Definition at line 139 of file GlobalHitsHistogrammer.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* GlobalHitsHistogrammer::meTrackerPxEta
private

Definition at line 138 of file GlobalHitsHistogrammer.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* GlobalHitsHistogrammer::meTrackerPxFToF
private

Definition at line 141 of file GlobalHitsHistogrammer.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* GlobalHitsHistogrammer::meTrackerPxFZ
private

Definition at line 142 of file GlobalHitsHistogrammer.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* GlobalHitsHistogrammer::meTrackerPxPhi
private

Definition at line 137 of file GlobalHitsHistogrammer.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* GlobalHitsHistogrammer::meTrackerSi[2]
private

Definition at line 148 of file GlobalHitsHistogrammer.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* GlobalHitsHistogrammer::meTrackerSiBR
private

Definition at line 152 of file GlobalHitsHistogrammer.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* GlobalHitsHistogrammer::meTrackerSiBToF
private

Definition at line 151 of file GlobalHitsHistogrammer.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* GlobalHitsHistogrammer::meTrackerSiEta
private

Definition at line 150 of file GlobalHitsHistogrammer.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* GlobalHitsHistogrammer::meTrackerSiFToF
private

Definition at line 153 of file GlobalHitsHistogrammer.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* GlobalHitsHistogrammer::meTrackerSiFZ
private

Definition at line 154 of file GlobalHitsHistogrammer.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* GlobalHitsHistogrammer::meTrackerSiPhi
private

Definition at line 149 of file GlobalHitsHistogrammer.h.

Referenced by analyze(), and bookHistograms().

int GlobalHitsHistogrammer::nMuonCscHits
private

Definition at line 168 of file GlobalHitsHistogrammer.h.

Referenced by analyze().

int GlobalHitsHistogrammer::nMuonDtHits
private

Definition at line 163 of file GlobalHitsHistogrammer.h.

Referenced by analyze().

int GlobalHitsHistogrammer::nMuonHits
private

Definition at line 160 of file GlobalHitsHistogrammer.h.

Referenced by analyze().

int GlobalHitsHistogrammer::nMuonRpcBrlHits
private

Definition at line 173 of file GlobalHitsHistogrammer.h.

Referenced by analyze().

int GlobalHitsHistogrammer::nMuonRpcFwdHits
private

Definition at line 174 of file GlobalHitsHistogrammer.h.

Referenced by analyze().

int GlobalHitsHistogrammer::nPxlBrlHits
private

Definition at line 133 of file GlobalHitsHistogrammer.h.

Referenced by analyze().

int GlobalHitsHistogrammer::nPxlFwdHits
private

Definition at line 134 of file GlobalHitsHistogrammer.h.

Referenced by analyze().

int GlobalHitsHistogrammer::nPxlHits
private

Definition at line 135 of file GlobalHitsHistogrammer.h.

Referenced by analyze().

int GlobalHitsHistogrammer::nSiBrlHits
private

Definition at line 146 of file GlobalHitsHistogrammer.h.

Referenced by analyze().

int GlobalHitsHistogrammer::nSiFwdHits
private

Definition at line 147 of file GlobalHitsHistogrammer.h.

Referenced by analyze().

int GlobalHitsHistogrammer::nSiHits
private

Definition at line 145 of file GlobalHitsHistogrammer.h.

Referenced by analyze().

std::string GlobalHitsHistogrammer::outputfile
private

Definition at line 92 of file GlobalHitsHistogrammer.h.

Referenced by GlobalHitsHistogrammer().

bool GlobalHitsHistogrammer::printProvenanceInfo
private

Definition at line 90 of file GlobalHitsHistogrammer.h.

Referenced by analyze(), and GlobalHitsHistogrammer().

int GlobalHitsHistogrammer::verbosity
private

Definition at line 85 of file GlobalHitsHistogrammer.h.

Referenced by analyze(), and GlobalHitsHistogrammer().

int GlobalHitsHistogrammer::vtxunit
private

Definition at line 87 of file GlobalHitsHistogrammer.h.

Referenced by GlobalHitsHistogrammer().