CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes
GlobalRecHitsAnalyzer Class Reference

#include <GlobalRecHitsAnalyzer.h>

Inheritance diagram for GlobalRecHitsAnalyzer:
DQMEDAnalyzer edm::stream::EDProducer< edm::GlobalCache< DQMEDAnalyzerGlobalCache >, edm::EndRunProducer, edm::EndLuminosityBlockProducer, edm::Accumulator >

Public Types

typedef std::map< uint32_t, float, std::less< uint32_t > > MapType
 
- Public Types inherited from DQMEDAnalyzer
typedef dqm::reco::DQMStore DQMStore
 
typedef dqm::reco::MonitorElement MonitorElement
 
- Public Types inherited from edm::stream::EDProducer< edm::GlobalCache< DQMEDAnalyzerGlobalCache >, edm::EndRunProducer, edm::EndLuminosityBlockProducer, edm::Accumulator >
using CacheTypes = CacheContexts< T... >
 
using GlobalCache = typename CacheTypes::GlobalCache
 
using HasAbility = AbilityChecker< T... >
 
using InputProcessBlockCache = typename CacheTypes::InputProcessBlockCache
 
using LuminosityBlockCache = typename CacheTypes::LuminosityBlockCache
 
using LuminosityBlockContext = LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCache >
 
using LuminosityBlockSummaryCache = typename CacheTypes::LuminosityBlockSummaryCache
 
using RunCache = typename CacheTypes::RunCache
 
using RunContext = RunContextT< RunCache, GlobalCache >
 
using RunSummaryCache = typename CacheTypes::RunSummaryCache
 

Public Member Functions

void analyze (const edm::Event &, const edm::EventSetup &) override
 
 GlobalRecHitsAnalyzer (const edm::ParameterSet &)
 
 ~GlobalRecHitsAnalyzer () override
 
- Public Member Functions inherited from DQMEDAnalyzer
void accumulate (edm::Event const &event, edm::EventSetup const &setup) final
 
void beginLuminosityBlock (edm::LuminosityBlock const &lumi, edm::EventSetup const &setup) final
 
void beginRun (edm::Run const &run, edm::EventSetup const &setup) final
 
void beginStream (edm::StreamID id) final
 
virtual void dqmBeginRun (edm::Run const &, edm::EventSetup const &)
 
 DQMEDAnalyzer ()
 
void endLuminosityBlock (edm::LuminosityBlock const &lumi, edm::EventSetup const &setup) final
 
void endRun (edm::Run const &run, edm::EventSetup const &setup) final
 
virtual bool getCanSaveByLumi ()
 
- Public Member Functions inherited from edm::stream::EDProducer< edm::GlobalCache< DQMEDAnalyzerGlobalCache >, edm::EndRunProducer, edm::EndLuminosityBlockProducer, edm::Accumulator >
 EDProducer ()=default
 
 EDProducer (const EDProducer &)=delete
 
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
 

Protected Member Functions

void bookHistograms (DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
 
- Protected Member Functions inherited from DQMEDAnalyzer
uint64_t meId () const
 

Private Member Functions

template<typename type >
int compute (const DTGeometry *dtGeom, const std::map< DTWireId, std::vector< PSimHit >> &simHitsPerWire, const std::map< DTWireId, std::vector< type >> &recHitsPerWire, int step)
 
void fillECal (const edm::Event &, const edm::EventSetup &)
 
void fillHCal (const edm::Event &, const edm::EventSetup &)
 
void fillMuon (const edm::Event &, const edm::EventSetup &)
 
void fillTrk (const edm::Event &, const edm::EventSetup &)
 
template<typename type >
const typefindBestRecHit (const DTLayer *layer, DTWireId wireId, const std::vector< type > &recHits, const float simHitDist)
 
std::map< DTWireId, std::vector< DTRecHit1DPair > > map1DRecHitsPerWire (const DTRecHitCollection *dt1DRecHitPairs)
 
void plotResolution (const PSimHit &simHit, const CSCRecHit2D &recHit, const CSCLayer *layer, int chamberType)
 
std::pair< LocalPoint, LocalVectorprojectHit (const PSimHit &hit, const StripGeomDetUnit *stripDet, const BoundPlane &plane)
 
float recHitDistFromWire (const DTRecHit1DPair &hitPair, const DTLayer *layer)
 
float recHitDistFromWire (const DTRecHit1D &recHit, const DTLayer *layer)
 
float simHitDistFromWire (const DTLayer *layer, DTWireId wireId, const PSimHit &hit)
 

Private Attributes

edm::ESGetToken< CaloGeometry, CaloGeometryRecordcaloGeomToken_
 
unsigned int count
 
edm::ESGetToken< CSCGeometry, MuonGeometryRecordcscGeomToken_
 
edm::ESGetToken< DTGeometry, MuonGeometryRecorddtGeomToken_
 
edm::EDGetTokenT< CrossingFrame< PCaloHit > > EBHits_Token_
 
edm::InputTag ECalEBSrc_
 
edm::EDGetTokenT< EBRecHitCollectionECalEBSrc_Token_
 
edm::InputTag ECalEESrc_
 
edm::EDGetTokenT< EERecHitCollectionECalEESrc_Token_
 
edm::InputTag ECalESSrc_
 
edm::EDGetTokenT< ESRecHitCollectionECalESSrc_Token_
 
edm::InputTag ECalUncalEBSrc_
 
edm::EDGetTokenT< EBUncalibratedRecHitCollectionECalUncalEBSrc_Token_
 
edm::InputTag ECalUncalEESrc_
 
edm::EDGetTokenT< EEUncalibratedRecHitCollectionECalUncalEESrc_Token_
 
edm::EDGetTokenT< CrossingFrame< PCaloHit > > EEHits_Token_
 
edm::EDGetTokenT< CrossingFrame< PCaloHit > > ESHits_Token_
 
std::string fName
 
int frequency
 
bool getAllProvenances
 
edm::GetterOfProducts< edm::SortedCollection< HBHERecHit, edm::StrictWeakOrdering< HBHERecHit > > > HBHERecHitgetter_
 
edm::InputTag HCalSrc_
 
edm::EDGetTokenT< edm::PCaloHitContainerHCalSrc_Token_
 
edm::GetterOfProducts< edm::SortedCollection< HFRecHit, edm::StrictWeakOrdering< HFRecHit > > > HFRecHitgetter_
 
std::string hitsProducer
 
edm::GetterOfProducts< edm::SortedCollection< HORecHit, edm::StrictWeakOrdering< HORecHit > > > HORecHitgetter_
 
std::string label
 
std::vector< PSimHitmatched
 
MonitorElementmehCSCn
 
MonitorElementmehCSCResRDPhi
 
MonitorElementmehDtMuonn
 
MonitorElementmehDtMuonRes
 
MonitorElementmehEcaln [3]
 
MonitorElementmehEcalRes [3]
 
MonitorElementmehHcaln [4]
 
MonitorElementmehHcalRes [4]
 
MonitorElementmehRPCn
 
MonitorElementmehRPCResX
 
MonitorElementmehSiPixeln [7]
 
MonitorElementmehSiPixelResX [7]
 
MonitorElementmehSiPixelResY [7]
 
MonitorElementmehSiStripn [19]
 
MonitorElementmehSiStripResX [19]
 
MonitorElementmehSiStripResY [19]
 
edm::EDGetTokenT< CrossingFrame< PSimHit > > MuCSCHits_Token_
 
edm::InputTag MuCSCSrc_
 
edm::EDGetTokenT< CSCRecHit2DCollectionMuCSCSrc_Token_
 
edm::InputTag MuDTSimSrc_
 
edm::EDGetTokenT< edm::PSimHitContainerMuDTSimSrc_Token_
 
edm::InputTag MuDTSrc_
 
edm::EDGetTokenT< DTRecHitCollectionMuDTSrc_Token_
 
edm::InputTag MuRPCSimSrc_
 
edm::EDGetTokenT< edm::PSimHitContainerMuRPCSimSrc_Token_
 
edm::InputTag MuRPCSrc_
 
edm::EDGetTokenT< RPCRecHitCollectionMuRPCSrc_Token_
 
bool printProvenanceInfo
 
edm::ESGetToken< RPCGeometry, MuonGeometryRecordrpcGeomToken_
 
edm::InputTag SiPxlSrc_
 
edm::EDGetTokenT< SiPixelRecHitCollectionSiPxlSrc_Token_
 
edm::InputTag SiStripSrc_
 
edm::EDGetTokenT< SiStripMatchedRecHit2DCollectionSiStripSrc_Token_
 
edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecordtGeomToken_
 
std::map< int, edm::PSimHitContainertheMap
 
TrackerHitAssociator::Config trackerHitAssociatorConfig_
 
edm::ESGetToken< TrackerTopology, TrackerTopologyRcdtTopoToken_
 
int verbosity
 

Additional Inherited Members

- Static Public Member Functions inherited from DQMEDAnalyzer
static void globalEndJob (DQMEDAnalyzerGlobalCache const *)
 
static void globalEndLuminosityBlockProduce (edm::LuminosityBlock &lumi, edm::EventSetup const &setup, LuminosityBlockContext const *context)
 
static void globalEndRunProduce (edm::Run &run, edm::EventSetup const &setup, RunContext const *context)
 
static std::unique_ptr< DQMEDAnalyzerGlobalCacheinitializeGlobalCache (edm::ParameterSet const &)
 
- Protected Attributes inherited from DQMEDAnalyzer
edm::EDPutTokenT< DQMTokenlumiToken_
 
edm::EDPutTokenT< DQMTokenrunToken_
 
unsigned int streamId_
 

Detailed Description

Definition at line 143 of file GlobalRecHitsAnalyzer.h.

Member Typedef Documentation

◆ MapType

typedef std::map<uint32_t, float, std::less<uint32_t> > GlobalRecHitsAnalyzer::MapType

Definition at line 145 of file GlobalRecHitsAnalyzer.h.

Constructor & Destructor Documentation

◆ GlobalRecHitsAnalyzer()

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

Definition at line 18 of file GlobalRecHitsAnalyzer.cc.

References EBHits_Token_, ECalEBSrc_, ECalEBSrc_Token_, ECalEESrc_, ECalEESrc_Token_, ECalESSrc_, ECalESSrc_Token_, ECalUncalEBSrc_, ECalUncalEBSrc_Token_, ECalUncalEESrc_, ECalUncalEESrc_Token_, EEHits_Token_, ESHits_Token_, fName, frequency, getAllProvenances, edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), HBHERecHitgetter_, HCalSrc_, HCalSrc_Token_, HFRecHitgetter_, hitsProducer, HORecHitgetter_, ProducerED_cfi::InputTag, edm::InputTag::instance(), edm::BranchDescription::isAnyAlias(), edm::InputTag::label(), MuCSCHits_Token_, MuCSCSrc_, MuCSCSrc_Token_, MuDTSimSrc_, MuDTSimSrc_Token_, MuDTSrc_, MuDTSrc_Token_, MuRPCSimSrc_, MuRPCSimSrc_Token_, MuRPCSrc_, MuRPCSrc_Token_, printProvenanceInfo, SiPxlSrc_, SiPxlSrc_Token_, SiStripSrc_, SiStripSrc_Token_, AlCaHLTBitMon_QueryRunRegistry::string, and verbosity.

