CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Attributes | Static Private Attributes
CaloSimHitAnalysis Class Reference
Inheritance diagram for CaloSimHitAnalysis:
edm::one::EDAnalyzer< edm::one::WatchRuns, edm::one::SharedResources > edm::one::EDAnalyzerBase edm::EDConsumerBase

Public Member Functions

 CaloSimHitAnalysis (const edm::ParameterSet &ps)
 
 ~CaloSimHitAnalysis () override
 
- Public Member Functions inherited from edm::one::EDAnalyzer< edm::one::WatchRuns, edm::one::SharedResources >
 EDAnalyzer ()=default
 
SerialTaskQueueglobalLuminosityBlocksQueue () final
 
SerialTaskQueueglobalRunsQueue () final
 
bool wantsGlobalLuminosityBlocks () const final
 
bool wantsGlobalRuns () const final
 
- Public Member Functions inherited from edm::one::EDAnalyzerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzerBase ()
 
ModuleDescription const & moduleDescription () const
 
bool wantsStreamLuminosityBlocks () const
 
bool wantsStreamRuns () const
 
 ~EDAnalyzerBase () 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)
 

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &descriptions)
 
- Static Public Member Functions inherited from edm::one::EDAnalyzerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 

Protected Member Functions

void analyze (edm::Event const &, edm::EventSetup const &) override
 
void analyzeHits (std::vector< PCaloHit > &, int)
 
void analyzePassiveHits (std::vector< PassiveHit > &hits)
 
void beginJob () override
 
void beginRun (edm::Run const &, edm::EventSetup const &) override
 
void endRun (edm::Run const &, edm::EventSetup const &) override
 
- 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)
 

Private Attributes

const int allSteps_
 
const CaloGeometrycaloGeometry_
 
const std::vector< std::string > detNames_
 
std::map< int, unsigned int > etaDepth_
 
const std::string g4Label_
 
TH1F * h_edep1_ [nCalo_]
 
TH1F * h_edep_ [nCalo_]
 
TH1F * h_edepEM_ [nCalo_]
 
TH1F * h_edepHad_ [nCalo_]
 
TH1F * h_edepp_
 
TH1F * h_edepT1_ [nCalo_]
 
TH1F * h_edepT_ [nCalo_]
 
std::vector< TH1F * > h_edepTk_
 
TH1F * h_eta_ [nCalo_]
 
TH2F * h_etaphi_
 
TH1F * h_etot_ [nCalo_]
 
TH1F * h_etotg_ [nCalo_]
 
TH1F * h_hit_ [nCalo_]
 
TH1F * h_hitp_
 
TH1F * h_phi_ [nCalo_]
 
TH1F * h_rr_ [nCalo_]
 
TH2F * h_rz1_
 
TH2F * h_rz_
 
std::vector< TH2F * > h_rzH_
 
TH1F * h_stepp_
 
TH1F * h_time_ [nCalo_]
 
TH1F * h_timep_
 
TH1F * h_timeT_ [nCalo_]
 
std::vector< TH1F * > h_timeTk_
 
TH1F * h_trackp_
 
TH1F * h_zz_ [nCalo_]
 
const HcalGeometryhcalGeom_
 
const std::vector< std::string > hitLab_
 
const double maxEnergy_
 
const double maxTime_
 
const bool passive_
 
const double tCut_
 
const bool testNumber_
 
const std::vector< double > timeSliceUnit_
 
const double tMax_
 
edm::EDGetTokenT< edm::PassiveHitContainertok_passive_
 
std::vector< edm::EDGetTokenT< edm::PCaloHitContainer > > toks_calo_
 
const double tScale_
 

Static Private Attributes

static constexpr int nCalo_ = 6
 

Additional Inherited Members

- Public Types inherited from edm::one::EDAnalyzerBase
typedef EDAnalyzerBase ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 

Detailed Description

Definition at line 45 of file CaloSimHitAnalysis.cc.

Constructor & Destructor Documentation

◆ CaloSimHitAnalysis()

CaloSimHitAnalysis::CaloSimHitAnalysis ( const edm::ParameterSet ps)

Definition at line 86 of file CaloSimHitAnalysis.cc.

