17 getAllProvenances(
false),
18 printProvenanceInfo(
false),
20 std::string MsgLoggerCat =
"GlobalHitsHistogrammer_GlobalHitsHistogrammer";
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()
56 <<
"===============================\n";
62 for (Int_t
i = 0;
i < 2; ++
i) {
119 sprintf(hname,
"hMCRGP1");
120 sprintf(htitle,
"RawGenParticles");
122 sprintf(hname,
"hMCRGP2");
124 for (Int_t
i = 0;
i < 2; ++
i) {
129 sprintf(hname,
"hMCG4Vtx1");
130 sprintf(htitle,
"G4 Vertices");
132 sprintf(hname,
"hMCG4Vtx2");
134 for (Int_t
i = 0;
i < 2; ++
i) {
139 sprintf(hname,
"hMCG4Trk1");
140 sprintf(htitle,
"G4 Tracks");
142 sprintf(hname,
"hMCG4Trk2");
144 for (Int_t
i = 0;
i < 2; ++
i) {
149 sprintf(hname,
"hGeantVtxX1");
150 sprintf(htitle,
"Geant vertex x/micrometer");
152 sprintf(hname,
"hGeantVtxX2");
154 for (Int_t
i = 0;
i < 2; ++
i) {
159 sprintf(hname,
"hGeantVtxY1");
160 sprintf(htitle,
"Geant vertex y/micrometer");
162 sprintf(hname,
"hGeantVtxY2");
164 for (Int_t
i = 0;
i < 2; ++
i) {
169 sprintf(hname,
"hGeantVtxZ1");
170 sprintf(htitle,
"Geant vertex z/millimeter");
172 sprintf(hname,
"hGeantVtxZ2");
174 for (Int_t
i = 0;
i < 2; ++
i) {
179 sprintf(hname,
"hGeantTrkPt");
180 sprintf(htitle,
"Geant track pt/GeV");
185 sprintf(hname,
"hGeantTrkE");
186 sprintf(htitle,
"Geant track E/GeV");
194 sprintf(hname,
"hCaloEcal1");
195 sprintf(htitle,
"Ecal hits");
197 sprintf(hname,
"hCaloEcal2");
200 sprintf(hname,
"hCaloEcalE1");
201 sprintf(htitle,
"Ecal hits, energy/GeV");
203 sprintf(hname,
"hCaloEcalE2");
206 sprintf(hname,
"hCaloEcalToF1");
207 sprintf(htitle,
"Ecal hits, ToF/ns");
209 sprintf(hname,
"hCaloEcalToF2");
212 for (Int_t
i = 0;
i < 2; ++
i) {
221 sprintf(hname,
"hCaloEcalPhi");
222 sprintf(htitle,
"Ecal hits, phi/rad");
227 sprintf(hname,
"hCaloEcalEta");
228 sprintf(htitle,
"Ecal hits, eta");
233 sprintf(hname,
"hCaloPreSh1");
234 sprintf(htitle,
"PreSh hits");
236 sprintf(hname,
"hCaloPreSh2");
239 sprintf(hname,
"hCaloPreShE1");
240 sprintf(htitle,
"PreSh hits, energy/GeV");
242 sprintf(hname,
"hCaloPreShE2");
245 sprintf(hname,
"hCaloPreShToF1");
246 sprintf(htitle,
"PreSh hits, ToF/ns");
248 sprintf(hname,
"hCaloPreShToF2");
251 for (Int_t
i = 0;
i < 2; ++
i) {
260 sprintf(hname,
"hCaloPreShPhi");
261 sprintf(htitle,
"PreSh hits, phi/rad");
266 sprintf(hname,
"hCaloPreShEta");
267 sprintf(htitle,
"PreSh hits, eta");
274 sprintf(hname,
"hCaloHcal1");
275 sprintf(htitle,
"Hcal hits");
277 sprintf(hname,
"hCaloHcal2");
280 sprintf(hname,
"hCaloHcalE1");
281 sprintf(htitle,
"Hcal hits, energy/GeV");
283 sprintf(hname,
"hCaloHcalE2");
286 sprintf(hname,
"hCaloHcalToF1");
287 sprintf(htitle,
"Hcal hits, ToF/ns");
289 sprintf(hname,
"hCaloHcalToF2");
292 for (Int_t
i = 0;
i < 2; ++
i) {
301 sprintf(hname,
"hCaloHcalPhi");
302 sprintf(htitle,
"Hcal hits, phi/rad");
307 sprintf(hname,
"hCaloHcalEta");
308 sprintf(htitle,
"Hcal hits, eta");
315 sprintf(hname,
"hTrackerPx1");
316 sprintf(htitle,
"Pixel hits");
318 sprintf(hname,
"hTrackerPx2");
320 for (Int_t
i = 0;
i < 2; ++
i) {
325 sprintf(hname,
"hTrackerPxPhi");
326 sprintf(htitle,
"Pixel hits phi/rad");
331 sprintf(hname,
"hTrackerPxEta");
332 sprintf(htitle,
"Pixel hits eta");
337 sprintf(hname,
"hTrackerPxBToF");
338 sprintf(htitle,
"Pixel barrel hits, ToF/ns");
343 sprintf(hname,
"hTrackerPxBR");
344 sprintf(htitle,
"Pixel barrel hits, R/cm");
349 sprintf(hname,
"hTrackerPxFToF");
350 sprintf(htitle,
"Pixel forward hits, ToF/ns");
355 sprintf(hname,
"hTrackerPxFZ");
356 sprintf(htitle,
"Pixel forward hits, Z/cm");
363 sprintf(hname,
"hTrackerSi1");
364 sprintf(htitle,
"Silicon hits");
366 sprintf(hname,
"hTrackerSi2");
368 for (Int_t
i = 0;
i < 2; ++
i) {
373 sprintf(hname,
"hTrackerSiPhi");
374 sprintf(htitle,
"Silicon hits phi/rad");
379 sprintf(hname,
"hTrackerSiEta");
380 sprintf(htitle,
"Silicon hits eta");
385 sprintf(hname,
"hTrackerSiBToF");
386 sprintf(htitle,
"Silicon barrel hits, ToF/ns");
391 sprintf(hname,
"hTrackerSiBR");
392 sprintf(htitle,
"Silicon barrel hits, R/cm");
397 sprintf(hname,
"hTrackerSiFToF");
398 sprintf(htitle,
"Silicon forward hits, ToF/ns");
403 sprintf(hname,
"hTrackerSiFZ");
404 sprintf(htitle,
"Silicon forward hits, Z/cm");
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) {
421 sprintf(hname,
"hMuonPhi");
422 sprintf(htitle,
"Muon hits phi/rad");
427 sprintf(hname,
"hMuonEta");
428 sprintf(htitle,
"Muon hits eta");
433 sprintf(hname,
"hMuonCscToF1");
434 sprintf(htitle,
"Muon CSC hits, ToF/ns");
436 sprintf(hname,
"hMuonCscToF2");
438 for (Int_t
i = 0;
i < 2; ++
i) {
443 sprintf(hname,
"hMuonCscZ");
444 sprintf(htitle,
"Muon CSC hits, Z/cm");
449 sprintf(hname,
"hMuonDtToF1");
450 sprintf(htitle,
"Muon DT hits, ToF/ns");
452 sprintf(hname,
"hMuonDtToF2");
454 for (Int_t
i = 0;
i < 2; ++
i) {
459 sprintf(hname,
"hMuonDtR");
460 sprintf(htitle,
"Muon DT hits, R/cm");
465 sprintf(hname,
"hMuonRpcFToF1");
466 sprintf(htitle,
"Muon RPC forward hits, ToF/ns");
468 sprintf(hname,
"hMuonRpcFToF2_4305");
470 for (Int_t
i = 0;
i < 2; ++
i) {
475 sprintf(hname,
"hMuonRpcFZ");
476 sprintf(htitle,
"Muon RPC forward hits, Z/cm");
481 sprintf(hname,
"hMuonRpcBToF1");
482 sprintf(htitle,
"Muon RPC barrel hits, ToF/ns");
484 sprintf(hname,
"hMuonRpcBToF2");
486 for (Int_t
i = 0;
i < 2; ++
i) {
491 sprintf(hname,
"hMuonRpcBR");
492 sprintf(htitle,
"Muon RPC barrel hits, R/cm");
501 std::string MsgLoggerCat =
"GlobalHitsHistogrammer_analyze";
511 edm::LogInfo(MsgLoggerCat) <<
"Processing run " << nrun <<
", event " << nevt <<
" (" <<
count <<
" events total)";
513 if (nevt %
frequency == 0 || nevt == 1) {
514 edm::LogInfo(MsgLoggerCat) <<
"Processing run " << nrun <<
", event " << nevt <<
" (" <<
count 521 std::vector<const edm::StableProvenance *> AllProv;
525 edm::LogInfo(MsgLoggerCat) <<
"Number of Provenances = " << AllProv.size();
528 TString eventout(
"\nProvenance info:\n");
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();
543 eventout +=
"\n ******************************\n";
553 if (!srcGlobalHits.
isValid()) {
554 edm::LogWarning(MsgLoggerCat) <<
"Unable to find PGlobalSimHit in event!";
570 for (Int_t
i = 0;
i < 2; ++
i) {
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) {
593 std::vector<PGlobalSimHit::Trk> G4Trk = srcGlobalHits->
getG4Trk();
594 for (
unsigned int i = 0;
i < G4Trk.size(); ++
i) {
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) {
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) {
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) {
633 std::vector<PGlobalSimHit::BrlHit> PxlBrlHits = srcGlobalHits->
getPxlBrlHits();
634 for (
unsigned int i = 0;
i < PxlBrlHits.size(); ++
i) {
642 std::vector<PGlobalSimHit::FwdHit> PxlFwdHits = srcGlobalHits->
getPxlFwdHits();
643 for (
unsigned int i = 0;
i < PxlFwdHits.size(); ++
i) {
651 std::vector<PGlobalSimHit::BrlHit> SiBrlHits = srcGlobalHits->
getSiBrlHits();
652 for (
unsigned int i = 0;
i < SiBrlHits.size(); ++
i) {
660 std::vector<PGlobalSimHit::FwdHit> SiFwdHits = srcGlobalHits->
getSiFwdHits();
661 for (
unsigned int i = 0;
i < SiFwdHits.size(); ++
i) {
669 std::vector<PGlobalSimHit::FwdHit> MuonCscHits = srcGlobalHits->
getMuonCscHits();
670 for (
unsigned int i = 0;
i < MuonCscHits.size(); ++
i) {
673 for (Int_t j = 0; j < 2; ++j) {
680 std::vector<PGlobalSimHit::BrlHit> MuonDtHits = srcGlobalHits->
getMuonDtHits();
681 for (
unsigned int i = 0;
i < MuonDtHits.size(); ++
i) {
684 for (Int_t j = 0; j < 2; ++j) {
691 std::vector<PGlobalSimHit::FwdHit> MuonRpcFwdHits = srcGlobalHits->
getMuonRpcFwdHits();
692 for (
unsigned int i = 0;
i < MuonRpcFwdHits.size(); ++
i) {
695 for (Int_t j = 0; j < 2; ++j) {
702 std::vector<PGlobalSimHit::BrlHit> MuonRpcBrlHits = srcGlobalHits->
getMuonRpcBrlHits();
703 for (
unsigned int i = 0;
i < MuonRpcBrlHits.size(); ++
i) {
706 for (Int_t j = 0; j < 2; ++j) {
CalVector getPreShHits() const
MonitorElement * meCaloEcalPhi
BrlVector getPxlBrlHits() const
T getParameter(std::string const &) const
EventNumber_t event() const
T getUntrackedParameter(std::string const &, T const &) const
MonitorElement * meTrackerPxBR
MonitorElement * meCaloHcalPhi
edm::InputTag GlobalHitSrc_
MonitorElement * meMCG4Vtx[2]
FwdVector getMuonCscHits() const
bool getByToken(EDGetToken token, Handle< PROD > &result) const
MonitorElement * meCaloPreShPhi
MonitorElement * meCaloHcal[2]
MonitorElement * meMuonRpcFZ
GlobalHitsHistogrammer(const edm::ParameterSet &)
MonitorElement * meCaloEcalE[2]
int getnRawGenPart() const
unsigned long long EventNumber_t
int getnSiFwdHits() const
MonitorElement * meTrackerSiFToF
int getnMuonCscHits() const
FwdVector getPxlFwdHits() const
MonitorElement * meMuonRpcBToF[2]
int getnMuonRpcFwdHits() const
MonitorElement * meCaloPreSh[2]
int getnMuonDtHits() const
int getnPreShHits() const
~GlobalHitsHistogrammer() override
MonitorElement * meMuonCscToF[2]
MonitorElement * meTrackerSiEta
MonitorElement * meGeantVtxY[2]
MonitorElement * meMuonDtToF[2]
void setCurrentFolder(std::string const &fullpath)
FwdVector getSiFwdHits() const
MonitorElement * meMuonPhi
MonitorElement * meMuonDtR
MonitorElement * meCaloPreShE[2]
MonitorElement * meMCRGP[2]
TrkVector getG4Trk() const
MonitorElement * meTrackerSiBToF
MonitorElement * meTrackerSiBR
MonitorElement * book1D(Args &&...args)
MonitorElement * meMuonRpcBR
MonitorElement * meCaloPreShEta
int getnPxlFwdHits() const
MonitorElement * meTrackerSiFZ
MonitorElement * meTrackerPxFZ
MonitorElement * meCaloHcalE[2]
BrlVector getMuonDtHits() const
MonitorElement * meCaloEcalEta
MonitorElement * meTrackerSi[2]
MonitorElement * meTrackerPxPhi
VtxVector getG4Vtx() const
MonitorElement * meMCG4Trk[2]
MonitorElement * meTrackerPxFToF
MonitorElement * meCaloEcal[2]
MonitorElement * meCaloPreShToF[2]
int getnMuonRpcBrlHits() const
MonitorElement * meTrackerPxEta
edm::EDGetTokenT< PGlobalSimHit > GlobalHitSrc_Token_
MonitorElement * meGeantTrkPt
MonitorElement * meCaloEcalToF[2]
MonitorElement * meMuonRpcFToF[2]
MonitorElement * meMuonCscZ
CalVector getHCalHits() const
MonitorElement * meTrackerPx[2]
CalVector getECalHits() const
int getnSiBrlHits() const
void analyze(const edm::Event &, const edm::EventSetup &) override
MonitorElement * meGeantVtxZ[2]
MonitorElement * meTrackerPxBToF
MonitorElement * meMuonEta
void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
MonitorElement * meGeantTrkE
MonitorElement * meCaloHcalEta
MonitorElement * meTrackerSiPhi
BrlVector getMuonRpcBrlHits() const
MonitorElement * meGeantVtxX[2]
BrlVector getSiBrlHits() const
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
MonitorElement * meCaloHcalToF[2]
int getnPxlBrlHits() const
FwdVector getMuonRpcFwdHits() const
MonitorElement * meMuon[2]
void getAllStableProvenance(std::vector< StableProvenance const * > &provenances) const