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::InputTag HCalSrc_
 
edm::EDGetTokenT< edm::PCaloHitContainerHCalSrc_Token_
 
std::string hitsProducer
 
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 141 of file GlobalRecHitsAnalyzer.h.

Member Typedef Documentation

◆ MapType

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

Definition at line 143 of file GlobalRecHitsAnalyzer.h.

Constructor & Destructor Documentation

◆ GlobalRecHitsAnalyzer()

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

Definition at line 16 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(), HCalSrc_, HCalSrc_Token_, hitsProducer, HLT_2022v12_cff::InputTag, edm::InputTag::instance(), 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.

17  : fName(""),
18  verbosity(0),
19  frequency(0),
20  label(""),
21  getAllProvenances(false),
22  printProvenanceInfo(false),
23  trackerHitAssociatorConfig_(iPSet, consumesCollector()),
30  count(0) {
31  consumesMany<edm::SortedCollection<HBHERecHit, edm::StrictWeakOrdering<HBHERecHit>>>();
32  consumesMany<edm::SortedCollection<HFRecHit, edm::StrictWeakOrdering<HFRecHit>>>();
33  consumesMany<edm::SortedCollection<HORecHit, edm::StrictWeakOrdering<HORecHit>>>();
34  std::string MsgLoggerCat = "GlobalRecHitsAnalyzer_GlobalRecHitsAnalyzer";
35 
36  // get information from parameter set
37  fName = iPSet.getUntrackedParameter<std::string>("Name");
38  verbosity = iPSet.getUntrackedParameter<int>("Verbosity");
39  frequency = iPSet.getUntrackedParameter<int>("Frequency");
40  edm::ParameterSet m_Prov = iPSet.getParameter<edm::ParameterSet>("ProvenanceLookup");
41  getAllProvenances = m_Prov.getUntrackedParameter<bool>("GetAllProvenances");
42  printProvenanceInfo = m_Prov.getUntrackedParameter<bool>("PrintProvenanceInfo");
43  hitsProducer = iPSet.getParameter<std::string>("hitsProducer");
44 
45  //get Labels to use to extract information
46  ECalEBSrc_ = iPSet.getParameter<edm::InputTag>("ECalEBSrc");
47  ECalUncalEBSrc_ = iPSet.getParameter<edm::InputTag>("ECalUncalEBSrc");
48  ECalEESrc_ = iPSet.getParameter<edm::InputTag>("ECalEESrc");
49  ECalUncalEESrc_ = iPSet.getParameter<edm::InputTag>("ECalUncalEESrc");
50  ECalESSrc_ = iPSet.getParameter<edm::InputTag>("ECalESSrc");
51  HCalSrc_ = iPSet.getParameter<edm::InputTag>("HCalSrc");
52  SiStripSrc_ = iPSet.getParameter<edm::InputTag>("SiStripSrc");
53  SiPxlSrc_ = iPSet.getParameter<edm::InputTag>("SiPxlSrc");
54  MuDTSrc_ = iPSet.getParameter<edm::InputTag>("MuDTSrc");
55  MuDTSimSrc_ = iPSet.getParameter<edm::InputTag>("MuDTSimSrc");
56  MuCSCSrc_ = iPSet.getParameter<edm::InputTag>("MuCSCSrc");
57  MuRPCSrc_ = iPSet.getParameter<edm::InputTag>("MuRPCSrc");
58  MuRPCSimSrc_ = iPSet.getParameter<edm::InputTag>("MuRPCSimSrc");
59 
60  // fix for consumes
61  ECalUncalEBSrc_Token_ = consumes<EBUncalibratedRecHitCollection>(iPSet.getParameter<edm::InputTag>("ECalUncalEBSrc"));
62  ECalUncalEESrc_Token_ = consumes<EEUncalibratedRecHitCollection>(iPSet.getParameter<edm::InputTag>("ECalUncalEESrc"));
63  ECalEBSrc_Token_ = consumes<EBRecHitCollection>(iPSet.getParameter<edm::InputTag>("ECalEBSrc"));
64  ECalEESrc_Token_ = consumes<EERecHitCollection>(iPSet.getParameter<edm::InputTag>("ECalEESrc"));
65  ECalESSrc_Token_ = consumes<ESRecHitCollection>(iPSet.getParameter<edm::InputTag>("ECalESSrc"));
66  HCalSrc_Token_ = consumes<edm::PCaloHitContainer>(iPSet.getParameter<edm::InputTag>("HCalSrc"));
67  SiStripSrc_Token_ = consumes<SiStripMatchedRecHit2DCollection>(iPSet.getParameter<edm::InputTag>("SiStripSrc"));
68  SiPxlSrc_Token_ = consumes<SiPixelRecHitCollection>(iPSet.getParameter<edm::InputTag>("SiPxlSrc"));
69 
70  MuDTSrc_Token_ = consumes<DTRecHitCollection>(iPSet.getParameter<edm::InputTag>("MuDTSrc"));
71  MuDTSimSrc_Token_ = consumes<edm::PSimHitContainer>(iPSet.getParameter<edm::InputTag>("MuDTSimSrc"));
72 
73  MuCSCSrc_Token_ = consumes<CSCRecHit2DCollection>(iPSet.getParameter<edm::InputTag>("MuCSCSrc"));
74  MuCSCHits_Token_ = consumes<CrossingFrame<PSimHit>>(
75  edm::InputTag(std::string("mix"), iPSet.getParameter<std::string>("hitsProducer") + std::string("MuonCSCHits")));
76 
77  MuRPCSrc_Token_ = consumes<RPCRecHitCollection>(iPSet.getParameter<edm::InputTag>("MuRPCSrc"));
78  MuRPCSimSrc_Token_ = consumes<edm::PSimHitContainer>(iPSet.getParameter<edm::InputTag>("MuRPCSimSrc"));
79 
80  EBHits_Token_ = consumes<CrossingFrame<PCaloHit>>(
81  edm::InputTag(std::string("mix"), iPSet.getParameter<std::string>("hitsProducer") + std::string("EcalHitsEB")));
82  EEHits_Token_ = consumes<CrossingFrame<PCaloHit>>(
83  edm::InputTag(std::string("mix"), iPSet.getParameter<std::string>("hitsProducer") + std::string("EcalHitsEE")));
84  ESHits_Token_ = consumes<CrossingFrame<PCaloHit>>(
85  edm::InputTag(std::string("mix"), iPSet.getParameter<std::string>("hitsProducer") + std::string("EcalHitsES")));
86 
87  // use value of first digit to determine default output level (inclusive)
88  // 0 is none, 1 is basic, 2 is fill output, 3 is gather output
89  verbosity %= 10;
90 
91  // create persistent object
92  // produces<PGlobalRecHit>(label);
93 
94  // print out Parameter Set information being used
95  if (verbosity >= 0) {
96  edm::LogInfo(MsgLoggerCat) << "\n===============================\n"
97  << "Initialized as EDProducer with parameter values:\n"
98  << " Name = " << fName << "\n"
99  << " Verbosity = " << verbosity << "\n"
100  << " Frequency = " << frequency << "\n"
101  << " GetProv = " << getAllProvenances << "\n"
102  << " PrintProv = " << printProvenanceInfo << "\n"
103  << " ECalEBSrc = " << ECalEBSrc_.label() << ":" << ECalEBSrc_.instance() << "\n"
104  << " ECalUncalEBSrc = " << ECalUncalEBSrc_.label() << ":"
105  << ECalUncalEBSrc_.instance() << "\n"
106  << " ECalEESrc = " << ECalEESrc_.label() << ":" << ECalUncalEESrc_.instance()
107  << "\n"
108  << " ECalUncalEESrc = " << ECalUncalEESrc_.label() << ":" << ECalEESrc_.instance()
109  << "\n"
110  << " ECalESSrc = " << ECalESSrc_.label() << ":" << ECalESSrc_.instance() << "\n"
111  << " HCalSrc = " << HCalSrc_.label() << ":" << HCalSrc_.instance() << "\n"
112  << " SiStripSrc = " << SiStripSrc_.label() << ":" << SiStripSrc_.instance()
113  << "\n"
114  << " SiPixelSrc = " << SiPxlSrc_.label() << ":" << SiPxlSrc_.instance() << "\n"
115  << " MuDTSrc = " << MuDTSrc_.label() << ":" << MuDTSrc_.instance() << "\n"
116  << " MuDTSimSrc = " << MuDTSimSrc_.label() << ":" << MuDTSimSrc_.instance()
117  << "\n"
118  << " MuCSCSrc = " << MuCSCSrc_.label() << ":" << MuCSCSrc_.instance() << "\n"
119  << " MuRPCSrc = " << MuRPCSrc_.label() << ":" << MuRPCSrc_.instance() << "\n"
120  << " MuRPCSimSrc = " << MuRPCSimSrc_.label() << ":" << MuRPCSimSrc_.instance()
121  << "\n"
122  << "===============================\n";
123  }
124 }
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:303
edm::ESGetToken< DTGeometry, MuonGeometryRecord > dtGeomToken_
edm::EDGetTokenT< EBRecHitCollection > ECalEBSrc_Token_
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_
Log< level::Info, false > LogInfo
edm::EDGetTokenT< CrossingFrame< PCaloHit > > EBHits_Token_
edm::EDGetTokenT< edm::PCaloHitContainer > HCalSrc_Token_
edm::ESGetToken< CSCGeometry, MuonGeometryRecord > cscGeomToken_
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 126 of file GlobalRecHitsAnalyzer.cc.