87  : g4Label_(ps.getUntrackedParameter<std::string>("moduleLabel", "g4SimHits")),
88  hitLab_(ps.getParameter<std::vector<std::string> >("hitCollection")),
89  timeSliceUnit_(ps.getParameter<std::vector<double> >("timeSliceUnit")),
90  maxEnergy_(ps.getUntrackedParameter<double>("maxEnergy", 250.0)),
91  maxTime_(ps.getUntrackedParameter<double>("maxTime", 1000.0)),
92  tMax_(ps.getUntrackedParameter<double>("timeCut", 100.0)),
93  tScale_(ps.getUntrackedParameter<double>("timeScale", 1.0)),
94  tCut_(ps.getUntrackedParameter<double>("timeThreshold", 15.0)),
95  testNumber_(ps.getUntrackedParameter<bool>("testNumbering", false)),
96  passive_(ps.getUntrackedParameter<bool>("passiveHits", false)),
97  allSteps_(ps.getUntrackedParameter<int>("allSteps", 100)),
98  detNames_(ps.getUntrackedParameter<std::vector<std::string> >("detNames")) {
99  usesResource(TFileService::kSharedResource);
100 
101  // register for data access
102  for (unsigned int i = 0; i < hitLab_.size(); i++)
103  toks_calo_.emplace_back(consumes<edm::PCaloHitContainer>(edm::InputTag(g4Label_, hitLab_[i])));
104  tok_passive_ = consumes<edm::PassiveHitContainer>(edm::InputTag(g4Label_, "AllPassiveHits"));
105 
106  edm::LogVerbatim("HitStudy") << "Module Label: " << g4Label_ << " Hits|timeSliceUnit:";
107  for (unsigned int i = 0; i < hitLab_.size(); i++)
108  edm::LogVerbatim("HitStudy") << "[" << i << "] " << hitLab_[i] << " " << timeSliceUnit_[i];
109  edm::LogVerbatim("HitStudy") << "Passive Hits " << passive_ << " from AllPassiveHits";
110  edm::LogVerbatim("HitStudy") << "maxEnergy: " << maxEnergy_ << " maxTime: " << maxTime_ << " tMax: " << tMax_;
111  for (unsigned int k = 0; k < detNames_.size(); ++k)
112  edm::LogVerbatim("HitStudy") << "Detector[" << k << "] " << detNames_[k];
113 
115  if (!tfile.isAvailable())
116  throw cms::Exception("BadConfig") << "TFileService unavailable: "
117  << "please add it to config file";
118  char name[20], title[120];
119  std::string dets[nCalo_] = {"EB", "EE", "HB", "HE", "HO", "HF"};
120  for (int i = 0; i < nCalo_; i++) {
121  sprintf(name, "Hit%d", i);
122  sprintf(title, "Number of hits in %s", dets[i].c_str());
123  h_hit_[i] = tfile->make<TH1F>(name, title, 100, 0., 20000.);
124  h_hit_[i]->GetXaxis()->SetTitle(title);
125  h_hit_[i]->GetYaxis()->SetTitle("Events");
126  sprintf(name, "Time%d", i);
127  sprintf(title, "Time of the hit (ns) in %s", dets[i].c_str());
128  h_time_[i] = tfile->make<TH1F>(name, title, 100, 0., 200.);
129  h_time_[i]->GetXaxis()->SetTitle(title);
130  h_time_[i]->GetYaxis()->SetTitle("Hits");
131  sprintf(name, "TimeT%d", i);
132  sprintf(title, "Time of each hit (ns) in %s", dets[i].c_str());
133  h_timeT_[i] = tfile->make<TH1F>(name, title, 100, 0., 200.);
134  h_timeT_[i]->GetXaxis()->SetTitle(title);
135  h_timeT_[i]->GetYaxis()->SetTitle("Hits");
136  double ymax = (i > 1) ? 0.01 : 0.1;
137  double ymx0 = (i > 1) ? 0.0025 : 0.025;
138  sprintf(name, "Edep%d", i);
139  sprintf(title, "Energy deposit (GeV) in %s", dets[i].c_str());
140  h_edep_[i] = tfile->make<TH1F>(name, title, 100, 0., ymax);
141  h_edep_[i]->GetXaxis()->SetTitle(title);
142  h_edep_[i]->GetYaxis()->SetTitle("Hits");
143  sprintf(name, "EdepT%d", i);
144  sprintf(title, "Energy deposit (GeV) of each hit in %s", dets[i].c_str());
145  h_edepT_[i] = tfile->make<TH1F>(name, title, 100, 0., ymx0);
146  h_edepT_[i]->GetXaxis()->SetTitle(title);
147  h_edepT_[i]->GetYaxis()->SetTitle("Hits");
148  sprintf(name, "EdepEM%d", i);
149  sprintf(title, "Energy deposit (GeV) by EM particles in %s", dets[i].c_str());
150  h_edepEM_[i] = tfile->make<TH1F>(name, title, 100, 0., ymx0);
151  h_edepEM_[i]->GetXaxis()->SetTitle(title);
152  h_edepEM_[i]->GetYaxis()->SetTitle("Hits");
153  sprintf(name, "EdepHad%d", i);
154  sprintf(title, "Energy deposit (GeV) by hadrons in %s", dets[i].c_str());
155  h_edepHad_[i] = tfile->make<TH1F>(name, title, 100, 0., ymx0);
156  h_edepHad_[i]->GetXaxis()->SetTitle(title);
157  h_edepHad_[i]->GetYaxis()->SetTitle("Hits");
158  sprintf(name, "Edep15%d", i);
159  sprintf(title, "Energy deposit (GeV) for T > %4.0f ns in %s", tCut_, dets[i].c_str());
160  h_edep1_[i] = tfile->make<TH1F>(name, title, 100, 0., ymax);
161  h_edep1_[i]->GetXaxis()->SetTitle(title);
162  h_edep1_[i]->GetYaxis()->SetTitle("Hits");
163  sprintf(name, "EdepT15%d", i);
164  sprintf(title, "Energy deposit (GeV) of each hit for T > %4.0f in %s", tCut_, dets[i].c_str());
165  h_edepT1_[i] = tfile->make<TH1F>(name, title, 100, 0., ymx0);
166  h_edepT1_[i]->GetXaxis()->SetTitle(title);
167  h_edepT1_[i]->GetYaxis()->SetTitle("Hits");
168  ymax = (i > 1) ? 1.0 : maxEnergy_;
169  sprintf(name, "Etot%d", i);
170  sprintf(title, "Total energy deposit (GeV) in %s", dets[i].c_str());
171  h_etot_[i] = tfile->make<TH1F>(name, title, 50, 0., ymax);
172  h_etot_[i]->GetXaxis()->SetTitle(title);
173  h_etot_[i]->GetYaxis()->SetTitle("Events");
174  sprintf(name, "EtotG%d", i);
175  sprintf(title, "Total energy deposit (GeV) in %s (t < 100 ns)", dets[i].c_str());
176  h_etotg_[i] = tfile->make<TH1F>(name, title, 50, 0., ymax);
177  h_etotg_[i]->GetXaxis()->SetTitle(title);
178  h_etotg_[i]->GetYaxis()->SetTitle("Events");
179  sprintf(name, "rr%d", i);
180  sprintf(title, "R of hit point (cm) in %s", dets[i].c_str());
181  h_rr_[i] = tfile->make<TH1F>(name, title, 100, 0., 250.);
182  h_rr_[i]->GetXaxis()->SetTitle(title);
183  h_rr_[i]->GetYaxis()->SetTitle("Hits");
184  sprintf(name, "zz%d", i);
185  sprintf(title, "z of hit point (cm) in %s", dets[i].c_str());
186  h_zz_[i] = tfile->make<TH1F>(name, title, 240, -600., 600.);
187  h_zz_[i]->GetXaxis()->SetTitle(title);
188  h_zz_[i]->GetYaxis()->SetTitle("Hits");
189  sprintf(name, "eta%d", i);
190  sprintf(title, "#eta of hit point in %s", dets[i].c_str());
191  h_eta_[i] = tfile->make<TH1F>(name, title, 100, -5.0, 5.0);
192  h_eta_[i]->GetXaxis()->SetTitle(title);
193  h_eta_[i]->GetYaxis()->SetTitle("Hits");
194  sprintf(name, "phi%d", i);
195  sprintf(title, "#phi of hit point in %s", dets[i].c_str());
196  h_phi_[i] = tfile->make<TH1F>(name, title, 100, -M_PI, M_PI);
197  h_phi_[i]->GetXaxis()->SetTitle(title);
198  h_phi_[i]->GetYaxis()->SetTitle("Hits");
199  }
200  sprintf(title, "R vs Z of hit point");
201  h_rz_ = tfile->make<TH2F>("rz", title, 120, 0., 600., 100, 0., 250.);
202  h_rz_->GetXaxis()->SetTitle("z (cm)");
203  h_rz_->GetYaxis()->SetTitle("R (cm)");
204  sprintf(title, "R vs Z of hit point for hits with T > %4.0f ns", tCut_);
205  h_rz1_ = tfile->make<TH2F>("rz2", title, 120, 0., 600., 100, 0., 250.);
206  h_rz1_->GetXaxis()->SetTitle("z (cm)");
207  h_rz1_->GetYaxis()->SetTitle("R (cm)");
208  sprintf(title, "#phi vs #eta of hit point");
209  h_etaphi_ = tfile->make<TH2F>("etaphi", title, 100, 0., 5., 100, 0., M_PI);
210  h_etaphi_->GetXaxis()->SetTitle("#eta");
211  h_etaphi_->GetYaxis()->SetTitle("#phi");
212 
213  if (passive_) {
214  h_hitp_ = tfile->make<TH1F>("hitp", "All Steps", 100, 0.0, 20000.0);
215  h_hitp_->GetXaxis()->SetTitle("Hits");
216  h_hitp_->GetYaxis()->SetTitle("Events");
217  h_trackp_ = tfile->make<TH1F>("trackp", "All Steps", 100, 0.0, 200000.0);
218  h_hitp_->GetXaxis()->SetTitle("Tracks");
219  h_hitp_->GetYaxis()->SetTitle("Events");
220  h_edepp_ = tfile->make<TH1F>("edepp", "All Steps", 100, 0.0, 50.0);
221  h_edepp_->GetXaxis()->SetTitle("Energy Deposit (MeV)");
222  h_edepp_->GetYaxis()->SetTitle("Hits");
223  h_timep_ = tfile->make<TH1F>("timep", "All Steps", 100, 0.0, 100.0);
224  h_timep_->GetXaxis()->SetTitle("Hits");
225  h_timep_->GetYaxis()->SetTitle("Hit Time (ns)");
226  h_stepp_ = tfile->make<TH1F>("stepp", "All Steps", 1000, 0.0, 100.0);
227  h_stepp_->GetXaxis()->SetTitle("Hits");
228  h_stepp_->GetYaxis()->SetTitle("Step length (cm)");
229  for (unsigned int k = 0; k < detNames_.size(); ++k) {
230  sprintf(name, "edept%d", k);
231  sprintf(title, "Energy Deposit (MeV) in %s", detNames_[k].c_str());
232  h_edepTk_.emplace_back(tfile->make<TH1F>(name, title, 100, 0.0, 1.0));
233  h_edepTk_.back()->GetYaxis()->SetTitle("Hits");
234  h_edepTk_.back()->GetXaxis()->SetTitle(title);
235  sprintf(name, "timet%d", k);
236  sprintf(title, "Hit Time (ns) in %s", detNames_[k].c_str());
237  h_timeTk_.emplace_back(tfile->make<TH1F>(name, title, 100, 0.0, 100.0));
238  h_timeTk_.back()->GetYaxis()->SetTitle("Hits");
239  h_timeTk_.back()->GetXaxis()->SetTitle(title);
240  }
241  if ((allSteps_ / 100) % 10 > 0) {
242  for (int eta = 1; eta <= 29; ++eta) {
243  int dmax = (eta < 16) ? 4 : 7;
244  for (int depth = 1; depth <= dmax; ++depth) {
245  sprintf(name, "Eta%dDepth%d", eta, depth);
246  sprintf(title, "R vs Z (#eta = %d, depth = %d)", eta, depth);
247  etaDepth_[eta * 100 + depth] = h_rzH_.size();
248  h_rzH_.emplace_back(tfile->make<TH2F>(name, title, 120, 0., 600., 100, 0., 250.));
249  h_rzH_.back()->GetXaxis()->SetTitle("z (cm)");
250  h_rzH_.back()->GetYaxis()->SetTitle("R (cm)");
251  }
252  }
253  }
254  }
255 }