19  : fName(""),
20  verbosity(0),
21  frequency(0),
22  label(""),
23  getAllProvenances(false),
24  printProvenanceInfo(false),
25  trackerHitAssociatorConfig_(iPSet, consumesCollector()),
32  count(0) {
34  edm::ProcessMatch("*"), this);
36  edm::ProcessMatch("*"), this);
38  edm::ProcessMatch("*"), this);
39  callWhenNewProductsRegistered([this](edm::BranchDescription const& bd) {
40  // in case of EDAliases, consume only the aliased-for original products
41  if (bd.isAnyAlias())
42  return;
43  this->HBHERecHitgetter_(bd);
44  this->HFRecHitgetter_(bd);
45  this->HORecHitgetter_(bd);
46  });
47  std::string MsgLoggerCat = "GlobalRecHitsAnalyzer_GlobalRecHitsAnalyzer";
48 
49  // get information from parameter set
50  fName = iPSet.getUntrackedParameter<std::string>("Name");
51  verbosity = iPSet.getUntrackedParameter<int>("Verbosity");
52  frequency = iPSet.getUntrackedParameter<int>("Frequency");
53  edm::ParameterSet m_Prov = iPSet.getParameter<edm::ParameterSet>("ProvenanceLookup");
54  getAllProvenances = m_Prov.getUntrackedParameter<bool>("GetAllProvenances");
55  printProvenanceInfo = m_Prov.getUntrackedParameter<bool>("PrintProvenanceInfo");
56  hitsProducer = iPSet.getParameter<std::string>("hitsProducer");
57 
58  //get Labels to use to extract information
59  ECalEBSrc_ = iPSet.getParameter<edm::InputTag>("ECalEBSrc");
60  ECalUncalEBSrc_ = iPSet.getParameter<edm::InputTag>("ECalUncalEBSrc");
61  ECalEESrc_ = iPSet.getParameter<edm::InputTag>("ECalEESrc");
62  ECalUncalEESrc_ = iPSet.getParameter<edm::InputTag>("ECalUncalEESrc");
63  ECalESSrc_ = iPSet.getParameter<edm::InputTag>("ECalESSrc");
64  HCalSrc_ = iPSet.getParameter<edm::InputTag>("HCalSrc");
65  SiStripSrc_ = iPSet.getParameter<edm::InputTag>("SiStripSrc");
66  SiPxlSrc_ = iPSet.getParameter<edm::InputTag>("SiPxlSrc");
67  MuDTSrc_ = iPSet.getParameter<edm::InputTag>("MuDTSrc");
68  MuDTSimSrc_ = iPSet.getParameter<edm::InputTag>("MuDTSimSrc");
69  MuCSCSrc_ = iPSet.getParameter<edm::InputTag>("MuCSCSrc");
70  MuRPCSrc_ = iPSet.getParameter<edm::InputTag>("MuRPCSrc");
71  MuRPCSimSrc_ = iPSet.getParameter<edm::InputTag>("MuRPCSimSrc");
72 
73  // fix for consumes
74  ECalUncalEBSrc_Token_ = consumes<EBUncalibratedRecHitCollection>(iPSet.getParameter<edm::InputTag>("ECalUncalEBSrc"));
75  ECalUncalEESrc_Token_ = consumes<EEUncalibratedRecHitCollection>(iPSet.getParameter<edm::InputTag>("ECalUncalEESrc"));
76  ECalEBSrc_Token_ = consumes<EBRecHitCollection>(iPSet.getParameter<edm::InputTag>("ECalEBSrc"));
77  ECalEESrc_Token_ = consumes<EERecHitCollection>(iPSet.getParameter<edm::InputTag>("ECalEESrc"));
78  ECalESSrc_Token_ = consumes<ESRecHitCollection>(iPSet.getParameter<edm::InputTag>("ECalESSrc"));
79  HCalSrc_Token_ = consumes<edm::PCaloHitContainer>(iPSet.getParameter<edm::InputTag>("HCalSrc"));
80  SiStripSrc_Token_ = consumes<SiStripMatchedRecHit2DCollection>(iPSet.getParameter<edm::InputTag>("SiStripSrc"));
81  SiPxlSrc_Token_ = consumes<SiPixelRecHitCollection>(iPSet.getParameter<edm::InputTag>("SiPxlSrc"));
82 
83  MuDTSrc_Token_ = consumes<DTRecHitCollection>(iPSet.getParameter<edm::InputTag>("MuDTSrc"));
84  MuDTSimSrc_Token_ = consumes<edm::PSimHitContainer>(iPSet.getParameter<edm::InputTag>("MuDTSimSrc"));
85 
86  MuCSCSrc_Token_ = consumes<CSCRecHit2DCollection>(iPSet.getParameter<edm::InputTag>("MuCSCSrc"));
87  MuCSCHits_Token_ = consumes<CrossingFrame<PSimHit>>(
88  edm::InputTag(std::string("mix"), iPSet.getParameter<std::string>("hitsProducer") + std::string("MuonCSCHits")));
89 
90  MuRPCSrc_Token_ = consumes<RPCRecHitCollection>(iPSet.getParameter<edm::InputTag>("MuRPCSrc"));
91  MuRPCSimSrc_Token_ = consumes<edm::PSimHitContainer>(iPSet.getParameter<edm::InputTag>("MuRPCSimSrc"));
92 
93  EBHits_Token_ = consumes<CrossingFrame<PCaloHit>>(
94  edm::InputTag(std::string("mix"), iPSet.getParameter<std::string>("hitsProducer") + std::string("EcalHitsEB")));
95  EEHits_Token_ = consumes<CrossingFrame<PCaloHit>>(
96  edm::InputTag(std::string("mix"), iPSet.getParameter<std::string>("hitsProducer") + std::string("EcalHitsEE")));
97  ESHits_Token_ = consumes<CrossingFrame<PCaloHit>>(
98  edm::InputTag(std::string("mix"), iPSet.getParameter<std::string>("hitsProducer") + std::string("EcalHitsES")));
99 
100  // use value of first digit to determine default output level (inclusive)
101  // 0 is none, 1 is basic, 2 is fill output, 3 is gather output
102  verbosity %= 10;
103 
104  // create persistent object
105  // produces<PGlobalRecHit>(label);
106 
107  // print out Parameter Set information being used
108  if (verbosity >= 0) {
109  edm::LogInfo(MsgLoggerCat) << "\n===============================\n"
110  << "Initialized as EDProducer with parameter values:\n"
111  << " Name = " << fName << "\n"
112  << " Verbosity = " << verbosity << "\n"
113  << " Frequency = " << frequency << "\n"
114  << " GetProv = " << getAllProvenances << "\n"
115  << " PrintProv = " << printProvenanceInfo << "\n"
116  << " ECalEBSrc = " << ECalEBSrc_.label() << ":" << ECalEBSrc_.instance() << "\n"
117  << " ECalUncalEBSrc = " << ECalUncalEBSrc_.label() << ":"
118  << ECalUncalEBSrc_.instance() << "\n"
119  << " ECalEESrc = " << ECalEESrc_.label() << ":" << ECalUncalEESrc_.instance()
120  << "\n"
121  << " ECalUncalEESrc = " << ECalUncalEESrc_.label() << ":" << ECalEESrc_.instance()
122  << "\n"
123  << " ECalESSrc = " << ECalESSrc_.label() << ":" << ECalESSrc_.instance() << "\n"
124  << " HCalSrc = " << HCalSrc_.label() << ":" << HCalSrc_.instance() << "\n"
125  << " SiStripSrc = " << SiStripSrc_.label() << ":" << SiStripSrc_.instance()
126  << "\n"
127  << " SiPixelSrc = " << SiPxlSrc_.label() << ":" << SiPxlSrc_.instance() << "\n"
128  << " MuDTSrc = " << MuDTSrc_.label() << ":" << MuDTSrc_.instance() << "\n"
129  << " MuDTSimSrc = " << MuDTSimSrc_.label() << ":" << MuDTSimSrc_.instance()
130  << "\n"
131  << " MuCSCSrc = " << MuCSCSrc_.label() << ":" << MuCSCSrc_.instance() << "\n"
132  << " MuRPCSrc = " << MuRPCSrc_.label() << ":" << MuRPCSrc_.instance() << "\n"
133  << " MuRPCSimSrc = " << MuRPCSimSrc_.label() << ":" << MuRPCSimSrc_.instance()
134  << "\n"
135  << "===============================\n";
136  }
137 }
edm::EDGetTokenT< SiPixelRecHitCollection > SiPxlSrc_Token_
ESGetTokenH3DDVariant esConsumes(std::string const &Record, edm::ConsumesCollector &)
Definition: DeDxTools.cc:283
T getParameter(std::string const &) const
Definition: ParameterSet.h:307
edm::ESGetToken< DTGeometry, MuonGeometryRecord > dtGeomToken_
edm::EDGetTokenT< EBRecHitCollection > ECalEBSrc_Token_
edm::GetterOfProducts< edm::SortedCollection< HORecHit, edm::StrictWeakOrdering< HORecHit > > > HORecHitgetter_
edm::EDGetTokenT< ESRecHitCollection > ECalESSrc_Token_
edm::EDGetTokenT< CrossingFrame< PCaloHit > > ESHits_Token_
std::string const & instance() const
Definition: InputTag.h:37
edm::EDGetTokenT< CrossingFrame< PSimHit > > MuCSCHits_Token_
edm::EDGetTokenT< CrossingFrame< PCaloHit > > EEHits_Token_
edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > tGeomToken_
std::string const & label() const
Definition: InputTag.h:36
edm::EDGetTokenT< edm::PSimHitContainer > MuDTSimSrc_Token_
T getUntrackedParameter(std::string const &, T const &) const
edm::ESGetToken< CaloGeometry, CaloGeometryRecord > caloGeomToken_
edm::EDGetTokenT< EBUncalibratedRecHitCollection > ECalUncalEBSrc_Token_
edm::EDGetTokenT< CSCRecHit2DCollection > MuCSCSrc_Token_
edm::EDGetTokenT< RPCRecHitCollection > MuRPCSrc_Token_
edm::GetterOfProducts< edm::SortedCollection< HFRecHit, edm::StrictWeakOrdering< HFRecHit > > > HFRecHitgetter_
Log< level::Info, false > LogInfo
edm::EDGetTokenT< CrossingFrame< PCaloHit > > EBHits_Token_
edm::EDGetTokenT< edm::PCaloHitContainer > HCalSrc_Token_
edm::ESGetToken< CSCGeometry, MuonGeometryRecord > cscGeomToken_
edm::GetterOfProducts< edm::SortedCollection< HBHERecHit, edm::StrictWeakOrdering< HBHERecHit > > > HBHERecHitgetter_
edm::EDGetTokenT< DTRecHitCollection > MuDTSrc_Token_
edm::EDGetTokenT< EEUncalibratedRecHitCollection > ECalUncalEESrc_Token_
edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > tTopoToken_
edm::ESGetToken< RPCGeometry, MuonGeometryRecord > rpcGeomToken_
TrackerHitAssociator::Config trackerHitAssociatorConfig_
edm::EDGetTokenT< edm::PSimHitContainer > MuRPCSimSrc_Token_
edm::EDGetTokenT< EERecHitCollection > ECalEESrc_Token_
edm::EDGetTokenT< SiStripMatchedRecHit2DCollection > SiStripSrc_Token_

◆ ~GlobalRecHitsAnalyzer()

GlobalRecHitsAnalyzer::~GlobalRecHitsAnalyzer ( )
override

Definition at line 139 of file GlobalRecHitsAnalyzer.cc.

139 {}

Member Function Documentation

◆ analyze()

void GlobalRecHitsAnalyzer::analyze ( const edm::Event iEvent,
const edm::EventSetup iSetup 
)
overridevirtual

Reimplemented from DQMEDAnalyzer.

Definition at line 311 of file GlobalRecHitsAnalyzer.cc.

References count, fillECal(), fillHCal(), fillMuon(), fillTrk(), frequency, getAllProvenances, mps_fire::i, iEvent, nevt, printProvenanceInfo, AlCaHLTBitMon_QueryRunRegistry::string, and verbosity.

311  {
312  std::string MsgLoggerCat = "GlobalRecHitsAnalyzer_analyze";
313 
314  // keep track of number of events processed
315  ++count;
316 
317  // get event id information
318  edm::RunNumber_t nrun = iEvent.id().run();
319  edm::EventNumber_t nevt = iEvent.id().event();
320 
321  if (verbosity > 0) {
322  edm::LogInfo(MsgLoggerCat) << "Processing run " << nrun << ", event " << nevt << " (" << count << " events total)";
323  } else if (verbosity == 0) {
324  if (nevt % frequency == 0 || nevt == 1) {
325  edm::LogInfo(MsgLoggerCat) << "Processing run " << nrun << ", event " << nevt << " (" << count
326  << " events total)";
327  }
328  }
329 
330  // look at information available in the event
331  if (getAllProvenances) {
332  std::vector<const edm::StableProvenance*> AllProv;
333  iEvent.getAllStableProvenance(AllProv);
334 
335  if (verbosity >= 0)
336  edm::LogInfo(MsgLoggerCat) << "Number of Provenances = " << AllProv.size();
337 
338  if (printProvenanceInfo && (verbosity >= 0)) {
339  TString eventout("\nProvenance info:\n");
340 
341  for (unsigned int i = 0; i < AllProv.size(); ++i) {
342  eventout += "\n ******************************";
343  eventout += "\n Module : ";
344  eventout += AllProv[i]->moduleLabel();
345  eventout += "\n ProductID : ";
346  eventout += AllProv[i]->productID().id();
347  eventout += "\n ClassName : ";
348  eventout += AllProv[i]->className();
349  eventout += "\n InstanceName : ";
350  eventout += AllProv[i]->productInstanceName();
351  eventout += "\n BranchName : ";
352  eventout += AllProv[i]->branchName();
353  }
354  eventout += "\n ******************************\n";
355  edm::LogInfo(MsgLoggerCat) << eventout << "\n";
356  printProvenanceInfo = false;
357  }
358  getAllProvenances = false;
359  }
360 
361  // call fill functions
362  // gather Ecal information from event
363  fillECal(iEvent, iSetup);
364  // gather Hcal information from event
365  fillHCal(iEvent, iSetup);
366  // gather Track information from event
367  fillTrk(iEvent, iSetup);
368  // gather Muon information from event
369  fillMuon(iEvent, iSetup);
370 
371  if (verbosity > 0)
372  edm::LogInfo(MsgLoggerCat) << "Done gathering data from event.";
373 
374  return;
375 }
void fillMuon(const edm::Event &, const edm::EventSetup &)
unsigned long long EventNumber_t
int iEvent
Definition: GenABIO.cc:224
Log< level::Info, false > LogInfo
void fillTrk(const edm::Event &, const edm::EventSetup &)
void fillECal(const edm::Event &, const edm::EventSetup &)
unsigned int RunNumber_t
void fillHCal(const edm::Event &, const edm::EventSetup &)

◆ bookHistograms()

void GlobalRecHitsAnalyzer::bookHistograms ( DQMStore::IBooker iBooker,
edm::Run const &  ,
edm::EventSetup const &   
)
overrideprotectedvirtual

Implements DQMEDAnalyzer.

Definition at line 141 of file GlobalRecHitsAnalyzer.cc.

References dqm::implementation::IBooker::book1D(), mps_fire::i, dqmiolumiharvest::j, mehCSCn, mehCSCResRDPhi, mehDtMuonn, mehDtMuonRes, mehEcaln, mehEcalRes, mehHcaln, mehHcalRes, mehRPCn, mehRPCResX, mehSiPixeln, mehSiPixelResX, mehSiPixelResY, mehSiStripn, mehSiStripResX, mehSiStripResY, dqm::impl::MonitorElement::setAxisTitle(), and dqm::implementation::NavigatorBase::setCurrentFolder().

