CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes
HcalTB02Analysis Class Reference
Inheritance diagram for HcalTB02Analysis:
SimProducer Observer< const BeginOfEvent *> Observer< const EndOfEvent *> SimWatcher

Public Member Functions

 HcalTB02Analysis (const edm::ParameterSet &p)
 
 HcalTB02Analysis (const HcalTB02Analysis &)=delete
 
const HcalTB02Analysisoperator= (const HcalTB02Analysis &)=delete
 
void produce (edm::Event &, const edm::EventSetup &) override
 
 ~HcalTB02Analysis () override
 
- Public Member Functions inherited from SimProducer
const SimProduceroperator= (const SimProducer &)=delete
 
void registerProducts (edm::ProducesCollector producesCollector)
 
 SimProducer ()
 
 SimProducer (const SimProducer &)=delete
 
- Public Member Functions inherited from SimWatcher
virtual void beginRun (edm::EventSetup const &)
 
bool isMT () const
 
const SimWatcheroperator= (const SimWatcher &)=delete
 
virtual void registerConsumes (edm::ConsumesCollector)
 
 SimWatcher ()
 
 SimWatcher (const SimWatcher &)=delete
 
virtual ~SimWatcher ()
 
- Public Member Functions inherited from Observer< const BeginOfEvent *>
 Observer ()
 
void slotForUpdate (const BeginOfEvent * iT)
 
virtual ~Observer ()
 
- Public Member Functions inherited from Observer< const EndOfEvent *>
 Observer ()
 
void slotForUpdate (const EndOfEvent * iT)
 
virtual ~Observer ()
 

Private Member Functions

void clear ()
 
void fillEvent (HcalTB02HistoClass &)
 
void finish ()
 
void update (const BeginOfEvent *evt) override
 This routine will be called when the appropriate signal arrives. More...
 
void update (const EndOfEvent *evt) override
 This routine will be called when the appropriate signal arrives. More...
 

Private Attributes

float E5x5Matrix
 
float E5x5MatrixN
 
float E7x7Matrix
 
float E7x7MatrixN
 
std::map< int, float > energyInCrystals
 
std::map< int, float > energyInScints
 
double eta
 
const bool hcalOnly
 
std::unique_ptr< HcalTB02Histohisto
 
double incidentEnergy
 
const edm::ParameterSet m_Anal
 
int maxTime
 
const std::vector< std::string > names
 
int particleType
 
double phi
 
double pInit
 
std::map< int, float > primaries
 
float SEnergy
 
float SEnergyN
 
float xE3x3Matrix
 
float xE3x3MatrixN
 
float xE5x5Matrix
 
float xE5x5MatrixN
 
double xIncidentEnergy
 
float xSEnergy
 
float xSEnergyN
 

Additional Inherited Members

- Protected Member Functions inherited from SimProducer
template<class T >
void produces ()
 
template<class T >
void produces (const std::string &instanceName)
 
- Protected Member Functions inherited from SimWatcher
void setMT (bool val)
 

Detailed Description

Definition at line 61 of file HcalTB02Analysis.cc.

Constructor & Destructor Documentation

◆ HcalTB02Analysis() [1/2]

HcalTB02Analysis::HcalTB02Analysis ( const edm::ParameterSet p)

Definition at line 106 of file HcalTB02Analysis.cc.

References hcalOnly, histo, and m_Anal.

107  : m_Anal(p.getParameter<edm::ParameterSet>("HcalTB02Analysis")),
108  hcalOnly(m_Anal.getUntrackedParameter<bool>("HcalClusterOnly", true)),
109  names(m_Anal.getParameter<std::vector<std::string> >("Names")) {
110  produces<HcalTB02HistoClass>();
111 
112  edm::LogVerbatim("HcalTBSim") << "HcalTB02Analysis:: Initialised as observer of "
113  << "BeginOfJob/BeginOfEvent/EndOfEvent with "
114  << "Parameter values:\n \thcalOnly = " << hcalOnly;
115 
116  histo = std::make_unique<HcalTB02Histo>(m_Anal);
117 }
Log< level::Info, true > LogVerbatim
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
T getUntrackedParameter(std::string const &, T const &) const
const edm::ParameterSet m_Anal
std::unique_ptr< HcalTB02Histo > histo
const std::vector< std::string > names