References allSteps_, LEDCalibrationChannels::depth, detNames_, PVValHelper::eta, etaDepth_, g4Label_, h_edep1_, h_edep_, h_edepEM_, h_edepHad_, h_edepp_, h_edepT1_, h_edepT_, h_edepTk_, h_eta_, h_etaphi_, h_etot_, h_etotg_, h_hit_, h_hitp_, h_phi_, h_rr_, h_rz1_, h_rz_, h_rzH_, h_stepp_, h_time_, h_timep_, h_timeT_, h_timeTk_, h_trackp_, h_zz_, hitLab_, mps_fire::i, dqmdumpme::k, TFileService::kSharedResource, M_PI, maxEnergy_, maxTime_, Skims_PA_cff::name, nCalo_, passive_, AlCaHLTBitMon_QueryRunRegistry::string, tCut_, compare::tfile, timeSliceUnit_, overlapproblemtsosanalyzer_cfi::title, tMax_, tok_passive_, toks_calo_, and L1TOccupancyClient_cfi::ymax.

◆ ~CaloSimHitAnalysis()

CaloSimHitAnalysis::~CaloSimHitAnalysis ( )
inlineoverride

Definition at line 48 of file CaloSimHitAnalysis.cc.

48 {}

Member Function Documentation

◆ analyze()

void CaloSimHitAnalysis::analyze ( edm::Event const &  e,
edm::EventSetup const &  set 
)
overrideprotectedvirtual

Implements edm::one::EDAnalyzerBase.

Definition at line 277 of file CaloSimHitAnalysis.cc.

277  {
278  edm::LogVerbatim("HitStudy") << "CaloSimHitAnalysis:Run = " << e.id().run() << " Event = " << e.id().event();
279 
280  edm::ESHandle<CaloGeometry> calo_handle;
281  set.get<CaloGeometryRecord>().get(calo_handle);
282  caloGeometry_ = calo_handle.product();
283  hcalGeom_ = static_cast<const HcalGeometry*>(caloGeometry_->getSubdetectorGeometry(DetId::Hcal, HcalBarrel));
284 
285  for (unsigned int i = 0; i < toks_calo_.size(); i++) {
287  e.getByToken(toks_calo_[i], hitsCalo);
288  bool getHits = (hitsCalo.isValid());
289 #ifdef EDM_ML_DEBUG
290  edm::LogVerbatim("HitStudy") << "CaloSimHitAnalysis: Input flags Hits[" << i << "]: " << getHits;
291 #endif
292  if (getHits) {
293  std::vector<PCaloHit> caloHits;
294  caloHits.insert(caloHits.end(), hitsCalo->begin(), hitsCalo->end());
295 #ifdef EDM_ML_DEBUG
296  edm::LogVerbatim("HitStudy") << "CaloSimHitAnalysis: Hit buffer [" << i << "] " << caloHits.size();
297 #endif
298  analyzeHits(caloHits, i);
299  }
300  }
301 
302  if (passive_) {
304  e.getByToken(tok_passive_, hitsPassive);
305  bool getHits = (hitsPassive.isValid());
306 #ifdef EDM_ML_DEBUG
307  edm::LogVerbatim("HitStudy") << "CaloSimHitAnalysis: Passive: " << getHits;
308 #endif
309  if (getHits) {
310  std::vector<PassiveHit> passiveHits;
311  passiveHits.insert(passiveHits.end(), hitsPassive->begin(), hitsPassive->end());
312 #ifdef EDM_ML_DEBUG
313  edm::LogVerbatim("HitStudy") << "CaloSimHitAnalysis: Passive Hit buffer " << passiveHits.size();
314 #endif
315  analyzePassiveHits(passiveHits);
316  }
317  }
318 }

References analyzeHits(), analyzePassiveHits(), caloGeometry_, MillePedeFileConverter_cfg::e, edm::EventSetup::get(), get, CaloGeometry::getSubdetectorGeometry(), DetId::Hcal, HcalBarrel, hcalGeom_, mps_fire::i, edm::HandleBase::isValid(), passive_, edm::ESHandle< T >::product(), tok_passive_, and toks_calo_.

◆ analyzeHits()

void CaloSimHitAnalysis::analyzeHits ( std::vector< PCaloHit > &  hits,
int  indx 
)
protected

Definition at line 320 of file CaloSimHitAnalysis.cc.