141  {
142  // Si Strip
143  string SiStripString[19] = {"TECW1",
144  "TECW2",
145  "TECW3",
146  "TECW4",
147  "TECW5",
148  "TECW6",
149  "TECW7",
150  "TECW8",
151  "TIBL1",
152  "TIBL2",
153  "TIBL3",
154  "TIBL4",
155  "TIDW1",
156  "TIDW2",
157  "TIDW3",
158  "TOBL1",
159  "TOBL2",
160  "TOBL3",
161  "TOBL4"};
162  for (int i = 0; i < 19; ++i) {
163  mehSiStripn[i] = nullptr;
164  mehSiStripResX[i] = nullptr;
165  mehSiStripResY[i] = nullptr;
166  }
167  string hcharname, hchartitle;
168  iBooker.setCurrentFolder("GlobalRecHitsV/SiStrips");
169  for (int amend = 0; amend < 19; ++amend) {
170  hcharname = "hSiStripn_" + SiStripString[amend];
171  hchartitle = SiStripString[amend] + " rechits";
172  mehSiStripn[amend] = iBooker.book1D(hcharname, hchartitle, 200, 0., 200.);
173  mehSiStripn[amend]->setAxisTitle("Number of hits in " + SiStripString[amend], 1);
174  mehSiStripn[amend]->setAxisTitle("Count", 2);
175  hcharname = "hSiStripResX_" + SiStripString[amend];
176  hchartitle = SiStripString[amend] + " rechit x resolution";
177  mehSiStripResX[amend] = iBooker.book1D(hcharname, hchartitle, 200, -0.02, .02);
178  mehSiStripResX[amend]->setAxisTitle("X-resolution in " + SiStripString[amend], 1);
179  mehSiStripResX[amend]->setAxisTitle("Count", 2);
180  hcharname = "hSiStripResY_" + SiStripString[amend];
181  hchartitle = SiStripString[amend] + " rechit y resolution";
182  mehSiStripResY[amend] = iBooker.book1D(hcharname, hchartitle, 200, -0.02, .02);
183  mehSiStripResY[amend]->setAxisTitle("Y-resolution in " + SiStripString[amend], 1);
184  mehSiStripResY[amend]->setAxisTitle("Count", 2);
185  }
186 
187  //HCal
188  //string hcharname, hchartitle;
189  string HCalString[4] = {"HB", "HE", "HF", "HO"};
190  float HCalnUpper[4] = {3000., 3000., 3000., 3000.};
191  float HCalnLower[4] = {0., 0., 0., 0.};
192  for (int j = 0; j < 4; ++j) {
193  mehHcaln[j] = nullptr;
194  mehHcalRes[j] = nullptr;
195  }
196 
197  iBooker.setCurrentFolder("GlobalRecHitsV/HCals");
198  for (int amend = 0; amend < 4; ++amend) {
199  hcharname = "hHcaln_" + HCalString[amend];
200  hchartitle = HCalString[amend] + " rechits";
201  mehHcaln[amend] = iBooker.book1D(hcharname, hchartitle, 1000, HCalnLower[amend], HCalnUpper[amend]);
202  mehHcaln[amend]->setAxisTitle("Number of RecHits", 1);
203  mehHcaln[amend]->setAxisTitle("Count", 2);
204  hcharname = "hHcalRes_" + HCalString[amend];
205  hchartitle = HCalString[amend] + " rechit resolution";
206  mehHcalRes[amend] = iBooker.book1D(hcharname, hchartitle, 25, -2., 2.);
207  mehHcalRes[amend]->setAxisTitle("RecHit E - SimHit E", 1);
208  mehHcalRes[amend]->setAxisTitle("Count", 2);
209  }
210 
211  //Ecal
212  string ECalString[3] = {"EB", "EE", "ES"};
213  int ECalnBins[3] = {1000, 3000, 150};
214  float ECalnUpper[3] = {20000., 62000., 3000.};
215  float ECalnLower[3] = {0., 0., 0.};
216  int ECalResBins[3] = {200, 200, 200};
217  float ECalResUpper[3] = {1., 0.3, .0002};
218  float ECalResLower[3] = {-1., -0.3, -.0002};
219  for (int i = 0; i < 3; ++i) {
220  mehEcaln[i] = nullptr;
221  mehEcalRes[i] = nullptr;
222  }
223  iBooker.setCurrentFolder("GlobalRecHitsV/ECals");
224 
225  for (int amend = 0; amend < 3; ++amend) {
226  hcharname = "hEcaln_" + ECalString[amend];
227  hchartitle = ECalString[amend] + " rechits";
228  mehEcaln[amend] = iBooker.book1D(hcharname, hchartitle, ECalnBins[amend], ECalnLower[amend], ECalnUpper[amend]);
229  mehEcaln[amend]->setAxisTitle("Number of RecHits", 1);
230  mehEcaln[amend]->setAxisTitle("Count", 2);
231  hcharname = "hEcalRes_" + ECalString[amend];
232  hchartitle = ECalString[amend] + " rechit resolution";
233  mehEcalRes[amend] =
234  iBooker.book1D(hcharname, hchartitle, ECalResBins[amend], ECalResLower[amend], ECalResUpper[amend]);
235  mehEcalRes[amend]->setAxisTitle("RecHit E - SimHit E", 1);
236  mehEcalRes[amend]->setAxisTitle("Count", 2);
237  }
238 
239  //Si Pixels
240  string SiPixelString[7] = {"BRL1", "BRL2", "BRL3", "FWD1n", "FWD1p", "FWD2n", "FWD2p"};
241  for (int j = 0; j < 7; ++j) {
242  mehSiPixeln[j] = nullptr;
243  mehSiPixelResX[j] = nullptr;
244  mehSiPixelResY[j] = nullptr;
245  }
246 
247  iBooker.setCurrentFolder("GlobalRecHitsV/SiPixels");
248  for (int amend = 0; amend < 7; ++amend) {
249  hcharname = "hSiPixeln_" + SiPixelString[amend];
250  hchartitle = SiPixelString[amend] + " rechits";
251  mehSiPixeln[amend] = iBooker.book1D(hcharname, hchartitle, 200, 0., 200.);
252  mehSiPixeln[amend]->setAxisTitle("Number of hits in " + SiPixelString[amend], 1);
253  mehSiPixeln[amend]->setAxisTitle("Count", 2);
254  hcharname = "hSiPixelResX_" + SiPixelString[amend];
255  hchartitle = SiPixelString[amend] + " rechit x resolution";
256  mehSiPixelResX[amend] = iBooker.book1D(hcharname, hchartitle, 200, -0.02, .02);
257  mehSiPixelResX[amend]->setAxisTitle("X-resolution in " + SiPixelString[amend], 1);
258  mehSiPixelResX[amend]->setAxisTitle("Count", 2);
259  hcharname = "hSiPixelResY_" + SiPixelString[amend];
260  hchartitle = SiPixelString[amend] + " rechit y resolution";
261 
262  mehSiPixelResY[amend] = iBooker.book1D(hcharname, hchartitle, 200, -0.02, .02);
263  mehSiPixelResY[amend]->setAxisTitle("Y-resolution in " + SiPixelString[amend], 1);
264  mehSiPixelResY[amend]->setAxisTitle("Count", 2);
265  }
266 
267  //Muons
268  iBooker.setCurrentFolder("GlobalRecHitsV/Muons");
269 
270  mehDtMuonn = nullptr;
271  mehCSCn = nullptr;
272  mehRPCn = nullptr;
273 
274  string n_List[3] = {"hDtMuonn", "hCSCn", "hRPCn"};
275  string hist_string[3] = {"Dt", "CSC", "RPC"};
276 
277  for (int amend = 0; amend < 3; ++amend) {
278  hchartitle = hist_string[amend] + " rechits";
279  if (amend == 0) {
280  mehDtMuonn = iBooker.book1D(n_List[amend], hchartitle, 50, 0., 500.);
281  mehDtMuonn->setAxisTitle("Number of Rechits", 1);
282  mehDtMuonn->setAxisTitle("Count", 2);
283  }
284  if (amend == 1) {
285  mehCSCn = iBooker.book1D(n_List[amend], hchartitle, 50, 0., 500.);
286  mehCSCn->setAxisTitle("Number of Rechits", 1);
287  mehCSCn->setAxisTitle("Count", 2);
288  }
289  if (amend == 2) {
290  mehRPCn = iBooker.book1D(n_List[amend], hchartitle, 50, 0., 500.);
291  mehRPCn->setAxisTitle("Number of Rechits", 1);
292  mehRPCn->setAxisTitle("Count", 2);
293  }
294  }
295 
296  mehDtMuonRes = nullptr;
297  mehCSCResRDPhi = nullptr;
298  mehRPCResX = nullptr;
299 
300  hcharname = "hDtMuonRes";
301  hchartitle = "DT wire distance resolution";
302  mehDtMuonRes = iBooker.book1D(hcharname, hchartitle, 200, -0.2, 0.2);
303  hcharname = "CSCResRDPhi";
304  hchartitle = "CSC perp*dphi resolution";
305  mehCSCResRDPhi = iBooker.book1D(hcharname, hchartitle, 200, -0.2, 0.2);
306  hcharname = "hRPCResX";
307  hchartitle = "RPC rechits x resolution";
308  mehRPCResX = iBooker.book1D(hcharname, hchartitle, 50, -5., 5.);
309 }
MonitorElement * mehCSCResRDPhi
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:36
MonitorElement * mehHcalRes[4]
MonitorElement * mehEcalRes[3]
MonitorElement * mehSiStripn[19]
MonitorElement * mehSiPixelResX[7]
MonitorElement * mehEcaln[3]
MonitorElement * mehSiPixelResY[7]
MonitorElement * mehSiStripResY[19]
MonitorElement * mehSiPixeln[7]
MonitorElement * mehHcaln[4]
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
Definition: DQMStore.h:98
MonitorElement * mehSiStripResX[19]
virtual void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)

◆ compute()

template<typename type >
int GlobalRecHitsAnalyzer::compute ( const DTGeometry dtGeom,
const std::map< DTWireId, std::vector< PSimHit >> &  simHitsPerWire,
const std::map< DTWireId, std::vector< type >> &  recHitsPerWire,
int  step 
)
private

Definition at line 1355 of file GlobalRecHitsAnalyzer.cc.

References dqm::impl::MonitorElement::Fill(), findBestRecHit(), DTHitQualityUtils::findMuSimHit(), nano_mu_digi_cff::layer, DTGeometry::layer(), genParticles_cff::map, mehDtMuonRes, recHitDistFromWire(), FastTrackerRecHitMaskProducer_cfi::recHits, and simHitDistFromWire().

Referenced by fillMuon().

1358  {
1359  std::map<DTWireId, std::vector<PSimHit>> simHitsPerWire = _simHitsPerWire;
1360  std::map<DTWireId, std::vector<type>> recHitsPerWire = _recHitsPerWire;
1361  int nDt = 0;
1362  // Loop over cells with a muon SimHit
1363  for (std::map<DTWireId, std::vector<PSimHit>>::const_iterator wireAndSHits = simHitsPerWire.begin();
1364  wireAndSHits != simHitsPerWire.end();
1365  wireAndSHits++) {
1366  DTWireId wireId = (*wireAndSHits).first;
1367  std::vector<PSimHit> simHitsInCell = (*wireAndSHits).second;
1368 
1369  // Get the layer
1370  const DTLayer* layer = dtGeom->layer(wireId);
1371 
1372  // Look for a mu hit in the cell
1373  const PSimHit* muSimHit = DTHitQualityUtils::findMuSimHit(simHitsInCell);
1374  if (muSimHit == nullptr) {
1375  continue; // Skip this cell
1376  }
1377 
1378  // Find the distance of the simhit from the wire
1379  float simHitWireDist = simHitDistFromWire(layer, wireId, *muSimHit);
1380  // Skip simhits out of the cell
1381  if (simHitWireDist > 2.1) {
1382  continue; // Skip this cell
1383  }
1384 
1385  // Look for RecHits in the same cell
1386  if (recHitsPerWire.find(wireId) == recHitsPerWire.end()) {
1387  continue; // No RecHit found in this cell
1388  } else {
1389  std::vector<type> recHits = recHitsPerWire[wireId];
1390 
1391  // Find the best RecHit
1392  const type* theBestRecHit = findBestRecHit(layer, wireId, recHits, simHitWireDist);
1393 
1394  float recHitWireDist = recHitDistFromWire(*theBestRecHit, layer);
1395 
1396  ++nDt;
1397 
1398  mehDtMuonRes->Fill(recHitWireDist - simHitWireDist);
1399 
1400  } // find rechits
1401  } // loop over simhits
1402 
1403  return nDt;
1404 }
float recHitDistFromWire(const DTRecHit1DPair &hitPair, const DTLayer *layer)
float simHitDistFromWire(const DTLayer *layer, DTWireId wireId, const PSimHit &hit)
void Fill(long long x)
const type * findBestRecHit(const DTLayer *layer, DTWireId wireId, const std::vector< type > &recHits, const float simHitDist)
const PSimHit * findMuSimHit(const edm::PSimHitContainer &hits)
Select the SimHit from a muon in a vector of SimHits.
const DTLayer * layer(const DTLayerId &id) const
Return a layer given its id.
Definition: DTGeometry.cc:96

◆ fillECal()

void GlobalRecHitsAnalyzer::fillECal ( const edm::Event iEvent,
const edm::EventSetup iSetup 
)
private

Definition at line 377 of file GlobalRecHitsAnalyzer.cc.

References HLT_2023v12_cff::barrelHits, edm::SortedCollection< T, SORT >::begin(), EBHits_Token_, CollectionTags_cfi::EBRecHit, CollectionTags_cfi::EBUncalibRecHit, ECalEBSrc_Token_, ECalEESrc_Token_, ECalESSrc_Token_, ECalUncalEBSrc_Token_, ECalUncalEESrc_Token_, EEHits_Token_, CollectionTags_cfi::EERecHit, CollectionTags_cfi::EEUncalibRecHit, edm::SortedCollection< T, SORT >::end(), HLT_2023v12_cff::endcapHits, ESHits_Token_, dqm::impl::MonitorElement::Fill(), iEvent, edm::HandleBase::isValid(), LogDebug, mehEcaln, mehEcalRes, gedPhotons_cfi::preshowerHits, edm::Handle< T >::product(), DetId::rawId(), rpcPointValidation_cfi::recHit, AlCaHLTBitMon_QueryRunRegistry::string, and verbosity.

Referenced by analyze().