◆ HcalTB02Analysis() [2/2]

HcalTB02Analysis::HcalTB02Analysis ( const HcalTB02Analysis )
delete

◆ ~HcalTB02Analysis()

HcalTB02Analysis::~HcalTB02Analysis ( )
override

Definition at line 119 of file HcalTB02Analysis.cc.

References finish().

119 { finish(); }

Member Function Documentation

◆ clear()

void HcalTB02Analysis::clear ( void  )
private

Definition at line 438 of file HcalTB02Analysis.cc.

References E5x5Matrix, E5x5MatrixN, E7x7Matrix, E7x7MatrixN, energyInCrystals, energyInScints, eta, incidentEnergy, maxTime, particleType, phi, pInit, primaries, SEnergy, SEnergyN, xE3x3Matrix, xE3x3MatrixN, xE5x5Matrix, xE5x5MatrixN, xIncidentEnergy, xSEnergy, and xSEnergyN.

Referenced by update().

438  {
439  primaries.clear();
440  particleType = 0;
441  pInit = eta = phi = incidentEnergy = 0;
442 
444  E7x7MatrixN = E5x5MatrixN = 0;
445  energyInScints.clear();
446  maxTime = 0;
447 
448  xIncidentEnergy = 0;
449  energyInCrystals.clear();
452 }
std::map< int, float > energyInScints
std::map< int, float > primaries
std::map< int, float > energyInCrystals

◆ fillEvent()

void HcalTB02Analysis::fillEvent ( HcalTB02HistoClass product)
private

Definition at line 408 of file HcalTB02Analysis.cc.

References E5x5Matrix, E5x5MatrixN, E7x7Matrix, E7x7MatrixN, energyInCrystals, energyInScints, eta, incidentEnergy, maxTime, particleType, phi, pInit, primaries, SEnergy, SEnergyN, HcalTB02HistoClass::set_E5x5(), HcalTB02HistoClass::set_E5x5N(), HcalTB02HistoClass::set_E7x7(), HcalTB02HistoClass::set_E7x7N(), HcalTB02HistoClass::set_Eentry(), HcalTB02HistoClass::set_Einit(), HcalTB02HistoClass::set_eta(), HcalTB02HistoClass::set_ETot(), HcalTB02HistoClass::set_ETotN(), HcalTB02HistoClass::set_Nprim(), HcalTB02HistoClass::set_Ntimesli(), HcalTB02HistoClass::set_NUnit(), HcalTB02HistoClass::set_partType(), HcalTB02HistoClass::set_phi(), HcalTB02HistoClass::set_xE3x3(), HcalTB02HistoClass::set_xE3x3N(), HcalTB02HistoClass::set_xE5x5(), HcalTB02HistoClass::set_xE5x5N(), HcalTB02HistoClass::set_xEentry(), HcalTB02HistoClass::set_xETot(), HcalTB02HistoClass::set_xETotN(), HcalTB02HistoClass::set_xNUnit(), xE3x3Matrix, xE3x3MatrixN, xE5x5Matrix, xE5x5MatrixN, xIncidentEnergy, xSEnergy, and xSEnergyN.

Referenced by produce().