320  {
321  int nHit = hits.size();
322  int nHB = 0, nHE = 0, nHO = 0, nHF = 0, nEB = 0, nEE = 0, nBad = 0, iHit = 0;
323  std::map<CaloHitID, std::pair<double, double> > hitMap;
324  double etot[nCalo_], etotG[nCalo_];
325  for (unsigned int k = 0; k < nCalo_; ++k) {
326  etot[k] = etotG[k] = 0;
327  }
328  for (const auto& hit : hits) {
329  double edep = hit.energy();
330  double time = tScale_ * hit.time();
331  uint32_t id = hit.id();
332  int itra = hit.geantTrackId();
333  double edepEM = hit.energyEM();
334  double edepHad = hit.energyHad();
335  int idx(-1);
336  if (indx != 2) {
337  idx = indx;
338  if (indx == 0)
339  ++nEB;
340  else
341  ++nEE;
342  } else {
343  int subdet(0);
344  if (testNumber_) {
345  int ieta(0), phi(0), z(0), lay(0), depth(0);
346  HcalTestNumbering::unpackHcalIndex(id, subdet, z, depth, ieta, phi, lay);
347  id = HcalDetId(static_cast<HcalSubdetector>(subdet), z * ieta, phi, depth).rawId();
348  } else {
349  subdet = HcalDetId(id).subdet();
350  }
351  if (subdet == static_cast<int>(HcalBarrel)) {
352  idx = indx;
353  nHB++;
354  } else if (subdet == static_cast<int>(HcalEndcap)) {
355  idx = indx + 1;
356  nHE++;
357  } else if (subdet == static_cast<int>(HcalOuter)) {
358  idx = indx + 2;
359  nHO++;
360  } else if (subdet == static_cast<int>(HcalForward)) {
361  idx = indx + 3;
362  nHF++;
363  }
364  }
365 #ifdef EDM_ML_DEBUG
366  edm::LogVerbatim("HitStudy") << "Hit[" << iHit << ":" << nHit << ":" << idx << "] E " << edep << ":" << edepEM
367  << ":" << edepHad << " T " << time << " itra " << itra << " ID " << std::hex << id
368  << std::dec;
369 #endif
370  ++iHit;
371  if (idx >= 0) {
372  CaloHitID hid(id, time, itra, 0, timeSliceUnit_[indx]);
373  auto itr = hitMap.find(hid);
374  if (itr == hitMap.end())
375  hitMap[hid] = std::make_pair(time, edep);
376  else
377  ((itr->second).second) += edep;
378  h_edepT_[idx]->Fill(edep);
379  h_timeT_[idx]->Fill(time);
380  if (edepEM > 0)
381  h_edepEM_[idx]->Fill(edepEM);
382  if (edepHad > 0)
383  h_edepHad_[idx]->Fill(edepHad);
384  if (time > tCut_)
385  h_edepT1_[idx]->Fill(edep);
386  } else {
387  ++nBad;
388  }
389  }
390 
391  //Now make plots
392  for (auto itr = hitMap.begin(); itr != hitMap.end(); ++itr) {
393  int idx = -1;
395  DetId id((itr->first).unitID());
396 #ifdef EDM_ML_DEBUG
397  edm::LogVerbatim("HitStudy") << "Index " << indx << " Geom " << caloGeometry_ << ":" << hcalGeom_ << " "
398  << std::hex << id.rawId() << std::dec;
399 #endif
400  if (indx != 2) {
401  idx = indx;
403  } else {
404  int subdet = id.subdetId();
405  if (subdet == static_cast<int>(HcalBarrel)) {
406  idx = indx;
407  } else if (subdet == static_cast<int>(HcalEndcap)) {
408  idx = indx + 1;
409  } else if (subdet == static_cast<int>(HcalOuter)) {
410  idx = indx + 2;
411  } else if (subdet == static_cast<int>(HcalForward)) {
412  idx = indx + 3;
413  }
414  point = hcalGeom_->getPosition(id);
415  }
416  double edep = (itr->second).second;
417  double time = (itr->second).first;
418 #ifdef EDM_ML_DEBUG
419  edm::LogVerbatim("HitStudy") << "Index " << idx << ":" << nCalo_ << " Point " << point << " E " << edep << " T "
420  << time;
421 #endif
422  if (idx >= 0) {
423  h_time_[idx]->Fill(time);
424  h_edep_[idx]->Fill(edep);
425  h_rr_[idx]->Fill(point.perp());
426  h_zz_[idx]->Fill(point.z());
427  h_eta_[idx]->Fill(point.eta());
428  h_phi_[idx]->Fill(point.phi());
429  h_rz_->Fill(std::abs(point.z()), point.perp());
430  h_etaphi_->Fill(std::abs(point.eta()), std::abs(point.phi()));
431  etot[idx] += edep;
432  if (time < tMax_)
433  etotG[idx] += edep;
434  if (time > tCut_) {
435  h_edep1_[idx]->Fill(edep);
436  h_rz1_->Fill(std::abs(point.z()), point.perp());
437  }
438  }
439  }
440 
441  if (indx < 2) {
442  h_etot_[indx]->Fill(etot[indx]);
443  h_etotg_[indx]->Fill(etotG[indx]);
444  if (indx == 0)
445  h_hit_[indx]->Fill(double(nEB));
446  else
447  h_hit_[indx]->Fill(double(nEE));
448  } else {
449  h_hit_[2]->Fill(double(nHB));
450  h_hit_[3]->Fill(double(nHE));
451  h_hit_[4]->Fill(double(nHO));
452  h_hit_[5]->Fill(double(nHF));
453  for (int idx = 2; idx < nCalo_; idx++) {
454  h_etot_[idx]->Fill(etot[idx]);
455  h_etotg_[idx]->Fill(etotG[idx]);
456  }
457  }
458 
459  edm::LogVerbatim("HitStudy") << "CaloSimHitAnalysis::analyzeHits: EB " << nEB << " EE " << nEE << " HB " << nHB
460  << " HE " << nHE << " HO " << nHO << " HF " << nHF << " Bad " << nBad << " All " << nHit
461  << " Reduced " << hitMap.size();
462 }

References funct::abs(), caloGeometry_, TauDecayModes::dec, LEDCalibrationChannels::depth, dqmdumpme::first, CaloGeometry::getPosition(), HcalGeometry::getPosition(), h_edep1_, h_edep_, h_edepEM_, h_edepHad_, h_edepT1_, h_edepT_, h_eta_, h_etaphi_, h_etot_, h_etotg_, h_hit_, h_phi_, h_rr_, h_rz1_, h_rz_, h_time_, h_timeT_, h_zz_, HcalBarrel, HcalEndcap, HcalForward, hcalGeom_, HcalOuter, hfClusterShapes_cfi::hits, triggerObjects_cff::id, hit::id, training_settings::idx, LEDCalibrationChannels::ieta, dqmdumpme::k, nCalo_, phi, point, DetId::rawId(), edm::second(), HcalDetId::subdet(), tCut_, testNumber_, ntuplemaker::time, timeSliceUnit_, tMax_, tScale_, HcalTestNumbering::unpackHcalIndex(), and z.

Referenced by analyze().