377  {
378  std::string MsgLoggerCat = "GlobalRecHitsAnalyzer_fillECal";
379 
380  TString eventout;
381  if (verbosity > 0)
382  eventout = "\nGathering info:";
383 
384  // extract crossing frame from event
386 
388  //extract EB information
391  iEvent.getByToken(ECalUncalEBSrc_Token_, EcalUncalibRecHitEB);
392  bool validUncalibRecHitEB = EcalUncalibRecHitEB.isValid();
393  if (!validUncalibRecHitEB) {
394  LogDebug(MsgLoggerCat) << "Unable to find EcalUncalRecHitEB in event!";
395  }
396 
397  edm::Handle<EBRecHitCollection> EcalRecHitEB;
398  iEvent.getByToken(ECalEBSrc_Token_, EcalRecHitEB);
399  bool validRecHitEB = EcalRecHitEB.isValid();
400  if (!validRecHitEB) {
401  LogDebug(MsgLoggerCat) << "Unable to find EcalRecHitEB in event!";
402  }
403 
404  // loop over simhits
405  iEvent.getByToken(EBHits_Token_, crossingFrame);
406  bool validXFrame = crossingFrame.isValid();
407  if (!validXFrame) {
408  LogDebug(MsgLoggerCat) << "Unable to find cal barrel crossingFrame in event!";
409  }
410 
411  MapType ebSimMap;
412  if (validXFrame) {
413  const MixCollection<PCaloHit> barrelHits(crossingFrame.product());
414  // keep track of sum of simhit energy in each crystal
415  for (auto const& iHit : barrelHits) {
416  EBDetId ebid = EBDetId(iHit.id());
417 
418  uint32_t crystid = ebid.rawId();
419  ebSimMap[crystid] += iHit.energy();
420  }
421  }
422 
423  int nEBRecHits = 0;
424  // loop over RecHits
425  if (validUncalibRecHitEB && validRecHitEB) {
426  const EBUncalibratedRecHitCollection* EBUncalibRecHit = EcalUncalibRecHitEB.product();
427  const EBRecHitCollection* EBRecHit = EcalRecHitEB.product();
428 
430  uncalibRecHit != EBUncalibRecHit->end();
431  ++uncalibRecHit) {
432  EBDetId EBid = EBDetId(uncalibRecHit->id());
433 
434  EcalRecHitCollection::const_iterator myRecHit = EBRecHit->find(EBid);
435 
436  if (myRecHit != EBRecHit->end()) {
437  ++nEBRecHits;
438  mehEcalRes[1]->Fill(myRecHit->energy() - ebSimMap[EBid.rawId()]);
439  }
440  }
441 
442  if (verbosity > 1) {
443  eventout += "\n Number of EBRecHits collected:............ ";
444  eventout += nEBRecHits;
445  }
446  mehEcaln[1]->Fill((float)nEBRecHits);
447  }
448 
450  //extract EE information
453  iEvent.getByToken(ECalUncalEESrc_Token_, EcalUncalibRecHitEE);
454  bool validuncalibRecHitEE = EcalUncalibRecHitEE.isValid();
455  if (!validuncalibRecHitEE) {
456  LogDebug(MsgLoggerCat) << "Unable to find EcalUncalRecHitEE in event!";
457  }
458 
459  edm::Handle<EERecHitCollection> EcalRecHitEE;
460  iEvent.getByToken(ECalEESrc_Token_, EcalRecHitEE);
461  bool validRecHitEE = EcalRecHitEE.isValid();
462  if (!validRecHitEE) {
463  LogDebug(MsgLoggerCat) << "Unable to find EcalRecHitEE in event!";
464  }
465 
466  // loop over simhits
467  iEvent.getByToken(EEHits_Token_, crossingFrame);
468  validXFrame = crossingFrame.isValid();
469  if (!validXFrame) {
470  LogDebug(MsgLoggerCat) << "Unable to find cal endcap crossingFrame in event!";
471  }
472 
473  MapType eeSimMap;
474  if (validXFrame) {
475  const MixCollection<PCaloHit> endcapHits(crossingFrame.product());
476  // keep track of sum of simhit energy in each crystal
477  for (auto const& iHit : endcapHits) {
478  EEDetId eeid = EEDetId(iHit.id());
479 
480  uint32_t crystid = eeid.rawId();
481  eeSimMap[crystid] += iHit.energy();
482  }
483  }
484 
485  int nEERecHits = 0;
486  if (validuncalibRecHitEE && validRecHitEE) {
487  // loop over RecHits
488  const EEUncalibratedRecHitCollection* EEUncalibRecHit = EcalUncalibRecHitEE.product();
489  const EERecHitCollection* EERecHit = EcalRecHitEE.product();
490 
492  uncalibRecHit != EEUncalibRecHit->end();
493  ++uncalibRecHit) {
494  EEDetId EEid = EEDetId(uncalibRecHit->id());
495 
496  EcalRecHitCollection::const_iterator myRecHit = EERecHit->find(EEid);
497 
498  if (myRecHit != EERecHit->end()) {
499  ++nEERecHits;
500  mehEcalRes[0]->Fill(myRecHit->energy() - eeSimMap[EEid.rawId()]);
501  }
502  }
503 
504  if (verbosity > 1) {
505  eventout += "\n Number of EERecHits collected:............ ";
506  eventout += nEERecHits;
507  }
508  mehEcaln[0]->Fill((float)nEERecHits);
509  }
510 
512  //extract ES information
514  edm::Handle<ESRecHitCollection> EcalRecHitES;
515  iEvent.getByToken(ECalESSrc_Token_, EcalRecHitES);
516  bool validRecHitES = EcalRecHitES.isValid();
517  if (!validRecHitES) {
518  LogDebug(MsgLoggerCat) << "Unable to find EcalRecHitES in event!";
519  }
520 
521  // loop over simhits
522  iEvent.getByToken(ESHits_Token_, crossingFrame);
523  validXFrame = crossingFrame.isValid();
524  if (!validXFrame) {
525  LogDebug(MsgLoggerCat) << "Unable to find cal preshower crossingFrame in event!";
526  }
527 
528  MapType esSimMap;
529  if (validXFrame) {
530  const MixCollection<PCaloHit> preshowerHits(crossingFrame.product());
531  // keep track of sum of simhit energy in each crystal
532  for (auto const& iHit : preshowerHits) {
533  ESDetId esid = ESDetId(iHit.id());
534 
535  uint32_t crystid = esid.rawId();
536  esSimMap[crystid] += iHit.energy();
537  }
538  }
539 
540  int nESRecHits = 0;
541  if (validRecHitES) {
542  // loop over RecHits
543  const ESRecHitCollection* ESRecHit = EcalRecHitES.product();
544  for (EcalRecHitCollection::const_iterator recHit = ESRecHit->begin(); recHit != ESRecHit->end(); ++recHit) {
545  ESDetId ESid = ESDetId(recHit->id());
546 
547  ++nESRecHits;
548  mehEcalRes[2]->Fill(recHit->energy() - esSimMap[ESid.rawId()]);
549  }
550 
551  if (verbosity > 1) {
552  eventout += "\n Number of ESRecHits collected:............ ";
553  eventout += nESRecHits;
554  }
555  mehEcaln[2]->Fill(float(nESRecHits));
556  }
557 
558  if (verbosity > 0)
559  edm::LogInfo(MsgLoggerCat) << eventout << "\n";
560 
561  return;
562 }
edm::EDGetTokenT< EBRecHitCollection > ECalEBSrc_Token_
edm::EDGetTokenT< ESRecHitCollection > ECalESSrc_Token_
edm::EDGetTokenT< CrossingFrame< PCaloHit > > ESHits_Token_
T const * product() const
Definition: Handle.h:70
std::vector< T >::const_iterator const_iterator
edm::EDGetTokenT< CrossingFrame< PCaloHit > > EEHits_Token_
MonitorElement * mehEcalRes[3]
void Fill(long long x)
int iEvent
Definition: GenABIO.cc:224
edm::EDGetTokenT< EBUncalibratedRecHitCollection > ECalUncalEBSrc_Token_
MonitorElement * mehEcaln[3]
const_iterator begin() const
const_iterator end() const
Log< level::Info, false > LogInfo
std::map< uint32_t, float, std::less< uint32_t > > MapType
edm::EDGetTokenT< CrossingFrame< PCaloHit > > EBHits_Token_
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
bool isValid() const
Definition: HandleBase.h:70
edm::EDGetTokenT< EEUncalibratedRecHitCollection > ECalUncalEESrc_Token_
edm::EDGetTokenT< EERecHitCollection > ECalEESrc_Token_
#define LogDebug(id)

◆ fillHCal()

void GlobalRecHitsAnalyzer::fillHCal ( const edm::Event iEvent,
const edm::EventSetup iSetup 
)
private

Definition at line 564 of file GlobalRecHitsAnalyzer.cc.

References caloGeomToken_, hcalRecHitTable_cff::detId, dqm::impl::MonitorElement::Fill(), edm::GetterOfProducts< T >::fillHandles(), edm::EventSetup::getHandle(), photonIsolationHIProducer_cfi::hbhe, HBHERecHitgetter_, HCalSrc_Token_, photonIsolationHIProducer_cfi::hf, HFRecHitgetter_, photonIsolationHIProducer_cfi::ho, HORecHitgetter_, iEvent, edm::HandleBase::isValid(), LogDebug, mehHcaln, mehHcalRes, edm::Handle< T >::product(), sdHcalBrl, sdHcalEC, sdHcalFwd, sdHcalOut, HLTBitAnalyser_cfi::simhits, AlCaHLTBitMon_QueryRunRegistry::string, and verbosity.

Referenced by analyze().

564  {
565  std::string MsgLoggerCat = "GlobalRecHitsAnalyzer_fillHCal";
566 
567  TString eventout;
568  if (verbosity > 0)
569  eventout = "\nGathering info:";
570 
571  // get geometry
572  const auto& geometry = iSetup.getHandle(caloGeomToken_);
573  if (!geometry.isValid()) {
574  edm::LogWarning(MsgLoggerCat) << "Unable to find CaloGeometry in event!";
575  return;
576  }
577 
579  // extract simhit info
582  iEvent.getByToken(HCalSrc_Token_, hcalHits);
583  bool validhcalHits = hcalHits.isValid();
584  if (!validhcalHits) {
585  LogDebug(MsgLoggerCat) << "Unable to find hcalHits in event!";
586  }
587 
588  std::map<HcalDetId, float> fHBEnergySimHits;
589  std::map<HcalDetId, float> fHEEnergySimHits;
590  std::map<HcalDetId, float> fHOEnergySimHits;
591  std::map<HcalDetId, float> fHFEnergySimHits;
592  if (validhcalHits) {
593  const edm::PCaloHitContainer* simhitResult = hcalHits.product();
594 
595  for (std::vector<PCaloHit>::const_iterator simhits = simhitResult->begin(); simhits != simhitResult->end();
596  ++simhits) {
597  HcalDetId detId(simhits->id());
598 
599  if (detId.subdet() == sdHcalBrl) {
600  fHBEnergySimHits[detId] += simhits->energy();
601  }
602  if (detId.subdet() == sdHcalEC) {
603  fHEEnergySimHits[detId] += simhits->energy();
604  }
605  if (detId.subdet() == sdHcalOut) {
606  fHOEnergySimHits[detId] += simhits->energy();
607  }
608  if (detId.subdet() == sdHcalFwd) {
609  fHFEnergySimHits[detId] += simhits->energy();
610  }
611  }
612  }
613 
615  // get HBHE information
617  std::vector<edm::Handle<HBHERecHitCollection>> hbhe;
619  bool validHBHE = hbhe[0].isValid();
620 
621  if (!validHBHE) {
622  LogDebug(MsgLoggerCat) << "Unable to find any HBHERecHitCollections in event!";
623  }
624 
625  else {
626  std::vector<edm::Handle<HBHERecHitCollection>>::iterator ihbhe;
627  int iHB = 0;
628  int iHE = 0;
629  for (ihbhe = hbhe.begin(); ihbhe != hbhe.end(); ++ihbhe) {
630  for (HBHERecHitCollection::const_iterator jhbhe = (*ihbhe)->begin(); jhbhe != (*ihbhe)->end(); ++jhbhe) {
631  HcalDetId cell(jhbhe->id());
632 
633  if (cell.subdet() == sdHcalBrl) {
634  ++iHB;
635  mehHcalRes[0]->Fill(jhbhe->energy() - fHBEnergySimHits[cell]);
636  }
637 
638  else if (cell.subdet() == sdHcalEC) {
639  ++iHE;
640  mehHcalRes[1]->Fill(jhbhe->energy() - fHEEnergySimHits[cell]);
641  }
642  }
643  } // end loop through collection
644 
645  if (verbosity > 1) {
646  eventout += "\n Number of HBRecHits collected:............ ";
647  eventout += iHB;
648  }
649 
650  if (verbosity > 1) {
651  eventout += "\n Number of HERecHits collected:............ ";
652  eventout += iHE;
653  }
654  mehHcaln[0]->Fill((float)iHB);
655  mehHcaln[1]->Fill((float)iHE);
656  }
657 
659  // get HF information
661  std::vector<edm::Handle<HFRecHitCollection>> hf;
663  bool validHF = hf[0].isValid();
664  if (!validHF) {
665  LogDebug(MsgLoggerCat) << "Unable to find any HFRecHitCollections in event!";
666  } else {
667  std::vector<edm::Handle<HFRecHitCollection>>::iterator ihf;
668 
669  int iHF = 0;
670  for (ihf = hf.begin(); ihf != hf.end(); ++ihf) {
671  for (HFRecHitCollection::const_iterator jhf = (*ihf)->begin(); jhf != (*ihf)->end(); ++jhf) {
672  HcalDetId cell(jhf->id());
673 
674  if (cell.subdet() == sdHcalFwd) {
675  ++iHF;
676  mehHcalRes[2]->Fill(jhf->energy() - fHFEnergySimHits[cell]);
677  }
678  }
679  } // end loop through collection
680 
681  if (verbosity > 1) {
682  eventout += "\n Number of HFDigis collected:.............. ";
683  eventout += iHF;
684  }
685  mehHcaln[2]->Fill((float)iHF);
686  }
687 
689  // get HO information
691  std::vector<edm::Handle<HORecHitCollection>> ho;
693  bool validHO = ho[0].isValid();
694  if (!validHO) {
695  LogDebug(MsgLoggerCat) << "Unable to find any HORecHitCollections in event!";
696  } else {
697  std::vector<edm::Handle<HORecHitCollection>>::iterator iho;
698 
699  int iHO = 0;
700  for (iho = ho.begin(); iho != ho.end(); ++iho) {
701  for (HORecHitCollection::const_iterator jho = (*iho)->begin(); jho != (*iho)->end(); ++jho) {
702  HcalDetId cell(jho->id());
703 
704  if (cell.subdet() == sdHcalOut) {
705  ++iHO;
706  mehHcalRes[3]->Fill(jho->energy() - fHOEnergySimHits[cell]);
707  }
708  }
709  } // end loop through collection
710 
711  if (verbosity > 1) {
712  eventout += "\n Number of HODigis collected:.............. ";
713  eventout += iHO;
714  }
715  mehHcaln[3]->Fill((float)iHO);
716  }
717 
718  if (verbosity > 0)
719  edm::LogInfo(MsgLoggerCat) << eventout << "\n";
720 
721  return;
722 }
std::vector< PCaloHit > PCaloHitContainer
static const int sdHcalOut
edm::GetterOfProducts< edm::SortedCollection< HORecHit, edm::StrictWeakOrdering< HORecHit > > > HORecHitgetter_
MonitorElement * mehHcalRes[4]
T const * product() const
Definition: Handle.h:70
std::vector< T >::const_iterator const_iterator
void Fill(long long x)
edm::ESGetToken< CaloGeometry, CaloGeometryRecord > caloGeomToken_
int iEvent
Definition: GenABIO.cc:224
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
Definition: EventSetup.h:130
void fillHandles(ProductContainer const &productContainer, std::vector< edm::Handle< T >> &handles) const
edm::GetterOfProducts< edm::SortedCollection< HFRecHit, edm::StrictWeakOrdering< HFRecHit > > > HFRecHitgetter_
Log< level::Info, false > LogInfo
edm::EDGetTokenT< edm::PCaloHitContainer > HCalSrc_Token_
static const int sdHcalFwd
edm::GetterOfProducts< edm::SortedCollection< HBHERecHit, edm::StrictWeakOrdering< HBHERecHit > > > HBHERecHitgetter_
static const int sdHcalBrl
bool isValid() const
Definition: HandleBase.h:70
MonitorElement * mehHcaln[4]
Log< level::Warning, false > LogWarning
static const int sdHcalEC
#define LogDebug(id)