408  {
409  //Beam information
410  product.set_Nprim(float(primaries.size()));
411  product.set_partType(particleType);
412  product.set_Einit(pInit / GeV);
413  product.set_eta(eta);
414  product.set_phi(phi);
415  product.set_Eentry(incidentEnergy);
416 
417  //Calorimeter energy
418  product.set_ETot(SEnergy / GeV);
419  product.set_E7x7(E7x7Matrix / GeV);
420  product.set_E5x5(E5x5Matrix / GeV);
421  product.set_ETotN(SEnergyN / GeV);
422  product.set_E7x7N(E7x7MatrixN / GeV);
423  product.set_E5x5N(E5x5MatrixN / GeV);
424  product.set_NUnit(float(energyInScints.size()));
425  product.set_Ntimesli(float(maxTime));
426 
427  //crystal information
428  product.set_xEentry(xIncidentEnergy);
429  product.set_xNUnit(float(energyInCrystals.size()));
430  product.set_xETot(xSEnergy / GeV);
431  product.set_xETotN(xSEnergyN / GeV);
432  product.set_xE5x5(xE5x5Matrix / GeV);
433  product.set_xE3x3(xE3x3Matrix / GeV);
434  product.set_xE5x5N(xE5x5MatrixN / GeV);
435  product.set_xE3x3N(xE3x3MatrixN / GeV);
436 }
void set_xE3x3N(float v)
void set_E5x5N(float v)
void set_Ntimesli(float v)
void set_NUnit(float v)
void set_Eentry(float v)
std::map< int, float > energyInScints
void set_xEentry(float v)
void set_xETotN(float v)
void set_Nprim(float v)
void set_E7x7(float v)
void set_ETotN(float v)
void set_Einit(float v)
void set_xETot(float v)
void set_E7x7N(float v)
void set_xE3x3(float v)
void set_xE5x5N(float v)
std::map< int, float > primaries
void set_E5x5(float v)
void set_partType(float v)
void set_ETot(float v)
void set_xE5x5(float v)
std::map< int, float > energyInCrystals
void set_xNUnit(float v)

◆ finish()

void HcalTB02Analysis::finish ( )
private

Definition at line 454 of file HcalTB02Analysis.cc.

Referenced by progressbar.ProgressBar::__next__(), and ~HcalTB02Analysis().

454  {
455  /*
456  //Profile
457  std::ofstream oFile;
458  oFile.open("profile.dat");
459  float st[19] = {0.8,
460  0.4, 0.4, 0.4, 0.4, 0.4,
461  0.4, 0.4, 0.4, 0.4, 0.4,
462  0.4, 0.4, 0.4, 0.4, 0.4,
463  0.8, 1.0, 1.0};
464 
465  //cm of material (brass) in front of scintillator layer i:
466 
467  float w[19] = {7.45, //iron !
468  6.00, 6.00, 6.00, 6.00, 6.00, //brass
469  6.00, 6.00, 6.00, 6.00, 6.60, //brass
470  6.60, 6.60, 6.60, 6.60, 6.60, //brass
471  8.90, 20.65, 19.5}; //brass,iron !
472 
473  for (int ilayer = 0; ilayer<19; ilayer++) {
474 
475  // Histogram mean and sigma calculated from the ROOT histos
476  edm::LogVerbatim("HcalTBSim") << "Layer number: " << ilayer << " Mean = "
477  << histo->getMean(ilayer) << " sigma = "
478  << histo->getRMS(ilayer) << " LThick= "
479  << w[ilayer] << " SThick= " << st[ilayer];
480 
481  oFile << ilayer << " " << histo->getMean(ilayer) << " "
482  << histo->getRMS(ilayer) << " " << w[ilayer] << " " << st[ilayer]
483  << std::endl;
484 
485  }
486  oFile.close();
487  */
488 }

◆ operator=()

const HcalTB02Analysis& HcalTB02Analysis::operator= ( const HcalTB02Analysis )
delete

◆ produce()

void HcalTB02Analysis::produce ( edm::Event e,
const edm::EventSetup  
)
overridevirtual

Implements SimProducer.

Definition at line 125 of file HcalTB02Analysis.cc.

References MillePedeFileConverter_cfg::e, fillEvent(), and eostools::move().

125  {
126  std::unique_ptr<HcalTB02HistoClass> product(new HcalTB02HistoClass);
127  fillEvent(*product);
128  e.put(std::move(product));
129 }
void fillEvent(HcalTB02HistoClass &)
def move(src, dest)
Definition: eostools.py:511

◆ update() [1/2]

void HcalTB02Analysis::update ( const BeginOfEvent )
overrideprivatevirtual

This routine will be called when the appropriate signal arrives.

