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
 
 EDAnalyzer (const EDAnalyzer &)=delete
 
SerialTaskQueueglobalLuminosityBlocksQueue () final
 
SerialTaskQueueglobalRunsQueue () final
 
const EDAnalyzeroperator= (const EDAnalyzer &)=delete
 
bool wantsGlobalLuminosityBlocks () const final
 
bool wantsGlobalRuns () const final
 
bool wantsInputProcessBlocks () const final
 
bool wantsProcessBlocks () 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
 
std::vector< ESProxyIndex > const & esGetTokenIndicesVector (edm::Transition iTrans) const
 
std::vector< ESRecordIndex > const & esGetTokenRecordIndicesVector (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::array< std::vector< ModuleDescription const * > *, NumBranchTypes > &modulesAll, std::vector< ModuleProcessName > &modulesInPreviousProcesses, 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
 
void selectInputProcessBlocks (ProductRegistry const &productRegistry, ProcessBlockHelperBase const &processBlockHelperBase)
 
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 = InEvent>
EDConsumerBaseAdaptor< B > consumes (edm::InputTag tag) noexcept
 
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<Transition Tr = Transition::Event>
constexpr auto esConsumes () noexcept
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
template<Transition Tr = Transition::Event>
auto esConsumes (ESInputTag tag) noexcept
 
template<Transition Tr = Transition::Event>
ESGetTokenGeneric esConsumes (eventsetup::EventSetupRecordKey const &iRecord, eventsetup::DataKey const &iKey)
 Used with EventSetupRecord::doGet. More...
 
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_
 
const edm::ESGetToken< CaloGeometry, CaloGeometryRecordtokGeom_
 
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 44 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  tokGeom_(esConsumes<CaloGeometry, CaloGeometryRecord>()) {
100  usesResource(TFileService::kSharedResource);
101 
102  // register for data access
103  for (unsigned int i = 0; i < hitLab_.size(); i++)
104  toks_calo_.emplace_back(consumes<edm::PCaloHitContainer>(edm::InputTag(g4Label_, hitLab_[i])));
105  tok_passive_ = consumes<edm::PassiveHitContainer>(edm::InputTag(g4Label_, "AllPassiveHits"));
106 
107  edm::LogVerbatim("HitStudy") << "Module Label: " << g4Label_ << " Hits|timeSliceUnit:";
108  for (unsigned int i = 0; i < hitLab_.size(); i++)
109  edm::LogVerbatim("HitStudy") << "[" << i << "] " << hitLab_[i] << " " << timeSliceUnit_[i];
110  edm::LogVerbatim("HitStudy") << "Passive Hits " << passive_ << " from AllPassiveHits";
111  edm::LogVerbatim("HitStudy") << "maxEnergy: " << maxEnergy_ << " maxTime: " << maxTime_ << " tMax: " << tMax_;
112  for (unsigned int k = 0; k < detNames_.size(); ++k)
113  edm::LogVerbatim("HitStudy") << "Detector[" << k << "] " << detNames_[k];
114 
116  if (!tfile.isAvailable())
117  throw cms::Exception("BadConfig") << "TFileService unavailable: "
118  << "please add it to config file";
119  char name[29], title[120];
120  std::string dets[nCalo_] = {"EB", "EE", "HB", "HE", "HO", "HF"};
121  for (int i = 0; i < nCalo_; i++) {
122  sprintf(name, "Hit%d", i);
123  sprintf(title, "Number of hits in %s", dets[i].c_str());
124  h_hit_[i] = tfile->make<TH1F>(name, title, 100, 0., 20000.);
125  h_hit_[i]->GetXaxis()->SetTitle(title);
126  h_hit_[i]->GetYaxis()->SetTitle("Events");
127  sprintf(name, "Time%d", i);
128  sprintf(title, "Time of the hit (ns) in %s", dets[i].c_str());
129  h_time_[i] = tfile->make<TH1F>(name, title, 100, 0., 200.);
130  h_time_[i]->GetXaxis()->SetTitle(title);
131  h_time_[i]->GetYaxis()->SetTitle("Hits");
132  sprintf(name, "TimeT%d", i);
133  sprintf(title, "Time of each hit (ns) in %s", dets[i].c_str());
134  h_timeT_[i] = tfile->make<TH1F>(name, title, 100, 0., 200.);
135  h_timeT_[i]->GetXaxis()->SetTitle(title);
136  h_timeT_[i]->GetYaxis()->SetTitle("Hits");
137  double ymax = (i > 1) ? 0.01 : 0.1;
138  double ymx0 = (i > 1) ? 0.0025 : 0.025;
139  sprintf(name, "Edep%d", i);
140  sprintf(title, "Energy deposit (GeV) in %s", dets[i].c_str());
141  h_edep_[i] = tfile->make<TH1F>(name, title, 100, 0., ymax);
142  h_edep_[i]->GetXaxis()->SetTitle(title);
143  h_edep_[i]->GetYaxis()->SetTitle("Hits");
144  sprintf(name, "EdepT%d", i);
145  sprintf(title, "Energy deposit (GeV) of each hit in %s", dets[i].c_str());
146  h_edepT_[i] = tfile->make<TH1F>(name, title, 100, 0., ymx0);
147  h_edepT_[i]->GetXaxis()->SetTitle(title);
148  h_edepT_[i]->GetYaxis()->SetTitle("Hits");
149  sprintf(name, "EdepEM%d", i);
150  sprintf(title, "Energy deposit (GeV) by EM particles in %s", dets[i].c_str());
151  h_edepEM_[i] = tfile->make<TH1F>(name, title, 100, 0., ymx0);
152  h_edepEM_[i]->GetXaxis()->SetTitle(title);
153  h_edepEM_[i]->GetYaxis()->SetTitle("Hits");
154  sprintf(name, "EdepHad%d", i);
155  sprintf(title, "Energy deposit (GeV) by hadrons in %s", dets[i].c_str());
156  h_edepHad_[i] = tfile->make<TH1F>(name, title, 100, 0., ymx0);
157  h_edepHad_[i]->GetXaxis()->SetTitle(title);
158  h_edepHad_[i]->GetYaxis()->SetTitle("Hits");
159  sprintf(name, "Edep15%d", i);
160  sprintf(title, "Energy deposit (GeV) for T > %4.0f ns in %s", tCut_, dets[i].c_str());
161  h_edep1_[i] = tfile->make<TH1F>(name, title, 100, 0., ymax);
162  h_edep1_[i]->GetXaxis()->SetTitle(title);
163  h_edep1_[i]->GetYaxis()->SetTitle("Hits");
164  sprintf(name, "EdepT15%d", i);
165  sprintf(title, "Energy deposit (GeV) of each hit for T > %4.0f in %s", tCut_, dets[i].c_str());
166  h_edepT1_[i] = tfile->make<TH1F>(name, title, 100, 0., ymx0);
167  h_edepT1_[i]->GetXaxis()->SetTitle(title);
168  h_edepT1_[i]->GetYaxis()->SetTitle("Hits");
169  ymax = (i > 1) ? 1.0 : maxEnergy_;
170  sprintf(name, "Etot%d", i);
171  sprintf(title, "Total energy deposit (GeV) in %s", dets[i].c_str());
172  h_etot_[i] = tfile->make<TH1F>(name, title, 50, 0., ymax);
173  h_etot_[i]->GetXaxis()->SetTitle(title);
174  h_etot_[i]->GetYaxis()->SetTitle("Events");
175  sprintf(name, "EtotG%d", i);
176  sprintf(title, "Total energy deposit (GeV) in %s (t < 100 ns)", dets[i].c_str());
177  h_etotg_[i] = tfile->make<TH1F>(name, title, 50, 0., ymax);
178  h_etotg_[i]->GetXaxis()->SetTitle(title);
179  h_etotg_[i]->GetYaxis()->SetTitle("Events");
180  sprintf(name, "rr%d", i);
181  sprintf(title, "R of hit point (cm) in %s", dets[i].c_str());
182  h_rr_[i] = tfile->make<TH1F>(name, title, 100, 0., 250.);
183  h_rr_[i]->GetXaxis()->SetTitle(title);
184  h_rr_[i]->GetYaxis()->SetTitle("Hits");
185  sprintf(name, "zz%d", i);
186  sprintf(title, "z of hit point (cm) in %s", dets[i].c_str());
187  h_zz_[i] = tfile->make<TH1F>(name, title, 240, -600., 600.);
188  h_zz_[i]->GetXaxis()->SetTitle(title);
189  h_zz_[i]->GetYaxis()->SetTitle("Hits");
190  sprintf(name, "eta%d", i);
191  sprintf(title, "#eta of hit point in %s", dets[i].c_str());
192  h_eta_[i] = tfile->make<TH1F>(name, title, 100, -5.0, 5.0);
193  h_eta_[i]->GetXaxis()->SetTitle(title);
194  h_eta_[i]->GetYaxis()->SetTitle("Hits");
195  sprintf(name, "phi%d", i);
196  sprintf(title, "#phi of hit point in %s", dets[i].c_str());
197  h_phi_[i] = tfile->make<TH1F>(name, title, 100, -M_PI, M_PI);
198  h_phi_[i]->GetXaxis()->SetTitle(title);
199  h_phi_[i]->GetYaxis()->SetTitle("Hits");
200  }
201  sprintf(title, "R vs Z of hit point");
202  h_rz_ = tfile->make<TH2F>("rz", title, 120, 0., 600., 100, 0., 250.);
203  h_rz_->GetXaxis()->SetTitle("z (cm)");
204  h_rz_->GetYaxis()->SetTitle("R (cm)");
205  sprintf(title, "R vs Z of hit point for hits with T > %4.0f ns", tCut_);
206  h_rz1_ = tfile->make<TH2F>("rz2", title, 120, 0., 600., 100, 0., 250.);
207  h_rz1_->GetXaxis()->SetTitle("z (cm)");
208  h_rz1_->GetYaxis()->SetTitle("R (cm)");
209  sprintf(title, "#phi vs #eta of hit point");
210  h_etaphi_ = tfile->make<TH2F>("etaphi", title, 100, 0., 5., 100, 0., M_PI);
211  h_etaphi_->GetXaxis()->SetTitle("#eta");
212  h_etaphi_->GetYaxis()->SetTitle("#phi");
213 
214  if (passive_) {
215  h_hitp_ = tfile->make<TH1F>("hitp", "All Steps", 100, 0.0, 20000.0);
216  h_hitp_->GetXaxis()->SetTitle("Hits");
217  h_hitp_->GetYaxis()->SetTitle("Events");
218  h_trackp_ = tfile->make<TH1F>("trackp", "All Steps", 100, 0.0, 200000.0);
219  h_hitp_->GetXaxis()->SetTitle("Tracks");
220  h_hitp_->GetYaxis()->SetTitle("Events");
221  h_edepp_ = tfile->make<TH1F>("edepp", "All Steps", 100, 0.0, 50.0);
222  h_edepp_->GetXaxis()->SetTitle("Energy Deposit (MeV)");
223  h_edepp_->GetYaxis()->SetTitle("Hits");
224  h_timep_ = tfile->make<TH1F>("timep", "All Steps", 100, 0.0, 100.0);
225  h_timep_->GetXaxis()->SetTitle("Hits");
226  h_timep_->GetYaxis()->SetTitle("Hit Time (ns)");
227  h_stepp_ = tfile->make<TH1F>("stepp", "All Steps", 1000, 0.0, 100.0);
228  h_stepp_->GetXaxis()->SetTitle("Hits");
229  h_stepp_->GetYaxis()->SetTitle("Step length (cm)");
230  for (unsigned int k = 0; k < detNames_.size(); ++k) {
231  sprintf(name, "edept%d", k);
232  sprintf(title, "Energy Deposit (MeV) in %s", detNames_[k].c_str());
233  h_edepTk_.emplace_back(tfile->make<TH1F>(name, title, 100, 0.0, 1.0));
234  h_edepTk_.back()->GetYaxis()->SetTitle("Hits");
235  h_edepTk_.back()->GetXaxis()->SetTitle(title);
236  sprintf(name, "timet%d", k);
237  sprintf(title, "Hit Time (ns) in %s", detNames_[k].c_str());
238  h_timeTk_.emplace_back(tfile->make<TH1F>(name, title, 100, 0.0, 100.0));
239  h_timeTk_.back()->GetYaxis()->SetTitle("Hits");
240  h_timeTk_.back()->GetXaxis()->SetTitle(title);
241  }
242  if ((allSteps_ / 100) % 10 > 0) {
243  for (int eta = 1; eta <= 29; ++eta) {
244  int dmax = (eta < 16) ? 4 : 7;
245  for (int depth = 1; depth <= dmax; ++depth) {
246  sprintf(name, "Eta%dDepth%d", eta, depth);
247  sprintf(title, "R vs Z (#eta = %d, depth = %d)", eta, depth);
248  etaDepth_[eta * 100 + depth] = h_rzH_.size();
249  h_rzH_.emplace_back(tfile->make<TH2F>(name, title, 120, 0., 600., 100, 0., 250.));
250  h_rzH_.back()->GetXaxis()->SetTitle("z (cm)");
251  h_rzH_.back()->GetYaxis()->SetTitle("R (cm)");
252  }
253  }
254  }
255  }
256 }

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_, runGCPTkAlMap::title, tMax_, tok_passive_, toks_calo_, and L1TOccupancyClient_cfi::ymax.

◆ ~CaloSimHitAnalysis()

CaloSimHitAnalysis::~CaloSimHitAnalysis ( )
inlineoverride

Definition at line 47 of file CaloSimHitAnalysis.cc.

47 {}

Member Function Documentation

◆ analyze()

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

Implements edm::one::EDAnalyzerBase.

Definition at line 278 of file CaloSimHitAnalysis.cc.

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

References analyzeHits(), analyzePassiveHits(), caloGeometry_, MillePedeFileConverter_cfg::e, edm::EventSetup::getData(), CaloGeometry::getSubdetectorGeometry(), DetId::Hcal, HcalBarrel, hcalGeom_, mps_fire::i, edm::HandleBase::isValid(), passive_, tok_passive_, tokGeom_, and toks_calo_.

◆ analyzeHits()

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

Definition at line 319 of file CaloSimHitAnalysis.cc.

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

References funct::abs(), caloGeometry_, TauDecayModes::dec, LEDCalibrationChannels::depth, 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, heavyIonCSV_trainingSettings::idx, LEDCalibrationChannels::ieta, dqmdumpme::k, nCalo_, phi, point, DetId::rawId(), edm::second(), HcalDetId::subdet(), tCut_, testNumber_, protons_cff::time, timeSliceUnit_, tMax_, tScale_, HcalTestNumbering::unpackHcalIndex(), and z.

Referenced by analyze().

◆ analyzePassiveHits()

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

Definition at line 463 of file CaloSimHitAnalysis.cc.

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

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, 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 51 of file CaloSimHitAnalysis.cc.

51 {}

◆ beginRun()

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

Definition at line 53 of file CaloSimHitAnalysis.cc.

53 {}

◆ endRun()

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

Definition at line 54 of file CaloSimHitAnalysis.cc.

54 {}

◆ fillDescriptions()

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

Definition at line 258 of file CaloSimHitAnalysis.cc.

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

References edm::ConfigurationDescriptions::add(), submitPVResolutionJobs::desc, SummaryClient_cfi::labels, names, and AlCaHLTBitMon_QueryRunRegistry::string.

Member Data Documentation

◆ allSteps_

const int CaloSimHitAnalysis::allSteps_
private

Definition at line 65 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 66 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 60 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 61 of file CaloSimHitAnalysis.cc.

Referenced by CaloSimHitAnalysis().

◆ maxEnergy_

const double CaloSimHitAnalysis::maxEnergy_
private

Definition at line 63 of file CaloSimHitAnalysis.cc.

Referenced by CaloSimHitAnalysis().

◆ maxTime_

const double CaloSimHitAnalysis::maxTime_
private

Definition at line 63 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 64 of file CaloSimHitAnalysis.cc.

Referenced by analyze(), and CaloSimHitAnalysis().

◆ tCut_

const double CaloSimHitAnalysis::tCut_
private

Definition at line 63 of file CaloSimHitAnalysis.cc.

Referenced by analyzeHits(), and CaloSimHitAnalysis().

◆ testNumber_

const bool CaloSimHitAnalysis::testNumber_
private

Definition at line 64 of file CaloSimHitAnalysis.cc.

Referenced by analyzeHits().

◆ timeSliceUnit_

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

Definition at line 62 of file CaloSimHitAnalysis.cc.

Referenced by analyzeHits(), and CaloSimHitAnalysis().

◆ tMax_

const double CaloSimHitAnalysis::tMax_
private

Definition at line 63 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().

◆ tokGeom_

const edm::ESGetToken<CaloGeometry, CaloGeometryRecord> CaloSimHitAnalysis::tokGeom_
private

Definition at line 67 of file CaloSimHitAnalysis.cc.

Referenced by analyze().

◆ 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 63 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
CaloSimHitAnalysis::h_edepT1_
TH1F * h_edepT1_[nCalo_]
Definition: CaloSimHitAnalysis.cc:76
runGCPTkAlMap.title
string title
Definition: runGCPTkAlMap.py:94
mps_fire.i
i
Definition: mps_fire.py:428
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:64
CaloSimHitAnalysis::g4Label_
const std::string g4Label_
Definition: CaloSimHitAnalysis.cc:60
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
findQualityFiles.rr
string rr
Definition: findQualityFiles.py:185
CaloSimHitAnalysis::analyzeHits
void analyzeHits(std::vector< PCaloHit > &, int)
Definition: CaloSimHitAnalysis.cc:319
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:64
protons_cff.time
time
Definition: protons_cff.py:35
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:222
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:63
HcalBarrel
Definition: HcalAssistant.h:33
CaloSimHitAnalysis::h_edepHad_
TH1F * h_edepHad_[nCalo_]
Definition: CaloSimHitAnalysis.cc:77
CaloSimHitAnalysis::tMax_
const double tMax_
Definition: CaloSimHitAnalysis.cc:63
CaloSimHitAnalysis::h_etaphi_
TH2F * h_etaphi_
Definition: CaloSimHitAnalysis.cc:79
edm::Handle
Definition: AssociativeIterator.h:50
heavyIonCSV_trainingSettings.idx
idx
Definition: heavyIonCSV_trainingSettings.py:5
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:61
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:124
PVValHelper::eta
Definition: PVValidationHelpers.h:70
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
HcalOuter
Definition: HcalAssistant.h:35
CaloSimHitAnalysis::h_hit_
TH1F * h_hit_[nCalo_]
Definition: CaloSimHitAnalysis.cc:75
CaloSimHitAnalysis::maxEnergy_
const double maxEnergy_
Definition: CaloSimHitAnalysis.cc:63
dqmdumpme.k
k
Definition: dqmdumpme.py:60
CaloSimHitAnalysis::timeSliceUnit_
const std::vector< double > timeSliceUnit_
Definition: CaloSimHitAnalysis.cc:62
Point3DBase< float, GlobalTag >
CaloSimHitAnalysis::h_zz_
TH1F * h_zz_[nCalo_]
Definition: CaloSimHitAnalysis.cc:77
LEDCalibrationChannels.depth
depth
Definition: LEDCalibrationChannels.py:65
first
auto first
Definition: CAHitNtupletGeneratorKernelsImpl.h:125
CaloSimHitAnalysis::h_edepp_
TH1F * h_edepp_
Definition: CaloSimHitAnalysis.cc:80
hit::z
double z
Definition: SiStripHitEffFromCalibTree.cc:91
CaloSimHitAnalysis::detNames_
const std::vector< std::string > detNames_
Definition: CaloSimHitAnalysis.cc:66
CaloSimHitAnalysis::h_phi_
TH1F * h_phi_[nCalo_]
Definition: CaloSimHitAnalysis.cc:78
LEDCalibrationChannels.ieta
ieta
Definition: LEDCalibrationChannels.py:63
CaloSimHitAnalysis::tokGeom_
const edm::ESGetToken< CaloGeometry, CaloGeometryRecord > tokGeom_
Definition: CaloSimHitAnalysis.cc:67
HcalGeometry::getPosition
GlobalPoint getPosition(const DetId &id) const
Definition: HcalGeometry.cc:179
CaloSimHitAnalysis::h_eta_
TH1F * h_eta_[nCalo_]
Definition: CaloSimHitAnalysis.cc:78
tracks
const uint32_t *__restrict__ const HitContainer *__restrict__ TkSoA *__restrict__ tracks
Definition: CAHitNtupletGeneratorKernelsImpl.h:176
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:63
M_PI
#define M_PI
Definition: BXVectorInputProducer.cc:49
CaloSimHitAnalysis::allSteps_
const int allSteps_
Definition: CaloSimHitAnalysis.cc:65
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
compare.tfile
tfile
Definition: compare.py:324
HcalForward
Definition: HcalAssistant.h:36
DDAxes::phi
submitPVResolutionJobs.desc
string desc
Definition: submitPVResolutionJobs.py:251
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
edm::LogVerbatim
Log< level::Info, true > LogVerbatim
Definition: MessageLogger.h:128
triggerObjects_cff.id
id
Definition: triggerObjects_cff.py:29
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
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
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:463
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
CaloSimHitAnalysis::h_trackp_
TH1F * h_trackp_
Definition: CaloSimHitAnalysis.cc:80
CaloSimHitAnalysis::tCut_
const double tCut_
Definition: CaloSimHitAnalysis.cc:63
CaloSimHitAnalysis::h_timep_
TH1F * h_timep_
Definition: CaloSimHitAnalysis.cc:80
edm::Log
Definition: MessageLogger.h:70
TauDecayModes.dec
dec
Definition: TauDecayModes.py:142
edm::InputTag
Definition: InputTag.h:15
hit
Definition: SiStripHitEffFromCalibTree.cc:88
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37