◆ fillMuon()

void GlobalRecHitsAnalyzer::fillMuon ( const edm::Event iEvent,
const edm::EventSetup iSetup 
)
private

Definition at line 1072 of file GlobalRecHitsAnalyzer.cc.

References nano_mu_digi_cff::chamberType, compute(), cscGeomToken_, hcalRecHitTable_cff::detId, dtGeomToken_, dqm::impl::MonitorElement::Fill(), edm::EventSetup::getHandle(), mps_fire::i, CSCGeometry::idToDetUnit(), iEvent, edm::HandleBase::isValid(), nano_mu_digi_cff::layer, LogDebug, map1DRecHitsPerWire(), DTHitQualityUtils::mapSimHitsPerWire(), mehCSCn, mehDtMuonn, mehRPCn, mehRPCResX, MuCSCHits_Token_, MuCSCSrc_Token_, MuDTSimSrc_Token_, MuDTSrc_Token_, MuRPCSimSrc_Token_, MuRPCSrc_Token_, plotResolution(), edm::Handle< T >::product(), OfflineHarvestingSequence_cosmic::ptype, alignCSCRings::r, rpcPointValidation_cfi::recHit, nano_mu_digi_cff::roll, rpcGeomToken_, rpcPointValidation_cfi::simHit, FastTrackerRecHitCombiner_cfi::simHits, AlCaHLTBitMon_QueryRunRegistry::string, theMap, verbosity, and PV3DBase< T, PVType, FrameType >::x().

Referenced by analyze().

1072  {
1073  std::string MsgLoggerCat = "GlobalRecHitsAnalyzer_fillMuon";
1074 
1075  TString eventout;
1076  if (verbosity > 0)
1077  eventout = "\nGathering info:";
1078 
1079  // get DT information
1080  const auto& dtGeom = iSetup.getHandle(dtGeomToken_);
1081  if (!dtGeom.isValid()) {
1082  edm::LogWarning(MsgLoggerCat) << "Unable to find DTMuonGeometryRecord in event!";
1083  return;
1084  }
1085 
1087  iEvent.getByToken(MuDTSimSrc_Token_, dtsimHits);
1088  bool validdtsim = dtsimHits.isValid();
1089  if (!validdtsim) {
1090  LogDebug(MsgLoggerCat) << "Unable to find dtsimHits in event!";
1091  }
1092 
1094  iEvent.getByToken(MuDTSrc_Token_, dtRecHits);
1095  bool validdtrec = dtRecHits.isValid();
1096  if (!validdtrec) {
1097  LogDebug(MsgLoggerCat) << "Unable to find dtRecHits in event!";
1098  }
1099 
1100  if (validdtsim && validdtrec) {
1101  std::map<DTWireId, edm::PSimHitContainer> simHitsPerWire =
1103 
1104  std::map<DTWireId, std::vector<DTRecHit1DPair>> recHitsPerWire = map1DRecHitsPerWire(dtRecHits.product());
1105 
1106  int nDt = compute(dtGeom.product(), simHitsPerWire, recHitsPerWire, 1);
1107 
1108  if (verbosity > 1) {
1109  eventout += "\n Number of DtMuonRecHits collected:........ ";
1110  eventout += nDt;
1111  }
1112  mehDtMuonn->Fill(float(nDt));
1113  }
1114 
1115  // get CSC Strip information
1116  // get map of sim hits
1117  theMap.clear();
1119 
1120  iEvent.getByToken(MuCSCHits_Token_, cf);
1121  bool validXFrame = cf.isValid();
1122  if (!validXFrame) {
1123  LogDebug(MsgLoggerCat) << "Unable to find muo CSC crossingFrame in event!";
1124  } else {
1126 
1127  // arrange the hits by detUnit
1128  for (auto const& iHit : simHits) {
1129  theMap[iHit.detUnitId()].push_back(iHit);
1130  }
1131  }
1132 
1133  // get geometry
1134  const auto& hGeom = iSetup.getHandle(cscGeomToken_);
1135  if (!hGeom.isValid()) {
1136  edm::LogWarning(MsgLoggerCat) << "Unable to find CSCMuonGeometryRecord in event!";
1137  return;
1138  }
1139  const CSCGeometry* theCSCGeometry = &*hGeom;
1140 
1141  // get rechits
1143  iEvent.getByToken(MuCSCSrc_Token_, hRecHits);
1144  bool validCSC = hRecHits.isValid();
1145  if (!validCSC) {
1146  LogDebug(MsgLoggerCat) << "Unable to find CSC RecHits in event!";
1147  } else {
1148  const CSCRecHit2DCollection* cscRecHits = hRecHits.product();
1149 
1150  int nCSC = 0;
1151  for (CSCRecHit2DCollection::const_iterator recHitItr = cscRecHits->begin(); recHitItr != cscRecHits->end();
1152  ++recHitItr) {
1153  int detId = (*recHitItr).cscDetId().rawId();
1154 
1156  std::map<int, edm::PSimHitContainer>::const_iterator mapItr = theMap.find(detId);
1157  if (mapItr != theMap.end()) {
1158  simHits = mapItr->second;
1159  }
1160 
1161  if (simHits.size() == 1) {
1162  ++nCSC;
1163 
1164  const GeomDetUnit* detUnit = theCSCGeometry->idToDetUnit(CSCDetId(detId));
1165  const CSCLayer* layer = dynamic_cast<const CSCLayer*>(detUnit);
1166 
1167  int chamberType = layer->chamber()->specs()->chamberType();
1168  plotResolution(simHits[0], *recHitItr, layer, chamberType);
1169  }
1170  }
1171 
1172  if (verbosity > 1) {
1173  eventout += "\n Number of CSCRecHits collected:........... ";
1174  eventout += nCSC;
1175  }
1176  mehCSCn->Fill((float)nCSC);
1177  }
1178 
1179  // get RPC information
1180  std::map<double, int> mapsim, maprec;
1181  std::map<int, double> nmapsim, nmaprec;
1182  const auto& rpcGeom = iSetup.getHandle(rpcGeomToken_);
1183  if (!rpcGeom.isValid()) {
1184  edm::LogWarning(MsgLoggerCat) << "Unable to find RPCMuonGeometryRecord in event!";
1185  return;
1186  }
1187 
1189  iEvent.getByToken(MuRPCSimSrc_Token_, simHit);
1190  bool validrpcsim = simHit.isValid();
1191  if (!validrpcsim) {
1192  LogDebug(MsgLoggerCat) << "Unable to find RPCSimHit in event!";
1193  }
1194 
1196  iEvent.getByToken(MuRPCSrc_Token_, recHit);
1197  bool validrpc = recHit.isValid();
1198  if (!validrpc) {
1199  LogDebug(MsgLoggerCat) << "Unable to find RPCRecHit in event!";
1200  }
1201 
1202  if (validrpc) {
1203  int nRPC = 0;
1205  int nrec = 0;
1206  for (recIt = recHit->begin(); recIt != recHit->end(); ++recIt) {
1207  RPCDetId Rid = (RPCDetId)(*recIt).rpcId();
1208  const RPCRoll* roll = dynamic_cast<const RPCRoll*>(rpcGeom->roll(Rid));
1209  if (roll->isForward()) {
1210  if (verbosity > 1) {
1211  eventout += "\n Number of RPCRecHits collected:........... ";
1212  eventout += nRPC;
1213  }
1214 
1215  if (verbosity > 0)
1216  edm::LogInfo(MsgLoggerCat) << eventout << "\n";
1217  return;
1218  }
1219  nrec = nrec + 1;
1220  LocalPoint rhitlocal = (*recIt).localPosition();
1221  double rhitlocalx = rhitlocal.x();
1222  maprec[rhitlocalx] = nrec;
1223  }
1224 
1225  int i = 0;
1226  for (std::map<double, int>::iterator iter = maprec.begin(); iter != maprec.end(); ++iter) {
1227  i = i + 1;
1228  nmaprec[i] = (*iter).first;
1229  }
1230 
1231  int nsim = 0;
1232  if (validrpcsim) {
1233  edm::PSimHitContainer::const_iterator simIt;
1234  for (simIt = simHit->begin(); simIt != simHit->end(); simIt++) {
1235  int ptype = (*simIt).particleType();
1236  if (ptype == 13 || ptype == -13) {
1237  nsim = nsim + 1;
1238  LocalPoint shitlocal = (*simIt).localPosition();
1239  double shitlocalx = shitlocal.x();
1240  mapsim[shitlocalx] = nsim;
1241  }
1242  }
1243 
1244  i = 0;
1245  for (std::map<double, int>::iterator iter = mapsim.begin(); iter != mapsim.end(); ++iter) {
1246  i = i + 1;
1247  nmapsim[i] = (*iter).first;
1248  }
1249  }
1250 
1251  if (nsim == nrec) {
1252  for (int r = 0; r < nsim; r++) {
1253  ++nRPC;
1254  mehRPCResX->Fill(nmaprec[r + 1] - nmapsim[r + 1]);
1255  }
1256  }
1257 
1258  if (verbosity > 1) {
1259  eventout += "\n Number of RPCRecHits collected:........... ";
1260  eventout += nRPC;
1261  }
1262  mehRPCn->Fill((float)nRPC);
1263  }
1264 
1265  if (verbosity > 0)
1266  edm::LogInfo(MsgLoggerCat) << eventout << "\n";
1267 
1268  return;
1269 }
std::map< DTWireId, edm::PSimHitContainer > mapSimHitsPerWire(const edm::PSimHitContainer &simhits)
edm::ESGetToken< DTGeometry, MuonGeometryRecord > dtGeomToken_
edm::EDGetTokenT< CrossingFrame< PSimHit > > MuCSCHits_Token_
T const * product() const
Definition: Handle.h:70
edm::EDGetTokenT< edm::PSimHitContainer > MuDTSimSrc_Token_
void plotResolution(const PSimHit &simHit, const CSCRecHit2D &recHit, const CSCLayer *layer, int chamberType)
void Fill(long long x)
std::map< int, edm::PSimHitContainer > theMap
int compute(const DTGeometry *dtGeom, const std::map< DTWireId, std::vector< PSimHit >> &simHitsPerWire, const std::map< DTWireId, std::vector< type >> &recHitsPerWire, int step)
std::map< DTWireId, std::vector< DTRecHit1DPair > > map1DRecHitsPerWire(const DTRecHitCollection *dt1DRecHitPairs)
C::const_iterator const_iterator
constant access iterator type
Definition: RangeMap.h:43
T x() const
Definition: PV3DBase.h:59
int iEvent
Definition: GenABIO.cc:224
edm::EDGetTokenT< CSCRecHit2DCollection > MuCSCSrc_Token_
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
Definition: EventSetup.h:130
edm::EDGetTokenT< RPCRecHitCollection > MuRPCSrc_Token_
Log< level::Info, false > LogInfo
edm::ESGetToken< CSCGeometry, MuonGeometryRecord > cscGeomToken_
bool isValid() const
Definition: HandleBase.h:70
edm::EDGetTokenT< DTRecHitCollection > MuDTSrc_Token_
std::vector< PSimHit > PSimHitContainer
edm::ESGetToken< RPCGeometry, MuonGeometryRecord > rpcGeomToken_
Log< level::Warning, false > LogWarning
edm::EDGetTokenT< edm::PSimHitContainer > MuRPCSimSrc_Token_
const GeomDet * idToDetUnit(DetId) const override
Return the pointer to the GeomDetUnit corresponding to a given DetId.
Definition: CSCGeometry.cc:89
#define LogDebug(id)

◆ fillTrk()

void GlobalRecHitsAnalyzer::fillTrk ( const edm::Event iEvent,
const edm::EventSetup iSetup 
)
private

Definition at line 724 of file GlobalRecHitsAnalyzer.cc.

References TrackerHitAssociator::associateHit(), edmNew::DetSet< T >::begin(), pv::closest(), hcalRecHitTable_cff::detId, edmNew::DetSet< T >::end(), edmNew::DetSetVector< T >::end(), dqm::impl::MonitorElement::Fill(), edmNew::DetSetVector< T >::find(), TrackingRecHit::geographicalId(), edm::EventSetup::getData(), edm::EventSetup::getHandle(), mps_fire::i, iEvent, edm::HandleBase::isValid(), ALPAKA_ACCELERATOR_NAMESPACE::vertexFinder::it, BaseTrackerRecHit::localPosition(), LogDebug, visualization-live-secondInstance_cfg::m, matched, mehSiPixeln, mehSiPixelResX, mehSiPixelResY, mehSiStripn, mehSiStripResX, mehSiStripResY, position, projectHit(), TrackerTopology::pxbLayer(), TrackerTopology::pxfDisk(), TrackerTopology::pxfSide(), nano_mu_digi_cff::rawId, sdPxlBrl, sdPxlFwd, sdSiTEC, sdSiTIB, sdSiTID, sdSiTOB, SiPxlSrc_Token_, SiStripSrc_Token_, mathSSE::sqrt(), GluedGeomDet::stereoDet(), AlCaHLTBitMon_QueryRunRegistry::string, DetId::subdetId(), GeomDet::surface(), TrackerTopology::tecWheel(), tGeomToken_, TrackerTopology::tibLayer(), TrackerTopology::tidWheel(), TrackerTopology::tobLayer(), PbPb_ZMuSkimMuonDPG_cff::tracker, trackerHitAssociatorConfig_, tTopoToken_, verbosity, PV3DBase< T, PVType, FrameType >::x(), and PV3DBase< T, PVType, FrameType >::y().

Referenced by analyze().