Implements Observer< const BeginOfEvent *>.

Definition at line 131 of file HcalTB02Analysis.cc.

References clear().

Referenced by progressbar.ProgressBar::__next__(), MatrixUtil.Matrix::__setitem__(), MatrixUtil.Steps::__setitem__(), progressbar.ProgressBar::finish(), and MatrixUtil.Steps::overwrite().

131  {
132 #ifdef EDM_ML_DEBUG
133  edm::LogVerbatim("HcalTBSim") << "HcalTB02Analysis: =====> Begin of event = " << (*evt)()->GetEventID();
134 #endif
135  clear();
136 }
Log< level::Info, true > LogVerbatim

◆ update() [2/2]

void HcalTB02Analysis::update ( const EndOfEvent )
overrideprivatevirtual

This routine will be called when the appropriate signal arrives.

Implements Observer< const EndOfEvent *>.

Definition at line 138 of file HcalTB02Analysis.cc.

References HGC3DClusterGenMatchSelector_cfi::dR, E5x5Matrix, E5x5MatrixN, E7x7Matrix, E7x7MatrixN, energyInCrystals, energyInScints, eta, CaloG4Hit::getEM(), CaloG4Hit::getHadr(), CaloG4Hit::getIncidentEnergy(), CaloG4Hit::getTimeSliceID(), CaloG4Hit::getTrackID(), CaloG4Hit::getUnitID(), hcalOnly, histo, mps_fire::i, LEDCalibrationChannels::ieta, incidentEnergy, LEDCalibrationChannels::iphi, METSignificanceParams_cfi::jeta, pixelTopology::layer, dqm-mbProfile::log, SiStripPI::max, maxTime, SiStripPI::min, names, npart, particleType, phi, pInit, funct::pow(), primaries, multPhiCorr_741_25nsDY_cfi::px, multPhiCorr_741_25nsDY_cfi::py, SEnergy, SEnergyN, mathSSE::sqrt(), AlCaHLTBitMon_QueryRunRegistry::string, funct::tan(), theta(), protons_cff::time, xE3x3Matrix, xE3x3MatrixN, xE5x5Matrix, xE5x5MatrixN, xIncidentEnergy, and xSEnergy.

Referenced by progressbar.ProgressBar::__next__(), MatrixUtil.Matrix::__setitem__(), MatrixUtil.Steps::__setitem__(), progressbar.ProgressBar::finish(), and MatrixUtil.Steps::overwrite().

