CMS 3D CMS Logo

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

#include <HSCPValidation/HSCPValidator/src/HSCPValidator.cc>

Inheritance diagram for HSCPValidator:
edm::EDAnalyzer edm::EDConsumerBase

Public Member Functions

 HSCPValidator (const edm::ParameterSet &)
 
 ~HSCPValidator () override
 
- Public Member Functions inherited from edm::EDAnalyzer
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzer ()
 
SerialTaskQueueglobalLuminosityBlocksQueue ()
 
SerialTaskQueueglobalRunsQueue ()
 
ModuleDescription const & moduleDescription () const
 
std::string workerType () const
 
 ~EDAnalyzer () override
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
void convertCurrentProcessAlias (std::string const &processName)
 Convert "@currentProcess" in InputTag process names to the actual current process name. More...
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase &&)=default
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
ESProxyIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector< ProductResolverIndexAndSkipBit > const & itemsToGetFrom (BranchType iType) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProxyIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

Private Member Functions

void analyze (const edm::Event &, const edm::EventSetup &) override
 
void beginJob () override
 
void endJob () override
 
bool IncreasedTreshold (const trigger::TriggerEvent &trEv, const edm::InputTag &InputPath, double NewThreshold, double etaCut, int NObjectAboveThreshold, bool averageThreshold)
 
std::string intToString (int num)
 
void makeGenPlots (const edm::Event &iEvent)
 
void makeHLTPlots (const edm::Event &iEvent)
 
void makeRecoPlots (const edm::Event &iEvent)
 
void makeSimDigiPlotsECAL (const edm::Event &iEvent)
 
void makeSimDigiPlotsRPC (const edm::Event &iEvent)
 
void makeSimTrackPlots (const edm::Event &iEvent)
 

Private Attributes

TH1F * cluSizeDistribution_
 
edm::EDGetTokenT< edm::ValueMap< reco::DeDxData > > dEdxTrackToken_
 
TH2F * dedxVsp
 
TH2F * digiOccupancyMapEB_
 
TH2F * digiOccupancyMapEEM_
 
TH2F * digiOccupancyMapEEP_
 
TH1F * digisEcalNumHistEB_
 
TH1F * digisEcalNumHistEE_
 
bool doGenPlots_
 
bool doHLTPlots_
 
bool doRecoPlots_
 
bool doSimDigiPlots_
 
bool doSimTrackPlots_
 
edm::EDGetTokenT< EBDigiCollectionEBDigiCollectionToken_
 
edm::EDGetTokenT< edm::PCaloHitContainerebSimHitToken_
 
edm::EDGetTokenT< EEDigiCollectionEEDigiCollectionToken_
 
edm::EDGetTokenT< edm::PCaloHitContainereeSimHitToken_
 
TH1F * efficiencyRPCRecHitSimDigis_
 
TH1F * h_genhscp_met
 
TH1F * h_genhscp_met_nohscp
 
TH1F * h_genhscp_scaloret
 
TH1F * h_genhscp_scaloret_nohscp
 
TH1F * hltjet
 
TH1F * hltmet
 
TH1F * hltmu
 
TH1F * particleBetaHist_
 
TH1F * particleBetaInverseHist_
 
TH1F * particleEtaHist_
 
std::vector< int > particleIds_
 
std::map< int, int > particleIdsFoundMap_
 
TH1F * particleMassHist_
 
TH1F * particlePhiHist_
 
TH1F * particlePHist_
 
TH1F * particlePtHist_
 
int particleStatus_
 
TH1F * particleStatusHist_
 
TH2F * RecoHSCPPtVsGenPt
 
TH1F * residualsRPCRecHitSimDigis_
 
TH1F * rpcBXBarrel_ [6]
 
TH1F * rpcBXEndCap_ [3]
 
edm::ESHandle< RPCGeometryrpcGeo
 
edm::EDGetTokenT< RPCRecHitCollectionrpcRecHitsToken_
 
TH1F * rpcTimeOfFlightBarrel_ [6]
 
TH1F * rpcTimeOfFlightEndCap_ [3]
 
TH1F * simHitsEcalDigiMatchEnergyHistEB_
 
TH1F * simHitsEcalDigiMatchEnergyHistEE_
 
TH2F * simHitsEcalDigiMatchEnergyVsTimeHistEB_
 
TH2F * simHitsEcalDigiMatchEnergyVsTimeHistEE_
 
TH1F * simHitsEcalDigiMatchIEtaHist_
 
TH1F * simHitsEcalDigiMatchIPhiHist_
 
TH1F * simHitsEcalDigiMatchTimeHistEB_
 
TH1F * simHitsEcalDigiMatchTimeHistEE_
 
TH1F * simHitsEcalEnergyHistEB_
 
TH1F * simHitsEcalEnergyHistEE_
 
TH2F * simHitsEcalEnergyVsTimeHistEB_
 
TH2F * simHitsEcalEnergyVsTimeHistEE_
 
TH1F * simHitsEcalNumHistEB_
 
TH1F * simHitsEcalNumHistEE_
 
TH1F * simHitsEcalTimeHistEB_
 
TH1F * simHitsEcalTimeHistEE_
 
TH1F * simTrackParticleBetaHist_
 
TH1F * simTrackParticleEtaHist_
 
TH1F * simTrackParticlePhiHist_
 
TH1F * simTrackParticlePHist_
 
TH1F * simTrackParticlePtHist_
 
edm::EDGetTokenT< edm::SimTrackContainersimTracksToken_
 
edm::EDGetTokenT< edm::SimTrackContainersimTrackToken_
 
edm::EDGetTokenT< reco::TrackCollectiontkTracksToken_
 
edm::EDGetTokenT< edm::HepMCProducttoken_
 
edm::EDGetTokenT< trigger::TriggerEventtrEvToken_
 
edm::EDGetTokenT< edm::TriggerResultstriggerResultsToken_
 

Additional Inherited Members

- Public Types inherited from edm::EDAnalyzer
typedef EDAnalyzer ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from edm::EDAnalyzer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &)
 
static bool wantsGlobalLuminosityBlocks ()
 
static bool wantsGlobalRuns ()
 
static bool wantsStreamLuminosityBlocks ()
 
static bool wantsStreamRuns ()
 
- Protected Member Functions inherited from edm::EDConsumerBase
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 

Detailed Description

Description: [one line class summary]

Implementation: [Notes on implementation]

Definition at line 46 of file HSCPValidator.h.

Constructor & Destructor Documentation

◆ HSCPValidator()

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

Definition at line 96 of file HSCPValidator.cc.