724  {
725  //Retrieve tracker topology from geometry
726  const TrackerTopology* const tTopo = &iSetup.getData(tTopoToken_);
727  std::string MsgLoggerCat = "GlobalRecHitsAnalyzer_fillTrk";
728  TString eventout;
729  if (verbosity > 0)
730  eventout = "\nGathering info:";
731 
732  // get strip information
734  iEvent.getByToken(SiStripSrc_Token_, rechitsmatched);
735  bool validstrip = rechitsmatched.isValid();
736  if (!validstrip) {
737  LogDebug(MsgLoggerCat) << "Unable to find stripmatchedrechits in event!";
738  }
739 
741 
742  const auto& tGeomHandle = iSetup.getHandle(tGeomToken_);
743  if (!tGeomHandle.isValid()) {
744  edm::LogWarning(MsgLoggerCat) << "Unable to find TrackerDigiGeometry in event!";
745  return;
746  }
747  const TrackerGeometry& tracker(*tGeomHandle);
748 
749  if (validstrip) {
750  int nStripBrl = 0, nStripFwd = 0;
751 
752  // loop over det units
753  for (TrackerGeometry::DetContainer::const_iterator it = tGeomHandle->dets().begin();
754  it != tGeomHandle->dets().end();
755  ++it) {
756  uint32_t myid = ((*it)->geographicalId()).rawId();
757  DetId detid = ((*it)->geographicalId());
758 
759  //loop over rechits-matched in the same subdetector
760  SiStripMatchedRecHit2DCollection::const_iterator rechitmatchedMatch = rechitsmatched->find(detid);
761 
762  if (rechitmatchedMatch != rechitsmatched->end()) {
763  SiStripMatchedRecHit2DCollection::DetSet rechitmatchedRange = *rechitmatchedMatch;
764  SiStripMatchedRecHit2DCollection::DetSet::const_iterator rechitmatchedRangeIteratorBegin =
765  rechitmatchedRange.begin();
766  SiStripMatchedRecHit2DCollection::DetSet::const_iterator rechitmatchedRangeIteratorEnd =
767  rechitmatchedRange.end();
769 
770  for (itermatched = rechitmatchedRangeIteratorBegin; itermatched != rechitmatchedRangeIteratorEnd;
771  ++itermatched) {
772  SiStripMatchedRecHit2D const rechit = *itermatched;
773  LocalPoint position = rechit.localPosition();
774 
775  float mindist = 999999.;
776  float distx = 999999.;
777  float disty = 999999.;
778  float dist = 999999.;
779  std::pair<LocalPoint, LocalVector> closestPair;
780  matched.clear();
781 
782  float rechitmatchedx = position.x();
783  float rechitmatchedy = position.y();
784 
785  matched = associate.associateHit(rechit);
786 
787  if (!matched.empty()) {
788  //project simhit;
789  const GluedGeomDet* gluedDet = (const GluedGeomDet*)tracker.idToDet(rechit.geographicalId());
790  const StripGeomDetUnit* partnerstripdet = (StripGeomDetUnit*)gluedDet->stereoDet();
791  std::pair<LocalPoint, LocalVector> hitPair;
792 
793  for (std::vector<PSimHit>::const_iterator m = matched.begin(); m != matched.end(); m++) {
794  //project simhit;
795  hitPair = projectHit((*m), partnerstripdet, gluedDet->surface());
796  distx = fabs(rechitmatchedx - hitPair.first.x());
797  disty = fabs(rechitmatchedy - hitPair.first.y());
798  dist = sqrt(distx * distx + disty * disty);
799 
800  if (dist < mindist) {
801  mindist = dist;
802  closestPair = hitPair;
803  }
804  }
805 
806  // get TIB
807  if (detid.subdetId() == sdSiTIB) {
808  ++nStripBrl;
809 
810  if (tTopo->tibLayer(myid) == 1) {
811  mehSiStripResX[8]->Fill(rechitmatchedx - closestPair.first.x());
812  mehSiStripResY[8]->Fill(rechitmatchedy - closestPair.first.y());
813  }
814  if (tTopo->tibLayer(myid) == 2) {
815  mehSiStripResX[9]->Fill(rechitmatchedx - closestPair.first.x());
816  mehSiStripResY[9]->Fill(rechitmatchedy - closestPair.first.y());
817  }
818  if (tTopo->tibLayer(myid) == 3) {
819  mehSiStripResX[10]->Fill(rechitmatchedx - closestPair.first.x());
820  mehSiStripResY[10]->Fill(rechitmatchedy - closestPair.first.y());
821  }
822  if (tTopo->tibLayer(myid) == 4) {
823  mehSiStripResX[11]->Fill(rechitmatchedx - closestPair.first.x());
824  mehSiStripResY[11]->Fill(rechitmatchedy - closestPair.first.y());
825  }
826  }
827 
828  // get TOB
829  if (detid.subdetId() == sdSiTOB) {
830  ++nStripBrl;
831 
832  if (tTopo->tobLayer(myid) == 1) {
833  mehSiStripResX[15]->Fill(rechitmatchedx - closestPair.first.x());
834  mehSiStripResY[15]->Fill(rechitmatchedy - closestPair.first.y());
835  }
836  if (tTopo->tobLayer(myid) == 2) {
837  mehSiStripResX[16]->Fill(rechitmatchedx - closestPair.first.x());
838  mehSiStripResY[16]->Fill(rechitmatchedy - closestPair.first.y());
839  }
840  if (tTopo->tobLayer(myid) == 3) {
841  mehSiStripResX[17]->Fill(rechitmatchedx - closestPair.first.x());
842  mehSiStripResY[17]->Fill(rechitmatchedy - closestPair.first.y());
843  }
844  if (tTopo->tobLayer(myid) == 4) {
845  mehSiStripResX[18]->Fill(rechitmatchedx - closestPair.first.x());
846  mehSiStripResY[18]->Fill(rechitmatchedy - closestPair.first.y());
847  }
848  }
849 
850  // get TID
851  if (detid.subdetId() == sdSiTID) {
852  ++nStripFwd;
853 
854  if (tTopo->tidWheel(myid) == 1) {
855  mehSiStripResX[12]->Fill(rechitmatchedx - closestPair.first.x());
856  mehSiStripResY[12]->Fill(rechitmatchedy - closestPair.first.y());
857  }
858  if (tTopo->tidWheel(myid) == 2) {
859  mehSiStripResX[13]->Fill(rechitmatchedx - closestPair.first.x());
860  mehSiStripResY[13]->Fill(rechitmatchedy - closestPair.first.y());
861  }
862  if (tTopo->tidWheel(myid) == 3) {
863  mehSiStripResX[14]->Fill(rechitmatchedx - closestPair.first.x());
864  mehSiStripResY[14]->Fill(rechitmatchedy - closestPair.first.y());
865  }
866  }
867 
868  // get TEC
869  if (detid.subdetId() == sdSiTEC) {
870  ++nStripFwd;
871 
872  if (tTopo->tecWheel(myid) == 1) {
873  mehSiStripResX[0]->Fill(rechitmatchedx - closestPair.first.x());
874  mehSiStripResY[0]->Fill(rechitmatchedy - closestPair.first.y());
875  }
876  if (tTopo->tecWheel(myid) == 2) {
877  mehSiStripResX[1]->Fill(rechitmatchedx - closestPair.first.x());
878  mehSiStripResY[1]->Fill(rechitmatchedy - closestPair.first.y());
879  }
880  if (tTopo->tecWheel(myid) == 3) {
881  mehSiStripResX[2]->Fill(rechitmatchedx - closestPair.first.x());
882  mehSiStripResY[2]->Fill(rechitmatchedy - closestPair.first.y());
883  }
884  if (tTopo->tecWheel(myid) == 4) {
885  mehSiStripResX[3]->Fill(rechitmatchedx - closestPair.first.x());
886  mehSiStripResY[3]->Fill(rechitmatchedy - closestPair.first.y());
887  }
888  if (tTopo->tecWheel(myid) == 5) {
889  mehSiStripResX[4]->Fill(rechitmatchedx - closestPair.first.x());
890  mehSiStripResY[4]->Fill(rechitmatchedy - closestPair.first.y());
891  }
892  if (tTopo->tecWheel(myid) == 6) {
893  mehSiStripResX[5]->Fill(rechitmatchedx - closestPair.first.x());
894  mehSiStripResY[5]->Fill(rechitmatchedy - closestPair.first.y());
895  }
896  if (tTopo->tecWheel(myid) == 7) {
897  mehSiStripResX[6]->Fill(rechitmatchedx - closestPair.first.x());
898  mehSiStripResY[6]->Fill(rechitmatchedy - closestPair.first.y());
899  }
900  if (tTopo->tecWheel(myid) == 8) {
901  mehSiStripResX[7]->Fill(rechitmatchedx - closestPair.first.x());
902  mehSiStripResY[7]->Fill(rechitmatchedy - closestPair.first.y());
903  }
904  }
905 
906  } // end if matched empty
907  }
908  }
909  } // end loop over det units
910 
911  if (verbosity > 1) {
912  eventout += "\n Number of BrlStripRecHits collected:...... ";
913  eventout += nStripBrl;
914  }
915 
916  for (int i = 8; i < 12; ++i) {
917  mehSiStripn[i]->Fill((float)nStripBrl);
918  }
919  for (int i = 16; i < 19; ++i) {
920  mehSiStripn[i]->Fill((float)nStripBrl);
921  }
922 
923  if (verbosity > 1) {
924  eventout += "\n Number of FrwdStripRecHits collected:..... ";
925  eventout += nStripFwd;
926  }
927  for (int i = 0; i < 8; ++i) {
928  mehSiStripn[i]->Fill((float)nStripFwd);
929  }
930  for (int i = 12; i < 16; ++i) {
931  mehSiStripn[i]->Fill((float)nStripFwd);
932  }
933  }
934 
935  // get pixel information
936  //Get RecHits
938  iEvent.getByToken(SiPxlSrc_Token_, recHitColl);
939  bool validpixel = recHitColl.isValid();
940  if (!validpixel) {
941  LogDebug(MsgLoggerCat) << "Unable to find SiPixelRecHitCollection in event!";
942  } else {
943  int nPxlBrl = 0, nPxlFwd = 0;
944  //iterate over detunits
945  for (TrackerGeometry::DetContainer::const_iterator it = tGeomHandle->dets().begin();
946  it != tGeomHandle->dets().end();
947  ++it) {
948  uint32_t myid = ((*it)->geographicalId()).rawId();
949  DetId detId = ((*it)->geographicalId());
950  int subid = detId.subdetId();
951 
952  if (!((subid == sdPxlBrl) || (subid == sdPxlFwd)))
953  continue;
954 
955  SiPixelRecHitCollection::const_iterator pixeldet = recHitColl->find(detId);
956  if (pixeldet == recHitColl->end())
957  continue;
958  SiPixelRecHitCollection::DetSet pixelrechitRange = *pixeldet;
959  SiPixelRecHitCollection::DetSet::const_iterator pixelrechitRangeIteratorBegin = pixelrechitRange.begin();
960  SiPixelRecHitCollection::DetSet::const_iterator pixelrechitRangeIteratorEnd = pixelrechitRange.end();
961  SiPixelRecHitCollection::DetSet::const_iterator pixeliter = pixelrechitRangeIteratorBegin;
962 
963  std::vector<PSimHit> matched;
964 
965  //----Loop over rechits for this detId
966  for (; pixeliter != pixelrechitRangeIteratorEnd; ++pixeliter) {
967  matched.clear();
968  matched = associate.associateHit(*pixeliter);
969 
970  if (!matched.empty()) {
971  float closest = 9999.9;
972  LocalPoint lp = pixeliter->localPosition();
973  float rechit_x = lp.x();
974  float rechit_y = lp.y();
975 
976  float sim_x = 0.;
977  float sim_y = 0.;
978 
979  //loop over sim hits and fill closet
980  for (std::vector<PSimHit>::const_iterator m = matched.begin(); m != matched.end(); ++m) {
981  float sim_x1 = (*m).entryPoint().x();
982  float sim_x2 = (*m).exitPoint().x();
983  float sim_xpos = 0.5 * (sim_x1 + sim_x2);
984 
985  float sim_y1 = (*m).entryPoint().y();
986  float sim_y2 = (*m).exitPoint().y();
987  float sim_ypos = 0.5 * (sim_y1 + sim_y2);
988 
989  float x_res = fabs(sim_xpos - rechit_x);
990  float y_res = fabs(sim_ypos - rechit_y);
991 
992  float dist = sqrt(x_res * x_res + y_res * y_res);
993 
994  if (dist < closest) {
995  closest = dist;
996  sim_x = sim_xpos;
997  sim_y = sim_ypos;
998  }
999  } // end sim hit loop
1000 
1001  // get Barrel pixels ***************Pixel STuff******************
1002  if (subid == sdPxlBrl) {
1003  ++nPxlBrl;
1004 
1005  if (tTopo->pxbLayer(myid) == 1) {
1006  mehSiPixelResX[0]->Fill(rechit_x - sim_x);
1007  mehSiPixelResY[0]->Fill(rechit_y - sim_y);
1008  }
1009  if (tTopo->pxbLayer(myid) == 2) {
1010  mehSiPixelResX[1]->Fill(rechit_x - sim_x);
1011  mehSiPixelResY[1]->Fill(rechit_y - sim_y);
1012  }
1013  if (tTopo->pxbLayer(myid) == 3) {
1014  mehSiPixelResX[2]->Fill(rechit_x - sim_x);
1015  mehSiPixelResY[2]->Fill(rechit_y - sim_y);
1016  }
1017  }
1018 
1019  // get Forward pixels
1020  if (subid == sdPxlFwd) {
1021  ++nPxlFwd;
1022 
1023  if (tTopo->pxfDisk(myid) == 1) {
1024  if (tTopo->pxfSide(myid) == 1) {
1025  mehSiPixelResX[3]->Fill(rechit_x - sim_x);
1026  mehSiPixelResY[3]->Fill(rechit_y - sim_y);
1027  }
1028  if (tTopo->pxfSide(myid) == 2) {
1029  mehSiPixelResX[4]->Fill(rechit_x - sim_x);
1030  mehSiPixelResY[4]->Fill(rechit_y - sim_y);
1031  }
1032  }
1033  if (tTopo->pxfDisk(myid) == 2) {
1034  if (tTopo->pxfSide(myid) == 1) {
1035  mehSiPixelResX[5]->Fill(rechit_x - sim_x);
1036  mehSiPixelResY[5]->Fill(rechit_y - sim_y);
1037  }
1038  if (tTopo->pxfSide(myid) == 2) {
1039  mehSiPixelResX[6]->Fill(rechit_x - sim_x);
1040  mehSiPixelResY[6]->Fill(rechit_y - sim_y);
1041  }
1042  }
1043  }
1044  } // end matched emtpy
1045  } // <-----end rechit loop
1046  } // <------ end detunit loop
1047 
1048  if (verbosity > 1) {
1049  eventout += "\n Number of BrlPixelRecHits collected:...... ";
1050  eventout += nPxlBrl;
1051  }
1052  for (int i = 0; i < 3; ++i) {
1053  mehSiPixeln[i]->Fill((float)nPxlBrl);
1054  }
1055 
1056  if (verbosity > 1) {
1057  eventout += "\n Number of FrwdPixelRecHits collected:..... ";
1058  eventout += nPxlFwd;
1059  }
1060 
1061  for (int i = 3; i < 7; ++i) {
1062  mehSiPixeln[i]->Fill((float)nPxlFwd);
1063  }
1064  }
1065 
1066  if (verbosity > 0)
1067  edm::LogInfo(MsgLoggerCat) << eventout << "\n";
1068 
1069  return;
1070 }
edm::EDGetTokenT< SiPixelRecHitCollection > SiPxlSrc_Token_
unsigned int tobLayer(const DetId &id) const
unsigned int pxbLayer(const DetId &id) const
T const & getData(const ESGetToken< T, R > &iToken) const noexcept(false)
Definition: EventSetup.h:119
std::vector< PSimHit > matched
int closest(std::vector< int > const &vec, int value)
unsigned int tidWheel(const DetId &id) const
static const int sdSiTID
unsigned int tecWheel(const DetId &id) const
edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > tGeomToken_
MonitorElement * mehSiStripn[19]
const_iterator end(bool update=false) const
void Fill(long long x)
T x() const
Definition: PV3DBase.h:59
T y() const
Definition: PV3DBase.h:60
int iEvent
Definition: GenABIO.cc:224
static const int sdSiTIB
static const int sdPxlBrl
T sqrt(T t)
Definition: SSEVec.h:19
MonitorElement * mehSiPixelResX[7]
unsigned int pxfDisk(const DetId &id) const
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:48
static const int sdSiTOB
MonitorElement * mehSiPixelResY[7]
MonitorElement * mehSiStripResY[19]
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
Definition: EventSetup.h:130
std::pair< LocalPoint, LocalVector > projectHit(const PSimHit &hit, const StripGeomDetUnit *stripDet, const BoundPlane &plane)
Log< level::Info, false > LogInfo
boost::transform_iterator< IterHelp, const_IdIter > const_iterator
Definition: DetId.h:17
unsigned int pxfSide(const DetId &id) const
const Plane & surface() const
The nominal surface of the GeomDet.
Definition: GeomDet.h:37
DetId geographicalId() const
MonitorElement * mehSiPixeln[7]
const GeomDetUnit * stereoDet() const
Definition: GluedGeomDet.h:20
bool isValid() const
Definition: HandleBase.h:70
static const int sdSiTEC
iterator end()
Definition: DetSetNew.h:53
const_iterator find(id_type i, bool update=false) const
LocalPoint localPosition() const override
static int position[264][3]
Definition: ReadPGInfo.cc:289
edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > tTopoToken_
unsigned int tibLayer(const DetId &id) const
static const int sdPxlFwd
TrackerHitAssociator::Config trackerHitAssociatorConfig_
Log< level::Warning, false > LogWarning
MonitorElement * mehSiStripResX[19]
#define LogDebug(id)
iterator begin()
Definition: DetSetNew.h:51
edm::EDGetTokenT< SiStripMatchedRecHit2DCollection > SiStripSrc_Token_