138  {
139  CLHEP::HepRandomEngine* engine = G4Random::getTheEngine();
140  CLHEP::RandGaussQ randGauss(*engine);
141 
142  // Look for the Hit Collection
143 #ifdef EDM_ML_DEBUG
144  edm::LogVerbatim("HcalTBSim") << "HcalTB02Analysis::Fill event " << (*evt)()->GetEventID();
145 #endif
146  // access to the G4 hit collections
147  G4HCofThisEvent* allHC = (*evt)()->GetHCofThisEvent();
148  int ihit = 0;
149 
150  // HCAL
151  std::string sd = names[0];
152  int HCHCid = G4SDManager::GetSDMpointer()->GetCollectionID(sd);
153  CaloG4HitCollection* theHCHC = (CaloG4HitCollection*)allHC->GetHC(HCHCid);
154 #ifdef EDM_ML_DEBUG
155  edm::LogVerbatim("HcalTBSim") << "HcalTB02Analysis :: Hit Collection for " << sd << " of ID " << HCHCid
156  << " is obtained at " << theHCHC;
157 #endif
158  int nentries = 0;
159  nentries = theHCHC->entries();
160  if (nentries == 0)
161  return;
162 
163  int xentries = 0;
164  int XTALSid = 0;
165  CaloG4HitCollection* theXTHC = nullptr;
166 
167  if (!hcalOnly) {
168  // XTALS
169  sd = names[1];
170  XTALSid = G4SDManager::GetSDMpointer()->GetCollectionID(sd);
171  theXTHC = (CaloG4HitCollection*)allHC->GetHC(XTALSid);
172 #ifdef EDM_ML_DEBUG
173  edm::LogVerbatim("HcalTBSim") << "HcalTB02Analysis :: Hit Collection for " << sd << " of ID " << XTALSid
174  << " is obtained at " << theXTHC;
175 #endif
176  xentries = theXTHC->entries();
177  if (xentries == 0)
178  return;
179  }
180 
181 #ifdef EDM_ML_DEBUG
182  edm::LogVerbatim("HcalTBSim") << "HcalTB02Analysis :: There are " << nentries << " HCal hits, and" << xentries
183  << " xtal hits";
184 #endif
185  float ETot = 0., xETot = 0.;
186  int scintID = 0, xtalID = 0;
187 
188  // HCAL
189  std::unique_ptr<HcalTB02HcalNumberingScheme> org(new HcalTB02HcalNumberingScheme());
190 
191  if (HCHCid >= 0 && theHCHC != nullptr) {
192  for (ihit = 0; ihit < nentries; ihit++) {
193  CaloG4Hit* aHit = (*theHCHC)[ihit];
194  scintID = aHit->getUnitID();
195  int layer = org->getlayerID(scintID);
196  float enEm = aHit->getEM();
197  float enhad = aHit->getHadr();
198 
199  if (layer == 0) {
200  enEm = enEm / 2.;
201  enhad = enhad / 2.;
202  }
203 
204  energyInScints[scintID] += enEm + enhad;
205  primaries[aHit->getTrackID()] += enEm + enhad;
206  float time = aHit->getTimeSliceID();
207  if (time > maxTime)
208  maxTime = static_cast<int>(time);
209  histo->fillAllTime(time);
210  }
211 
212  //
213  // Profile
214  //
215 
216  float TowerEne[8][18], TowerEneCF[8][18], LayerEne[19], EnRing[100];
217  for (int iphi = 0; iphi < 8; iphi++) {
218  for (int jeta = 0; jeta < 18; jeta++) {
219  TowerEne[iphi][jeta] = 0.;
220  TowerEneCF[iphi][jeta] = 0.;
221  }
222  }
223 
224  for (int ilayer = 0; ilayer < 19; ilayer++)
225  LayerEne[ilayer] = 0.;
226  for (int iring = 0; iring < 100; iring++)
227  EnRing[iring] = 0.;
228 
229  for (std::map<int, float>::iterator is = energyInScints.begin(); is != energyInScints.end(); is++) {
230  ETot = (*is).second;
231 
232  int layer = org->getlayerID((*is).first);
233 
234  if ((layer != 17) && (layer != 18)) {
235  float eta = org->getetaID((*is).first);
236  float phi = org->getphiID((*is).first);
237 
238  SEnergy += ETot;
239  int iphi = static_cast<int>(phi);
240  int ieta = static_cast<int>(eta);
241  TowerEne[iphi][ieta] += ETot;
242 
243  TowerEneCF[iphi][ieta] += ETot * (1. + 0.1 * randGauss.fire());
244  double dR = 0.08727 * std::sqrt((eta - 8.) * (eta - 8.) + (phi - 3.) * (phi - 3.));
245  EnRing[static_cast<int>(dR / 0.01)] += ETot;
246  }
247 
248  LayerEne[layer] += ETot;
249  }
250 
251  for (int ilayer = 0; ilayer < 19; ilayer++) {
252  histo->fillProfile(ilayer, LayerEne[ilayer] / GeV);
253  }
254 
255  for (int iring = 0; iring < 100; iring++)
256  histo->fillTransProf(0.01 * iring + 0.005, EnRing[iring] / GeV);
257 
258  for (int iphi = 0; iphi < 8; iphi++) {
259  for (int jeta = 0; jeta < 18; jeta++) {
260  SEnergyN += TowerEneCF[iphi][jeta] + 3. * randGauss.fire(); // QGSP
261 
262  double Rand = 3. * randGauss.fire(); // QGSP
263 
264  if ((iphi >= 0) && (iphi < 7)) {
265  if ((jeta >= 5) && (jeta < 12)) {
266  E7x7Matrix += TowerEne[iphi][jeta];
267  E7x7MatrixN += TowerEneCF[iphi][jeta] + Rand;
268 
269  if ((iphi >= 1) && (iphi < 6)) {
270  if ((jeta >= 6) && (jeta < 11)) {
271  E5x5Matrix += TowerEne[iphi][jeta];
272  E5x5MatrixN += TowerEneCF[iphi][jeta] + Rand;
273  }
274  }
275  }
276  }
277  }
278  }
279 
280  //
281  // Find Primary info:
282  //
283  int trackID = 0;
284  G4PrimaryParticle* thePrim = nullptr;
285  G4int nvertex = (*evt)()->GetNumberOfPrimaryVertex();
286 #ifdef EDM_ML_DEBUG
287  edm::LogVerbatim("HcalTBSim") << "HcalTB02Analysis :: Event has " << nvertex << " vertex";
288 #endif
289  if (nvertex == 0)
290  edm::LogWarning("HcalTBSim") << "HcalTB02Analysis:: End Of Event "
291  << "ERROR: no vertex";
292 
293  for (int i = 0; i < nvertex; i++) {
294  G4PrimaryVertex* avertex = (*evt)()->GetPrimaryVertex(i);
295  if (avertex == nullptr) {
296  edm::LogWarning("HcalTBSim") << "HcalTB02Analysis:: End Of Event "
297  << "ERROR: pointer to vertex = 0";
298  } else {
299 #ifdef EDM_ML_DEBUG
300  int npart = avertex->GetNumberOfParticle();
301  edm::LogVerbatim("HcalTBSim") << "HcalTB02Analysis::Vertex number :" << i << " with " << npart << " particles";
302 #endif
303  if (thePrim == nullptr)
304  thePrim = avertex->GetPrimary(trackID);
305  }
306  }
307 
308  double px = 0., py = 0., pz = 0.;
309 
310  if (thePrim != nullptr) {
311  px = thePrim->GetPx();
312  py = thePrim->GetPy();
313  pz = thePrim->GetPz();
314  pInit = std::sqrt(pow(px, 2.) + pow(py, 2.) + pow(pz, 2.));
315  if (pInit == 0) {
316  edm::LogWarning("HcalTBSim") << "HcalTB02Analysis:: End Of Event "
317  << " ERROR: primary has p=0 ";
318  } else {
319  float costheta = pz / pInit;
320  float theta = acos(std::min(std::max(costheta, float(-1.)), float(1.)));
321  eta = -std::log(std::tan(theta / 2));
322  if (px != 0)
323  phi = std::atan(py / px);
324  }
325  particleType = thePrim->GetPDGcode();
326  } else {
327 #ifdef EDM_ML_DEBUG
328  edm::LogVerbatim("HcalTBSim") << "HcalTB02Analysis:: End Of Event ERROR: could not find primary ";
329 #endif
330  }
331 
332  CaloG4Hit* firstHit = (*theHCHC)[0];
333  incidentEnergy = (firstHit->getIncidentEnergy() / GeV);
334 
335  } // number of Hits > 0
336 
337  if (!hcalOnly) {
338  // XTALS
339 
340  if (XTALSid >= 0 && theXTHC != nullptr) {
341  for (int xihit = 0; xihit < xentries; xihit++) {
342  CaloG4Hit* xaHit = (*theXTHC)[xihit];
343 
344  float xenEm = xaHit->getEM();
345  float xenhad = xaHit->getHadr();
346  xtalID = xaHit->getUnitID();
347 
348  energyInCrystals[xtalID] += xenEm + xenhad;
349  }
350 
351  float xCrysEne[7][7];
352  for (int irow = 0; irow < 7; irow++) {
353  for (int jcol = 0; jcol < 7; jcol++) {
354  xCrysEne[irow][jcol] = 0.;
355  }
356  }
357 
358  for (std::map<int, float>::iterator is = energyInCrystals.begin(); is != energyInCrystals.end(); is++) {
359  int xtalID = (*is).first;
360  xETot = (*is).second;
361 
362  int irow = static_cast<int>(xtalID / 100.);
363  int jcol = static_cast<int>(xtalID - 100. * irow);
364 
365  xSEnergy += xETot;
366  xCrysEne[irow][jcol] = xETot;
367 
368  float dR = std::sqrt(0.01619 * 0.01619 * (jcol - 3) * (jcol - 3) + 0.01606 * 0.01606 * (irow - 3) * (irow - 3));
369  histo->fillTransProf(dR, xETot * 1.05);
370 
371  if ((irow > 0) && (irow < 6)) {
372  if ((jcol > 0) && (jcol < 6)) {
373  xE5x5Matrix += xCrysEne[irow][jcol];
374  xE5x5MatrixN += xCrysEne[irow][jcol] + 108.5 * randGauss.fire();
375 
376  if ((irow > 1) && (irow < 5)) {
377  if ((jcol > 1) && (jcol < 5)) {
378  xE3x3Matrix += xCrysEne[irow][jcol];
379  xE3x3MatrixN += xCrysEne[irow][jcol] + 108.5 * randGauss.fire();
380  }
381  }
382  }
383  }
384  }
385 
386  if (!hcalOnly) {
387  // assert(theXTHC);
388  if (theXTHC != nullptr) {
389  CaloG4Hit* xfirstHit = (*theXTHC)[0];
390  xIncidentEnergy = xfirstHit->getIncidentEnergy() / GeV;
391  }
392  }
393 
394  } // number of Hits > 0
395  }
396 
397  int iEvt = (*evt)()->GetEventID();
398  if (iEvt < 10)
399  edm::LogVerbatim("HcalTBSim") << " Event " << iEvt;
400  else if ((iEvt < 100) && (iEvt % 10 == 0))
401  edm::LogVerbatim("HcalTBSim") << " Event " << iEvt;
402  else if ((iEvt < 1000) && (iEvt % 100 == 0))
403  edm::LogVerbatim("HcalTBSim") << " Event " << iEvt;
404  else if ((iEvt < 10000) && (iEvt % 1000 == 0))
405  edm::LogVerbatim("HcalTBSim") << " Event " << iEvt;
406 }
Log< level::Info, true > LogVerbatim
int getTrackID() const
Definition: CaloG4Hit.h:64
std::map< int, float > energyInScints
double getEM() const
Definition: CaloG4Hit.h:55
double npart
Definition: HydjetWrapper.h:46
double getHadr() const
Definition: CaloG4Hit.h:58
constexpr std::array< uint8_t, layerIndexSize< TrackerTraits > > layer
std::unique_ptr< HcalTB02Histo > histo
T sqrt(T t)
Definition: SSEVec.h:19
Tan< T >::type tan(const T &t)
Definition: Tan.h:22
std::map< int, float > primaries
const std::vector< std::string > names
int getTimeSliceID() const
Definition: CaloG4Hit.h:68
uint32_t getUnitID() const
Definition: CaloG4Hit.h:66
G4THitsCollection< CaloG4Hit > CaloG4HitCollection
Log< level::Warning, false > LogWarning
double getIncidentEnergy() const
Definition: CaloG4Hit.h:61
Geom::Theta< T > theta() const
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:29
std::map< int, float > energyInCrystals