126 {}

Member Function Documentation

◆ analyze()

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

Reimplemented from DQMEDAnalyzer.

Definition at line 298 of file GlobalRecHitsAnalyzer.cc.

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

298  {
299  std::string MsgLoggerCat = "GlobalRecHitsAnalyzer_analyze";
300 
301  // keep track of number of events processed
302  ++count;
303 
304  // get event id information
305  edm::RunNumber_t nrun = iEvent.id().run();
306  edm::EventNumber_t nevt = iEvent.id().event();
307 
308  if (verbosity > 0) {
309  edm::LogInfo(MsgLoggerCat) << "Processing run " << nrun << ", event " << nevt << " (" << count << " events total)";
310  } else if (verbosity == 0) {
311  if (nevt % frequency == 0 || nevt == 1) {
312  edm::LogInfo(MsgLoggerCat) << "Processing run " << nrun << ", event " << nevt << " (" << count
313  << " events total)";
314  }
315  }
316 
317  // look at information available in the event
318  if (getAllProvenances) {
319  std::vector<const edm::StableProvenance*> AllProv;
320  iEvent.getAllStableProvenance(AllProv);
321 
322  if (verbosity >= 0)
323  edm::LogInfo(MsgLoggerCat) << "Number of Provenances = " << AllProv.size();
324 
325  if (printProvenanceInfo && (verbosity >= 0)) {
326  TString eventout("\nProvenance info:\n");
327 
328  for (unsigned int i = 0; i < AllProv.size(); ++i) {
329  eventout += "\n ******************************";
330  eventout += "\n Module : ";
331  eventout += AllProv[i]->moduleLabel();
332  eventout += "\n ProductID : ";
333  eventout += AllProv[i]->productID().id();
334  eventout += "\n ClassName : ";
335  eventout += AllProv[i]->className();
336  eventout += "\n InstanceName : ";
337  eventout += AllProv[i]->productInstanceName();
338  eventout += "\n BranchName : ";
339  eventout += AllProv[i]->branchName();
340  }
341  eventout += "\n ******************************\n";
342  edm::LogInfo(MsgLoggerCat) << eventout << "\n";
343  printProvenanceInfo = false;
344  }
345  getAllProvenances = false;
346  }
347 
348  // call fill functions
349  // gather Ecal information from event
350  fillECal(iEvent, iSetup);
351  // gather Hcal information from event
352  fillHCal(iEvent, iSetup);
353  // gather Track information from event
354  fillTrk(iEvent, iSetup);
355  // gather Muon information from event
356  fillMuon(iEvent, iSetup);
357 
358  if (verbosity > 0)
359  edm::LogInfo(MsgLoggerCat) << "Done gathering data from event.";
360 
361  return;
362 }
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 128 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().

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

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