◆ analyzePassiveHits()

void CaloSimHitAnalysis::analyzePassiveHits ( std::vector< PassiveHit > &  hits)
protected

Definition at line 464 of file CaloSimHitAnalysis.cc.

464  {
465  const std::string active = "Active";
466  const std::string sensor = "Sensor";
467  std::map<std::pair<std::string, uint32_t>, int> hitx;
468  std::map<int, int> tracks;
469  unsigned int passive1(0), passive2(0);
470  for (auto& hit : hits) {
471  std::string name = hit.vname();
472  std::pair<std::string, uint32_t> volume = std::make_pair(name, (hit.id() % 1000000));
473  auto itr = hitx.find(volume);
474  if (itr == hitx.end())
475  hitx[volume] = 1;
476  else
477  ++(itr->second);
478  auto ktr = tracks.find(hit.trackId());
479  if (ktr == tracks.end())
480  tracks[hit.trackId()] = 1;
481  else
482  ++(ktr->second);
483  h_edepp_->Fill(hit.energy());
484  h_timep_->Fill(hit.time());
485  h_stepp_->Fill(hit.stepLength());
486  if ((name.find(active) != std::string::npos) || (name.find(sensor) != std::string::npos)) {
487  unsigned idet = detNames_.size();
488  for (unsigned int k = 0; k < detNames_.size(); ++k) {
489  if (name.find(detNames_[k]) != std::string::npos) {
490  idet = k;
491  break;
492  }
493  }
494  if (idet < detNames_.size()) {
495  h_edepTk_[idet]->Fill(hit.energy());
496  h_timeTk_[idet]->Fill(hit.time());
497  }
498  }
499 
500  if ((allSteps_ / 100) % 10 > 0) {
501  uint32_t id = hit.id();
502  if (DetId(id).det() == DetId::Hcal) {
503  HcalDetId hid = HcalDetId(id);
504  int indx = (100 * hid.ietaAbs() + hid.depth());
505  auto itr = etaDepth_.find(indx);
506 #ifdef EDM_ML_DEBUG
507  edm::LogVerbatim("HitStudy") << "CaloSimHitAnalysis::ID: " << hid << " Index " << indx << " Iterator "
508  << (itr != etaDepth_.end());
509 #endif
510  ++passive1;
511  if (itr != etaDepth_.end()) {
512  uint32_t ipos = itr->second;
513  double rr = std::sqrt(hit.x() * hit.x() + hit.y() * hit.y());
514  if (ipos < h_rzH_.size()) {
515  h_rzH_[ipos]->Fill(hit.z(), rr);
516  ++passive2;
517  }
518  }
519  }
520  }
521  }
522  h_hitp_->Fill(hitx.size());
523  h_trackp_->Fill(tracks.size());
524  edm::LogVerbatim("HitStudy") << "CaloSimHitAnalysis::analyzPassiveHits: Total " << hits.size() << " Cells "
525  << hitx.size() << " Tracks " << tracks.size() << " Passive " << passive1 << ":"
526  << passive2;
527 }

References allSteps_, HcalDetId::depth(), detNames_, etaDepth_, h_edepp_, h_edepTk_, h_hitp_, h_rzH_, h_stepp_, h_timep_, h_timeTk_, h_trackp_, DetId::Hcal, hfClusterShapes_cfi::hits, hit::id, HcalDetId::ietaAbs(), dqmdumpme::k, Skims_PA_cff::name, findQualityFiles::rr, mathSSE::sqrt(), AlCaHLTBitMon_QueryRunRegistry::string, PDWG_EXOHSCP_cff::tracks, hit::x, hit::y, and hit::z.

Referenced by analyze().

◆ beginJob()

void CaloSimHitAnalysis::beginJob ( void  )
inlineoverrideprotectedvirtual

Reimplemented from edm::one::EDAnalyzerBase.

Definition at line 52 of file CaloSimHitAnalysis.cc.

52 {}

◆ beginRun()

void CaloSimHitAnalysis::beginRun ( edm::Run const &  ,
edm::EventSetup const &   
)
inlineoverrideprotected

Definition at line 54 of file CaloSimHitAnalysis.cc.

54 {}

◆ endRun()

void CaloSimHitAnalysis::endRun ( edm::Run const &  ,
edm::EventSetup const &   
)
inlineoverrideprotected

Definition at line 55 of file CaloSimHitAnalysis.cc.

55 {}

◆ fillDescriptions()

void CaloSimHitAnalysis::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 257 of file CaloSimHitAnalysis.cc.

257  {
259  std::vector<std::string> labels = {"EcalHitsEB1", "EcalHitsEE1", "HcalHits1"};
260  std::vector<double> times = {1, 1, 1};
261  desc.addUntracked<std::string>("moduleLabel", "g4SimHits");
262  desc.add<std::vector<std::string> >("hitCollection", labels);
263  desc.add<std::vector<double> >("timeSliceUnit", times);
264  desc.addUntracked<double>("maxEnergy", 250.0);
265  desc.addUntracked<double>("maxTime", 1000.0);
266  desc.addUntracked<double>("timeCut", 100.0);
267  desc.addUntracked<double>("timeScale", 1.0);
268  desc.addUntracked<double>("timeThreshold", 15.0);
269  desc.addUntracked<bool>("testNumbering", false);
270  desc.addUntracked<bool>("passiveHits", false);
271  std::vector<std::string> names = {"PixelBarrel", "PixelForward", "TIB", "TID", "TOB", "TEC"};
272  desc.addUntracked<std::vector<std::string> >("detNames", names);
273  desc.addUntracked<int>("allStep", 100);
274  descriptions.add("caloSimHitAnalysis", desc);
275 }

References edm::ConfigurationDescriptions::add(), edm::ParameterSetDescription::add(), edm::ParameterSetDescription::addUntracked(), SummaryClient_cfi::labels, names, and AlCaHLTBitMon_QueryRunRegistry::string.

Member Data Documentation

◆ allSteps_

const int CaloSimHitAnalysis::allSteps_
private

Definition at line 66 of file CaloSimHitAnalysis.cc.

Referenced by analyzePassiveHits(), and CaloSimHitAnalysis().

◆ caloGeometry_

const CaloGeometry* CaloSimHitAnalysis::caloGeometry_
private

Definition at line 71 of file CaloSimHitAnalysis.cc.

Referenced by analyze(), and analyzeHits().

◆ detNames_

const std::vector<std::string> CaloSimHitAnalysis::detNames_
private

Definition at line 67 of file CaloSimHitAnalysis.cc.

Referenced by analyzePassiveHits(), and CaloSimHitAnalysis().

◆ etaDepth_

std::map<int, unsigned int> CaloSimHitAnalysis::etaDepth_
private

Definition at line 83 of file CaloSimHitAnalysis.cc.

Referenced by analyzePassiveHits(), and CaloSimHitAnalysis().

◆ g4Label_

const std::string CaloSimHitAnalysis::g4Label_
private

Definition at line 61 of file CaloSimHitAnalysis.cc.

Referenced by CaloSimHitAnalysis().

◆ h_edep1_