97  : doGenPlots_(iConfig.getParameter<bool>("MakeGenPlots")),
98  doHLTPlots_(iConfig.getParameter<bool>("MakeHLTPlots")),
99  doSimTrackPlots_(iConfig.getParameter<bool>("MakeSimTrackPlots")),
100  doSimDigiPlots_(iConfig.getParameter<bool>("MakeSimDigiPlots")),
101  doRecoPlots_(iConfig.getParameter<bool>("MakeRecoPlots")),
102  token_(consumes<edm::HepMCProduct>(iConfig.getParameter<edm::InputTag>("generatorLabel"))),
103  simTracksToken_(consumes<edm::SimTrackContainer>(edm::InputTag("g4SimHits"))),
104  trEvToken_(consumes<trigger::TriggerEvent>(edm::InputTag("hltTriggerSummaryAOD"))),
105  tkTracksToken_(consumes<reco::TrackCollection>(edm::InputTag("generalTracks"))),
107  rpcRecHitsToken_(consumes<RPCRecHitCollection>(edm::InputTag("rpcRecHits"))),
108  triggerResultsToken_(consumes<edm::TriggerResults>(edm::InputTag("TriggerResults", "", "HLT"))),
109  particleIds_(iConfig.getParameter<std::vector<int> >("particleIds")),
110  particleStatus_(iConfig.getUntrackedParameter<int>("particleStatus", 1)),
111  ebSimHitToken_(consumes<edm::PCaloHitContainer>(iConfig.getParameter<edm::InputTag>("EBSimHitCollection"))),
112  eeSimHitToken_(consumes<edm::PCaloHitContainer>(iConfig.getParameter<edm::InputTag>("EESimHitCollection"))),
113  simTrackToken_(consumes<edm::SimTrackContainer>(iConfig.getParameter<edm::InputTag>("SimTrackCollection"))),
114  EBDigiCollectionToken_(consumes<EBDigiCollection>(iConfig.getParameter<edm::InputTag>("EBDigiCollection"))),
115  EEDigiCollectionToken_(consumes<EEDigiCollection>(iConfig.getParameter<edm::InputTag>("EEDigiCollection"))) {
116  //now do what ever initialization is needed
117  // GEN
118  particleEtaHist_ = fileService->make<TH1F>("particleEta", "Eta of gen particle", 100, -5, 5);
119  particlePhiHist_ = fileService->make<TH1F>("particlePhi", "Phi of gen particle", 180, -3.15, 3.15);
120  particlePHist_ = fileService->make<TH1F>("particleP", "Momentum of gen particle", 500, 0, 2000);
121  particlePtHist_ = fileService->make<TH1F>("particlePt", "P_{T} of gen particle", 500, 0, 2000);
122  particleMassHist_ = fileService->make<TH1F>("particleMass", "Mass of gen particle", 1000, 0, 2000);
123  particleStatusHist_ = fileService->make<TH1F>("particleStatus", "Status of gen particle", 10, 0, 10);
124  particleBetaHist_ = fileService->make<TH1F>("particleBeta", "Beta of gen particle", 100, 0, 1);
125  particleBetaInverseHist_ = fileService->make<TH1F>("particleBetaInverse", "1/#beta of gen particle", 100, 0, 5);
126 
127  h_genhscp_met = fileService->make<TH1F>("hscp_met", "missing E_{T} hscp", 100, 0., 1500.);
128  h_genhscp_met_nohscp = fileService->make<TH1F>("hscp_met_nohscp", "missing E_{T} w/o hscp", 100, 0., 1500.);
129  h_genhscp_scaloret = fileService->make<TH1F>("hscp_scaloret", "scalor E_{T} sum", 100, 0., 1500.);
131  fileService->make<TH1F>("hscp_scaloret_nohscp", "scalor E_{T} sum w/o hscp", 100, 0., 1500.);
132 
133  //SIM track Info
134  simTrackParticleEtaHist_ = fileService->make<TH1F>("simTrackParticleEta", "Eta of simTrackParticle", 100, -5, 5);
136  fileService->make<TH1F>("simTrackParticlePhi", "Phi of simTrackParticle", 180, -3.15, 3.15);
137  simTrackParticlePHist_ = fileService->make<TH1F>("simTrackParticleP", "Momentum of simTrackParticle", 500, 0, 2000);
138  simTrackParticlePtHist_ = fileService->make<TH1F>("simTrackParticlePt", "P_{T} of simTrackParticle", 500, 0, 2000);
139  simTrackParticleBetaHist_ = fileService->make<TH1F>("simTrackParticleBeta", "Beta of simTrackParticle", 100, 0, 1);
140  //reco track Info
141 
142  RecoHSCPPtVsGenPt = fileService->make<TH2F>("Recovsgenpt", "RecovsGen", 100, 0, 1000, 100, 0, 1000);
143  dedxVsp = fileService->make<TH2F>("dedxvsp", "dedxvsp", 100, 0, 1000, 100, 0, 10);
144  //HLT Info
145  hltmet = fileService->make<TH1F>("HLT_MET", "MET", 3, -1, 2);
146  hltjet = fileService->make<TH1F>("HLT_JET", "JET", 3, -1, 2);
147  hltmu = fileService->make<TH1F>("HLT_Mu", "Mu", 3, -1, 2);
148 
149  // SIM-DIGI: ECAL
151  fileService->make<TH1F>("ecalEnergyOfSimHitsEB", "HSCP SimTrack-matching SimHit energy EB [GeV]", 125, -1, 4);
153  fileService->make<TH1F>("ecalEnergyOfSimHitsEE", "HSCP SimTrack-matching SimHit energy EE [GeV]", 125, -1, 4);
155  fileService->make<TH1F>("ecalTimingOfSimHitsEB", "HSCP SimTrack-matching SimHit time EB [ns]", 115, -15, 100);
157  fileService->make<TH1F>("ecalTimingOfSimHitsEE", "HSCP SimTrack-matching SimHit time EE [ns]", 115, -15, 100);
159  "ecalNumberOfSimHitsEB", "Number of HSCP SimTrack-matching EB sim hits in event", 100, 0, 200);
161  "ecalNumberOfSimHitsEE", "Number of HSCP SimTrack-matching EE sim hits in event", 100, 0, 200);
163  fileService->make<TH2F>("ecalEnergyVsTimeOfSimHitsEB",
164  "Energy vs. time of HSCP SimTrack-matching EB sim hits in event",
165  115,
166  -15,
167  100,
168  125,
169  -1,
170  4);
172  fileService->make<TH2F>("ecalEnergyVsTimeOfSimHitsEE",
173  "Energy vs. time of HSCP SimTrack-matching EE sim hits in event",
174  115,
175  -15,
176  100,
177  125,
178  -1,
179  4);
181  fileService->make<TH1F>("ecalEnergyOfDigiMatSimHitsEB", "HSCP digi-matching SimHit energy EB [GeV]", 125, -1, 4);
183  fileService->make<TH1F>("ecalEnergyOfDigiMatSimHitsEE", "HSCP digi-matching SimHit energy EE [GeV]", 125, -1, 4);
185  fileService->make<TH1F>("ecalTimingOfDigiMatSimHitsEB", "HSCP digi-matching SimHit time EB [ns]", 115, -15, 100);
187  fileService->make<TH1F>("ecalTimingOfDigiMatSimHitsEE", "HSCP digi-matching SimHit time EE [ns]", 115, -15, 100);
189  "ecalEnergyVsTimeOfDigiMatSimHitsEB", "HSCP digi-matching EB SimHit energy vs. time", 115, -15, 100, 125, -1, 4);
191  "ecalEnergyVsTimeOfDigiMatSimHitsEE", "HSCP digi-matching EE SimHit energy vs. time", 115, -15, 100, 125, -1, 4);
193  fileService->make<TH1F>("ecalIEtaOfDigiMatchSimHits", "iEta of digi-matching Ecal simHits (EB)", 171, -85, 86);
195  fileService->make<TH1F>("ecalIPhiOfDigiMatchSimHits", "iPhi of digi-matching Ecal simHits (EB)", 360, 1, 361);
197  fileService->make<TH1F>("ecalDigisNumberEB", "Number of EB digis matching simhits in event", 200, 0, 1000);
199  fileService->make<TH1F>("ecalDigisNumberEE", "Number of EE digis matching simhits in event", 200, 0, 1000);
201  "ecalDigiOccupancyMapEB", "Occupancy of simhit-matching digis EB;i#phi;i#eta", 360, 1, 361, 171, -85, 86);
203  "ecalDigiOccupancyMapEEM", "Occupancy of simhit-matching digis EEM;ix;iy", 100, 1, 100, 100, 1, 100);
205  "ecalDigiOccupancyMapEEP", "Occupancy of simhit-matching digis EEP;ix;iy", 100, 1, 100, 100, 1, 100);
206 
207  // SIM-DIGI: RPC
209  fileService->make<TH1F>("residualsRPCRecHitSimDigis", "HSCP SimHit - Clossest RPC RecHit", 100, -5, 5);
211  fileService->make<TH1F>("efficiencyRPCRecHitSimDigis", "HSCP SimHits RecHits Efficiency", 2, -0.5, 1.5);
212  cluSizeDistribution_ = fileService->make<TH1F>("RPCCluSizeDistro", "RPC HSCP CluSize Distribution", 11, -0.5, 10.5);
213  rpcTimeOfFlightBarrel_[0] = fileService->make<TH1F>("RPCToFLayer1", "RPC HSCP Time Of Flight Layer 1", 50, 5, 100);
214  rpcTimeOfFlightBarrel_[1] = fileService->make<TH1F>("RPCToFLayer2", "RPC HSCP Time Of Flight Layer 2", 50, 5, 100);
215  rpcTimeOfFlightBarrel_[2] = fileService->make<TH1F>("RPCToFLayer3", "RPC HSCP Time Of Flight Layer 3", 50, 5, 100);
216  rpcTimeOfFlightBarrel_[3] = fileService->make<TH1F>("RPCToFLayer4", "RPC HSCP Time Of Flight Layer 4", 50, 5, 100);
217  rpcTimeOfFlightBarrel_[4] = fileService->make<TH1F>("RPCToFLayer5", "RPC HSCP Time Of Flight Layer 5", 50, 5, 100);
218  rpcTimeOfFlightBarrel_[5] = fileService->make<TH1F>("RPCToFLayer6", "RPC HSCP Time Of Flight Layer 6", 50, 5, 100);
219  rpcBXBarrel_[0] = fileService->make<TH1F>("RPCBXLayer1", "RPC HSCP BX Layer 1", 5, -0.5, 4.5);
220  rpcBXBarrel_[1] = fileService->make<TH1F>("RPCBXLayer2", "RPC HSCP BX Layer 2", 5, -0.5, 4.5);
221  rpcBXBarrel_[2] = fileService->make<TH1F>("RPCBXLayer3", "RPC HSCP BX Layer 3", 5, -0.5, 4.5);
222  rpcBXBarrel_[3] = fileService->make<TH1F>("RPCBXLayer4", "RPC HSCP BX Layer 4", 5, -0.5, 4.5);
223  rpcBXBarrel_[4] = fileService->make<TH1F>("RPCBXLayer5", "RPC HSCP BX Layer 5", 5, -0.5, 4.5);
224  rpcBXBarrel_[5] = fileService->make<TH1F>("RPCBXLayer6", "RPC HSCP BX Layer 6", 5, -0.5, 4.5);
225  rpcTimeOfFlightEndCap_[0] = fileService->make<TH1F>("RPCToFDisk1", "RPC HSCP Time Of Flight Disk 1", 50, 5, 100);
226  rpcTimeOfFlightEndCap_[1] = fileService->make<TH1F>("RPCToFDisk2", "RPC HSCP Time Of Flight Disk 2", 50, 5, 100);
227  rpcTimeOfFlightEndCap_[2] = fileService->make<TH1F>("RPCToFDisk3", "RPC HSCP Time Of Flight Disk 3", 50, 5, 100);
228  rpcBXEndCap_[0] = fileService->make<TH1F>("RPCBXDisk1", "RPC HSCP BX Disk 1", 5, -0.5, 4.5);
229  rpcBXEndCap_[1] = fileService->make<TH1F>("RPCBXDisk2", "RPC HSCP BX Disk 2", 5, -0.5, 4.5);
230  rpcBXEndCap_[2] = fileService->make<TH1F>("RPCBXDisk3", "RPC HSCP BX Disk 3", 5, -0.5, 4.5);
231 }

References cluSizeDistribution_, dedxVsp, digiOccupancyMapEB_, digiOccupancyMapEEM_, digiOccupancyMapEEP_, digisEcalNumHistEB_, digisEcalNumHistEE_, efficiencyRPCRecHitSimDigis_, fileService, h_genhscp_met, h_genhscp_met_nohscp, h_genhscp_scaloret, h_genhscp_scaloret_nohscp, hltjet, hltmet, hltmu, TFileService::make(), particleBetaHist_, particleBetaInverseHist_, particleEtaHist_, particleMassHist_, particlePhiHist_, particlePHist_, particlePtHist_, particleStatusHist_, RecoHSCPPtVsGenPt, residualsRPCRecHitSimDigis_, rpcBXBarrel_, rpcBXEndCap_, rpcTimeOfFlightBarrel_, rpcTimeOfFlightEndCap_, simHitsEcalDigiMatchEnergyHistEB_, simHitsEcalDigiMatchEnergyHistEE_, simHitsEcalDigiMatchEnergyVsTimeHistEB_, simHitsEcalDigiMatchEnergyVsTimeHistEE_, simHitsEcalDigiMatchIEtaHist_, simHitsEcalDigiMatchIPhiHist_, simHitsEcalDigiMatchTimeHistEB_, simHitsEcalDigiMatchTimeHistEE_, simHitsEcalEnergyHistEB_, simHitsEcalEnergyHistEE_, simHitsEcalEnergyVsTimeHistEB_, simHitsEcalEnergyVsTimeHistEE_, simHitsEcalNumHistEB_, simHitsEcalNumHistEE_, simHitsEcalTimeHistEB_, simHitsEcalTimeHistEE_, simTrackParticleBetaHist_, simTrackParticleEtaHist_, simTrackParticlePhiHist_, simTrackParticlePHist_, and simTrackParticlePtHist_.

◆ ~HSCPValidator()

HSCPValidator::~HSCPValidator ( )
override

Definition at line 233 of file HSCPValidator.cc.

233  {
234  // do anything here that needs to be done at desctruction time
235  // (e.g. close files, deallocate resources etc.)
236  // particleEtaHist_ = fileService->make<TH1F>("particleEta","Eta of gen particle",100,-5,5);
237  // particlePhiHist_ = fileService->make<TH1F>("particlePhi","Phi of gen particle",180,-3.15,3.15);
238  // particlePHist_ = fileService->make<TH1F>("particleP","Momentum of gen particle",500,0,2000);
239  // particlePtHist_ = fileService->make<TH1F>("particlePt","P_{T} of gen particle",500,0,2000);
240  // particleMassHist_ = fileService->make<TH1F>("particleMass","Mass of gen particle",1000,0,2000);
241  // particleStatusHist_ = fileService->make<TH1F>("particleStatus","Status of gen particle",10,0,10);
242  // particleBetaHist_ = fileService->make<TH1F>("particleBeta","Beta of gen particle",100,0,1);
243  // particleBetaInverseHist_ = fileService->make<TH1F>("particleBetaInverse","1/#beta of gen particle",100,0,5);
244 }

Member Function Documentation

◆ analyze()

void HSCPValidator::analyze ( const edm::Event iEvent,
const edm::EventSetup iSetup 
)
overrideprivatevirtual

◆ beginJob()

void HSCPValidator::beginJob ( void  )
overrideprivatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 272 of file HSCPValidator.cc.

272 {}

◆ endJob()

void HSCPValidator::endJob ( void  )
overrideprivatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 275 of file HSCPValidator.cc.

275  {
276  std::string frequencies = "";
277  for (std::map<int, int>::const_iterator itr = particleIdsFoundMap_.begin(); itr != particleIdsFoundMap_.end();
278  ++itr) {
279  frequencies += "PDG ID: ";
280  frequencies += intToString(itr->first);
281  frequencies += " Frequency: ";
282  frequencies += intToString(itr->second);
283  frequencies += "\n";
284  }
285  std::cout << "Found PDGIds: "
286  << "\n\n"
287  << frequencies << std::endl;
288 }

References gather_cfg::cout, intToString(), particleIdsFoundMap_, and AlCaHLTBitMon_QueryRunRegistry::string.

◆ IncreasedTreshold()

bool HSCPValidator::IncreasedTreshold ( const trigger::TriggerEvent trEv,
const edm::InputTag InputPath,
double  NewThreshold,
double  etaCut,
int  NObjectAboveThreshold,
bool  averageThreshold 
)
private