Referenced by fillMuon().

1346  {
1347  std::map<DTWireId, std::vector<PSimHit>> simHitsPerWire = _simHitsPerWire;
1348  std::map<DTWireId, std::vector<type>> recHitsPerWire = _recHitsPerWire;
1349  int nDt = 0;
1350  // Loop over cells with a muon SimHit
1351  for (std::map<DTWireId, std::vector<PSimHit>>::const_iterator wireAndSHits = simHitsPerWire.begin();
1352  wireAndSHits != simHitsPerWire.end();
1353  wireAndSHits++) {
1354  DTWireId wireId = (*wireAndSHits).first;
1355  std::vector<PSimHit> simHitsInCell = (*wireAndSHits).second;
1356 
1357  // Get the layer
1358  const DTLayer* layer = dtGeom->layer(wireId);
1359 
1360  // Look for a mu hit in the cell
1361  const PSimHit* muSimHit = DTHitQualityUtils::findMuSimHit(simHitsInCell);
1362  if (muSimHit == nullptr) {
1363  continue; // Skip this cell
1364  }
1365 
1366  // Find the distance of the simhit from the wire
1367  float simHitWireDist = simHitDistFromWire(layer, wireId, *muSimHit);
1368  // Skip simhits out of the cell
1369  if (simHitWireDist > 2.1) {
1370  continue; // Skip this cell
1371  }
1372 
1373  // Look for RecHits in the same cell
1374  if (recHitsPerWire.find(wireId) == recHitsPerWire.end()) {
1375  continue; // No RecHit found in this cell
1376  } else {
1377  std::vector<type> recHits = recHitsPerWire[wireId];
1378 
1379  // Find the best RecHit
1380  const type* theBestRecHit = findBestRecHit(layer, wireId, recHits, simHitWireDist);
1381 
1382  float recHitWireDist = recHitDistFromWire(*theBestRecHit, layer);
1383 
1384  ++nDt;
1385 
1386  mehDtMuonRes->Fill(recHitWireDist - simHitWireDist);
1387 
1388  } // find rechits
1389  } // loop over simhits
1390 
1391  return nDt;
1392 }
float recHitDistFromWire(const DTRecHit1DPair &hitPair, const DTLayer *layer)
float simHitDistFromWire(const DTLayer *layer, DTWireId wireId, const PSimHit &hit)
constexpr std::array< uint8_t, layerIndexSize > layer
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 364 of file GlobalRecHitsAnalyzer.cc.

References HLT_2022v12_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_2022v12_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().

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

References caloGeomToken_, dqm::impl::MonitorElement::Fill(), edm::EventSetup::getHandle(), photonIsolationHIProducer_cfi::hbhe, HCalSrc_Token_, photonIsolationHIProducer_cfi::hf, photonIsolationHIProducer_cfi::ho, 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().

551  {
552  std::string MsgLoggerCat = "GlobalRecHitsAnalyzer_fillHCal";
553 
554  TString eventout;
555  if (verbosity > 0)
556  eventout = "\nGathering info:";
557 
558  // get geometry
559  const auto& geometry = iSetup.getHandle(caloGeomToken_);
560  if (!geometry.isValid()) {
561  edm::LogWarning(MsgLoggerCat) << "Unable to find CaloGeometry in event!";
562  return;
563  }
564 
566  // extract simhit info
569  iEvent.getByToken(HCalSrc_Token_, hcalHits);
570  bool validhcalHits = hcalHits.isValid();
571  if (!validhcalHits) {
572  LogDebug(MsgLoggerCat) << "Unable to find hcalHits in event!";
573  }
574 
575  std::map<HcalDetId, float> fHBEnergySimHits;
576  std::map<HcalDetId, float> fHEEnergySimHits;
577  std::map<HcalDetId, float> fHOEnergySimHits;
578  std::map<HcalDetId, float> fHFEnergySimHits;
579  if (validhcalHits) {
580  const edm::PCaloHitContainer* simhitResult = hcalHits.product();
581 
582  for (std::vector<PCaloHit>::const_iterator simhits = simhitResult->begin(); simhits != simhitResult->end();
583  ++simhits) {
584  HcalDetId detId(simhits->id());
585 
586  if (detId.subdet() == sdHcalBrl) {
587  fHBEnergySimHits[detId] += simhits->energy();
588  }
589  if (detId.subdet() == sdHcalEC) {
590  fHEEnergySimHits[detId] += simhits->energy();
591  }
592  if (detId.subdet() == sdHcalOut) {
593  fHOEnergySimHits[detId] += simhits->energy();
594  }
595  if (detId.subdet() == sdHcalFwd) {
596  fHFEnergySimHits[detId] += simhits->energy();
597  }
598  }
599  }
600 
602  // get HBHE information
604  std::vector<edm::Handle<HBHERecHitCollection>> hbhe;
605  iEvent.getManyByType(hbhe);
606 
607  bool validHBHE = hbhe[0].isValid();
608 
609  if (!validHBHE) {
610  LogDebug(MsgLoggerCat) << "Unable to find any HBHERecHitCollections in event!";
611  }
612 
613  else {
614  std::vector<edm::Handle<HBHERecHitCollection>>::iterator ihbhe;
615  int iHB = 0;
616  int iHE = 0;
617  for (ihbhe = hbhe.begin(); ihbhe != hbhe.end(); ++ihbhe) {
618  for (HBHERecHitCollection::const_iterator jhbhe = (*ihbhe)->begin(); jhbhe != (*ihbhe)->end(); ++jhbhe) {
619  HcalDetId cell(jhbhe->id());
620 
621  if (cell.subdet() == sdHcalBrl) {
622  ++iHB;
623  mehHcalRes[0]->Fill(jhbhe->energy() - fHBEnergySimHits[cell]);
624  }
625 
626  else if (cell.subdet() == sdHcalEC) {
627  ++iHE;
628  mehHcalRes[1]->Fill(jhbhe->energy() - fHEEnergySimHits[cell]);
629  }
630  }
631  } // end loop through collection
632 
633  if (verbosity > 1) {
634  eventout += "\n Number of HBRecHits collected:............ ";
635  eventout += iHB;
636  }
637 
638  if (verbosity > 1) {
639  eventout += "\n Number of HERecHits collected:............ ";
640  eventout += iHE;
641  }
642  mehHcaln[0]->Fill((float)iHB);
643  mehHcaln[1]->Fill((float)iHE);
644  }
645 
647  // get HF information
649  std::vector<edm::Handle<HFRecHitCollection>> hf;
650  iEvent.getManyByType(hf);
651  bool validHF = hf[0].isValid();
652  if (!validHF) {
653  LogDebug(MsgLoggerCat) << "Unable to find any HFRecHitCollections in event!";
654  } else {
655  std::vector<edm::Handle<HFRecHitCollection>>::iterator ihf;
656 
657  int iHF = 0;
658  for (ihf = hf.begin(); ihf != hf.end(); ++ihf) {
659  for (HFRecHitCollection::const_iterator jhf = (*ihf)->begin(); jhf != (*ihf)->end(); ++jhf) {
660  HcalDetId cell(jhf->id());
661 
662  if (cell.subdet() == sdHcalFwd) {
663  ++iHF;
664  mehHcalRes[2]->Fill(jhf->energy() - fHFEnergySimHits[cell]);
665  }
666  }
667  } // end loop through collection
668 
669  if (verbosity > 1) {
670  eventout += "\n Number of HFDigis collected:.............. ";
671  eventout += iHF;
672  }
673  mehHcaln[2]->Fill((float)iHF);
674  }
675 
677  // get HO information
679  std::vector<edm::Handle<HORecHitCollection>> ho;
680  iEvent.getManyByType(ho);
681  bool validHO = ho[0].isValid();
682  if (!validHO) {
683  LogDebug(MsgLoggerCat) << "Unable to find any HORecHitCollections in event!";
684  } else {
685  std::vector<edm::Handle<HORecHitCollection>>::iterator iho;
686 
687  int iHO = 0;
688  for (iho = ho.begin(); iho != ho.end(); ++iho) {
689  for (HORecHitCollection::const_iterator jho = (*iho)->begin(); jho != (*iho)->end(); ++jho) {
690  HcalDetId cell(jho->id());
691 
692  if (cell.subdet() == sdHcalOut) {
693  ++iHO;
694  mehHcalRes[3]->Fill(jho->energy() - fHOEnergySimHits[cell]);
695  }
696  }
697  } // end loop through collection
698 
699  if (verbosity > 1) {
700  eventout += "\n Number of HODigis collected:.............. ";
701  eventout += iHO;
702  }
703  mehHcaln[3]->Fill((float)iHO);
704  }
705 
706  if (verbosity > 0)
707  edm::LogInfo(MsgLoggerCat) << eventout << "\n";
708 
709  return;
710 }
std::vector< PCaloHit > PCaloHitContainer
static const int sdHcalOut
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:151
Log< level::Info, false > LogInfo
edm::EDGetTokenT< edm::PCaloHitContainer > HCalSrc_Token_
static const int sdHcalFwd
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 1060 of file GlobalRecHitsAnalyzer.cc.