Member Data Documentation

◆ E5x5Matrix

float HcalTB02Analysis::E5x5Matrix
private

Definition at line 93 of file HcalTB02Analysis.cc.

Referenced by clear(), fillEvent(), and update().

◆ E5x5MatrixN

float HcalTB02Analysis::E5x5MatrixN
private

Definition at line 94 of file HcalTB02Analysis.cc.

Referenced by clear(), fillEvent(), and update().

◆ E7x7Matrix

float HcalTB02Analysis::E7x7Matrix
private

Definition at line 93 of file HcalTB02Analysis.cc.

Referenced by clear(), fillEvent(), and update().

◆ E7x7MatrixN

float HcalTB02Analysis::E7x7MatrixN
private

Definition at line 94 of file HcalTB02Analysis.cc.

Referenced by clear(), fillEvent(), and update().

◆ energyInCrystals

std::map<int, float> HcalTB02Analysis::energyInCrystals
private

Definition at line 89 of file HcalTB02Analysis.cc.

Referenced by clear(), fillEvent(), and update().

◆ energyInScints

std::map<int, float> HcalTB02Analysis::energyInScints
private

Definition at line 89 of file HcalTB02Analysis.cc.

Referenced by clear(), fillEvent(), and update().

◆ eta

double HcalTB02Analysis::eta
private