Definition at line 839 of file HSCPValidator.cc.

844  {
845  unsigned int filterIndex = trEv.filterIndex(InputPath);
846  //if(filterIndex<trEv.sizeFilters())printf("SELECTED INDEX =%i --> %s XXX %s\n",filterIndex,trEv.filterTag(filterIndex).label().c_str(), trEv.filterTag(filterIndex).process().c_str());
847 
848  if (filterIndex < trEv.sizeFilters()) {
849  const trigger::Vids& VIDS(trEv.filterIds(filterIndex));
850  const trigger::Keys& KEYS(trEv.filterKeys(filterIndex));
851  const int nI(VIDS.size());
852  const int nK(KEYS.size());
853  assert(nI == nK);
854  const int n(std::max(nI, nK));
855  const trigger::TriggerObjectCollection& TOC(trEv.getObjects());
856 
857  if (!averageThreshold) {
858  int NObjectAboveThresholdObserved = 0;
859  for (int i = 0; i != n; ++i) {
860  if (TOC[KEYS[i]].pt() > NewThreshold && fabs(TOC[KEYS[i]].eta()) < etaCut)
861  NObjectAboveThresholdObserved++;
862  //cout << " " << i << " " << VIDS[i] << "/" << KEYS[i] << ": "<< TOC[KEYS[i]].id() << " " << TOC[KEYS[i]].pt() << " " << TOC[KEYS[i]].eta() << " " << TOC[KEYS[i]].phi() << " " << TOC[KEYS[i]].mass()<< endl;
863  }
864  if (NObjectAboveThresholdObserved >= NObjectAboveThreshold)
865  return true;
866 
867  } else {
868  std::vector<double> ObjPt;
869 
870  for (int i = 0; i != n; ++i) {
871  ObjPt.push_back(TOC[KEYS[i]].pt());
872  //cout << " " << i << " " << VIDS[i] << "/" << KEYS[i] << ": "<< TOC[KEYS[i]].id() << " " << TOC[KEYS[i]].pt() << " " << TOC[KEYS[i]].eta() << " " << TOC[KEYS[i]].phi() << " " << TOC[KEYS[i]].mass()<< endl;
873  }
874  if ((int)(ObjPt.size()) < NObjectAboveThreshold)
875  return false;
876  std::sort(ObjPt.begin(), ObjPt.end());
877 
878  double Average = 0;
879  for (int i = 0; i < NObjectAboveThreshold; i++) {
880  Average += ObjPt[ObjPt.size() - 1 - i];
881  }
882  Average /= NObjectAboveThreshold;
883  //cout << "AVERAGE = " << Average << endl;
884 
885  if (Average > NewThreshold)
886  return true;
887  }
888  }
889  return false;
890 }

References cms::cuda::assert(), Average, PVValHelper::eta, fftjetproducer_cfi::etaCut, trigger::TriggerEvent::filterIds(), trigger::TriggerEvent::filterIndex(), trigger::TriggerEvent::filterKeys(), trigger::TriggerEvent::getObjects(), mps_fire::i, SiStripPI::max, dqmiodumpmetadata::n, DiDispStaMuonMonitor_cfi::pt, and trigger::TriggerEvent::sizeFilters().

Referenced by makeHLTPlots().

◆ intToString()

std::string HSCPValidator::intToString ( int  num)
private

Definition at line 830 of file HSCPValidator.cc.

830  {
831  using namespace std;
832  ostringstream myStream;
833  myStream << num << flush;
834  return (myStream.str()); //returns the string form of the stringstream object
835 }

References EgammaValidation_cff::num.

Referenced by endJob().

◆ makeGenPlots()

void HSCPValidator::makeGenPlots ( const edm::Event iEvent)
private

Definition at line 291 of file HSCPValidator.cc.

291  {
292  using namespace edm;
293 
294  double missingpx = 0;
295  double missingpy = 0;
296  double missingpx_nohscp = 0;
297  double missingpy_nohscp = 0;
298  double scalorEt = 0;
299  double scalorEt_nohscp = 0;
300 
302  iEvent.getByToken(token_, evt);
303 
304  HepMC::GenEvent* myGenEvent = new HepMC::GenEvent(*(evt->GetEvent()));
305  for (HepMC::GenEvent::particle_iterator p = myGenEvent->particles_begin(); p != myGenEvent->particles_end(); ++p) {
306  if ((*p)->status() != particleStatus_)
307  continue;
308  //calculate MET(neutrino as MET)
309  if (abs((*p)->pdg_id()) != 12 && abs((*p)->pdg_id()) != 14 &&
310  abs((*p)->pdg_id()) != 16) { //for non-neutrino particles.
311  missingpx -= (*p)->momentum().px();
312  missingpy -= (*p)->momentum().py();
313  scalorEt += (*p)->momentum().perp();
314  }
315 
316  // Check if the particleId is in our R-hadron list
317  std::vector<int>::const_iterator partIdItr = find(particleIds_.begin(), particleIds_.end(), (*p)->pdg_id());
318  if (partIdItr == particleIds_.end()) {
319  //calculate MET(neutrino+ HSCP as MET)
320  if (abs((*p)->pdg_id()) != 12 && abs((*p)->pdg_id()) != 14 &&
321  abs((*p)->pdg_id()) != 16) { //for non-neutrino particles.
322  missingpx_nohscp -= (*p)->momentum().px();
323  missingpy_nohscp -= (*p)->momentum().py();
324  scalorEt_nohscp += (*p)->momentum().perp();
325  }
326  } else {
327  particleStatusHist_->Fill((*p)->status());
328 
329  std::pair<std::map<int, int>::iterator, bool> pair =
330  particleIdsFoundMap_.insert(std::make_pair<int, int>((*p)->pdg_id(), 1));
331  if (!pair.second) {
332  ++(pair.first->second);
333  }
334 
335  double mag = sqrt(pow((*p)->momentum().px(), 2) + pow((*p)->momentum().py(), 2) + pow((*p)->momentum().pz(), 2));
336  particleEtaHist_->Fill((*p)->momentum().eta());
337  particlePhiHist_->Fill((*p)->momentum().phi());
338  particlePHist_->Fill(mag);
339  particlePtHist_->Fill((*p)->momentum().perp());
340  particleMassHist_->Fill((*p)->generated_mass());
341  float particleP = mag;
342  float particleM = (*p)->generated_mass();
343  particleBetaHist_->Fill(particleP / sqrt(particleP * particleP + particleM * particleM));
344  particleBetaInverseHist_->Fill(sqrt(particleP * particleP + particleM * particleM) / particleP);
345  }
346  }
347 
348  h_genhscp_met->Fill(sqrt(missingpx * missingpx + missingpy * missingpy));
349  h_genhscp_met_nohscp->Fill(sqrt(missingpx_nohscp * missingpx_nohscp + missingpy_nohscp * missingpy_nohscp));
350  h_genhscp_scaloret->Fill(scalorEt);
351  h_genhscp_scaloret_nohscp->Fill(scalorEt_nohscp);
352 
353  delete myGenEvent;
354 }

References funct::abs(), spr::find(), edm::HepMCProduct::GetEvent(), h_genhscp_met, h_genhscp_met_nohscp, h_genhscp_scaloret, h_genhscp_scaloret_nohscp, iEvent, mag(), AlCaHLTBitMon_ParallelJobs::p, particleBetaHist_, particleBetaInverseHist_, particleEtaHist_, particleIds_, particleIdsFoundMap_, particleMassHist_, particlePhiHist_, particlePHist_, particlePtHist_, particleStatus_, particleStatusHist_, funct::pow(), mathSSE::sqrt(), and token_.

Referenced by analyze().

◆ makeHLTPlots()

void HSCPValidator::makeHLTPlots ( const edm::Event iEvent)
private

Definition at line 384 of file HSCPValidator.cc.

384  {
385  using namespace edm;
386  //get HLT infos
387 
390 
391  edm::TriggerResultsByName tr(nullptr, nullptr);
392  if (triggerResults.isValid()) {
393  tr = iEvent.triggerResultsByName(*triggerResults);
394  }
395 
396  if (!tr.isValid()) {
397  std::cout << "Trigger Results not available" << std::endl;
398  }
399 
401  iEvent.getByToken(trEvToken_, trEvHandle);
402  trigger::TriggerEvent trEv = *trEvHandle;
403 
404  unsigned int TrIndex_Unknown = tr.size();
405 
406  // HLT TRIGGER BASED ON 1 MUON!
407  if (TrIndex_Unknown != tr.triggerIndex("HLT_Mu40_v1")) {
408  if (tr.accept(tr.triggerIndex("HLT_Mu40_v1")))
409  hltmu->Fill(1);
410  else {
411  hltmu->Fill(0);
412  }
413  } else {
414  if (TrIndex_Unknown != tr.triggerIndex("HLT_Mu30_v1")) {
415  if (IncreasedTreshold(trEv, InputTag("hltSingleMu30L3Filtered30", "", "HLT"), 40, 2.1, 1, false))
416  hltmu->Fill(1);
417  else
418  hltmu->Fill(0);
419  } else {
420  printf("BUG with HLT_Mu\n");
421  std::cout << "trigger names are : ";
422  for (unsigned int i = 0; i < tr.size(); i++) {
423  std::cout << " " << tr.triggerName(i);
424  }
425  std::cout << std::endl;
426  }
427  }
428 
429  // HLT TRIGGER BASED ON MET!
430  if (TrIndex_Unknown != tr.triggerIndex("HLT_PFMHT150_v3")) {
431  if (tr.accept(tr.triggerIndex("HLT_PFMHT150_v3")))
432  hltmet->Fill(1);
433  else
434  hltmet->Fill(0);
435  } else {
436  if (TrIndex_Unknown != tr.triggerIndex("HLT_PFMHT150_v2")) {
437  if (tr.accept(tr.triggerIndex("HLT_PFMHT150_v2")))
438  hltmet->Fill(1);
439  else
440  hltmet->Fill(0);
441  } else {
442  printf("BUG with HLT_MET\n");
443  }
444  }
445 
446  // HLT TRIGGER BASED ON 1 JET!
447  if (TrIndex_Unknown != tr.triggerIndex("HLT_Jet370_v1")) {
448  if (tr.accept(tr.triggerIndex("HLT_Jet370_v1")))
449  hltjet->Fill(1);
450  else
451  hltjet->Fill(0);
452  } else {
453  if (TrIndex_Unknown != tr.triggerIndex("HLT_Jet100U")) {
454  if (IncreasedTreshold(trEv, InputTag("hlt1jet100U", "", "HLT"), 140, 5., 1, false))
455  hltjet->Fill(1);
456  else
457  hltjet->Fill(0);
458  } else {
459  if (TrIndex_Unknown != tr.triggerIndex("HLT_Jet70U")) {
460  if (IncreasedTreshold(trEv, InputTag("hlt1jet70U", "", "HLT"), 140, 5., 1, false))
461  hltjet->Fill(1);
462  else
463  hltjet->Fill(0);
464  } else {
465  if (TrIndex_Unknown != tr.triggerIndex("HLT_Jet50U")) {
466  if (IncreasedTreshold(trEv, InputTag("hlt1jet50U", "", "HLT"), 140, 2.5, 1, false))
467  hltjet->Fill(1);
468  else
469  hltjet->Fill(0);
470  } else {
471  printf("BUG with HLT_Jet\n");
472  }
473  }
474  }
475  }
476 }

References edm::TriggerResultsByName::accept(), gather_cfg::cout, hltjet, hltmet, hltmu, mps_fire::i, iEvent, IncreasedTreshold(), HLT_2018_cff::InputTag, edm::TriggerResultsByName::isValid(), edm::TriggerResultsByName::size(), trEvToken_, edm::TriggerResultsByName::triggerIndex(), edm::TriggerResultsByName::triggerName(), triggerResults, and triggerResultsToken_.