References compute(), cscGeomToken_, dtGeomToken_, dqm::impl::MonitorElement::Fill(), edm::EventSetup::getHandle(), mps_fire::i, CSCGeometry::idToDetUnit(), iEvent, RPCRoll::isForward(), edm::HandleBase::isValid(), phase1PixelTopology::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, rpcGeomToken_, rpcPointValidation_cfi::simHit, FastTrackerRecHitCombiner_cfi::simHits, AlCaHLTBitMon_QueryRunRegistry::string, theMap, verbosity, and PV3DBase< T, PVType, FrameType >::x().

Referenced by analyze().

1060  {
1061  std::string MsgLoggerCat = "GlobalRecHitsAnalyzer_fillMuon";
1062 
1063  TString eventout;
1064  if (verbosity > 0)
1065  eventout = "\nGathering info:";
1066 
1067  // get DT information
1068  const auto& dtGeom = iSetup.getHandle(dtGeomToken_);
1069  if (!dtGeom.isValid()) {
1070  edm::LogWarning(MsgLoggerCat) << "Unable to find DTMuonGeometryRecord in event!";
1071  return;
1072  }
1073 
1075  iEvent.getByToken(MuDTSimSrc_Token_, dtsimHits);
1076  bool validdtsim = dtsimHits.isValid();
1077  if (!validdtsim) {
1078  LogDebug(MsgLoggerCat) << "Unable to find dtsimHits in event!";
1079  }
1080 
1082  iEvent.getByToken(MuDTSrc_Token_, dtRecHits);
1083  bool validdtrec = dtRecHits.isValid();
1084  if (!validdtrec) {
1085  LogDebug(MsgLoggerCat) << "Unable to find dtRecHits in event!";
1086  }
1087 
1088  if (validdtsim && validdtrec) {
1089  std::map<DTWireId, edm::PSimHitContainer> simHitsPerWire =
1091 
1092  std::map<DTWireId, std::vector<DTRecHit1DPair>> recHitsPerWire = map1DRecHitsPerWire(dtRecHits.product());
1093 
1094  int nDt = compute(dtGeom.product(), simHitsPerWire, recHitsPerWire, 1);
1095 
1096  if (verbosity > 1) {
1097  eventout += "\n Number of DtMuonRecHits collected:........ ";
1098  eventout += nDt;
1099  }
1100  mehDtMuonn->Fill(float(nDt));
1101  }
1102 
1103  // get CSC Strip information
1104  // get map of sim hits
1105  theMap.clear();
1107 
1108  iEvent.getByToken(MuCSCHits_Token_, cf);
1109  bool validXFrame = cf.isValid();
1110  if (!validXFrame) {
1111  LogDebug(MsgLoggerCat) << "Unable to find muo CSC crossingFrame in event!";
1112  } else {
1114 
1115  // arrange the hits by detUnit
1116  for (auto const& iHit : simHits) {
1117  theMap[iHit.detUnitId()].push_back(iHit);
1118  }
1119  }
1120 
1121  // get geometry
1122  const auto& hGeom = iSetup.getHandle(cscGeomToken_);
1123  if (!hGeom.isValid()) {
1124  edm::LogWarning(MsgLoggerCat) << "Unable to find CSCMuonGeometryRecord in event!";
1125  return;
1126  }
1127  const CSCGeometry* theCSCGeometry = &*hGeom;
1128 
1129  // get rechits
1131  iEvent.getByToken(MuCSCSrc_Token_, hRecHits);
1132  bool validCSC = hRecHits.isValid();
1133  if (!validCSC) {
1134  LogDebug(MsgLoggerCat) << "Unable to find CSC RecHits in event!";
1135  } else {
1136  const CSCRecHit2DCollection* cscRecHits = hRecHits.product();
1137 
1138  int nCSC = 0;
1139  for (CSCRecHit2DCollection::const_iterator recHitItr = cscRecHits->begin(); recHitItr != cscRecHits->end();
1140  ++recHitItr) {
1141  int detId = (*recHitItr).cscDetId().rawId();
1142 
1144  std::map<int, edm::PSimHitContainer>::const_iterator mapItr = theMap.find(detId);
1145  if (mapItr != theMap.end()) {
1146  simHits = mapItr->second;
1147  }
1148 
1149  if (simHits.size() == 1) {
1150  ++nCSC;
1151 
1152  const GeomDetUnit* detUnit = theCSCGeometry->idToDetUnit(CSCDetId(detId));
1153  const CSCLayer* layer = dynamic_cast<const CSCLayer*>(detUnit);
1154 
1155  int chamberType = layer->chamber()->specs()->chamberType();
1156  plotResolution(simHits[0], *recHitItr, layer, chamberType);
1157  }
1158  }
1159 
1160  if (verbosity > 1) {
1161  eventout += "\n Number of CSCRecHits collected:........... ";
1162  eventout += nCSC;
1163  }
1164  mehCSCn->Fill((float)nCSC);
1165  }
1166 
1167  // get RPC information
1168  std::map<double, int> mapsim, maprec;
1169  std::map<int, double> nmapsim, nmaprec;
1170  const auto& rpcGeom = iSetup.getHandle(rpcGeomToken_);
1171  if (!rpcGeom.isValid()) {
1172  edm::LogWarning(MsgLoggerCat) << "Unable to find RPCMuonGeometryRecord in event!";
1173  return;
1174  }
1175 
1177  iEvent.getByToken(MuRPCSimSrc_Token_, simHit);
1178  bool validrpcsim = simHit.isValid();
1179  if (!validrpcsim) {
1180  LogDebug(MsgLoggerCat) << "Unable to find RPCSimHit in event!";
1181  }
1182 
1184  iEvent.getByToken(MuRPCSrc_Token_, recHit);
1185  bool validrpc = recHit.isValid();
1186  if (!validrpc) {
1187  LogDebug(MsgLoggerCat) << "Unable to find RPCRecHit in event!";
1188  }
1189 
1190  if (validrpc) {
1191  int nRPC = 0;
1193  int nrec = 0;
1194  for (recIt = recHit->begin(); recIt != recHit->end(); ++recIt) {
1195  RPCDetId Rid = (RPCDetId)(*recIt).rpcId();
1196  const RPCRoll* roll = dynamic_cast<const RPCRoll*>(rpcGeom->roll(Rid));
1197  if (roll->isForward()) {
1198  if (verbosity > 1) {
1199  eventout += "\n Number of RPCRecHits collected:........... ";
1200  eventout += nRPC;
1201  }
1202 
1203  if (verbosity > 0)
1204  edm::LogInfo(MsgLoggerCat) << eventout << "\n";
1205  return;
1206  }
1207  nrec = nrec + 1;
1208  LocalPoint rhitlocal = (*recIt).localPosition();
1209  double rhitlocalx = rhitlocal.x();
1210  maprec[rhitlocalx] = nrec;
1211  }
1212 
1213  int i = 0;
1214  for (std::map<double, int>::iterator iter = maprec.begin(); iter != maprec.end(); ++iter) {
1215  i = i + 1;
1216  nmaprec[i] = (*iter).first;
1217  }
1218 
1219  int nsim = 0;
1220  if (validrpcsim) {
1221  edm::PSimHitContainer::const_iterator simIt;
1222  for (simIt = simHit->begin(); simIt != simHit->end(); simIt++) {
1223  int ptype = (*simIt).particleType();
1224  if (ptype == 13 || ptype == -13) {
1225  nsim = nsim + 1;
1226  LocalPoint shitlocal = (*simIt).localPosition();
1227  double shitlocalx = shitlocal.x();
1228  mapsim[shitlocalx] = nsim;
1229  }
1230  }
1231 
1232  i = 0;
1233  for (std::map<double, int>::iterator iter = mapsim.begin(); iter != mapsim.end(); ++iter) {
1234  i = i + 1;
1235  nmapsim[i] = (*iter).first;
1236  }
1237  }
1238 
1239  if (nsim == nrec) {
1240  for (int r = 0; r < nsim; r++) {
1241  ++nRPC;
1242  mehRPCResX->Fill(nmaprec[r + 1] - nmapsim[r + 1]);
1243  }
1244  }
1245 
1246  if (verbosity > 1) {
1247  eventout += "\n Number of RPCRecHits collected:........... ";
1248  eventout += nRPC;
1249  }
1250  mehRPCn->Fill((float)nRPC);
1251  }
1252 
1253  if (verbosity > 0)
1254  edm::LogInfo(MsgLoggerCat) << eventout << "\n";
1255 
1256  return;
1257 }
std::map< DTWireId, edm::PSimHitContainer > mapSimHitsPerWire(const edm::PSimHitContainer &simhits)
edm::ESGetToken< DTGeometry, MuonGeometryRecord > dtGeomToken_
bool isForward() const
Definition: RPCRoll.cc:43
edm::EDGetTokenT< CrossingFrame< PSimHit > > MuCSCHits_Token_
T const * product() const
Definition: Handle.h:70
edm::EDGetTokenT< edm::PSimHitContainer > MuDTSimSrc_Token_
constexpr std::array< uint8_t, layerIndexSize > layer
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:151
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 712 of file GlobalRecHitsAnalyzer.cc.