◆ hcalOnly

const bool HcalTB02Analysis::hcalOnly
private

Definition at line 85 of file HcalTB02Analysis.cc.

Referenced by HcalTB02Analysis(), and update().

◆ histo

std::unique_ptr<HcalTB02Histo> HcalTB02Analysis::histo
private

Definition at line 81 of file HcalTB02Analysis.cc.

Referenced by HcalTB02Analysis(), and update().

◆ incidentEnergy

double HcalTB02Analysis::incidentEnergy
private

Definition at line 92 of file HcalTB02Analysis.cc.

Referenced by clear(), fillEvent(), and update().

◆ m_Anal

const edm::ParameterSet HcalTB02Analysis::m_Anal
private

Definition at line 84 of file HcalTB02Analysis.cc.

Referenced by HcalTB02Analysis().

◆ maxTime

int HcalTB02Analysis::maxTime
private

Definition at line 95 of file HcalTB02Analysis.cc.

Referenced by clear(), fillEvent(), and update().

◆ names

const std::vector<std::string> HcalTB02Analysis::names
private

Definition at line 86 of file HcalTB02Analysis.cc.

Referenced by update().

◆ particleType

int HcalTB02Analysis::particleType
private

Definition at line 91 of file HcalTB02Analysis.cc.

Referenced by clear(), fillEvent(), and update().