TH1F * CaloSimHitAnalysis::h_edep1_[nCalo_]
private

Definition at line 76 of file CaloSimHitAnalysis.cc.

Referenced by analyzeHits(), and CaloSimHitAnalysis().

◆ h_edep_

TH1F * CaloSimHitAnalysis::h_edep_[nCalo_]
private

Definition at line 75 of file CaloSimHitAnalysis.cc.

Referenced by analyzeHits(), and CaloSimHitAnalysis().

◆ h_edepEM_

TH1F* CaloSimHitAnalysis::h_edepEM_[nCalo_]
private

Definition at line 77 of file CaloSimHitAnalysis.cc.

Referenced by analyzeHits(), and CaloSimHitAnalysis().

◆ h_edepHad_

TH1F * CaloSimHitAnalysis::h_edepHad_[nCalo_]
private

Definition at line 77 of file CaloSimHitAnalysis.cc.

Referenced by analyzeHits(), and CaloSimHitAnalysis().

◆ h_edepp_

TH1F * CaloSimHitAnalysis::h_edepp_
private

Definition at line 80 of file CaloSimHitAnalysis.cc.

Referenced by analyzePassiveHits(), and CaloSimHitAnalysis().

◆ h_edepT1_

TH1F * CaloSimHitAnalysis::h_edepT1_[nCalo_]
private

Definition at line 76 of file CaloSimHitAnalysis.cc.

Referenced by analyzeHits(), and CaloSimHitAnalysis().

◆ h_edepT_

TH1F * CaloSimHitAnalysis::h_edepT_[nCalo_]
private

Definition at line 75 of file CaloSimHitAnalysis.cc.

Referenced by analyzeHits(), and CaloSimHitAnalysis().

◆ h_edepTk_

std::vector<TH1F*> CaloSimHitAnalysis::h_edepTk_
private

Definition at line 81 of file CaloSimHitAnalysis.cc.

Referenced by analyzePassiveHits(), and CaloSimHitAnalysis().

◆ h_eta_

TH1F* CaloSimHitAnalysis::h_eta_[nCalo_]
private

Definition at line 78 of file CaloSimHitAnalysis.cc.

Referenced by analyzeHits(), and CaloSimHitAnalysis().

◆ h_etaphi_

TH2F * CaloSimHitAnalysis::h_etaphi_
private

Definition at line 79 of file CaloSimHitAnalysis.cc.

Referenced by analyzeHits(), and CaloSimHitAnalysis().

◆ h_etot_

TH1F * CaloSimHitAnalysis::h_etot_[nCalo_]
private

Definition at line 78 of file CaloSimHitAnalysis.cc.

Referenced by analyzeHits(), and CaloSimHitAnalysis().

◆ h_etotg_

TH1F * CaloSimHitAnalysis::h_etotg_[nCalo_]
private

Definition at line 78 of file CaloSimHitAnalysis.cc.

Referenced by analyzeHits(), and CaloSimHitAnalysis().

◆ h_hit_

TH1F* CaloSimHitAnalysis::h_hit_[nCalo_]
private

Definition at line 75 of file CaloSimHitAnalysis.cc.

Referenced by analyzeHits(), and CaloSimHitAnalysis().

◆ h_hitp_

TH1F* CaloSimHitAnalysis::h_hitp_
private

Definition at line 80 of file CaloSimHitAnalysis.cc.

Referenced by analyzePassiveHits(), and CaloSimHitAnalysis().

◆ h_phi_

TH1F * CaloSimHitAnalysis::h_phi_[nCalo_]
private

Definition at line 78 of file CaloSimHitAnalysis.cc.

Referenced by analyzeHits(), and CaloSimHitAnalysis().

◆ h_rr_

TH1F * CaloSimHitAnalysis::h_rr_[nCalo_]
private

Definition at line 77 of file CaloSimHitAnalysis.cc.

Referenced by analyzeHits(), and CaloSimHitAnalysis().

◆ h_rz1_

TH2F * CaloSimHitAnalysis::h_rz1_
private

Definition at line 79 of file CaloSimHitAnalysis.cc.

Referenced by analyzeHits(), and CaloSimHitAnalysis().

◆ h_rz_

TH2F* CaloSimHitAnalysis::h_rz_
private

Definition at line 79 of file CaloSimHitAnalysis.cc.

Referenced by analyzeHits(), and CaloSimHitAnalysis().

◆ h_rzH_

std::vector<TH2F*> CaloSimHitAnalysis::h_rzH_
private

Definition at line 82 of file CaloSimHitAnalysis.cc.

Referenced by analyzePassiveHits(), and CaloSimHitAnalysis().

◆ h_stepp_

TH1F * CaloSimHitAnalysis::h_stepp_
private

Definition at line 80 of file CaloSimHitAnalysis.cc.

Referenced by analyzePassiveHits(), and CaloSimHitAnalysis().

◆ h_time_

TH1F * CaloSimHitAnalysis::h_time_[nCalo_]
private

Definition at line 75 of file CaloSimHitAnalysis.cc.

Referenced by analyzeHits(), and CaloSimHitAnalysis().

◆ h_timep_

TH1F * CaloSimHitAnalysis::h_timep_
private

Definition at line 80 of file CaloSimHitAnalysis.cc.

Referenced by analyzePassiveHits(), and CaloSimHitAnalysis().

◆ h_timeT_

TH1F* CaloSimHitAnalysis::h_timeT_[nCalo_]
private

Definition at line 76 of file CaloSimHitAnalysis.cc.

Referenced by analyzeHits(), and CaloSimHitAnalysis().

◆ h_timeTk_

std::vector<TH1F*> CaloSimHitAnalysis::h_timeTk_
private

Definition at line 81 of file CaloSimHitAnalysis.cc.

Referenced by analyzePassiveHits(), and CaloSimHitAnalysis().

◆ h_trackp_

TH1F * CaloSimHitAnalysis::h_trackp_
private

Definition at line 80 of file CaloSimHitAnalysis.cc.

Referenced by analyzePassiveHits(), and CaloSimHitAnalysis().

◆ h_zz_

TH1F * CaloSimHitAnalysis::h_zz_[nCalo_]
private

Definition at line 77 of file CaloSimHitAnalysis.cc.

Referenced by analyzeHits(), and CaloSimHitAnalysis().

◆ hcalGeom_

const HcalGeometry* CaloSimHitAnalysis::hcalGeom_
private

Definition at line 72 of file CaloSimHitAnalysis.cc.

Referenced by analyze(), and analyzeHits().

◆ hitLab_

const std::vector<std::string> CaloSimHitAnalysis::hitLab_
private

Definition at line 62 of file CaloSimHitAnalysis.cc.

Referenced by CaloSimHitAnalysis().

◆ maxEnergy_

const double CaloSimHitAnalysis::maxEnergy_
private

Definition at line 64 of file CaloSimHitAnalysis.cc.

Referenced by CaloSimHitAnalysis().

◆ maxTime_

const double CaloSimHitAnalysis::maxTime_
private

Definition at line 64 of file CaloSimHitAnalysis.cc.

Referenced by CaloSimHitAnalysis().