◆ findBestRecHit()

template<typename type >
const type * GlobalRecHitsAnalyzer::findBestRecHit ( const DTLayer layer,
DTWireId  wireId,
const std::vector< type > &  recHits,
const float  simHitDist 
)
private

Definition at line 1325 of file GlobalRecHitsAnalyzer.cc.

References nano_mu_digi_cff::layer, rpcPointValidation_cfi::recHit, recHitDistFromWire(), and FastTrackerRecHitMaskProducer_cfi::recHits.

Referenced by compute().

1328  {
1329  float res = 99999;
1330  const type* theBestRecHit = nullptr;
1331  // Loop over RecHits within the cell
1332  for (typename std::vector<type>::const_iterator recHit = recHits.begin(); recHit != recHits.end(); recHit++) {
1333  float distTmp = recHitDistFromWire(*recHit, layer);
1334  if (fabs(distTmp - simHitDist) < res) {
1335  res = fabs(distTmp - simHitDist);
1336  theBestRecHit = &(*recHit);
1337  }
1338  } // End of loop over RecHits within the cell
1339 
1340  return theBestRecHit;
1341 }
float recHitDistFromWire(const DTRecHit1DPair &hitPair, const DTLayer *layer)
Definition: Electron.h:6

◆ map1DRecHitsPerWire()

std::map< DTWireId, std::vector< DTRecHit1DPair > > GlobalRecHitsAnalyzer::map1DRecHitsPerWire ( const DTRecHitCollection dt1DRecHitPairs)
private

Definition at line 1299 of file GlobalRecHitsAnalyzer.cc.

References runTheMatrix::ret.

Referenced by fillMuon().

1300  {
1301  std::map<DTWireId, std::vector<DTRecHit1DPair>> ret;
1302 
1303  for (DTRecHitCollection::const_iterator rechit = dt1DRecHitPairs->begin(); rechit != dt1DRecHitPairs->end();
1304  rechit++) {
1305  ret[(*rechit).wireId()].push_back(*rechit);
1306  }
1307 
1308  return ret;
1309 }
ret
prodAgent to be discontinued
C::const_iterator const_iterator
constant access iterator type
Definition: RangeMap.h:43

◆ plotResolution()

void GlobalRecHitsAnalyzer::plotResolution ( const PSimHit simHit,
const CSCRecHit2D recHit,
const CSCLayer layer,
int  chamberType 
)
private

Definition at line 1406 of file GlobalRecHitsAnalyzer.cc.

References dqm::impl::MonitorElement::Fill(), nano_mu_digi_cff::layer, mehCSCResRDPhi, PV3DBase< T, PVType, FrameType >::phi(), rpcPointValidation_cfi::recHit, and rpcPointValidation_cfi::simHit.

Referenced by fillMuon().

1409  {
1410  GlobalPoint simHitPos = layer->toGlobal(simHit.localPosition());
1411  GlobalPoint recHitPos = layer->toGlobal(recHit.localPosition());
1412 
1413  mehCSCResRDPhi->Fill(recHitPos.phi() - simHitPos.phi());
1414 }
MonitorElement * mehCSCResRDPhi
Geom::Phi< T > phi() const
Definition: PV3DBase.h:66
void Fill(long long x)

◆ projectHit()

std::pair< LocalPoint, LocalVector > GlobalRecHitsAnalyzer::projectHit ( const PSimHit hit,
const StripGeomDetUnit stripDet,
const BoundPlane plane 
)
private

Definition at line 1272 of file GlobalRecHitsAnalyzer.cc.

References funct::cos(), DeadROC_duringRun::dir, pfClustersFromCombinedCaloHF_cfi::scale, funct::sin(), StripGeomDetUnit::specificTopology(), StripTopology::strip(), StripTopology::stripAngle(), GeomDet::surface(), Surface::toGlobal(), and PV3DBase< T, PVType, FrameType >::z().

Referenced by fillTrk().

1274  {
1275  const StripTopology& topol = stripDet->specificTopology();
1276  GlobalPoint globalpos = stripDet->surface().toGlobal(hit.localPosition());
1277  LocalPoint localHit = plane.toLocal(globalpos);
1278  //track direction
1279  LocalVector locdir = hit.localDirection();
1280  //rotate track in new frame
1281 
1282  GlobalVector globaldir = stripDet->surface().toGlobal(locdir);
1283  LocalVector dir = plane.toLocal(globaldir);
1284  float scale = -localHit.z() / dir.z();
1285 
1286  LocalPoint projectedPos = localHit + scale * dir;
1287 
1288  float selfAngle = topol.stripAngle(topol.strip(hit.localPosition()));
1289 
1290  // vector along strip in hit frame
1291  LocalVector stripDir(sin(selfAngle), cos(selfAngle), 0);
1292 
1293  LocalVector localStripDir(plane.toLocal(stripDet->surface().toGlobal(stripDir)));
1294 
1295  return std::pair<LocalPoint, LocalVector>(projectedPos, localStripDir);
1296 }
virtual float stripAngle(float strip) const =0
T z() const
Definition: PV3DBase.h:61
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
virtual float strip(const LocalPoint &) const =0
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
virtual const StripTopology & specificTopology() const
Returns a reference to the strip proxy topology.
GlobalPoint toGlobal(const Point2DBase< Scalar, LocalTag > lp) const
Definition: Surface.h:79
const Plane & surface() const
The nominal surface of the GeomDet.
Definition: GeomDet.h:37

◆ recHitDistFromWire() [1/2]

float GlobalRecHitsAnalyzer::recHitDistFromWire ( const DTRecHit1DPair hitPair,
const DTLayer layer 
)
private

Definition at line 1344 of file GlobalRecHitsAnalyzer.cc.

References DTEnums::Left, DTRecHit1DPair::localPosition(), DTEnums::Right, and PV3DBase< T, PVType, FrameType >::x().

Referenced by compute(), and findBestRecHit().

1344  {
1345  // Compute the rechit distance from wire
1346  return fabs(hitPair.localPosition(DTEnums::Left).x() - hitPair.localPosition(DTEnums::Right).x()) / 2.;
1347 }
LocalPoint localPosition() const override
T x() const
Definition: PV3DBase.h:59

◆ recHitDistFromWire() [2/2]

float GlobalRecHitsAnalyzer::recHitDistFromWire ( const DTRecHit1D recHit,
const DTLayer layer 
)
private

Definition at line 1350 of file GlobalRecHitsAnalyzer.cc.

References nano_mu_digi_cff::layer, and rpcPointValidation_cfi::recHit.

1350  {
1351  return fabs(recHit.localPosition().x() - layer->specificTopology().wirePosition(recHit.wireId().wire()));
1352 }

◆ simHitDistFromWire()

float GlobalRecHitsAnalyzer::simHitDistFromWire ( const DTLayer layer,
DTWireId  wireId,
const PSimHit hit 
)
private

Definition at line 1312 of file GlobalRecHitsAnalyzer.cc.

References nano_mu_digi_cff::layer, DTWireId::wire(), PV3DBase< T, PVType, FrameType >::x(), and PV3DBase< T, PVType, FrameType >::z().

Referenced by compute().

1312  {
1313  float xwire = layer->specificTopology().wirePosition(wireId.wire());
1314  LocalPoint entryP = hit.entryPoint();
1315  LocalPoint exitP = hit.exitPoint();
1316  float xEntry = entryP.x() - xwire;
1317  float xExit = exitP.x() - xwire;
1318 
1319  //FIXME: check...
1320  return fabs(xEntry - (entryP.z() * (xExit - xEntry)) / (exitP.z() - entryP.z()));
1321 }
int wire() const
Return the wire number.
Definition: DTWireId.h:45
T z() const
Definition: PV3DBase.h:61
T x() const
Definition: PV3DBase.h:59

Member Data Documentation

◆ caloGeomToken_

edm::ESGetToken<CaloGeometry, CaloGeometryRecord> GlobalRecHitsAnalyzer::caloGeomToken_
private

Definition at line 293 of file GlobalRecHitsAnalyzer.h.

Referenced by fillHCal().

◆ count

unsigned int GlobalRecHitsAnalyzer::count
private

Definition at line 301 of file GlobalRecHitsAnalyzer.h.

Referenced by analyze().

◆ cscGeomToken_

edm::ESGetToken<CSCGeometry, MuonGeometryRecord> GlobalRecHitsAnalyzer::cscGeomToken_
private

Definition at line 297 of file GlobalRecHitsAnalyzer.h.

Referenced by fillMuon().

◆ dtGeomToken_

edm::ESGetToken<DTGeometry, MuonGeometryRecord> GlobalRecHitsAnalyzer::dtGeomToken_
private

Definition at line 296 of file GlobalRecHitsAnalyzer.h.

Referenced by fillMuon().

◆ EBHits_Token_

edm::EDGetTokenT<CrossingFrame<PCaloHit> > GlobalRecHitsAnalyzer::EBHits_Token_
private

Definition at line 197 of file GlobalRecHitsAnalyzer.h.

Referenced by fillECal(), and GlobalRecHitsAnalyzer().

◆ ECalEBSrc_

edm::InputTag GlobalRecHitsAnalyzer::ECalEBSrc_
private

Definition at line 187 of file GlobalRecHitsAnalyzer.h.

Referenced by GlobalRecHitsAnalyzer().

◆ ECalEBSrc_Token_

edm::EDGetTokenT<EBRecHitCollection> GlobalRecHitsAnalyzer::ECalEBSrc_Token_
private

Definition at line 192 of file GlobalRecHitsAnalyzer.h.

Referenced by fillECal(), and GlobalRecHitsAnalyzer().

◆ ECalEESrc_

edm::InputTag GlobalRecHitsAnalyzer::ECalEESrc_
private

Definition at line 189 of file GlobalRecHitsAnalyzer.h.

Referenced by GlobalRecHitsAnalyzer().

◆ ECalEESrc_Token_

edm::EDGetTokenT<EERecHitCollection> GlobalRecHitsAnalyzer::ECalEESrc_Token_
private

Definition at line 193 of file GlobalRecHitsAnalyzer.h.

Referenced by fillECal(), and GlobalRecHitsAnalyzer().

◆ ECalESSrc_

edm::InputTag GlobalRecHitsAnalyzer::ECalESSrc_
private

Definition at line 191 of file GlobalRecHitsAnalyzer.h.

Referenced by GlobalRecHitsAnalyzer().

◆ ECalESSrc_Token_

edm::EDGetTokenT<ESRecHitCollection> GlobalRecHitsAnalyzer::ECalESSrc_Token_
private

Definition at line 194 of file GlobalRecHitsAnalyzer.h.

Referenced by fillECal(), and GlobalRecHitsAnalyzer().