Referenced by analyze().

◆ makeRecoPlots()

void HSCPValidator::makeRecoPlots ( const edm::Event iEvent)
private

Definition at line 676 of file HSCPValidator.cc.

676  {
677  using namespace edm;
678  using namespace reco;
679 
681  iEvent.getByToken(token_, evt);
682 
683  Handle<TrackCollection> tkTracks;
684  iEvent.getByToken(tkTracksToken_, tkTracks);
685  const reco::TrackCollection tkTC = *(tkTracks.product());
686 
687  Handle<ValueMap<DeDxData> > dEdxTrackHandle;
688  iEvent.getByToken(dEdxTrackToken_, dEdxTrackHandle);
689  const ValueMap<DeDxData> dEdxTrack = *dEdxTrackHandle.product();
690 
691  for (size_t i = 0; i < tkTracks->size(); i++) {
692  reco::TrackRef trkRef = reco::TrackRef(tkTracks, i);
693 
694  if (trkRef->pt() < 5 || trkRef->normalizedChi2() > 10)
695  continue;
696 
697  double minR = 999;
698  double hscpgenPt = -1;
699 
700  HepMC::GenEvent* myGenEvent = new HepMC::GenEvent(*(evt->GetEvent()));
701  for (HepMC::GenEvent::particle_iterator p = myGenEvent->particles_begin(); p != myGenEvent->particles_end(); ++p) {
702  if ((*p)->status() != particleStatus_)
703  continue;
704  // Check if the particleId is in our R-hadron list
705  std::vector<int>::const_iterator partIdItr = find(particleIds_.begin(), particleIds_.end(), (*p)->pdg_id());
706  if (partIdItr != particleIds_.end()) {
707  //calculate DeltaR
708  double distance =
709  pow((*p)->momentum().eta() - trkRef->eta(), 2) + pow((*p)->momentum().phi() - trkRef->phi(), 2);
711  if (distance < minR) {
712  minR = distance;
713  hscpgenPt = (*p)->momentum().perp();
714  }
715  }
716  }
717  RecoHSCPPtVsGenPt->Fill(trkRef->pt(), hscpgenPt);
718 
719  delete myGenEvent;
720  double dedx = dEdxTrack[trkRef].dEdx();
721  dedxVsp->Fill(trkRef->p(), dedx);
722  }
723 }

References dEdxTrackToken_, dedxVsp, HLT_2018_cff::distance, spr::find(), edm::HepMCProduct::GetEvent(), mps_fire::i, iEvent, HLT_2018_cff::minR, AlCaHLTBitMon_ParallelJobs::p, particleIds_, particleStatus_, funct::pow(), edm::Handle< T >::product(), RecoHSCPPtVsGenPt, mathSSE::sqrt(), tkTracksToken_, and token_.

Referenced by analyze().

◆ makeSimDigiPlotsECAL()

void HSCPValidator::makeSimDigiPlotsECAL ( const edm::Event iEvent)
private

Definition at line 479 of file HSCPValidator.cc.

479  {
480  using namespace edm;
481  // EB SimHits
482  Handle<PCaloHitContainer> ebSimHits;
483  iEvent.getByToken(ebSimHitToken_, ebSimHits);
484  if (!ebSimHits.isValid()) {
485  std::cout << "Cannot get EBSimHits from event!" << std::endl;
486  return;
487  }
488  // EE SimHits
490  iEvent.getByToken(eeSimHitToken_, eeSimHits);
491  if (!eeSimHits.isValid()) {
492  std::cout << "Cannot get EESimHits from event!" << std::endl;
493  return;
494  }
495  // SimTracks
497  iEvent.getByToken(simTrackToken_, simTracks);
498  if (!simTracks.isValid()) {
499  std::cout << "Cannot get SimTracks from event!" << std::endl;
500  return;
501  }
502  // EB Digis
503  Handle<EBDigiCollection> ebDigis;
504  iEvent.getByToken(EBDigiCollectionToken_, ebDigis);
505  if (!ebDigis.isValid()) {
506  std::cout << "Cannot get EBDigis from event!" << std::endl;
507  return;
508  }
509  // EE Digis
512  if (!eeDigis.isValid()) {
513  std::cout << "Cannot get EEDigis from event!" << std::endl;
514  return;
515  }
516 
517  // EB first
518  // 1) Look at SimTracks, getting only the HSCP tracks
519  // 2) Match to PCaloHits
520  // 3) Match to digis
521  int numMatchedSimHitsEventEB = 0;
522  int numMatchedDigisEventEB = 0;
523  const PCaloHitContainer* phitsEB = nullptr;
524  phitsEB = ebSimHits.product();
525  for (SimTrackContainer::const_iterator simTrack = simTracks->begin(); simTrack != simTracks->end(); ++simTrack) {
526  // Check if the particleId is in our list
527  std::vector<int>::const_iterator partIdItr = find(particleIds_.begin(), particleIds_.end(), simTrack->type());
528  if (partIdItr == particleIds_.end())
529  continue;
530 
531  PCaloHitContainer mySimHitsEB;
532  std::vector<EBDataFrame> myDigisEB;
533 
534  //int particleId = simTrack->type();
535  int trackId = simTrack->trackId();
536  PCaloHitContainer::const_iterator simHitItr = phitsEB->begin();
537  while (simHitItr != phitsEB->end()) {
538  if (simHitItr->geantTrackId() == trackId)
539  mySimHitsEB.push_back(*simHitItr);
540  ++simHitItr;
541  }
542  if (mySimHitsEB.empty()) {
543  std::cout << "Could not find matching EB PCaloHits for SimTrack id: " << trackId << ". Skipping this SimTrack"
544  << std::endl;
545  continue;
546  }
547 
548  // Loop over matching PCaloHits
549  for (simHitItr = mySimHitsEB.begin(); simHitItr != mySimHitsEB.end(); ++simHitItr) {
550  simHitsEcalEnergyHistEB_->Fill(simHitItr->energy());
551  simHitsEcalTimeHistEB_->Fill(simHitItr->time());
552  simHitsEcalEnergyVsTimeHistEB_->Fill(simHitItr->time(), simHitItr->energy());
553  EBDetId simHitId = EBDetId(simHitItr->id());
554  std::cout << "SimHit DetId found: " << simHitId << " for PDGid: " << simTrack->type() << std::endl;
555  //std::cout << "SimHit hashedIndex: " << simHitId.hashedIndex() << std::endl;
556  std::cout << "SimHit energy: " << simHitItr->energy() << " time: " << simHitItr->time() << std::endl;
557  ++numMatchedSimHitsEventEB;
558 
559  EBDigiCollection::const_iterator digiItr = ebDigis->begin();
560  while (digiItr != ebDigis->end() && (digiItr->id() != simHitId))
561  ++digiItr;
562  if (digiItr == ebDigis->end()) {
563  // Commented out for debugging ease, Aug 3 2009
564  std::cout << "Could not find simHit detId: " << simHitId << "in EBDigiCollection!" << std::endl;
565  continue;
566  }
567  std::vector<EBDataFrame>::const_iterator myDigiItr = myDigisEB.begin();
568  while (myDigiItr != myDigisEB.end() && (digiItr->id() != myDigiItr->id()))
569  ++myDigiItr;
570  if (myDigiItr != myDigisEB.end())
571  continue; // if this digi is already in the list, skip it
572 
573  ++numMatchedDigisEventEB;
574  EBDataFrame df = *digiItr;
575  myDigisEB.push_back(df);
576  std::cout << "SAMPLE ADCs: "
577  << "\t";
578  for (int i = 0; i < 10; ++i)
579  std::cout << i << "\t";
580  std::cout << std::endl << "\t\t";
581  for (int i = 0; i < df.size(); ++i) {
582  std::cout << df.sample(i).adc() << "\t";
583  }
584  std::cout << std::endl << std::endl;
585 
586  simHitsEcalDigiMatchEnergyHistEB_->Fill(simHitItr->energy());
587  simHitsEcalDigiMatchTimeHistEB_->Fill(simHitItr->time());
588  simHitsEcalDigiMatchEnergyVsTimeHistEB_->Fill(simHitItr->time(), simHitItr->energy());
589  simHitsEcalDigiMatchIEtaHist_->Fill(((EBDetId)digiItr->id()).ieta());
590  simHitsEcalDigiMatchIPhiHist_->Fill(((EBDetId)digiItr->id()).iphi());
591  digiOccupancyMapEB_->Fill(((EBDetId)digiItr->id()).iphi(), ((EBDetId)digiItr->id()).ieta());
592  }
593  }
594  simHitsEcalNumHistEB_->Fill(numMatchedSimHitsEventEB);
595  digisEcalNumHistEB_->Fill(numMatchedDigisEventEB);
596 
597  // EE next
598  int numMatchedSimHitsEventEE = 0;
599  int numMatchedDigisEventEE = 0;
600  const PCaloHitContainer* phitsEE = nullptr;
601  phitsEE = eeSimHits.product();
602  for (SimTrackContainer::const_iterator simTrack = simTracks->begin(); simTrack != simTracks->end(); ++simTrack) {
603  // Check if the particleId is in our list
604  std::vector<int>::const_iterator partIdItr = find(particleIds_.begin(), particleIds_.end(), simTrack->type());
605  if (partIdItr == particleIds_.end())
606  continue;
607 
608  PCaloHitContainer mySimHitsEE;
609  std::vector<EEDataFrame> myDigisEE;
610 
611  //int particleId = simTrack->type();
612  int trackId = simTrack->trackId();
613  PCaloHitContainer::const_iterator simHitItr = phitsEE->begin();
614  while (simHitItr != phitsEE->end()) {
615  if (simHitItr->geantTrackId() == trackId)
616  mySimHitsEE.push_back(*simHitItr);
617  ++simHitItr;
618  }
619  if (mySimHitsEE.empty()) {
620  std::cout << "Could not find matching EE PCaloHits for SimTrack id: " << trackId << ". Skipping this SimTrack"
621  << std::endl;
622  continue;
623  }
624 
625  // Loop over matching PCaloHits
626  for (simHitItr = mySimHitsEE.begin(); simHitItr != mySimHitsEE.end(); ++simHitItr) {
627  simHitsEcalEnergyHistEE_->Fill(simHitItr->energy());
628  simHitsEcalTimeHistEE_->Fill(simHitItr->time());
629  simHitsEcalEnergyVsTimeHistEE_->Fill(simHitItr->time(), simHitItr->energy());
630  EEDetId simHitId = EEDetId(simHitItr->id());
631  std::cout << "SimHit DetId found: " << simHitId << " for PDGid: " << simTrack->type() << std::endl;
632  //std::cout << "SimHit hashedIndex: " << simHitId.hashedIndex() << std::endl;
633  std::cout << "SimHit energy: " << simHitItr->energy() << " time: " << simHitItr->time() << std::endl;
634  ++numMatchedSimHitsEventEE;
635 
636  EEDigiCollection::const_iterator digiItr = eeDigis->begin();
637  while (digiItr != eeDigis->end() && (digiItr->id() != simHitId))
638  ++digiItr;
639  if (digiItr == eeDigis->end()) {
640  // Commented out for debugging ease, Aug 3 2009
641  std::cout << "Could not find simHit detId: " << simHitId << "in EEDigiCollection!" << std::endl;
642  continue;
643  }
644  std::vector<EEDataFrame>::const_iterator myDigiItr = myDigisEE.begin();
645  while (myDigiItr != myDigisEE.end() && (digiItr->id() != myDigiItr->id()))
646  ++myDigiItr;
647  if (myDigiItr != myDigisEE.end())
648  continue; // if this digi is already in the list, skip it
649 
650  ++numMatchedDigisEventEE;
651  EEDataFrame df = *digiItr;
652  myDigisEE.push_back(df);
653  std::cout << "SAMPLE ADCs: "
654  << "\t";
655  for (int i = 0; i < 10; ++i)
656  std::cout << i << "\t";
657  std::cout << std::endl << "\t\t";
658  for (int i = 0; i < df.size(); ++i) {
659  std::cout << df.sample(i).adc() << "\t";
660  }
661  std::cout << std::endl << std::endl;
662 
663  simHitsEcalDigiMatchEnergyHistEE_->Fill(simHitItr->energy());
664  simHitsEcalDigiMatchTimeHistEE_->Fill(simHitItr->time());
665  simHitsEcalDigiMatchEnergyVsTimeHistEE_->Fill(simHitItr->time(), simHitItr->energy());
666  if (((EEDetId)digiItr->id()).zside() > 0)
667  digiOccupancyMapEEP_->Fill(((EEDetId)digiItr->id()).ix(), ((EEDetId)digiItr->id()).iy());
668  else if (((EEDetId)digiItr->id()).zside() < 0)
669  digiOccupancyMapEEM_->Fill(((EEDetId)digiItr->id()).ix(), ((EEDetId)digiItr->id()).iy());
670  }
671  }
672  simHitsEcalNumHistEE_->Fill(numMatchedSimHitsEventEE);
673  digisEcalNumHistEE_->Fill(numMatchedDigisEventEE);
674 }