References TrackerHitAssociator::associateHit(), edmNew::DetSet< T >::begin(), 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(), BaseTrackerRecHit::localPosition(), LogDebug, visualization-live-secondInstance_cfg::m, matched, mehSiPixeln, mehSiPixelResX, mehSiPixelResY, mehSiStripn, mehSiStripResX, mehSiStripResY, position, projectHit(), TrackerTopology::pxbLayer(), TrackerTopology::pxfDisk(), TrackerTopology::pxfSide(), 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().

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

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

Referenced by compute().

1316  {
1317  float res = 99999;
1318  const type* theBestRecHit = nullptr;
1319  // Loop over RecHits within the cell
1320  for (typename std::vector<type>::const_iterator recHit = recHits.begin(); recHit != recHits.end(); recHit++) {
1321  float distTmp = recHitDistFromWire(*recHit, layer);
1322  if (fabs(distTmp - simHitDist) < res) {
1323  res = fabs(distTmp - simHitDist);
1324  theBestRecHit = &(*recHit);
1325  }
1326  } // End of loop over RecHits within the cell
1327 
1328  return theBestRecHit;
1329 }
float recHitDistFromWire(const DTRecHit1DPair &hitPair, const DTLayer *layer)
Definition: Electron.h:6
constexpr std::array< uint8_t, layerIndexSize > layer