◆ phi

double HcalTB02Analysis::phi
private

◆ pInit

double HcalTB02Analysis::pInit
private

Definition at line 92 of file HcalTB02Analysis.cc.

Referenced by clear(), fillEvent(), and update().

◆ primaries

std::map<int, float> HcalTB02Analysis::primaries
private

Definition at line 90 of file HcalTB02Analysis.cc.

Referenced by clear(), fillEvent(), and update().

◆ SEnergy

float HcalTB02Analysis::SEnergy
private

Definition at line 93 of file HcalTB02Analysis.cc.

Referenced by clear(), fillEvent(), and update().

◆ SEnergyN

float HcalTB02Analysis::SEnergyN
private

Definition at line 94 of file HcalTB02Analysis.cc.

Referenced by clear(), fillEvent(), and update().

◆ xE3x3Matrix

float HcalTB02Analysis::xE3x3Matrix
private

Definition at line 98 of file HcalTB02Analysis.cc.

Referenced by clear(), fillEvent(), and update().

◆ xE3x3MatrixN

float HcalTB02Analysis::xE3x3MatrixN
private

Definition at line 99 of file HcalTB02Analysis.cc.

Referenced by clear(), fillEvent(), and update().

◆ xE5x5Matrix

float HcalTB02Analysis::xE5x5Matrix
private

Definition at line 98 of file HcalTB02Analysis.cc.

Referenced by clear(), fillEvent(), and update().

◆ xE5x5MatrixN

float HcalTB02Analysis::xE5x5MatrixN
private

Definition at line 99 of file HcalTB02Analysis.cc.

Referenced by clear(), fillEvent(), and update().

◆ xIncidentEnergy

double HcalTB02Analysis::xIncidentEnergy
private

Definition at line 96 of file HcalTB02Analysis.cc.

Referenced by clear(), fillEvent(), and update().

◆ xSEnergy

float HcalTB02Analysis::xSEnergy
private

Definition at line 97 of file HcalTB02Analysis.cc.

Referenced by clear(), fillEvent(), and update().

◆ xSEnergyN

float HcalTB02Analysis::xSEnergyN
private

Definition at line 97 of file HcalTB02Analysis.cc.

Referenced by clear(), and fillEvent().