References EcalMGPASample::adc(), edm::DataFrameContainer::begin(), gather_cfg::cout, digiOccupancyMapEB_, digiOccupancyMapEEM_, digiOccupancyMapEEP_, digisEcalNumHistEB_, digisEcalNumHistEE_, EBDigiCollectionToken_, ebSimHitToken_, EEDigiCollectionToken_, SimL1EmulatorDM_cff::eeDigis, hgcalTriggerNtuples_cfi::eeSimHits, eeSimHitToken_, edm::DataFrameContainer::end(), spr::find(), mps_fire::i, LEDCalibrationChannels::ieta, iEvent, LEDCalibrationChannels::iphi, edm::HandleBase::isValid(), particleIds_, edm::Handle< T >::product(), EcalDataFrame::sample(), simHitsEcalDigiMatchEnergyHistEB_, simHitsEcalDigiMatchEnergyHistEE_, simHitsEcalDigiMatchEnergyVsTimeHistEB_, simHitsEcalDigiMatchEnergyVsTimeHistEE_, simHitsEcalDigiMatchIEtaHist_, simHitsEcalDigiMatchIPhiHist_, simHitsEcalDigiMatchTimeHistEB_, simHitsEcalDigiMatchTimeHistEE_, simHitsEcalEnergyHistEB_, simHitsEcalEnergyHistEE_, simHitsEcalEnergyVsTimeHistEB_, simHitsEcalEnergyVsTimeHistEE_, simHitsEcalNumHistEB_, simHitsEcalNumHistEE_, simHitsEcalTimeHistEB_, simHitsEcalTimeHistEE_, muonSimHitMatcherPSet::simTrack, TrackCandidateProducer_cfi::simTracks, simTrackToken_, EcalDataFrame::size(), and ecaldqm::zside().

Referenced by analyze().

◆ makeSimDigiPlotsRPC()

void HSCPValidator::makeSimDigiPlotsRPC ( const edm::Event iEvent)
private

Definition at line 726 of file HSCPValidator.cc.

726  {
727  using namespace edm;
728 
729  //std::cout << " Getting the SimHits " <<std::endl;
730  std::vector<Handle<edm::PSimHitContainer> > theSimHitContainers;
731  iEvent.getManyByType(theSimHitContainers);
732  //std::cout << " The Number of sim Hits is " << theSimHitContainers.size() <<std::endl;
733 
735  iEvent.getByToken(rpcRecHitsToken_, rpcRecHits);
736 
737  //SimTrack Stuff
738  std::vector<PSimHit> theSimHits;
739 
740  for (int i = 0; i < int(theSimHitContainers.size()); i++) {
741  theSimHits.insert(theSimHits.end(), theSimHitContainers.at(i)->begin(), theSimHitContainers.at(i)->end());
742  }
743 
744  for (std::vector<PSimHit>::const_iterator iHit = theSimHits.begin(); iHit != theSimHits.end(); iHit++) {
745  std::vector<int>::const_iterator partIdItr = find(particleIds_.begin(), particleIds_.end(), (*iHit).particleType());
746  if (partIdItr == particleIds_.end())
747  continue;
748 
749  DetId theDetUnitId((*iHit).detUnitId());
750 
751  DetId simdetid = DetId((*iHit).detUnitId());
752 
753  if (simdetid.det() == DetId::Muon && simdetid.subdetId() == MuonSubdetId::RPC) { //Only RPCs
754 
755  RPCDetId rollId(theDetUnitId);
756  RPCGeomServ rpcsrv(rollId);
757 
758  //std::cout << " Reading the Roll"<<std::endl;
759  const RPCRoll* rollasociated = rpcGeo->roll(rollId);
760 
761  //std::cout << " Getting the Surface"<<std::endl;
762  const BoundPlane& RPCSurface = rollasociated->surface();
763 
764  GlobalPoint SimHitInGlobal = RPCSurface.toGlobal((*iHit).localPosition());
765 
766  std::cout << "\t\t We have an RPC Sim Hit! in t=" << (*iHit).timeOfFlight() << "ns " << rpcsrv.name()
767  << " Global postition=" << SimHitInGlobal << std::endl;
768 
769  int layer = 0;
770 
771  if (rollId.station() == 1 && rollId.layer() == 1)
772  layer = 1;
773  else if (rollId.station() == 1 && rollId.layer() == 2)
774  layer = 2;
775  else if (rollId.station() == 2 && rollId.layer() == 1)
776  layer = 3;
777  else if (rollId.station() == 2 && rollId.layer() == 2)
778  layer = 4;
779  else if (rollId.station() == 3)
780  layer = 5;
781  else if (rollId.station() == 4)
782  layer = 6;
783 
784  if (rollId.region() == 0) {
785  rpcTimeOfFlightBarrel_[layer - 1]->Fill((*iHit).timeOfFlight());
786  } else {
787  rpcTimeOfFlightEndCap_[rollId.station() - 1]->Fill((*iHit).timeOfFlight());
788  }
789 
790  std::cout << "\t\t r=" << SimHitInGlobal.mag() << " phi=" << SimHitInGlobal.phi()
791  << " eta=" << SimHitInGlobal.eta() << std::endl;
792 
793  int cluSize = 0;
794  int bx = 100;
795  float minres = 3000.;
796 
797  std::cout << "\t \t \t \t Getting RecHits in Roll Asociated" << std::endl;
798 
799  typedef std::pair<RPCRecHitCollection::const_iterator, RPCRecHitCollection::const_iterator> rangeRecHits;
800  rangeRecHits recHitCollection = rpcRecHits->get(rollId);
802 
804 
805  for (recHit = recHitCollection.first; recHit != recHitCollection.second; recHit++) {
806  LocalPoint recHitPos = recHit->localPosition();
807  float res = (*iHit).localPosition().x() - recHitPos.x();
808  if (fabs(res) < fabs(minres)) {
809  minres = res;
810  cluSize = recHit->clusterSize();
811  bx = recHit->BunchX();
812  std::cout << "\t New Min Res " << res << "cm." << std::endl;
813  }
814  }
815 
816  if (minres < 3000.) {
817  residualsRPCRecHitSimDigis_->Fill(minres);
819  cluSizeDistribution_->Fill(cluSize);
820  if (rollId.region() == 0)
821  rpcBXBarrel_[layer - 1]->Fill(bx);
822  else
823  rpcBXEndCap_[rollId.station() - 1]->Fill(bx);
824  }
825  }
826  }
827 }

References l1GtPatternGenerator_cfi::bx, cluSizeDistribution_, gather_cfg::cout, efficiencyRPCRecHitSimDigis_, PV3DBase< T, PVType, FrameType >::eta(), HcalObjRepresent::Fill(), spr::find(), mps_fire::i, iEvent, createfilelist::int, RPCDetId::layer(), PV3DBase< T, PVType, FrameType >::mag(), DetId::Muon, RPCGeomServ::name(), particleIds_, PV3DBase< T, PVType, FrameType >::phi(), rpcPointValidation_cfi::recHit, RPCDetId::region(), residualsRPCRecHitSimDigis_, RPCGeometry::roll(), MuonSubdetId::RPC, rpcBXBarrel_, rpcBXEndCap_, rpcGeo, dtTriggerPhase2PrimitiveDigis_cfi::rpcRecHits, rpcRecHitsToken_, rpcTimeOfFlightBarrel_, rpcTimeOfFlightEndCap_, RPCDetId::station(), GeomDet::surface(), and PV3DBase< T, PVType, FrameType >::x().

Referenced by analyze().

◆ makeSimTrackPlots()

void HSCPValidator::makeSimTrackPlots ( const edm::Event iEvent)
private

Definition at line 357 of file HSCPValidator.cc.

357  {
358  using namespace edm;
359  //get sim track infos
360  Handle<edm::SimTrackContainer> simTracksHandle;
361  iEvent.getByToken(simTracksToken_, simTracksHandle);
362  const SimTrackContainer simTracks = *(simTracksHandle.product());
363 
364  SimTrackContainer::const_iterator simTrack;
365 
366  for (simTrack = simTracks.begin(); simTrack != simTracks.end(); ++simTrack) {
367  // Check if the particleId is in our list
368  std::vector<int>::const_iterator partIdItr = find(particleIds_.begin(), particleIds_.end(), simTrack->type());
369  if (partIdItr == particleIds_.end())
370  continue;
371 
372  simTrackParticleEtaHist_->Fill((*simTrack).momentum().eta());
373  simTrackParticlePhiHist_->Fill((*simTrack).momentum().phi());
374  simTrackParticlePHist_->Fill((*simTrack).momentum().P());
375 
376  simTrackParticlePtHist_->Fill((*simTrack).momentum().pt());
377 
378  simTrackParticleBetaHist_->Fill((*simTrack).momentum().P() / (*simTrack).momentum().e());
379 
380  // std::cout<<"Particle:"<<simTrack->type()<<" Charge:"<<simTrack->charge()<<std::endl;
381  }
382 }

References spr::find(), iEvent, particleIds_, edm::Handle< T >::product(), muonSimHitMatcherPSet::simTrack, simTrackParticleBetaHist_, simTrackParticleEtaHist_, simTrackParticlePhiHist_, simTrackParticlePHist_, simTrackParticlePtHist_, TrackCandidateProducer_cfi::simTracks, and simTracksToken_.

Referenced by analyze().

Member Data Documentation

◆ cluSizeDistribution_

TH1F* HSCPValidator::cluSizeDistribution_
private

Definition at line 138 of file HSCPValidator.h.

Referenced by HSCPValidator(), and makeSimDigiPlotsRPC().

◆ dEdxTrackToken_

edm::EDGetTokenT<edm::ValueMap<reco::DeDxData> > HSCPValidator::dEdxTrackToken_
private

Definition at line 80 of file HSCPValidator.h.

Referenced by makeRecoPlots().

◆ dedxVsp

TH2F* HSCPValidator::dedxVsp
private

Definition at line 149 of file HSCPValidator.h.

Referenced by HSCPValidator(), and makeRecoPlots().

◆ digiOccupancyMapEB_

TH2F* HSCPValidator::digiOccupancyMapEB_
private

Definition at line 132 of file HSCPValidator.h.

Referenced by HSCPValidator(), and makeSimDigiPlotsECAL().