◆ map1DRecHitsPerWire()

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

Definition at line 1287 of file GlobalRecHitsAnalyzer.cc.

References runTheMatrix::ret.

Referenced by fillMuon().

1288  {
1289  std::map<DTWireId, std::vector<DTRecHit1DPair>> ret;
1290 
1291  for (DTRecHitCollection::const_iterator rechit = dt1DRecHitPairs->begin(); rechit != dt1DRecHitPairs->end();
1292  rechit++) {
1293  ret[(*rechit).wireId()].push_back(*rechit);
1294  }
1295 
1296  return ret;
1297 }
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 1394 of file GlobalRecHitsAnalyzer.cc.

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

Referenced by fillMuon().

1397  {
1398  GlobalPoint simHitPos = layer->toGlobal(simHit.localPosition());
1399  GlobalPoint recHitPos = layer->toGlobal(recHit.localPosition());
1400 
1401  mehCSCResRDPhi->Fill(recHitPos.phi() - simHitPos.phi());
1402 }
MonitorElement * mehCSCResRDPhi
Geom::Phi< T > phi() const
Definition: PV3DBase.h:66
constexpr std::array< uint8_t, layerIndexSize > layer
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 1260 of file GlobalRecHitsAnalyzer.cc.

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

Referenced by fillTrk().

1262  {
1263  const StripTopology& topol = stripDet->specificTopology();
1264  GlobalPoint globalpos = stripDet->surface().toGlobal(hit.localPosition());
1265  LocalPoint localHit = plane.toLocal(globalpos);
1266  //track direction
1267  LocalVector locdir = hit.localDirection();
1268  //rotate track in new frame
1269 
1270  GlobalVector globaldir = stripDet->surface().toGlobal(locdir);
1271  LocalVector dir = plane.toLocal(globaldir);
1272  float scale = -localHit.z() / dir.z();
1273 
1274  LocalPoint projectedPos = localHit + scale * dir;
1275 
1276  float selfAngle = topol.stripAngle(topol.strip(hit.localPosition()));
1277 
1278  // vector along strip in hit frame
1279  LocalVector stripDir(sin(selfAngle), cos(selfAngle), 0);
1280 
1281  LocalVector localStripDir(plane.toLocal(stripDet->surface().toGlobal(stripDir)));
1282 
1283  return std::pair<LocalPoint, LocalVector>(projectedPos, localStripDir);
1284 }
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 1332 of file GlobalRecHitsAnalyzer.cc.

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

Referenced by compute(), and findBestRecHit().

1332  {
1333  // Compute the rechit distance from wire
1334  return fabs(hitPair.localPosition(DTEnums::Left).x() - hitPair.localPosition(DTEnums::Right).x()) / 2.;
1335 }
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 1338 of file GlobalRecHitsAnalyzer.cc.

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

1338  {
1339  return fabs(recHit.localPosition().x() - layer->specificTopology().wirePosition(recHit.wireId().wire()));
1340 }
constexpr std::array< uint8_t, layerIndexSize > layer

◆ simHitDistFromWire()

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

Definition at line 1300 of file GlobalRecHitsAnalyzer.cc.

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

Referenced by compute().

1300  {
1301  float xwire = layer->specificTopology().wirePosition(wireId.wire());
1302  LocalPoint entryP = hit.entryPoint();
1303  LocalPoint exitP = hit.exitPoint();
1304  float xEntry = entryP.x() - xwire;
1305  float xExit = exitP.x() - xwire;
1306 
1307  //FIXME: check...
1308  return fabs(xEntry - (entryP.z() * (xExit - xEntry)) / (exitP.z() - entryP.z()));
1309 }
int wire() const
Return the wire number.
Definition: DTWireId.h:42
T z() const
Definition: PV3DBase.h:61
constexpr std::array< uint8_t, layerIndexSize > layer
T x() const
Definition: PV3DBase.h:59

Member Data Documentation

◆ caloGeomToken_

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

Definition at line 287 of file GlobalRecHitsAnalyzer.h.

Referenced by fillHCal().

◆ count

unsigned int GlobalRecHitsAnalyzer::count
private

Definition at line 295 of file GlobalRecHitsAnalyzer.h.

Referenced by analyze().

◆ cscGeomToken_

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

Definition at line 291 of file GlobalRecHitsAnalyzer.h.

Referenced by fillMuon().

◆ dtGeomToken_

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

Definition at line 290 of file GlobalRecHitsAnalyzer.h.

Referenced by fillMuon().

◆ EBHits_Token_

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

Definition at line 191 of file GlobalRecHitsAnalyzer.h.

Referenced by fillECal(), and GlobalRecHitsAnalyzer().

◆ ECalEBSrc_

edm::InputTag GlobalRecHitsAnalyzer::ECalEBSrc_
private