◆ ECalUncalEBSrc_

edm::InputTag GlobalRecHitsAnalyzer::ECalUncalEBSrc_
private

Definition at line 188 of file GlobalRecHitsAnalyzer.h.

Referenced by GlobalRecHitsAnalyzer().

◆ ECalUncalEBSrc_Token_

edm::EDGetTokenT<EBUncalibratedRecHitCollection> GlobalRecHitsAnalyzer::ECalUncalEBSrc_Token_
private

Definition at line 195 of file GlobalRecHitsAnalyzer.h.

Referenced by fillECal(), and GlobalRecHitsAnalyzer().

◆ ECalUncalEESrc_

edm::InputTag GlobalRecHitsAnalyzer::ECalUncalEESrc_
private

Definition at line 190 of file GlobalRecHitsAnalyzer.h.

Referenced by GlobalRecHitsAnalyzer().

◆ ECalUncalEESrc_Token_

edm::EDGetTokenT<EEUncalibratedRecHitCollection> GlobalRecHitsAnalyzer::ECalUncalEESrc_Token_
private

Definition at line 196 of file GlobalRecHitsAnalyzer.h.

Referenced by fillECal(), and GlobalRecHitsAnalyzer().

◆ EEHits_Token_

edm::EDGetTokenT<CrossingFrame<PCaloHit> > GlobalRecHitsAnalyzer::EEHits_Token_
private

Definition at line 198 of file GlobalRecHitsAnalyzer.h.

Referenced by fillECal(), and GlobalRecHitsAnalyzer().

◆ ESHits_Token_

edm::EDGetTokenT<CrossingFrame<PCaloHit> > GlobalRecHitsAnalyzer::ESHits_Token_
private

Definition at line 199 of file GlobalRecHitsAnalyzer.h.

Referenced by fillECal(), and GlobalRecHitsAnalyzer().

◆ fName

std::string GlobalRecHitsAnalyzer::fName
private

Definition at line 169 of file GlobalRecHitsAnalyzer.h.

Referenced by GlobalRecHitsAnalyzer().

◆ frequency

int GlobalRecHitsAnalyzer::frequency
private

Definition at line 171 of file GlobalRecHitsAnalyzer.h.

Referenced by analyze(), and GlobalRecHitsAnalyzer().

◆ getAllProvenances

bool GlobalRecHitsAnalyzer::getAllProvenances
private

Definition at line 173 of file GlobalRecHitsAnalyzer.h.

Referenced by analyze(), and GlobalRecHitsAnalyzer().

◆ HBHERecHitgetter_

edm::GetterOfProducts<edm::SortedCollection<HBHERecHit, edm::StrictWeakOrdering<HBHERecHit> > > GlobalRecHitsAnalyzer::HBHERecHitgetter_
private

Definition at line 183 of file GlobalRecHitsAnalyzer.h.

Referenced by fillHCal(), and GlobalRecHitsAnalyzer().

◆ HCalSrc_

edm::InputTag GlobalRecHitsAnalyzer::HCalSrc_
private

Definition at line 206 of file GlobalRecHitsAnalyzer.h.

Referenced by GlobalRecHitsAnalyzer().

◆ HCalSrc_Token_

edm::EDGetTokenT<edm::PCaloHitContainer> GlobalRecHitsAnalyzer::HCalSrc_Token_
private

Definition at line 207 of file GlobalRecHitsAnalyzer.h.

Referenced by fillHCal(), and GlobalRecHitsAnalyzer().

◆ HFRecHitgetter_

edm::GetterOfProducts<edm::SortedCollection<HFRecHit, edm::StrictWeakOrdering<HFRecHit> > > GlobalRecHitsAnalyzer::HFRecHitgetter_
private

Definition at line 184 of file GlobalRecHitsAnalyzer.h.

Referenced by fillHCal(), and GlobalRecHitsAnalyzer().

◆ hitsProducer

std::string GlobalRecHitsAnalyzer::hitsProducer
private

Definition at line 175 of file GlobalRecHitsAnalyzer.h.

Referenced by GlobalRecHitsAnalyzer().

◆ HORecHitgetter_

edm::GetterOfProducts<edm::SortedCollection<HORecHit, edm::StrictWeakOrdering<HORecHit> > > GlobalRecHitsAnalyzer::HORecHitgetter_
private

Definition at line 185 of file GlobalRecHitsAnalyzer.h.

Referenced by fillHCal(), and GlobalRecHitsAnalyzer().

◆ label

std::string GlobalRecHitsAnalyzer::label
private

Definition at line 172 of file GlobalRecHitsAnalyzer.h.

◆ matched

std::vector<PSimHit> GlobalRecHitsAnalyzer::matched
private

Definition at line 219 of file GlobalRecHitsAnalyzer.h.

Referenced by fillTrk().

◆ mehCSCn

MonitorElement* GlobalRecHitsAnalyzer::mehCSCn
private

Definition at line 238 of file GlobalRecHitsAnalyzer.h.

Referenced by bookHistograms(), and fillMuon().

◆ mehCSCResRDPhi

MonitorElement* GlobalRecHitsAnalyzer::mehCSCResRDPhi
private

Definition at line 241 of file GlobalRecHitsAnalyzer.h.

Referenced by bookHistograms(), and plotResolution().

◆ mehDtMuonn

MonitorElement* GlobalRecHitsAnalyzer::mehDtMuonn
private

Definition at line 237 of file GlobalRecHitsAnalyzer.h.

Referenced by bookHistograms(), and fillMuon().

◆ mehDtMuonRes

MonitorElement* GlobalRecHitsAnalyzer::mehDtMuonRes
private

Definition at line 240 of file GlobalRecHitsAnalyzer.h.

Referenced by bookHistograms(), and compute().

◆ mehEcaln

MonitorElement* GlobalRecHitsAnalyzer::mehEcaln[3]
private

Definition at line 180 of file GlobalRecHitsAnalyzer.h.

Referenced by bookHistograms(), and fillECal().

◆ mehEcalRes

MonitorElement* GlobalRecHitsAnalyzer::mehEcalRes[3]
private

Definition at line 181 of file GlobalRecHitsAnalyzer.h.

Referenced by bookHistograms(), and fillECal().

◆ mehHcaln

MonitorElement* GlobalRecHitsAnalyzer::mehHcaln[4]
private

Definition at line 203 of file GlobalRecHitsAnalyzer.h.

Referenced by bookHistograms(), and fillHCal().

◆ mehHcalRes

MonitorElement* GlobalRecHitsAnalyzer::mehHcalRes[4]
private

Definition at line 204 of file GlobalRecHitsAnalyzer.h.

Referenced by bookHistograms(), and fillHCal().

◆ mehRPCn

MonitorElement* GlobalRecHitsAnalyzer::mehRPCn
private

Definition at line 239 of file GlobalRecHitsAnalyzer.h.

Referenced by bookHistograms(), and fillMuon().

◆ mehRPCResX

MonitorElement* GlobalRecHitsAnalyzer::mehRPCResX
private

Definition at line 242 of file GlobalRecHitsAnalyzer.h.

Referenced by bookHistograms(), and fillMuon().

◆ mehSiPixeln

MonitorElement* GlobalRecHitsAnalyzer::mehSiPixeln[7]
private

Definition at line 227 of file GlobalRecHitsAnalyzer.h.

Referenced by bookHistograms(), and fillTrk().

◆ mehSiPixelResX

MonitorElement* GlobalRecHitsAnalyzer::mehSiPixelResX[7]
private

Definition at line 228 of file GlobalRecHitsAnalyzer.h.

Referenced by bookHistograms(), and fillTrk().

◆ mehSiPixelResY

MonitorElement* GlobalRecHitsAnalyzer::mehSiPixelResY[7]
private

Definition at line 229 of file GlobalRecHitsAnalyzer.h.

Referenced by bookHistograms(), and fillTrk().

◆ mehSiStripn

MonitorElement* GlobalRecHitsAnalyzer::mehSiStripn[19]
private

Definition at line 212 of file GlobalRecHitsAnalyzer.h.

Referenced by bookHistograms(), and fillTrk().

◆ mehSiStripResX

MonitorElement* GlobalRecHitsAnalyzer::mehSiStripResX[19]
private

Definition at line 213 of file GlobalRecHitsAnalyzer.h.

Referenced by bookHistograms(), and fillTrk().

◆ mehSiStripResY

MonitorElement* GlobalRecHitsAnalyzer::mehSiStripResY[19]
private

Definition at line 214 of file GlobalRecHitsAnalyzer.h.

Referenced by bookHistograms(), and fillTrk().

◆ MuCSCHits_Token_

edm::EDGetTokenT<CrossingFrame<PSimHit> > GlobalRecHitsAnalyzer::MuCSCHits_Token_
private

Definition at line 279 of file GlobalRecHitsAnalyzer.h.

Referenced by fillMuon(), and GlobalRecHitsAnalyzer().

◆ MuCSCSrc_

edm::InputTag GlobalRecHitsAnalyzer::MuCSCSrc_
private

Definition at line 277 of file GlobalRecHitsAnalyzer.h.

Referenced by GlobalRecHitsAnalyzer().

◆ MuCSCSrc_Token_

edm::EDGetTokenT<CSCRecHit2DCollection> GlobalRecHitsAnalyzer::MuCSCSrc_Token_
private

Definition at line 278 of file GlobalRecHitsAnalyzer.h.

Referenced by fillMuon(), and GlobalRecHitsAnalyzer().

◆ MuDTSimSrc_

edm::InputTag GlobalRecHitsAnalyzer::MuDTSimSrc_
private

Definition at line 245 of file GlobalRecHitsAnalyzer.h.

Referenced by GlobalRecHitsAnalyzer().

◆ MuDTSimSrc_Token_

edm::EDGetTokenT<edm::PSimHitContainer> GlobalRecHitsAnalyzer::MuDTSimSrc_Token_
private

Definition at line 247 of file GlobalRecHitsAnalyzer.h.

Referenced by fillMuon(), and GlobalRecHitsAnalyzer().

◆ MuDTSrc_

edm::InputTag GlobalRecHitsAnalyzer::MuDTSrc_
private

Definition at line 244 of file GlobalRecHitsAnalyzer.h.

Referenced by GlobalRecHitsAnalyzer().

◆ MuDTSrc_Token_

edm::EDGetTokenT<DTRecHitCollection> GlobalRecHitsAnalyzer::MuDTSrc_Token_
private

Definition at line 246 of file GlobalRecHitsAnalyzer.h.

Referenced by fillMuon(), and GlobalRecHitsAnalyzer().

◆ MuRPCSimSrc_

edm::InputTag GlobalRecHitsAnalyzer::MuRPCSimSrc_
private

Definition at line 289 of file GlobalRecHitsAnalyzer.h.

Referenced by GlobalRecHitsAnalyzer().

◆ MuRPCSimSrc_Token_

edm::EDGetTokenT<edm::PSimHitContainer> GlobalRecHitsAnalyzer::MuRPCSimSrc_Token_
private

Definition at line 291 of file GlobalRecHitsAnalyzer.h.

Referenced by fillMuon(), and GlobalRecHitsAnalyzer().

◆ MuRPCSrc_

edm::InputTag GlobalRecHitsAnalyzer::MuRPCSrc_
private

Definition at line 288 of file GlobalRecHitsAnalyzer.h.

Referenced by GlobalRecHitsAnalyzer().

◆ MuRPCSrc_Token_

edm::EDGetTokenT<RPCRecHitCollection> GlobalRecHitsAnalyzer::MuRPCSrc_Token_
private

Definition at line 290 of file GlobalRecHitsAnalyzer.h.

Referenced by fillMuon(), and GlobalRecHitsAnalyzer().

◆ printProvenanceInfo

bool GlobalRecHitsAnalyzer::printProvenanceInfo
private

Definition at line 174 of file GlobalRecHitsAnalyzer.h.

Referenced by analyze(), and GlobalRecHitsAnalyzer().

◆ rpcGeomToken_

edm::ESGetToken<RPCGeometry, MuonGeometryRecord> GlobalRecHitsAnalyzer::rpcGeomToken_
private

Definition at line 298 of file GlobalRecHitsAnalyzer.h.

Referenced by fillMuon().

◆ SiPxlSrc_

edm::InputTag GlobalRecHitsAnalyzer::SiPxlSrc_
private

Definition at line 231 of file GlobalRecHitsAnalyzer.h.

Referenced by GlobalRecHitsAnalyzer().

◆ SiPxlSrc_Token_

edm::EDGetTokenT<SiPixelRecHitCollection> GlobalRecHitsAnalyzer::SiPxlSrc_Token_
private

Definition at line 232 of file GlobalRecHitsAnalyzer.h.

Referenced by fillTrk(), and GlobalRecHitsAnalyzer().

◆ SiStripSrc_

edm::InputTag GlobalRecHitsAnalyzer::SiStripSrc_
private

Definition at line 216 of file GlobalRecHitsAnalyzer.h.

Referenced by GlobalRecHitsAnalyzer().

◆ SiStripSrc_Token_

edm::EDGetTokenT<SiStripMatchedRecHit2DCollection> GlobalRecHitsAnalyzer::SiStripSrc_Token_
private

Definition at line 217 of file GlobalRecHitsAnalyzer.h.

Referenced by fillTrk(), and GlobalRecHitsAnalyzer().

◆ tGeomToken_

edm::ESGetToken<TrackerGeometry, TrackerDigiGeometryRecord> GlobalRecHitsAnalyzer::tGeomToken_
private

Definition at line 295 of file GlobalRecHitsAnalyzer.h.

Referenced by fillTrk().

◆ theMap

std::map<int, edm::PSimHitContainer> GlobalRecHitsAnalyzer::theMap
private

Definition at line 281 of file GlobalRecHitsAnalyzer.h.

Referenced by fillMuon().

◆ trackerHitAssociatorConfig_

TrackerHitAssociator::Config GlobalRecHitsAnalyzer::trackerHitAssociatorConfig_
private

Definition at line 223 of file GlobalRecHitsAnalyzer.h.

Referenced by fillTrk().

◆ tTopoToken_

edm::ESGetToken<TrackerTopology, TrackerTopologyRcd> GlobalRecHitsAnalyzer::tTopoToken_
private

Definition at line 294 of file GlobalRecHitsAnalyzer.h.

Referenced by fillTrk().

◆ verbosity

int GlobalRecHitsAnalyzer::verbosity
private