◆ digiOccupancyMapEEM_

TH2F* HSCPValidator::digiOccupancyMapEEM_
private

Definition at line 134 of file HSCPValidator.h.

Referenced by HSCPValidator(), and makeSimDigiPlotsECAL().

◆ digiOccupancyMapEEP_

TH2F* HSCPValidator::digiOccupancyMapEEP_
private

Definition at line 133 of file HSCPValidator.h.

Referenced by HSCPValidator(), and makeSimDigiPlotsECAL().

◆ digisEcalNumHistEB_

TH1F* HSCPValidator::digisEcalNumHistEB_
private

Definition at line 130 of file HSCPValidator.h.

Referenced by HSCPValidator(), and makeSimDigiPlotsECAL().

◆ digisEcalNumHistEE_

TH1F* HSCPValidator::digisEcalNumHistEE_
private

Definition at line 131 of file HSCPValidator.h.

Referenced by HSCPValidator(), and makeSimDigiPlotsECAL().

◆ doGenPlots_

bool HSCPValidator::doGenPlots_
private

Definition at line 69 of file HSCPValidator.h.

Referenced by analyze().

◆ doHLTPlots_

bool HSCPValidator::doHLTPlots_
private

Definition at line 70 of file HSCPValidator.h.

Referenced by analyze().

◆ doRecoPlots_

bool HSCPValidator::doRecoPlots_
private

Definition at line 73 of file HSCPValidator.h.

Referenced by analyze().

◆ doSimDigiPlots_

bool HSCPValidator::doSimDigiPlots_
private

Definition at line 72 of file HSCPValidator.h.

Referenced by analyze().

◆ doSimTrackPlots_

bool HSCPValidator::doSimTrackPlots_
private

Definition at line 71 of file HSCPValidator.h.

Referenced by analyze().

◆ EBDigiCollectionToken_

edm::EDGetTokenT<EBDigiCollection> HSCPValidator::EBDigiCollectionToken_
private

Definition at line 110 of file HSCPValidator.h.

Referenced by makeSimDigiPlotsECAL().

◆ ebSimHitToken_

edm::EDGetTokenT<edm::PCaloHitContainer> HSCPValidator::ebSimHitToken_
private

Definition at line 107 of file HSCPValidator.h.

Referenced by makeSimDigiPlotsECAL().

◆ EEDigiCollectionToken_

edm::EDGetTokenT<EEDigiCollection> HSCPValidator::EEDigiCollectionToken_
private

Definition at line 111 of file HSCPValidator.h.

Referenced by makeSimDigiPlotsECAL().

◆ eeSimHitToken_

edm::EDGetTokenT<edm::PCaloHitContainer> HSCPValidator::eeSimHitToken_
private

Definition at line 108 of file HSCPValidator.h.

Referenced by makeSimDigiPlotsECAL().

◆ efficiencyRPCRecHitSimDigis_

TH1F* HSCPValidator::efficiencyRPCRecHitSimDigis_
private

Definition at line 137 of file HSCPValidator.h.

Referenced by HSCPValidator(), and makeSimDigiPlotsRPC().

◆ h_genhscp_met

TH1F* HSCPValidator::h_genhscp_met
private

Definition at line 94 of file HSCPValidator.h.

Referenced by HSCPValidator(), and makeGenPlots().

◆ h_genhscp_met_nohscp

TH1F* HSCPValidator::h_genhscp_met_nohscp
private

Definition at line 95 of file HSCPValidator.h.

Referenced by HSCPValidator(), and makeGenPlots().

◆ h_genhscp_scaloret

TH1F* HSCPValidator::h_genhscp_scaloret
private

Definition at line 96 of file HSCPValidator.h.

Referenced by HSCPValidator(), and makeGenPlots().

◆ h_genhscp_scaloret_nohscp

TH1F* HSCPValidator::h_genhscp_scaloret_nohscp
private

Definition at line 97 of file HSCPValidator.h.

Referenced by HSCPValidator(), and makeGenPlots().

◆ hltjet

TH1F* HSCPValidator::hltjet
private

Definition at line 145 of file HSCPValidator.h.

Referenced by HSCPValidator(), and makeHLTPlots().

◆ hltmet

TH1F* HSCPValidator::hltmet
private

Definition at line 144 of file HSCPValidator.h.

Referenced by HSCPValidator(), and makeHLTPlots().

◆ hltmu

TH1F* HSCPValidator::hltmu
private

Definition at line 146 of file HSCPValidator.h.

Referenced by HSCPValidator(), and makeHLTPlots().

◆ particleBetaHist_

TH1F* HSCPValidator::particleBetaHist_
private

Definition at line 92 of file HSCPValidator.h.

Referenced by HSCPValidator(), and makeGenPlots().

◆ particleBetaInverseHist_

TH1F* HSCPValidator::particleBetaInverseHist_
private

Definition at line 93 of file HSCPValidator.h.

Referenced by HSCPValidator(), and makeGenPlots().

◆ particleEtaHist_

TH1F* HSCPValidator::particleEtaHist_
private

Definition at line 86 of file HSCPValidator.h.

Referenced by HSCPValidator(), and makeGenPlots().

◆ particleIds_

std::vector<int> HSCPValidator::particleIds_
private

◆ particleIdsFoundMap_

std::map<int, int> HSCPValidator::particleIdsFoundMap_
private

Definition at line 85 of file HSCPValidator.h.

Referenced by endJob(), and makeGenPlots().

◆ particleMassHist_

TH1F* HSCPValidator::particleMassHist_
private

Definition at line 90 of file HSCPValidator.h.

Referenced by HSCPValidator(), and makeGenPlots().

◆ particlePhiHist_

TH1F* HSCPValidator::particlePhiHist_
private

Definition at line 87 of file HSCPValidator.h.

Referenced by HSCPValidator(), and makeGenPlots().

◆ particlePHist_

TH1F* HSCPValidator::particlePHist_
private

Definition at line 88 of file HSCPValidator.h.

Referenced by HSCPValidator(), and makeGenPlots().

◆ particlePtHist_

TH1F* HSCPValidator::particlePtHist_
private

Definition at line 89 of file HSCPValidator.h.

Referenced by HSCPValidator(), and makeGenPlots().

◆ particleStatus_

int HSCPValidator::particleStatus_
private

Definition at line 84 of file HSCPValidator.h.

Referenced by makeGenPlots(), and makeRecoPlots().

◆ particleStatusHist_

TH1F* HSCPValidator::particleStatusHist_
private

Definition at line 91 of file HSCPValidator.h.

Referenced by HSCPValidator(), and makeGenPlots().

◆ RecoHSCPPtVsGenPt

TH2F* HSCPValidator::RecoHSCPPtVsGenPt
private

Definition at line 148 of file HSCPValidator.h.

Referenced by HSCPValidator(), and makeRecoPlots().

◆ residualsRPCRecHitSimDigis_

TH1F* HSCPValidator::residualsRPCRecHitSimDigis_
private

Definition at line 136 of file HSCPValidator.h.

Referenced by HSCPValidator(), and makeSimDigiPlotsRPC().

◆ rpcBXBarrel_

TH1F* HSCPValidator::rpcBXBarrel_[6]
private

Definition at line 140 of file HSCPValidator.h.

Referenced by HSCPValidator(), and makeSimDigiPlotsRPC().

◆ rpcBXEndCap_

TH1F* HSCPValidator::rpcBXEndCap_[3]
private

Definition at line 142 of file HSCPValidator.h.

Referenced by HSCPValidator(), and makeSimDigiPlotsRPC().

◆ rpcGeo

edm::ESHandle<RPCGeometry> HSCPValidator::rpcGeo
private

Definition at line 112 of file HSCPValidator.h.

Referenced by analyze(), and makeSimDigiPlotsRPC().

◆ rpcRecHitsToken_

edm::EDGetTokenT<RPCRecHitCollection> HSCPValidator::rpcRecHitsToken_
private

Definition at line 81 of file HSCPValidator.h.

Referenced by makeSimDigiPlotsRPC().

◆ rpcTimeOfFlightBarrel_

TH1F* HSCPValidator::rpcTimeOfFlightBarrel_[6]
private

Definition at line 139 of file HSCPValidator.h.

Referenced by HSCPValidator(), and makeSimDigiPlotsRPC().

◆ rpcTimeOfFlightEndCap_

TH1F* HSCPValidator::rpcTimeOfFlightEndCap_[3]
private

Definition at line 141 of file HSCPValidator.h.

Referenced by HSCPValidator(), and makeSimDigiPlotsRPC().

◆ simHitsEcalDigiMatchEnergyHistEB_

TH1F* HSCPValidator::simHitsEcalDigiMatchEnergyHistEB_
private

Definition at line 122 of file HSCPValidator.h.

Referenced by HSCPValidator(), and makeSimDigiPlotsECAL().

◆ simHitsEcalDigiMatchEnergyHistEE_

TH1F* HSCPValidator::simHitsEcalDigiMatchEnergyHistEE_
private

Definition at line 125 of file HSCPValidator.h.

Referenced by HSCPValidator(), and makeSimDigiPlotsECAL().

◆ simHitsEcalDigiMatchEnergyVsTimeHistEB_

TH2F* HSCPValidator::simHitsEcalDigiMatchEnergyVsTimeHistEB_
private

Definition at line 124 of file HSCPValidator.h.

Referenced by HSCPValidator(), and makeSimDigiPlotsECAL().

◆ simHitsEcalDigiMatchEnergyVsTimeHistEE_

TH2F* HSCPValidator::simHitsEcalDigiMatchEnergyVsTimeHistEE_
private

Definition at line 127 of file HSCPValidator.h.

Referenced by HSCPValidator(), and makeSimDigiPlotsECAL().

◆ simHitsEcalDigiMatchIEtaHist_

TH1F* HSCPValidator::simHitsEcalDigiMatchIEtaHist_
private

Definition at line 128 of file HSCPValidator.h.

Referenced by HSCPValidator(), and makeSimDigiPlotsECAL().

◆ simHitsEcalDigiMatchIPhiHist_

TH1F* HSCPValidator::simHitsEcalDigiMatchIPhiHist_
private

Definition at line 129 of file HSCPValidator.h.

Referenced by HSCPValidator(), and makeSimDigiPlotsECAL().

◆ simHitsEcalDigiMatchTimeHistEB_

TH1F* HSCPValidator::simHitsEcalDigiMatchTimeHistEB_
private

Definition at line 123 of file HSCPValidator.h.

Referenced by HSCPValidator(), and makeSimDigiPlotsECAL().

◆ simHitsEcalDigiMatchTimeHistEE_

TH1F* HSCPValidator::simHitsEcalDigiMatchTimeHistEE_
private

Definition at line 126 of file HSCPValidator.h.

Referenced by HSCPValidator(), and makeSimDigiPlotsECAL().

◆ simHitsEcalEnergyHistEB_

TH1F* HSCPValidator::simHitsEcalEnergyHistEB_
private

Definition at line 114 of file HSCPValidator.h.

Referenced by HSCPValidator(), and makeSimDigiPlotsECAL().

◆ simHitsEcalEnergyHistEE_

TH1F* HSCPValidator::simHitsEcalEnergyHistEE_
private

Definition at line 118 of file HSCPValidator.h.

Referenced by HSCPValidator(), and makeSimDigiPlotsECAL().

◆ simHitsEcalEnergyVsTimeHistEB_

TH2F* HSCPValidator::simHitsEcalEnergyVsTimeHistEB_
private

Definition at line 117 of file HSCPValidator.h.

Referenced by HSCPValidator(), and makeSimDigiPlotsECAL().

◆ simHitsEcalEnergyVsTimeHistEE_

TH2F* HSCPValidator::simHitsEcalEnergyVsTimeHistEE_
private