Definition at line 181 of file GlobalRecHitsAnalyzer.h.

Referenced by GlobalRecHitsAnalyzer().

◆ ECalEBSrc_Token_

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

Definition at line 186 of file GlobalRecHitsAnalyzer.h.

Referenced by fillECal(), and GlobalRecHitsAnalyzer().

◆ ECalEESrc_

edm::InputTag GlobalRecHitsAnalyzer::ECalEESrc_
private

Definition at line 183 of file GlobalRecHitsAnalyzer.h.

Referenced by GlobalRecHitsAnalyzer().

◆ ECalEESrc_Token_

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

Definition at line 187 of file GlobalRecHitsAnalyzer.h.

Referenced by fillECal(), and GlobalRecHitsAnalyzer().

◆ ECalESSrc_

edm::InputTag GlobalRecHitsAnalyzer::ECalESSrc_
private

Definition at line 185 of file GlobalRecHitsAnalyzer.h.

Referenced by GlobalRecHitsAnalyzer().

◆ ECalESSrc_Token_

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

Definition at line 188 of file GlobalRecHitsAnalyzer.h.

Referenced by fillECal(), and GlobalRecHitsAnalyzer().

◆ ECalUncalEBSrc_

edm::InputTag GlobalRecHitsAnalyzer::ECalUncalEBSrc_
private

Definition at line 182 of file GlobalRecHitsAnalyzer.h.

Referenced by GlobalRecHitsAnalyzer().

◆ ECalUncalEBSrc_Token_

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

Definition at line 189 of file GlobalRecHitsAnalyzer.h.

Referenced by fillECal(), and GlobalRecHitsAnalyzer().

◆ ECalUncalEESrc_

edm::InputTag GlobalRecHitsAnalyzer::ECalUncalEESrc_
private

Definition at line 184 of file GlobalRecHitsAnalyzer.h.

Referenced by GlobalRecHitsAnalyzer().

◆ ECalUncalEESrc_Token_

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

Definition at line 190 of file GlobalRecHitsAnalyzer.h.

Referenced by fillECal(), and GlobalRecHitsAnalyzer().

◆ EEHits_Token_

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

Definition at line 192 of file GlobalRecHitsAnalyzer.h.

Referenced by fillECal(), and GlobalRecHitsAnalyzer().

◆ ESHits_Token_

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

Definition at line 193 of file GlobalRecHitsAnalyzer.h.

Referenced by fillECal(), and GlobalRecHitsAnalyzer().

◆ fName

std::string GlobalRecHitsAnalyzer::fName
private

Definition at line 167 of file GlobalRecHitsAnalyzer.h.

Referenced by GlobalRecHitsAnalyzer().

◆ frequency

int GlobalRecHitsAnalyzer::frequency
private

Definition at line 169 of file GlobalRecHitsAnalyzer.h.

Referenced by analyze(), and GlobalRecHitsAnalyzer().

◆ getAllProvenances

bool GlobalRecHitsAnalyzer::getAllProvenances
private

Definition at line 171 of file GlobalRecHitsAnalyzer.h.

Referenced by analyze(), and GlobalRecHitsAnalyzer().

◆ HCalSrc_

edm::InputTag GlobalRecHitsAnalyzer::HCalSrc_
private

Definition at line 200 of file GlobalRecHitsAnalyzer.h.

Referenced by GlobalRecHitsAnalyzer().

◆ HCalSrc_Token_

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

Definition at line 201 of file GlobalRecHitsAnalyzer.h.

Referenced by fillHCal(), and GlobalRecHitsAnalyzer().

◆ hitsProducer

std::string GlobalRecHitsAnalyzer::hitsProducer
private

Definition at line 173 of file GlobalRecHitsAnalyzer.h.

Referenced by GlobalRecHitsAnalyzer().

◆ label

std::string GlobalRecHitsAnalyzer::label
private

Definition at line 170 of file GlobalRecHitsAnalyzer.h.

◆ matched

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

Definition at line 213 of file GlobalRecHitsAnalyzer.h.

Referenced by fillTrk().

◆ mehCSCn

MonitorElement* GlobalRecHitsAnalyzer::mehCSCn
private

Definition at line 232 of file GlobalRecHitsAnalyzer.h.

Referenced by bookHistograms(), and fillMuon().

◆ mehCSCResRDPhi

MonitorElement* GlobalRecHitsAnalyzer::mehCSCResRDPhi
private

Definition at line 235 of file GlobalRecHitsAnalyzer.h.

Referenced by bookHistograms(), and plotResolution().

◆ mehDtMuonn

MonitorElement* GlobalRecHitsAnalyzer::mehDtMuonn
private

Definition at line 231 of file GlobalRecHitsAnalyzer.h.

Referenced by bookHistograms(), and fillMuon().

◆ mehDtMuonRes

MonitorElement* GlobalRecHitsAnalyzer::mehDtMuonRes
private

Definition at line 234 of file GlobalRecHitsAnalyzer.h.

Referenced by bookHistograms(), and compute().

◆ mehEcaln

MonitorElement* GlobalRecHitsAnalyzer::mehEcaln[3]
private

Definition at line 178 of file GlobalRecHitsAnalyzer.h.

Referenced by bookHistograms(), and fillECal().

◆ mehEcalRes

MonitorElement* GlobalRecHitsAnalyzer::mehEcalRes[3]
private

Definition at line 179 of file GlobalRecHitsAnalyzer.h.

Referenced by bookHistograms(), and fillECal().

◆ mehHcaln

MonitorElement* GlobalRecHitsAnalyzer::mehHcaln[4]
private

Definition at line 197 of file GlobalRecHitsAnalyzer.h.

Referenced by bookHistograms(), and fillHCal().

◆ mehHcalRes

MonitorElement* GlobalRecHitsAnalyzer::mehHcalRes[4]
private

Definition at line 198 of file GlobalRecHitsAnalyzer.h.

Referenced by bookHistograms(), and fillHCal().

◆ mehRPCn

MonitorElement* GlobalRecHitsAnalyzer::mehRPCn
private

Definition at line 233 of file GlobalRecHitsAnalyzer.h.

Referenced by bookHistograms(), and fillMuon().

