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 64 of file HcalTB02Analysis.cc.

Constructor & Destructor Documentation

◆ HcalTB02Analysis() [1/2]

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

Definition at line 109 of file HcalTB02Analysis.cc.

References hcalOnly, histo, and m_Anal.

110  : m_Anal(p.getParameter<edm::ParameterSet>("HcalTB02Analysis")),
111  hcalOnly(m_Anal.getUntrackedParameter<bool>("HcalClusterOnly", true)),
112  names(m_Anal.getParameter<std::vector<std::string> >("Names")) {
113  produces<HcalTB02HistoClass>();
114 
115  edm::LogVerbatim("HcalTBSim") << "HcalTB02Analysis:: Initialised as observer of "
116  << "BeginOfJob/BeginOfEvent/EndOfEvent with "
117  << "Parameter values:\n \thcalOnly = " << hcalOnly;
118 
119  histo = std::make_unique<HcalTB02Histo>(m_Anal);
120 }
Log< level::Info, true > LogVerbatim
T getParameter(std::string const &) const
Definition: ParameterSet.h:307
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 122 of file HcalTB02Analysis.cc.

References finish().

122 { finish(); }

Member Function Documentation

◆ clear()

void HcalTB02Analysis::clear ( void  )
private

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

441  {
442  primaries.clear();
443  particleType = 0;
444  pInit = eta = phi = incidentEnergy = 0;
445 
447  E7x7MatrixN = E5x5MatrixN = 0;
448  energyInScints.clear();
449  maxTime = 0;
450 
451  xIncidentEnergy = 0;
452  energyInCrystals.clear();
455 }
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 411 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().

411  {
412  //Beam information
413  product.set_Nprim(float(primaries.size()));
414  product.set_partType(particleType);
415  product.set_Einit(pInit / GeV);
416  product.set_eta(eta);
417  product.set_phi(phi);
418  product.set_Eentry(incidentEnergy);
419 
420  //Calorimeter energy
421  product.set_ETot(SEnergy / GeV);
422  product.set_E7x7(E7x7Matrix / GeV);
423  product.set_E5x5(E5x5Matrix / GeV);
424  product.set_ETotN(SEnergyN / GeV);
425  product.set_E7x7N(E7x7MatrixN / GeV);
426  product.set_E5x5N(E5x5MatrixN / GeV);
427  product.set_NUnit(float(energyInScints.size()));
428  product.set_Ntimesli(float(maxTime));
429 
430  //crystal information
431  product.set_xEentry(xIncidentEnergy);
432  product.set_xNUnit(float(energyInCrystals.size()));
433  product.set_xETot(xSEnergy / GeV);
434  product.set_xETotN(xSEnergyN / GeV);
435  product.set_xE5x5(xE5x5Matrix / GeV);
436  product.set_xE3x3(xE3x3Matrix / GeV);
437  product.set_xE5x5N(xE5x5MatrixN / GeV);
438  product.set_xE3x3N(xE3x3MatrixN / GeV);
439 }
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 457 of file HcalTB02Analysis.cc.

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

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

◆ operator=()

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

◆ produce()

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

Implements SimProducer.

Definition at line 128 of file HcalTB02Analysis.cc.

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

128  {
129  std::unique_ptr<HcalTB02HistoClass> product(new HcalTB02HistoClass);
130  fillEvent(*product);
131  e.put(std::move(product));
132 }
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 134 of file HcalTB02Analysis.cc.

References clear().

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

134  {
135 #ifdef EDM_ML_DEBUG
136  edm::LogVerbatim("HcalTBSim") << "HcalTB02Analysis: =====> Begin of event = " << (*evt)()->GetEventID();
137 #endif
138  clear();
139 }
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 141 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, hcalRecHitTable_cff::ieta, incidentEnergy, hcalRecHitTable_cff::iphi, METSignificanceParams_cfi::jeta, nano_mu_digi_cff::layer, CrabHelper::log, WZElectronSkims53X_cff::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(), tauSpinnerTable_cfi::theta, hcalRecHitTable_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().

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

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

◆ E5x5MatrixN

float HcalTB02Analysis::E5x5MatrixN
private

Definition at line 97 of file HcalTB02Analysis.cc.

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

◆ E7x7Matrix

float HcalTB02Analysis::E7x7Matrix
private

Definition at line 96 of file HcalTB02Analysis.cc.

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

◆ E7x7MatrixN

float HcalTB02Analysis::E7x7MatrixN
private

Definition at line 97 of file HcalTB02Analysis.cc.

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

◆ energyInCrystals

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

Definition at line 92 of file HcalTB02Analysis.cc.

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

◆ energyInScints

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

Definition at line 92 of file HcalTB02Analysis.cc.

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

◆ eta

double HcalTB02Analysis::eta
private

◆ hcalOnly

const bool HcalTB02Analysis::hcalOnly
private

Definition at line 88 of file HcalTB02Analysis.cc.

Referenced by HcalTB02Analysis(), and update().

◆ histo

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

Definition at line 84 of file HcalTB02Analysis.cc.

Referenced by HcalTB02Analysis(), and update().

◆ incidentEnergy

double HcalTB02Analysis::incidentEnergy
private

Definition at line 95 of file HcalTB02Analysis.cc.

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

◆ m_Anal

const edm::ParameterSet HcalTB02Analysis::m_Anal
private

Definition at line 87 of file HcalTB02Analysis.cc.

Referenced by HcalTB02Analysis().

◆ maxTime

int HcalTB02Analysis::maxTime
private

Definition at line 98 of file HcalTB02Analysis.cc.

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

◆ names

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

Definition at line 89 of file HcalTB02Analysis.cc.

Referenced by update().

◆ particleType

int HcalTB02Analysis::particleType
private

Definition at line 94 of file HcalTB02Analysis.cc.

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

◆ phi

double HcalTB02Analysis::phi
private

◆ pInit

double HcalTB02Analysis::pInit
private

Definition at line 95 of file HcalTB02Analysis.cc.

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

◆ primaries

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

Definition at line 93 of file HcalTB02Analysis.cc.

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

◆ SEnergy

float HcalTB02Analysis::SEnergy
private

Definition at line 96 of file HcalTB02Analysis.cc.

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

◆ SEnergyN

float HcalTB02Analysis::SEnergyN
private

Definition at line 97 of file HcalTB02Analysis.cc.

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

◆ xE3x3Matrix

float HcalTB02Analysis::xE3x3Matrix
private

Definition at line 101 of file HcalTB02Analysis.cc.

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

◆ xE3x3MatrixN

float HcalTB02Analysis::xE3x3MatrixN
private

Definition at line 102 of file HcalTB02Analysis.cc.

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

◆ xE5x5Matrix

float HcalTB02Analysis::xE5x5Matrix
private

Definition at line 101 of file HcalTB02Analysis.cc.

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

◆ xE5x5MatrixN

float HcalTB02Analysis::xE5x5MatrixN
private

Definition at line 102 of file HcalTB02Analysis.cc.

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

◆ xIncidentEnergy

double HcalTB02Analysis::xIncidentEnergy
private

Definition at line 99 of file HcalTB02Analysis.cc.

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

◆ xSEnergy

float HcalTB02Analysis::xSEnergy
private

Definition at line 100 of file HcalTB02Analysis.cc.

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

◆ xSEnergyN

float HcalTB02Analysis::xSEnergyN
private

Definition at line 100 of file HcalTB02Analysis.cc.

Referenced by clear(), and fillEvent().