◆ nCalo_

constexpr int CaloSimHitAnalysis::nCalo_ = 6
staticconstexprprivate

Definition at line 74 of file CaloSimHitAnalysis.cc.

Referenced by analyzeHits(), and CaloSimHitAnalysis().

◆ passive_

const bool CaloSimHitAnalysis::passive_
private

Definition at line 65 of file CaloSimHitAnalysis.cc.

Referenced by analyze(), and CaloSimHitAnalysis().

◆ tCut_

const double CaloSimHitAnalysis::tCut_
private

Definition at line 64 of file CaloSimHitAnalysis.cc.

Referenced by analyzeHits(), and CaloSimHitAnalysis().

◆ testNumber_

const bool CaloSimHitAnalysis::testNumber_
private

Definition at line 65 of file CaloSimHitAnalysis.cc.

Referenced by analyzeHits().

◆ timeSliceUnit_

const std::vector<double> CaloSimHitAnalysis::timeSliceUnit_
private

Definition at line 63 of file CaloSimHitAnalysis.cc.

Referenced by analyzeHits(), and CaloSimHitAnalysis().

◆ tMax_

const double CaloSimHitAnalysis::tMax_
private

Definition at line 64 of file CaloSimHitAnalysis.cc.

Referenced by analyzeHits(), and CaloSimHitAnalysis().

◆ tok_passive_

edm::EDGetTokenT<edm::PassiveHitContainer> CaloSimHitAnalysis::tok_passive_
private

Definition at line 69 of file CaloSimHitAnalysis.cc.

Referenced by analyze(), and CaloSimHitAnalysis().

◆ toks_calo_

std::vector<edm::EDGetTokenT<edm::PCaloHitContainer> > CaloSimHitAnalysis::toks_calo_
private

Definition at line 68 of file CaloSimHitAnalysis.cc.

Referenced by analyze(), and CaloSimHitAnalysis().

◆ tScale_

const double CaloSimHitAnalysis::tScale_
private

Definition at line 64 of file CaloSimHitAnalysis.cc.

Referenced by analyzeHits().