◆ mehRPCResX

MonitorElement* GlobalRecHitsAnalyzer::mehRPCResX
private

Definition at line 236 of file GlobalRecHitsAnalyzer.h.

Referenced by bookHistograms(), and fillMuon().

◆ mehSiPixeln

MonitorElement* GlobalRecHitsAnalyzer::mehSiPixeln[7]
private

Definition at line 221 of file GlobalRecHitsAnalyzer.h.

Referenced by bookHistograms(), and fillTrk().

◆ mehSiPixelResX

MonitorElement* GlobalRecHitsAnalyzer::mehSiPixelResX[7]
private

Definition at line 222 of file GlobalRecHitsAnalyzer.h.

Referenced by bookHistograms(), and fillTrk().

◆ mehSiPixelResY

MonitorElement* GlobalRecHitsAnalyzer::mehSiPixelResY[7]
private

Definition at line 223 of file GlobalRecHitsAnalyzer.h.

Referenced by bookHistograms(), and fillTrk().

◆ mehSiStripn

MonitorElement* GlobalRecHitsAnalyzer::mehSiStripn[19]
private

Definition at line 206 of file GlobalRecHitsAnalyzer.h.

Referenced by bookHistograms(), and fillTrk().

◆ mehSiStripResX

MonitorElement* GlobalRecHitsAnalyzer::mehSiStripResX[19]
private

Definition at line 207 of file GlobalRecHitsAnalyzer.h.

Referenced by bookHistograms(), and fillTrk().

◆ mehSiStripResY

MonitorElement* GlobalRecHitsAnalyzer::mehSiStripResY[19]
private

Definition at line 208 of file GlobalRecHitsAnalyzer.h.

Referenced by bookHistograms(), and fillTrk().

◆ MuCSCHits_Token_

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

Definition at line 273 of file GlobalRecHitsAnalyzer.h.

Referenced by fillMuon(), and GlobalRecHitsAnalyzer().

◆ MuCSCSrc_

edm::InputTag GlobalRecHitsAnalyzer::MuCSCSrc_
private

Definition at line 271 of file GlobalRecHitsAnalyzer.h.

Referenced by GlobalRecHitsAnalyzer().

◆ MuCSCSrc_Token_

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

Definition at line 272 of file GlobalRecHitsAnalyzer.h.

Referenced by fillMuon(), and GlobalRecHitsAnalyzer().

◆ MuDTSimSrc_

edm::InputTag GlobalRecHitsAnalyzer::MuDTSimSrc_
private

Definition at line 239 of file GlobalRecHitsAnalyzer.h.

Referenced by GlobalRecHitsAnalyzer().

◆ MuDTSimSrc_Token_

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

Definition at line 241 of file GlobalRecHitsAnalyzer.h.

Referenced by fillMuon(), and GlobalRecHitsAnalyzer().

◆ MuDTSrc_

edm::InputTag GlobalRecHitsAnalyzer::MuDTSrc_
private

Definition at line 238 of file GlobalRecHitsAnalyzer.h.

Referenced by GlobalRecHitsAnalyzer().

◆ MuDTSrc_Token_

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

Definition at line 240 of file GlobalRecHitsAnalyzer.h.

Referenced by fillMuon(), and GlobalRecHitsAnalyzer().

◆ MuRPCSimSrc_

edm::InputTag GlobalRecHitsAnalyzer::MuRPCSimSrc_
private

Definition at line 283 of file GlobalRecHitsAnalyzer.h.

Referenced by GlobalRecHitsAnalyzer().

◆ MuRPCSimSrc_Token_

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

Definition at line 285 of file GlobalRecHitsAnalyzer.h.

Referenced by fillMuon(), and GlobalRecHitsAnalyzer().

◆ MuRPCSrc_

edm::InputTag GlobalRecHitsAnalyzer::MuRPCSrc_
private

Definition at line 282 of file GlobalRecHitsAnalyzer.h.

Referenced by GlobalRecHitsAnalyzer().

◆ MuRPCSrc_Token_

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

Definition at line 284 of file GlobalRecHitsAnalyzer.h.

Referenced by fillMuon(), and GlobalRecHitsAnalyzer().

◆ printProvenanceInfo

bool GlobalRecHitsAnalyzer::printProvenanceInfo
private

Definition at line 172 of file GlobalRecHitsAnalyzer.h.

Referenced by analyze(), and GlobalRecHitsAnalyzer().

◆ rpcGeomToken_

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

Definition at line 292 of file GlobalRecHitsAnalyzer.h.

Referenced by fillMuon().

◆ SiPxlSrc_

edm::InputTag GlobalRecHitsAnalyzer::SiPxlSrc_
private

Definition at line 225 of file GlobalRecHitsAnalyzer.h.

Referenced by GlobalRecHitsAnalyzer().

◆ SiPxlSrc_Token_

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

Definition at line 226 of file GlobalRecHitsAnalyzer.h.

Referenced by fillTrk(), and GlobalRecHitsAnalyzer().

◆ SiStripSrc_

edm::InputTag GlobalRecHitsAnalyzer::SiStripSrc_
private

Definition at line 210 of file GlobalRecHitsAnalyzer.h.

Referenced by GlobalRecHitsAnalyzer().

◆ SiStripSrc_Token_

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

Definition at line 211 of file GlobalRecHitsAnalyzer.h.

Referenced by fillTrk(), and GlobalRecHitsAnalyzer().

◆ tGeomToken_

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

Definition at line 289 of file GlobalRecHitsAnalyzer.h.

Referenced by fillTrk().

◆ theMap

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

Definition at line 275 of file GlobalRecHitsAnalyzer.h.

Referenced by fillMuon().

◆ trackerHitAssociatorConfig_

TrackerHitAssociator::Config GlobalRecHitsAnalyzer::trackerHitAssociatorConfig_
private

Definition at line 217 of file GlobalRecHitsAnalyzer.h.

Referenced by fillTrk().

◆ tTopoToken_

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

Definition at line 288 of file GlobalRecHitsAnalyzer.h.

Referenced by fillTrk().

◆ verbosity

int GlobalRecHitsAnalyzer::verbosity
private