Definition at line 121 of file HSCPValidator.h.

Referenced by HSCPValidator(), and makeSimDigiPlotsECAL().

◆ simHitsEcalNumHistEB_

TH1F* HSCPValidator::simHitsEcalNumHistEB_
private

Definition at line 116 of file HSCPValidator.h.

Referenced by HSCPValidator(), and makeSimDigiPlotsECAL().

◆ simHitsEcalNumHistEE_

TH1F* HSCPValidator::simHitsEcalNumHistEE_
private

Definition at line 120 of file HSCPValidator.h.

Referenced by HSCPValidator(), and makeSimDigiPlotsECAL().

◆ simHitsEcalTimeHistEB_

TH1F* HSCPValidator::simHitsEcalTimeHistEB_
private

Definition at line 115 of file HSCPValidator.h.

Referenced by HSCPValidator(), and makeSimDigiPlotsECAL().

◆ simHitsEcalTimeHistEE_

TH1F* HSCPValidator::simHitsEcalTimeHistEE_
private

Definition at line 119 of file HSCPValidator.h.

Referenced by HSCPValidator(), and makeSimDigiPlotsECAL().

◆ simTrackParticleBetaHist_

TH1F* HSCPValidator::simTrackParticleBetaHist_
private

Definition at line 104 of file HSCPValidator.h.

Referenced by HSCPValidator(), and makeSimTrackPlots().

◆ simTrackParticleEtaHist_

TH1F* HSCPValidator::simTrackParticleEtaHist_
private

Definition at line 100 of file HSCPValidator.h.

Referenced by HSCPValidator(), and makeSimTrackPlots().

◆ simTrackParticlePhiHist_

TH1F* HSCPValidator::simTrackParticlePhiHist_
private

Definition at line 101 of file HSCPValidator.h.

Referenced by HSCPValidator(), and makeSimTrackPlots().

◆ simTrackParticlePHist_

TH1F* HSCPValidator::simTrackParticlePHist_
private

Definition at line 102 of file HSCPValidator.h.

Referenced by HSCPValidator(), and makeSimTrackPlots().

◆ simTrackParticlePtHist_

TH1F* HSCPValidator::simTrackParticlePtHist_
private

Definition at line 103 of file HSCPValidator.h.

Referenced by HSCPValidator(), and makeSimTrackPlots().

◆ simTracksToken_

edm::EDGetTokenT<edm::SimTrackContainer> HSCPValidator::simTracksToken_
private

Definition at line 77 of file HSCPValidator.h.

Referenced by makeSimTrackPlots().

◆ simTrackToken_

edm::EDGetTokenT<edm::SimTrackContainer> HSCPValidator::simTrackToken_
private

Definition at line 109 of file HSCPValidator.h.

Referenced by makeSimDigiPlotsECAL().

◆ tkTracksToken_

edm::EDGetTokenT<reco::TrackCollection> HSCPValidator::tkTracksToken_
private

Definition at line 79 of file HSCPValidator.h.

Referenced by makeRecoPlots().

◆ token_

edm::EDGetTokenT<edm::HepMCProduct> HSCPValidator::token_
private

Definition at line 76 of file HSCPValidator.h.

Referenced by makeGenPlots(), and makeRecoPlots().

◆ trEvToken_

edm::EDGetTokenT<trigger::TriggerEvent> HSCPValidator::trEvToken_
private

Definition at line 78 of file HSCPValidator.h.

Referenced by makeHLTPlots().

◆ triggerResultsToken_

edm::EDGetTokenT<edm::TriggerResults> HSCPValidator::triggerResultsToken_
private

Definition at line 82 of file HSCPValidator.h.

Referenced by makeHLTPlots().