CaloSimHitAnalysis::h_timeTk_
std::vector< TH1F * > h_timeTk_
Definition: CaloSimHitAnalysis.cc:81
SummaryClient_cfi.labels
labels
Definition: SummaryClient_cfi.py:61
edm::ESHandle::product
T const * product() const
Definition: ESHandle.h:86
CaloSimHitAnalysis::h_edepT1_
TH1F * h_edepT1_[nCalo_]
Definition: CaloSimHitAnalysis.cc:76
PDWG_EXOHSCP_cff.tracks
tracks
Definition: PDWG_EXOHSCP_cff.py:28
mps_fire.i
i
Definition: mps_fire.py:355
edm::ParameterSetDescription::add
ParameterDescriptionBase * add(U const &iLabel, T const &value)
Definition: ParameterSetDescription.h:95
hit::id
unsigned int id
Definition: SiStripHitEffFromCalibTree.cc:92
hfClusterShapes_cfi.hits
hits
Definition: hfClusterShapes_cfi.py:5
hit::y
double y
Definition: SiStripHitEffFromCalibTree.cc:90
CaloSimHitAnalysis::passive_
const bool passive_
Definition: CaloSimHitAnalysis.cc:65
CaloSimHitAnalysis::g4Label_
const std::string g4Label_
Definition: CaloSimHitAnalysis.cc:61
CaloGeometry::getPosition
GlobalPoint getPosition(const DetId &id) const
Get the position of a given detector id.
Definition: CaloGeometry.cc:50
CaloSimHitAnalysis::toks_calo_
std::vector< edm::EDGetTokenT< edm::PCaloHitContainer > > toks_calo_
Definition: CaloSimHitAnalysis.cc:68
CaloGeometryRecord
Definition: CaloGeometryRecord.h:30
findQualityFiles.rr
string rr
Definition: findQualityFiles.py:185
CaloSimHitAnalysis::analyzeHits
void analyzeHits(std::vector< PCaloHit > &, int)
Definition: CaloSimHitAnalysis.cc:320
DetId::Hcal
Definition: DetId.h:28
edm::ParameterSetDescription
Definition: ParameterSetDescription.h:52
CaloGeometry::getSubdetectorGeometry
const CaloSubdetectorGeometry * getSubdetectorGeometry(const DetId &id) const
access the subdetector geometry for the given subdetector directly
Definition: CaloGeometry.cc:34
CaloSimHitAnalysis::testNumber_
const bool testNumber_
Definition: CaloSimHitAnalysis.cc:65
CaloSimHitAnalysis::h_rz_
TH2F * h_rz_
Definition: CaloSimHitAnalysis.cc:79
CaloSimHitAnalysis::h_etotg_
TH1F * h_etotg_[nCalo_]
Definition: CaloSimHitAnalysis.cc:78
edm::second
U second(std::pair< T, U > const &p)
Definition: ParameterSet.cc:215
HcalDetId::depth
constexpr int depth() const
get the tower depth
Definition: HcalDetId.h:164
edm::ParameterSet::getUntrackedParameter
T getUntrackedParameter(std::string const &, T const &) const
CaloSimHitAnalysis::tScale_
const double tScale_
Definition: CaloSimHitAnalysis.cc:64
HcalBarrel
Definition: HcalAssistant.h:33
CaloSimHitAnalysis::h_edepHad_
TH1F * h_edepHad_[nCalo_]
Definition: CaloSimHitAnalysis.cc:77
CaloSimHitAnalysis::tMax_
const double tMax_
Definition: CaloSimHitAnalysis.cc:64
CaloSimHitAnalysis::h_etaphi_
TH2F * h_etaphi_
Definition: CaloSimHitAnalysis.cc:79
edm::Handle
Definition: AssociativeIterator.h:50
training_settings.idx
idx
Definition: training_settings.py:16
dqmdumpme.first
first
Definition: dqmdumpme.py:55
CaloSimHitAnalysis::h_edep_
TH1F * h_edep_[nCalo_]
Definition: CaloSimHitAnalysis.cc:75
hit::x
double x
Definition: SiStripHitEffFromCalibTree.cc:89
CaloSimHitAnalysis::h_rr_
TH1F * h_rr_[nCalo_]
Definition: CaloSimHitAnalysis.cc:77
CaloSimHitAnalysis::tok_passive_
edm::EDGetTokenT< edm::PassiveHitContainer > tok_passive_
Definition: CaloSimHitAnalysis.cc:69
DetId
Definition: DetId.h:17
CaloSimHitAnalysis::h_edepT_
TH1F * h_edepT_[nCalo_]
Definition: CaloSimHitAnalysis.cc:75
CaloSimHitAnalysis::h_time_
TH1F * h_time_[nCalo_]
Definition: CaloSimHitAnalysis.cc:75
CaloSimHitAnalysis::h_hitp_
TH1F * h_hitp_
Definition: CaloSimHitAnalysis.cc:80
HcalTestNumbering::unpackHcalIndex
static void unpackHcalIndex(const uint32_t &idx, int &det, int &z, int &depth, int &eta, int &phi, int &lay)
Definition: HcalTestNumbering.cc:18
CaloSimHitAnalysis::hitLab_
const std::vector< std::string > hitLab_
Definition: CaloSimHitAnalysis.cc:62
CaloSimHitAnalysis::etaDepth_
std::map< int, unsigned int > etaDepth_
Definition: CaloSimHitAnalysis.cc:83
L1TOccupancyClient_cfi.ymax
ymax
Definition: L1TOccupancyClient_cfi.py:43
edm::ConfigurationDescriptions::add
void add(std::string const &label, ParameterSetDescription const &psetDescription)
Definition: ConfigurationDescriptions.cc:57
CaloSimHitAnalysis::hcalGeom_
const HcalGeometry * hcalGeom_
Definition: CaloSimHitAnalysis.cc:72
names
const std::string names[nVars_]
Definition: PhotonIDValueMapProducer.cc:122
PVValHelper::eta
Definition: PVValidationHelpers.h:69
CaloSimHitAnalysis::h_edepTk_
std::vector< TH1F * > h_edepTk_
Definition: CaloSimHitAnalysis.cc:81
mathSSE::sqrt
T sqrt(T t)
Definition: SSEVec.h:19
CaloSimHitAnalysis::h_etot_
TH1F * h_etot_[nCalo_]
Definition: CaloSimHitAnalysis.cc:78
tfile
Definition: tfile.py:1
DDAxes::z
edm::ESHandle< CaloGeometry >
HcalOuter
Definition: HcalAssistant.h:35
CaloSimHitAnalysis::h_hit_
TH1F * h_hit_[nCalo_]
Definition: CaloSimHitAnalysis.cc:75
CaloSimHitAnalysis::maxEnergy_
const double maxEnergy_
Definition: CaloSimHitAnalysis.cc:64
dqmdumpme.k
k
Definition: dqmdumpme.py:60
CaloSimHitAnalysis::timeSliceUnit_
const std::vector< double > timeSliceUnit_
Definition: CaloSimHitAnalysis.cc:63
Point3DBase< float, GlobalTag >
CaloSimHitAnalysis::h_zz_
TH1F * h_zz_[nCalo_]
Definition: CaloSimHitAnalysis.cc:77
LEDCalibrationChannels.depth
depth
Definition: LEDCalibrationChannels.py:65
CaloSimHitAnalysis::h_edepp_
TH1F * h_edepp_
Definition: CaloSimHitAnalysis.cc:80
hit::z
double z
Definition: SiStripHitEffFromCalibTree.cc:91
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
CaloSimHitAnalysis::detNames_
const std::vector< std::string > detNames_
Definition: CaloSimHitAnalysis.cc:67
CaloSimHitAnalysis::h_phi_
TH1F * h_phi_[nCalo_]
Definition: CaloSimHitAnalysis.cc:78
edm::ParameterSetDescription::addUntracked
ParameterDescriptionBase * addUntracked(U const &iLabel, T const &value)
Definition: ParameterSetDescription.h:100
LEDCalibrationChannels.ieta
ieta
Definition: LEDCalibrationChannels.py:63
HcalGeometry::getPosition
GlobalPoint getPosition(const DetId &id) const
Definition: HcalGeometry.cc:178
CaloSimHitAnalysis::h_eta_
TH1F * h_eta_[nCalo_]
Definition: CaloSimHitAnalysis.cc:78
CaloSimHitAnalysis::h_rz1_
TH2F * h_rz1_
Definition: CaloSimHitAnalysis.cc:79
CaloSimHitAnalysis::h_rzH_
std::vector< TH2F * > h_rzH_
Definition: CaloSimHitAnalysis.cc:82
HcalDetId::subdet
constexpr HcalSubdetector subdet() const
get the subdetector
Definition: HcalDetId.h:138
HcalDetId
Definition: HcalDetId.h:12
edm::Service< TFileService >
CaloSimHitAnalysis::maxTime_
const double maxTime_
Definition: CaloSimHitAnalysis.cc:64
M_PI
#define M_PI
Definition: BXVectorInputProducer.cc:50
edm::LogVerbatim
Definition: MessageLogger.h:297
itr
std::vector< std::pair< float, float > >::iterator itr
Definition: HGCDigitizer.cc:28
get
#define get
CaloSimHitAnalysis::allSteps_
const int allSteps_
Definition: CaloSimHitAnalysis.cc:66
compare.tfile
tfile
Definition: compare.py:325
overlapproblemtsosanalyzer_cfi.title
title
Definition: overlapproblemtsosanalyzer_cfi.py:7
HcalForward
Definition: HcalAssistant.h:36
DDAxes::phi
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
DetId::rawId
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
CaloSimHitAnalysis::h_stepp_
TH1F * h_stepp_
Definition: CaloSimHitAnalysis.cc:80
HcalEndcap
Definition: HcalAssistant.h:34
CaloSimHitAnalysis::nCalo_
static constexpr int nCalo_
Definition: CaloSimHitAnalysis.cc:74
triggerObjects_cff.id
id
Definition: triggerObjects_cff.py:31
CaloHitID
Definition: CaloHitID.h:11
TFileService::kSharedResource
static const std::string kSharedResource
Definition: TFileService.h:76
CaloSimHitAnalysis::h_edep1_
TH1F * h_edep1_[nCalo_]
Definition: CaloSimHitAnalysis.cc:76
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
CaloSimHitAnalysis::h_edepEM_
TH1F * h_edepEM_[nCalo_]
Definition: CaloSimHitAnalysis.cc:77
CaloSimHitAnalysis::caloGeometry_
const CaloGeometry * caloGeometry_
Definition: CaloSimHitAnalysis.cc:71
cms::Exception
Definition: Exception.h:70
funct::abs
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
HcalDetId::ietaAbs
constexpr int ietaAbs() const
get the absolute value of the cell ieta
Definition: HcalDetId.h:148
CaloSimHitAnalysis::h_timeT_
TH1F * h_timeT_[nCalo_]
Definition: CaloSimHitAnalysis.cc:76
CaloSimHitAnalysis::analyzePassiveHits
void analyzePassiveHits(std::vector< PassiveHit > &hits)
Definition: CaloSimHitAnalysis.cc:464
point
*vegas h *****************************************************used in the default bin number in original ***version of VEGAS is ***a higher bin number might help to derive a more precise ***grade subtle point
Definition: invegas.h:5
edm::HandleBase::isValid
bool isValid() const
Definition: HandleBase.h:70
ntuplemaker.time
time
Definition: ntuplemaker.py:310
CaloSimHitAnalysis::h_trackp_
TH1F * h_trackp_
Definition: CaloSimHitAnalysis.cc:80
CaloSimHitAnalysis::tCut_
const double tCut_
Definition: CaloSimHitAnalysis.cc:64
CaloSimHitAnalysis::h_timep_
TH1F * h_timep_
Definition: CaloSimHitAnalysis.cc:80
TauDecayModes.dec
dec
Definition: TauDecayModes.py:143
edm::InputTag
Definition: InputTag.h:15
hit
Definition: SiStripHitEffFromCalibTree.cc:88
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37