RPCRoll
Definition: RPCRoll.h:12
EcalDataFrame::sample
EcalMGPASample sample(int i) const
Definition: EcalDataFrame.h:29
HSCPValidator::simHitsEcalEnergyVsTimeHistEB_
TH2F * simHitsEcalEnergyVsTimeHistEB_
Definition: HSCPValidator.h:117
trigger::TriggerEvent::sizeFilters
trigger::size_type sizeFilters() const
Definition: TriggerEvent.h:146
mps_fire.i
i
Definition: mps_fire.py:355
RPCGeomServ
Definition: RPCGeomServ.h:8
HSCPValidator::cluSizeDistribution_
TH1F * cluSizeDistribution_
Definition: HSCPValidator.h:138
trigger::TriggerEvent::filterKeys
const Keys & filterKeys(trigger::size_type index) const
Definition: TriggerEvent.h:118
HSCPValidator::digisEcalNumHistEE_
TH1F * digisEcalNumHistEE_
Definition: HSCPValidator.h:131
dqmiodumpmetadata.n
n
Definition: dqmiodumpmetadata.py:28
edm::Handle::product
T const * product() const
Definition: Handle.h:70
trigger::Vids
std::vector< int > Vids
Definition: TriggerTypeDefs.h:21
HLT_2018_cff.minR
minR
Definition: HLT_2018_cff.py:83154
edm::DataFrameContainer::const_iterator
boost::transform_iterator< IterHelp, boost::counting_iterator< int > > const_iterator
Definition: DataFrameContainer.h:61
HSCPValidator::trEvToken_
edm::EDGetTokenT< trigger::TriggerEvent > trEvToken_
Definition: HSCPValidator.h:78
HSCPValidator::RecoHSCPPtVsGenPt
TH2F * RecoHSCPPtVsGenPt
Definition: HSCPValidator.h:148
PV3DBase::x
T x() const
Definition: PV3DBase.h:59
fileService
edm::Service< TFileService > fileService
Definition: HSCPValidator.cc:91
DiDispStaMuonMonitor_cfi.pt
pt
Definition: DiDispStaMuonMonitor_cfi.py:39
HSCPValidator::particleEtaHist_
TH1F * particleEtaHist_
Definition: HSCPValidator.h:86
HSCPValidator::hltmu
TH1F * hltmu
Definition: HSCPValidator.h:146
ecaldqm::zside
int zside(DetId const &)
Definition: EcalDQMCommonUtils.cc:189
EBDetId
Definition: EBDetId.h:17
edm
HLT enums.
Definition: AlignableModifier.h:19
EBDataFrame
Definition: EBDataFrame.h:11
HSCPValidator::efficiencyRPCRecHitSimDigis_
TH1F * efficiencyRPCRecHitSimDigis_
Definition: HSCPValidator.h:137
AlCaHLTBitMon_ParallelJobs.p
p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
RPCDetId
Definition: RPCDetId.h:16
gather_cfg.cout
cout
Definition: gather_cfg.py:144
l1GtPatternGenerator_cfi.bx
bx
Definition: l1GtPatternGenerator_cfi.py:18
triggerResults
static const std::string triggerResults
Definition: EdmProvDump.cc:45
HSCPValidator::digiOccupancyMapEEP_
TH2F * digiOccupancyMapEEP_
Definition: HSCPValidator.h:133
HSCPValidator::EEDigiCollectionToken_
edm::EDGetTokenT< EEDigiCollection > EEDigiCollectionToken_
Definition: HSCPValidator.h:111
HSCPValidator::particlePhiHist_
TH1F * particlePhiHist_
Definition: HSCPValidator.h:87
HSCPValidator::particleStatus_
int particleStatus_
Definition: HSCPValidator.h:84
cms::cuda::assert
assert(be >=bs)
HLT_2018_cff.distance
distance
Definition: HLT_2018_cff.py:6417
TrackCandidateProducer_cfi.simTracks
simTracks
Definition: TrackCandidateProducer_cfi.py:15
HSCPValidator::particleIdsFoundMap_
std::map< int, int > particleIdsFoundMap_
Definition: HSCPValidator.h:85
HSCPValidator::doSimDigiPlots_
bool doSimDigiPlots_
Definition: HSCPValidator.h:72
HSCPValidator::hltjet
TH1F * hltjet
Definition: HSCPValidator.h:145
RPCGeometry::roll
const RPCRoll * roll(RPCDetId id) const
Return a roll given its id.
Definition: RPCGeometry.cc:50
HSCPValidator::simHitsEcalTimeHistEB_
TH1F * simHitsEcalTimeHistEB_
Definition: HSCPValidator.h:115
HSCPValidator::eeSimHitToken_
edm::EDGetTokenT< edm::PCaloHitContainer > eeSimHitToken_
Definition: HSCPValidator.h:108
edm::ParameterSet::getUntrackedParameter
T getUntrackedParameter(std::string const &, T const &) const
reco
fixed size matrix
Definition: AlignmentAlgorithmBase.h:45
spr::find
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:19
HSCPValidator::rpcRecHitsToken_
edm::EDGetTokenT< RPCRecHitCollection > rpcRecHitsToken_
Definition: HSCPValidator.h:81
HSCPValidator::doHLTPlots_
bool doHLTPlots_
Definition: HSCPValidator.h:70
edm::Handle
Definition: AssociativeIterator.h:50
rpcPointValidation_cfi.recHit
recHit
Definition: rpcPointValidation_cfi.py:7
HSCPValidator::particlePtHist_
TH1F * particlePtHist_
Definition: HSCPValidator.h:89
HSCPValidator::simHitsEcalTimeHistEE_
TH1F * simHitsEcalTimeHistEE_
Definition: HSCPValidator.h:119
HepMC::GenEvent
Definition: hepmc_rootio.cc:9
edm::Ref< TrackCollection >
HSCPValidator::h_genhscp_met_nohscp
TH1F * h_genhscp_met_nohscp
Definition: HSCPValidator.h:95
HSCPValidator::residualsRPCRecHitSimDigis_
TH1F * residualsRPCRecHitSimDigis_
Definition: HSCPValidator.h:136
LEDCalibrationChannels.iphi
iphi
Definition: LEDCalibrationChannels.py:64
DetId
Definition: DetId.h:17
HSCPValidator::digiOccupancyMapEB_
TH2F * digiOccupancyMapEB_
Definition: HSCPValidator.h:132
GeomDet::surface
const Plane & surface() const
The nominal surface of the GeomDet.
Definition: GeomDet.h:37
EcalMGPASample::adc
int adc() const
get the ADC sample (12 bits)
Definition: EcalMGPASample.h:31
HSCPValidator::simTrackToken_
edm::EDGetTokenT< edm::SimTrackContainer > simTrackToken_
Definition: HSCPValidator.h:109
HSCPValidator::digiOccupancyMapEEM_
TH2F * digiOccupancyMapEEM_
Definition: HSCPValidator.h:134
edm::EventSetup::get
T get() const
Definition: EventSetup.h:73
HSCPValidator::makeRecoPlots
void makeRecoPlots(const edm::Event &iEvent)
Definition: HSCPValidator.cc:676
HSCPValidator::simTrackParticlePtHist_
TH1F * simTrackParticlePtHist_
Definition: HSCPValidator.h:103
HSCPValidator::doSimTrackPlots_
bool doSimTrackPlots_
Definition: HSCPValidator.h:71
HSCPValidator::ebSimHitToken_
edm::EDGetTokenT< edm::PCaloHitContainer > ebSimHitToken_
Definition: HSCPValidator.h:107
PVValHelper::eta
Definition: PVValidationHelpers.h:69
HSCPValidator::simHitsEcalEnergyHistEE_
TH1F * simHitsEcalEnergyHistEE_
Definition: HSCPValidator.h:118
mathSSE::sqrt
T sqrt(T t)
Definition: SSEVec.h:19
HSCPValidator::doRecoPlots_
bool doRecoPlots_
Definition: HSCPValidator.h:73
HSCPValidator::simTrackParticlePHist_
TH1F * simTrackParticlePHist_
Definition: HSCPValidator.h:102
HSCPValidator::simHitsEcalDigiMatchEnergyVsTimeHistEB_
TH2F * simHitsEcalDigiMatchEnergyVsTimeHistEB_
Definition: HSCPValidator.h:124
Point3DBase< float, GlobalTag >
HSCPValidator::token_
edm::EDGetTokenT< edm::HepMCProduct > token_
Definition: HSCPValidator.h:76
HSCPValidator::h_genhscp_scaloret
TH1F * h_genhscp_scaloret
Definition: HSCPValidator.h:96
EEDetId
Definition: EEDetId.h:14
HSCPValidator::intToString
std::string intToString(int num)
Definition: HSCPValidator.cc:830
reco::TrackRef
edm::Ref< TrackCollection > TrackRef
persistent reference to a Track
Definition: TrackFwd.h:20
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
HSCPValidator::simTracksToken_
edm::EDGetTokenT< edm::SimTrackContainer > simTracksToken_
Definition: HSCPValidator.h:77
HSCPValidator::particlePHist_
TH1F * particlePHist_
Definition: HSCPValidator.h:88
LEDCalibrationChannels.ieta
ieta
Definition: LEDCalibrationChannels.py:63
HLT_2018_cff.InputTag
InputTag
Definition: HLT_2018_cff.py:79016
HSCPValidator::simHitsEcalEnergyHistEB_
TH1F * simHitsEcalEnergyHistEB_
Definition: HSCPValidator.h:114
fftjetproducer_cfi.etaCut
etaCut
Definition: fftjetproducer_cfi.py:168
HSCPValidator::simHitsEcalDigiMatchTimeHistEE_
TH1F * simHitsEcalDigiMatchTimeHistEE_
Definition: HSCPValidator.h:126
SiStripPI::max
Definition: SiStripPayloadInspectorHelper.h:169
HSCPValidator::simTrackParticleBetaHist_
TH1F * simTrackParticleBetaHist_
Definition: HSCPValidator.h:104
HSCPValidator::rpcGeo
edm::ESHandle< RPCGeometry > rpcGeo
Definition: HSCPValidator.h:112
trigger::TriggerObjectCollection
std::vector< TriggerObject > TriggerObjectCollection
collection of trigger physics objects (e.g., all isolated muons)
Definition: TriggerObject.h:75
edm::RangeMap::const_iterator
C::const_iterator const_iterator
constant access iterator type
Definition: RangeMap.h:43
HSCPValidator::EBDigiCollectionToken_
edm::EDGetTokenT< EBDigiCollection > EBDigiCollectionToken_
Definition: HSCPValidator.h:110
HSCPValidator::dedxVsp
TH2F * dedxVsp
Definition: HSCPValidator.h:149
muonSimHitMatcherPSet.simTrack
simTrack
Definition: muonSimHitMatcherPSet.py:4
PV3DBase::eta
T eta() const
Definition: PV3DBase.h:73
createfilelist.int
int
Definition: createfilelist.py:10
HSCPValidator::particleBetaHist_
TH1F * particleBetaHist_
Definition: HSCPValidator.h:92
iEvent
int iEvent
Definition: GenABIO.cc:224
trigger::TriggerEvent::filterIndex
trigger::size_type filterIndex(const edm::InputTag &filterTag) const
find index of filter in data-member vector from filter tag
Definition: TriggerEvent.h:132
edm::TriggerResultsByName
Definition: TriggerResultsByName.h:48
edm::DataFrameContainer::begin
const_iterator begin() const
The iterator returned can not safely be used across threads.
Definition: DataFrameContainer.h:149
trigger::Keys
std::vector< size_type > Keys
Definition: TriggerTypeDefs.h:19
HSCPValidator::hltmet
TH1F * hltmet
Definition: HSCPValidator.h:144
edm::HepMCProduct::GetEvent
const HepMC::GenEvent * GetEvent() const
Definition: HepMCProduct.h:34
trigger::TriggerEvent
The single EDProduct to be saved for each event (AOD case)
Definition: TriggerEvent.h:25
itr
std::vector< std::pair< float, float > >::iterator itr
Definition: HGCDigitizer.cc:28
hgcalTriggerNtuples_cfi.eeSimHits
eeSimHits
Definition: hgcalTriggerNtuples_cfi.py:50
get
#define get
res
Definition: Electron.h:6
trigger::TriggerEvent::getObjects
const TriggerObjectCollection & getObjects() const
Definition: TriggerEvent.h:101
HSCPValidator::simHitsEcalNumHistEB_
TH1F * simHitsEcalNumHistEB_
Definition: HSCPValidator.h:116
HcalObjRepresent::Fill
void Fill(HcalDetId &id, double val, std::vector< TH2F > &depth)
Definition: HcalObjRepresent.h:1053
trigger::TriggerEvent::filterIds
const Vids & filterIds(trigger::size_type index) const
Definition: TriggerEvent.h:117
HSCPValidator::doGenPlots_
bool doGenPlots_
Definition: HSCPValidator.h:69
EgammaValidation_cff.num
num
Definition: EgammaValidation_cff.py:34
HSCPValidator::simHitsEcalDigiMatchTimeHistEB_
TH1F * simHitsEcalDigiMatchTimeHistEB_
Definition: HSCPValidator.h:123
HSCPValidator::tkTracksToken_
edm::EDGetTokenT< reco::TrackCollection > tkTracksToken_
Definition: HSCPValidator.h:79
HSCPValidator::simHitsEcalDigiMatchEnergyHistEE_
TH1F * simHitsEcalDigiMatchEnergyHistEE_
Definition: HSCPValidator.h:125
HSCPValidator::rpcTimeOfFlightEndCap_
TH1F * rpcTimeOfFlightEndCap_[3]
Definition: HSCPValidator.h:141
PV3DBase::mag
T mag() const
Definition: PV3DBase.h:64
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
HSCPValidator::simHitsEcalDigiMatchEnergyHistEB_
TH1F * simHitsEcalDigiMatchEnergyHistEB_
Definition: HSCPValidator.h:122
mag
T mag() const
The vector magnitude. Equivalent to sqrt(vec.mag2())
Definition: Basic3DVectorLD.h:127
HSCPValidator::makeGenPlots
void makeGenPlots(const edm::Event &iEvent)
Definition: HSCPValidator.cc:291
std
Definition: JetResolutionObject.h:76
HSCPValidator::particleBetaInverseHist_
TH1F * particleBetaInverseHist_
Definition: HSCPValidator.h:93
HSCPValidator::rpcBXBarrel_
TH1F * rpcBXBarrel_[6]
Definition: HSCPValidator.h:140
edm::SimTrackContainer
std::vector< SimTrack > SimTrackContainer
Definition: SimTrackContainer.h:12
dtTriggerPhase2PrimitiveDigis_cfi.rpcRecHits
rpcRecHits
Definition: dtTriggerPhase2PrimitiveDigis_cfi.py:39
MuonSubdetId::RPC
static constexpr int RPC
Definition: MuonSubdetId.h:13
HSCPValidator::particleMassHist_
TH1F * particleMassHist_
Definition: HSCPValidator.h:90
HSCPValidator::makeSimDigiPlotsECAL
void makeSimDigiPlotsECAL(const edm::Event &iEvent)
Definition: HSCPValidator.cc:479
edm::ValueMap
Definition: ValueMap.h:107
HSCPValidator::triggerResultsToken_
edm::EDGetTokenT< edm::TriggerResults > triggerResultsToken_
Definition: HSCPValidator.h:82
BoundPlane
HSCPValidator::makeSimDigiPlotsRPC
void makeSimDigiPlotsRPC(const edm::Event &iEvent)
Definition: HSCPValidator.cc:726
HSCPValidator::particleIds_
std::vector< int > particleIds_
Definition: HSCPValidator.h:83
edm::PCaloHitContainer
std::vector< PCaloHit > PCaloHitContainer
Definition: PCaloHitContainer.h:8
HSCPValidator::simTrackParticleEtaHist_
TH1F * simTrackParticleEtaHist_
Definition: HSCPValidator.h:100
HSCPValidator::makeHLTPlots
void makeHLTPlots(const edm::Event &iEvent)
Definition: HSCPValidator.cc:384
HSCPValidator::simHitsEcalDigiMatchIPhiHist_
TH1F * simHitsEcalDigiMatchIPhiHist_
Definition: HSCPValidator.h:129
EcalDataFrame::size
int size() const
Definition: EcalDataFrame.h:26
funct::pow
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:30
DetId::Muon
Definition: DetId.h:26
funct::abs
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
Average
Definition: trackSplitPlot.h:34
HSCPValidator::h_genhscp_met
TH1F * h_genhscp_met
Definition: HSCPValidator.h:94
HSCPValidator::simHitsEcalDigiMatchEnergyVsTimeHistEE_
TH2F * simHitsEcalDigiMatchEnergyVsTimeHistEE_
Definition: HSCPValidator.h:127
edm::EDConsumerBase::consumes
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
Definition: EDConsumerBase.h:126
HSCPValidator::makeSimTrackPlots
void makeSimTrackPlots(const edm::Event &iEvent)
Definition: HSCPValidator.cc:357
HSCPValidator::digisEcalNumHistEB_
TH1F * digisEcalNumHistEB_
Definition: HSCPValidator.h:130
edm::HandleBase::isValid
bool isValid() const
Definition: HandleBase.h:70
HSCPValidator::rpcTimeOfFlightBarrel_
TH1F * rpcTimeOfFlightBarrel_[6]
Definition: HSCPValidator.h:139
HSCPValidator::simHitsEcalEnergyVsTimeHistEE_
TH2F * simHitsEcalEnergyVsTimeHistEE_
Definition: HSCPValidator.h:121
EEDataFrame
Definition: EEDataFrame.h:12
HSCPValidator::IncreasedTreshold
bool IncreasedTreshold(const trigger::TriggerEvent &trEv, const edm::InputTag &InputPath, double NewThreshold, double etaCut, int NObjectAboveThreshold, bool averageThreshold)
Definition: HSCPValidator.cc:839
MuonGeometryRecord
Definition: MuonGeometryRecord.h:34
HSCPValidator::simTrackParticlePhiHist_
TH1F * simTrackParticlePhiHist_
Definition: HSCPValidator.h:101
SimL1EmulatorDM_cff.eeDigis
eeDigis
Definition: SimL1EmulatorDM_cff.py:18
edm::DataFrameContainer::end
const_iterator end() const
Definition: DataFrameContainer.h:152
edm::InputTag
Definition: InputTag.h:15
reco::TrackCollection
std::vector< Track > TrackCollection
collection of Tracks
Definition: TrackFwd.h:14
HSCPValidator::simHitsEcalDigiMatchIEtaHist_
TH1F * simHitsEcalDigiMatchIEtaHist_
Definition: HSCPValidator.h:128
PV3DBase::phi
Geom::Phi< T > phi() const
Definition: PV3DBase.h:66
HSCPValidator::dEdxTrackToken_
edm::EDGetTokenT< edm::ValueMap< reco::DeDxData > > dEdxTrackToken_
Definition: HSCPValidator.h:80
HSCPValidator::particleStatusHist_
TH1F * particleStatusHist_
Definition: HSCPValidator.h:91
HSCPValidator::rpcBXEndCap_
TH1F * rpcBXEndCap_[3]
Definition: HSCPValidator.h:142
TFileService::make
T * make(const Args &... args) const
make new ROOT object
Definition: TFileService.h:64
HSCPValidator::simHitsEcalNumHistEE_
TH1F * simHitsEcalNumHistEE_
Definition: HSCPValidator.h:120
HSCPValidator::h_genhscp_scaloret_nohscp
TH1F * h_genhscp_scaloret_nohscp
Definition: HSCPValidator.h:97