CMS 3D CMS Logo

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

Public Member Functions

 HcalTB04Analysis (const edm::ParameterSet &p)
 
 HcalTB04Analysis (const HcalTB04Analysis &)=delete
 
const HcalTB04Analysisoperator= (const HcalTB04Analysis &)=delete
 
void produce (edm::Event &, const edm::EventSetup &) override
 
 ~HcalTB04Analysis () 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 BeginOfRun *>
 Observer ()
 
void slotForUpdate (const BeginOfRun * iT)
 
virtual ~Observer ()
 
- 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 ()
 
- Public Member Functions inherited from Observer< const G4Step *>
 Observer ()
 
void slotForUpdate (const G4Step * iT)
 
virtual ~Observer ()
 

Private Member Functions

void clear ()
 
void fillBuffer (const EndOfEvent *evt)
 
void fillEvent (PHcalTB04Info &)
 
void finalAnalysis ()
 
void init ()
 
void qieAnalysis (CLHEP::HepRandomEngine *)
 
double scale (int det, int layer)
 
double timeOfFlight (int det, int layer, double eta)
 
int unitID (uint32_t id)
 
void update (const BeginOfRun *run) override
 This routine will be called when the appropriate signal arrives. More...
 
void update (const BeginOfEvent *evt) override
 This routine will be called when the appropriate signal arrives. More...
 
void update (const G4Step *step) 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...
 
void xtalAnalysis (CLHEP::HepRandomEngine *)
 

Private Attributes

G4RotationMatrix * beamline_RM
 
const double beamOffset
 
int count
 
std::vector< CaloHitecalHitCache
 
const double ecalNoise
 
double eecalq
 
double eecals
 
double ehcalq
 
double ehcals
 
std::vector< double > enois
 
std::vector< double > eqeta
 
std::vector< double > eqie
 
std::vector< double > eqlay
 
std::vector< double > eqphi
 
std::vector< double > eseta
 
std::vector< double > esime
 
std::vector< double > esimh
 
std::vector< double > eslay
 
std::vector< double > esphi
 
double etaInit
 
double etotq
 
double etots
 
int evNum
 
std::vector< CaloHithcalHitCache
 
std::vector< CaloHithcalHitLayer
 
const bool hcalOnly
 
HcalTB04Histohisto
 
int iceta
 
int icphi
 
std::vector< uint32_t > idEcal
 
std::vector< int > idHcal
 
std::vector< uint32_t > idTower
 
std::vector< int > idXtal
 
const edm::ParameterSet m_Anal
 
const int mode
 
HcalQiemyQie
 
const std::vector< std::string > names
 
int nCrystal
 
int nPrimary
 
int nTower
 
int particleType
 
double phiInit
 
double pInit
 
bool pvFound
 
G4ThreeVector pvMomentum
 
G4ThreeVector pvPosition
 
int pvType
 
G4ThreeVector pvUVW
 
const double scaleHB0
 
const double scaleHB16
 
const double scaleHE0
 
const double scaleHO
 
std::vector< double > secEkin
 
std::vector< G4ThreeVector > secMomentum
 
std::vector< int > secPartID
 
std::vector< int > secTrackID
 
std::vector< int > shortLivedSecondaries
 
const int type
 

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 73 of file HcalTB04Analysis.cc.

Constructor & Destructor Documentation

◆ HcalTB04Analysis() [1/2]

HcalTB04Analysis::HcalTB04Analysis ( const edm::ParameterSet p)

Definition at line 150 of file HcalTB04Analysis.cc.

References beamline_RM, beamOffset, ecalNoise, JetChargeProducer_cfi::exp, edm::ParameterSet::getParameter(), hcalOnly, histo, iceta, icphi, init(), m_Anal, mode, myQie, and AlCaHLTBitMon_ParallelJobs::p.

151  : m_Anal(p.getParameter<edm::ParameterSet>("HcalTB04Analysis")),
152  hcalOnly(m_Anal.getParameter<bool>("HcalOnly")),
153  mode(m_Anal.getParameter<int>("Mode")),
154  type(m_Anal.getParameter<int>("Type")),
155  ecalNoise(m_Anal.getParameter<double>("EcalNoise")),
156  beamOffset(-m_Anal.getParameter<double>("BeamPosition") * CLHEP::cm),
157  scaleHB0(m_Anal.getParameter<double>("ScaleHB0")),
158  scaleHB16(m_Anal.getParameter<double>("ScaleHB16")),
159  scaleHO(m_Anal.getParameter<double>("ScaleHO")),
160  scaleHE0(m_Anal.getParameter<double>("ScaleHE0")),
161  names(m_Anal.getParameter<std::vector<std::string> >("Names")),
162  myQie(nullptr),
163  histo(nullptr) {
164  double fMinEta = m_Anal.getParameter<double>("MinEta");
165  double fMaxEta = m_Anal.getParameter<double>("MaxEta");
166  double fMinPhi = m_Anal.getParameter<double>("MinPhi");
167  double fMaxPhi = m_Anal.getParameter<double>("MaxPhi");
168  double beamEta = (fMaxEta + fMinEta) / 2.;
169  double beamPhi = (fMaxPhi + fMinPhi) / 2.;
170  double beamThet = 2 * atan(exp(-beamEta));
171  if (beamPhi < 0)
172  beamPhi += twopi;
173  iceta = static_cast<int>(beamEta / 0.087) + 1;
174  icphi = static_cast<int>(std::fabs(beamPhi) / 0.087) + 5;
175  if (icphi > 72)
176  icphi -= 73;
177 
178  produces<PHcalTB04Info>();
179 
180  beamline_RM = new G4RotationMatrix;
181  beamline_RM->rotateZ(-beamPhi);
182  beamline_RM->rotateY(-beamThet);
183 
184  edm::LogVerbatim("HcalTBSim")
185  << "HcalTB04:: Initialised as observer of BeginOf Job/BeginOfRun/BeginOfEvent/G4Step/EndOfEvent with Parameter "
186  "values:\n \thcalOnly = "
187  << hcalOnly << "\tecalNoise = " << ecalNoise << "\n\tMode = " << mode << " (0: HB2 Standard; 1:HB2 Segmented)"
188  << "\tType = " << type << " (0: HB; 1 HE; 2 HB+HE)\n\tbeamOffset = " << beamOffset << "\ticeta = " << iceta
189  << "\ticphi = " << icphi << "\n\tbeamline_RM = " << *beamline_RM;
190 
191  init();
192 
193  myQie = new HcalQie(p);
194  histo = new HcalTB04Histo(m_Anal);
195 }
Log< level::Info, true > LogVerbatim
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
const double beamOffset
const double scaleHB16
const edm::ParameterSet m_Anal
const double scaleHE0
const double scaleHB0
G4RotationMatrix * beamline_RM
const std::vector< std::string > names
HcalTB04Histo * histo
const double scaleHO
const double ecalNoise

◆ HcalTB04Analysis() [2/2]

HcalTB04Analysis::HcalTB04Analysis ( const HcalTB04Analysis )
delete

◆ ~HcalTB04Analysis()

HcalTB04Analysis::~HcalTB04Analysis ( )
override

Definition at line 197 of file HcalTB04Analysis.cc.

References count, histo, and myQie.

197  {
198 #ifdef EDM_ML_DEBUG
199  edm::LogVerbatim("HcalTBSim") << "\n --------> Total number of selected entries : " << count << "\nPointers:: QIE "
200  << myQie << " Histo " << histo;
201 #endif
202  if (myQie) {
203  delete myQie;
204  myQie = nullptr;
205  }
206  if (histo) {
207  delete histo;
208  histo = nullptr;
209  }
210 }
Log< level::Info, true > LogVerbatim
HcalTB04Histo * histo

Member Function Documentation

◆ clear()

void HcalTB04Analysis::clear ( void  )
private

Definition at line 1029 of file HcalTB04Analysis.cc.

References ecalHitCache, enois, eqie, esime, esimh, etaInit, hcalHitCache, hcalHitLayer, mps_fire::i, nCrystal, nPrimary, nTower, particleType, phiInit, pInit, pvFound, pvMomentum, pvPosition, pvType, pvUVW, secEkin, secMomentum, secPartID, secTrackID, and shortLivedSecondaries.

Referenced by init(), and update().

1029  {
1030  pvFound = false;
1031  pvType = -2;
1032  pvPosition = G4ThreeVector();
1033  pvMomentum = G4ThreeVector();
1034  pvUVW = G4ThreeVector();
1035  secTrackID.clear();
1036  secPartID.clear();
1037  secMomentum.clear();
1038  secEkin.clear();
1039  shortLivedSecondaries.clear();
1040 
1041  ecalHitCache.erase(ecalHitCache.begin(), ecalHitCache.end());
1042  hcalHitCache.erase(hcalHitCache.begin(), hcalHitCache.end());
1043  hcalHitLayer.erase(hcalHitLayer.begin(), hcalHitLayer.end());
1044  nPrimary = particleType = 0;
1045  pInit = etaInit = phiInit = 0;
1046 
1047  esimh.clear();
1048  eqie.clear();
1049  esimh.reserve(nTower);
1050  eqie.reserve(nTower);
1051  for (int i = 0; i < nTower; i++) {
1052  esimh.push_back(0.);
1053  eqie.push_back(0.);
1054  }
1055  esime.clear();
1056  enois.clear();
1057  esime.reserve(nCrystal);
1058  enois.reserve(nCrystal);
1059  for (int i = 0; i < nCrystal; i++) {
1060  esime.push_back(0.);
1061  enois.push_back(0.);
1062  }
1063 }
std::vector< double > secEkin
std::vector< CaloHit > hcalHitLayer
std::vector< double > eqie
std::vector< int > shortLivedSecondaries
std::vector< int > secTrackID
std::vector< int > secPartID
G4ThreeVector pvUVW
std::vector< double > esime
std::vector< CaloHit > hcalHitCache
std::vector< CaloHit > ecalHitCache
std::vector< double > enois
std::vector< G4ThreeVector > secMomentum
G4ThreeVector pvMomentum
G4ThreeVector pvPosition
std::vector< double > esimh

◆ fillBuffer()

void HcalTB04Analysis::fillBuffer ( const EndOfEvent evt)
private

Definition at line 481 of file HcalTB04Analysis.cc.

References TauDecayModes::dec, MillePedeFileConverter_cfg::e, ecalHitCache, PVValHelper::eta, etaInit, evNum, CaloG4Hit::getEnergyDeposit(), CaloG4Hit::getEntry(), CaloG4Hit::getTimeSlice(), CaloG4Hit::getTrackID(), HcalTBNumberingScheme::getUnitID(), CaloG4Hit::getUnitID(), watchdog::group, hcalHitCache, hcalHitLayer, hfClusterShapes_cfi::hits, mps_fire::i, heavyIonCSV_trainingSettings::idx, LEDCalibrationChannels::ieta, LEDCalibrationChannels::iphi, dqmiolumiharvest::j, pixelTopology::layer, dqm-mbProfile::log, SiStripPI::max, SiStripPI::min, mode, names, npart, nPrimary, AlCaHLTBitMon_ParallelJobs::p, particleType, phi, phiInit, pInit, funct::pow(), multPhiCorr_741_25nsDY_cfi::px, multPhiCorr_741_25nsDY_cfi::py, scale(), heavyFlavorDQMFirstStep_cff::sdName, jetUpdater_cfi::sort, mathSSE::sqrt(), AlCaHLTBitMon_QueryRunRegistry::string, funct::tan(), theta(), protons_cff::time, timeOfFlight(), unitID(), HcalTestNumbering::unpackHcalIndex(), and z.

Referenced by update().

481  {
482  std::vector<CaloHit> hhits, hhitl;
483  int idHC, j;
484  CaloG4HitCollection* theHC;
485  std::map<int, float, std::less<int> > primaries;
486 #ifdef EDM_ML_DEBUG
487  double etot1 = 0, etot2 = 0;
488 #endif
489 
490  // Look for the Hit Collection of HCal
491  G4HCofThisEvent* allHC = (*evt)()->GetHCofThisEvent();
492  std::string sdName = names[0];
493  idHC = G4SDManager::GetSDMpointer()->GetCollectionID(sdName);
494  theHC = (CaloG4HitCollection*)allHC->GetHC(idHC);
495 #ifdef EDM_ML_DEBUG
496  edm::LogVerbatim("HcalTBSim") << "HcalTB04Analysis:: Hit Collection for " << sdName << " of ID " << idHC
497  << " is obtained at " << theHC << " with " << theHC->entries() << " entries";
498 #endif
499  int thehc_entries = theHC->entries();
500  if (idHC >= 0 && theHC != nullptr) {
501  hhits.reserve(theHC->entries());
502  hhitl.reserve(theHC->entries());
503  for (j = 0; j < thehc_entries; j++) {
504  CaloG4Hit* aHit = (*theHC)[j];
505  double e = aHit->getEnergyDeposit() / CLHEP::GeV;
506  double time = aHit->getTimeSlice();
507  math::XYZPoint pos = aHit->getEntry();
508  unsigned int id = aHit->getUnitID();
509  double theta = pos.theta();
510  double eta = -std::log(std::tan(theta * 0.5));
511  double phi = pos.phi();
512  int det, z, group, ieta, iphi, layer;
514  double jitter = time - timeOfFlight(det, layer, eta);
515  if (jitter < 0)
516  jitter = 0;
517  if (e < 0 || e > 1.)
518  e = 0;
519  double escl = e * scale(det, layer);
520  unsigned int idx = HcalTBNumberingScheme::getUnitID(id, mode);
521  CaloHit hit(det, layer, escl, eta, phi, jitter, idx);
522  hhits.push_back(hit);
523  CaloHit hitl(det, layer, escl, eta, phi, jitter, id);
524  hhitl.push_back(hitl);
525  primaries[aHit->getTrackID()] += e;
526 #ifdef EDM_ML_DEBUG
527  etot1 += escl;
528  edm::LogVerbatim("HcalTBSim") << "HcalTB04Analysis:: Hcal Hit i/p " << j << " ID 0x" << std::hex << id << " 0x"
529  << idx << std::dec << " time " << std::setw(6) << time << " " << std::setw(6)
530  << jitter << " theta " << std::setw(8) << theta << " eta " << std::setw(8) << eta
531  << " phi " << std::setw(8) << phi << " e " << std::setw(8) << e << " "
532  << std::setw(8) << escl;
533 #endif
534  }
535  }
536 
537  // Add hits in the same channel within same time slice
538  std::vector<CaloHit>::iterator itr;
539  int nHit = hhits.size();
540  std::vector<CaloHit*> hits(nHit);
541  for (j = 0, itr = hhits.begin(); itr != hhits.end(); j++, itr++) {
542  hits[j] = &hhits[j];
543  }
544  sort(hits.begin(), hits.end(), CaloHitIdMore());
545  std::vector<CaloHit*>::iterator k1, k2;
546  int nhit = 0;
547  for (k1 = hits.begin(); k1 != hits.end(); k1++) {
548  int det = (**k1).det();
549  int layer = (**k1).layer();
550  double ehit = (**k1).e();
551  double eta = (**k1).eta();
552  double phi = (**k1).phi();
553  double jitter = (**k1).t();
554  uint32_t unitID = (**k1).id();
555  int jump = 0;
556  for (k2 = k1 + 1; k2 != hits.end() && std::fabs(jitter - (**k2).t()) < 1 && unitID == (**k2).id(); k2++) {
557  ehit += (**k2).e();
558  jump++;
559  }
560  nhit++;
561  CaloHit hit(det, layer, ehit, eta, phi, jitter, unitID);
562  hcalHitCache.push_back(hit);
563  k1 += jump;
564 #ifdef EDM_ML_DEBUG
565  etot2 += ehit;
566  edm::LogVerbatim("HcalTBSim") << "HcalTB04Analysis:: Hcal Hit store " << nhit << " ID 0x" << std::hex << unitID
567  << std::dec << " time " << std::setw(6) << jitter << " eta " << std::setw(8) << eta
568  << " phi " << std::setw(8) << phi << " e " << std::setw(8) << ehit;
569 #endif
570  }
571 #ifdef EDM_ML_DEBUG
572  edm::LogVerbatim("HcalTBSim") << "HcalTB04Analysis:: Stores " << nhit << " HCal hits from " << nHit
573  << " input hits E(Hcal) " << etot1 << " " << etot2;
574 #endif
575  //Repeat for Hit in each layer (hhits and hhitl sizes are the same)
576  for (j = 0, itr = hhitl.begin(); itr != hhitl.end(); j++, itr++) {
577  hits[j] = &hhitl[j];
578  }
579  sort(hits.begin(), hits.end(), CaloHitIdMore());
580  int nhitl = 0;
581 #ifdef EDM_ML_DEBUG
582  double etotl = 0;
583 #endif
584  for (k1 = hits.begin(); k1 != hits.end(); k1++) {
585  int det = (**k1).det();
586  int layer = (**k1).layer();
587  double ehit = (**k1).e();
588  double eta = (**k1).eta();
589  double phi = (**k1).phi();
590  double jitter = (**k1).t();
591  uint32_t unitID = (**k1).id();
592  int jump = 0;
593  for (k2 = k1 + 1; k2 != hits.end() && std::fabs(jitter - (**k2).t()) < 1 && unitID == (**k2).id(); k2++) {
594  ehit += (**k2).e();
595  jump++;
596  }
597  nhitl++;
598  CaloHit hit(det, layer, ehit, eta, phi, jitter, unitID);
599  hcalHitLayer.push_back(hit);
600 #ifdef EDM_ML_DEBUG
601  etotl += ehit;
602 #endif
603  k1 += jump;
604 #ifdef EDM_ML_DEBUG
605  edm::LogVerbatim("HcalTBSim") << "HcalTB04Analysis:: Hcal Hit store " << nhitl << " ID 0x" << std::hex << unitID
606  << std::dec << " time " << std::setw(6) << jitter << " eta " << std::setw(8) << eta
607  << " phi " << std::setw(8) << phi << " e " << std::setw(8) << ehit;
608 #endif
609  }
610 #ifdef EDM_ML_DEBUG
611  edm::LogVerbatim("HcalTBSim") << "HcalTB04Analysis:: Stores " << nhitl << " HCal hits from " << nHit
612  << " input hits E(Hcal) " << etot1 << " " << etotl;
613 #endif
614  // Look for the Hit Collection of ECal
615  std::vector<CaloHit> ehits;
616  sdName = names[1];
617  idHC = G4SDManager::GetSDMpointer()->GetCollectionID(sdName);
618  theHC = (CaloG4HitCollection*)allHC->GetHC(idHC);
619 #ifdef EDM_ML_DEBUG
620  etot1 = etot2 = 0;
621  edm::LogVerbatim("HcalTBSim") << "HcalTB04Analysis:: Hit Collection for " << sdName << " of ID " << idHC
622  << " is obtained at " << theHC << " with " << theHC->entries() << " entries";
623 #endif
624  if (idHC >= 0 && theHC != nullptr) {
625  thehc_entries = theHC->entries();
626  ehits.reserve(theHC->entries());
627  for (j = 0; j < thehc_entries; j++) {
628  CaloG4Hit* aHit = (*theHC)[j];
629  double e = aHit->getEnergyDeposit() / CLHEP::GeV;
630  double time = aHit->getTimeSlice();
631  if (e < 0 || e > 100000.)
632  e = 0;
633  if (e > 0) {
634  math::XYZPoint pos = aHit->getEntry();
635  unsigned int id = aHit->getUnitID();
636  double theta = pos.theta();
637  double eta = -std::log(std::tan(theta * 0.5));
638  double phi = pos.phi();
639  int det, z, group, ieta, iphi, layer;
641  CaloHit hit(det, 0, e, eta, phi, time, id);
642  ehits.push_back(hit);
643  primaries[aHit->getTrackID()] += e;
644 #ifdef EDM_ML_DEBUG
645  etot1 += e;
646  edm::LogVerbatim("HcalTBSim") << "HcalTB04Analysis:: Ecal Hit i/p " << j << " ID 0x" << std::hex << id
647  << std::dec << " time " << std::setw(6) << time << " theta " << std::setw(8)
648  << theta << " eta " << std::setw(8) << eta << " phi " << std::setw(8) << phi
649  << " e " << std::setw(8) << e;
650 #endif
651  }
652  }
653  }
654 
655  // Add hits in the same channel within same time slice
656  nHit = ehits.size();
657  std::vector<CaloHit*> hite(nHit);
658  for (j = 0, itr = ehits.begin(); itr != ehits.end(); j++, itr++) {
659  hite[j] = &ehits[j];
660  }
661  sort(hite.begin(), hite.end(), CaloHitIdMore());
662  nhit = 0;
663  for (k1 = hite.begin(); k1 != hite.end(); k1++) {
664  int det = (**k1).det();
665  int layer = (**k1).layer();
666  double ehit = (**k1).e();
667  double eta = (**k1).eta();
668  double phi = (**k1).phi();
669  double jitter = (**k1).t();
670  uint32_t unitID = (**k1).id();
671  int jump = 0;
672  for (k2 = k1 + 1; k2 != hite.end() && std::fabs(jitter - (**k2).t()) < 1 && unitID == (**k2).id(); k2++) {
673  ehit += (**k2).e();
674  jump++;
675  }
676  nhit++;
677  CaloHit hit(det, layer, ehit, eta, phi, jitter, unitID);
678  ecalHitCache.push_back(hit);
679  k1 += jump;
680 #ifdef EDM_ML_DEBUG
681  etot2 += ehit;
682  edm::LogVerbatim("HcalTBSim") << "HcalTB04Analysis:: Ecal Hit store " << nhit << " ID 0x" << std::hex << unitID
683  << std::dec << " time " << std::setw(6) << jitter << " eta " << std::setw(8) << eta
684  << " phi " << std::setw(8) << phi << " e " << std::setw(8) << ehit;
685 #endif
686  }
687 #ifdef EDM_ML_DEBUG
688  edm::LogVerbatim("HcalTBSim") << "HcalTB04Analysis:: Stores " << nhit << " ECal hits from " << nHit
689  << " input hits E(Ecal) " << etot1 << " " << etot2;
690 #endif
691  // Find Primary info:
692  nPrimary = static_cast<int>(primaries.size());
693  int trackID = 0;
694  G4PrimaryParticle* thePrim = nullptr;
695  int nvertex = (*evt)()->GetNumberOfPrimaryVertex();
696 #ifdef EDM_ML_DEBUG
697  edm::LogVerbatim("HcalTBSim") << "HcalTB04Analysis:: Event has " << nvertex << " verteices";
698 #endif
699  if (nvertex <= 0)
700  edm::LogWarning("HcalTBSim") << "HcalTB04Analysis::EndOfEvent ERROR: no vertex found for event " << evNum;
701  for (int i = 0; i < nvertex; i++) {
702  G4PrimaryVertex* avertex = (*evt)()->GetPrimaryVertex(i);
703  if (avertex == nullptr) {
704  edm::LogWarning("HcalTBSim") << "HcalTB04Analysis::EndOfEvent ERR: pointer to vertex = 0 for event " << evNum;
705  } else {
706  edm::LogVerbatim("HcalTBSim") << "HcalTB04Analysis::Vertex number :" << i << " " << avertex->GetPosition();
707  int npart = avertex->GetNumberOfParticle();
708  if (npart == 0)
709  edm::LogWarning("HcalTBSim") << "HcalTB04Analysis::End Of Event ERR: no primary!";
710  if (thePrim == nullptr)
711  thePrim = avertex->GetPrimary(trackID);
712  }
713  }
714 
715  if (thePrim != nullptr) {
716  double px = thePrim->GetPx();
717  double py = thePrim->GetPy();
718  double pz = thePrim->GetPz();
719  double p = std::sqrt(pow(px, 2.) + pow(py, 2.) + pow(pz, 2.));
720  pInit = p / CLHEP::GeV;
721  if (p == 0)
722  edm::LogWarning("HcalTBSim") << "HcalTB04Analysis:: EndOfEvent ERR: primary has p=0 ";
723  else {
724  double costheta = pz / p;
725  double theta = acos(std::min(std::max(costheta, -1.), 1.));
726  etaInit = -std::log(std::tan(theta / 2));
727  if (px != 0 || py != 0)
728  phiInit = std::atan2(py, px);
729  }
730  particleType = thePrim->GetPDGcode();
731  } else
732  edm::LogWarning("HcalTBSim") << "HcalTB04Analysis::EndOfEvent ERR: could not find primary";
733 }
Log< level::Info, true > LogVerbatim
int getTrackID() const
Definition: CaloG4Hit.h:64
std::vector< CaloHit > hcalHitLayer
double npart
Definition: HydjetWrapper.h:46
constexpr std::array< uint8_t, layerIndexSize< TrackerTraits > > layer
math::XYZPoint getEntry() const
Definition: CaloG4Hit.h:46
T sqrt(T t)
Definition: SSEVec.h:19
Tan< T >::type tan(const T &t)
Definition: Tan.h:22
static void unpackHcalIndex(const uint32_t &idx, int &det, int &z, int &depth, int &eta, int &phi, int &lay)
double scale(int det, int layer)
double timeOfFlight(int det, int layer, double eta)
const std::vector< std::string > names
std::vector< CaloHit > hcalHitCache
static uint32_t getUnitID(const uint32_t id, const int mode)
XYZPointD XYZPoint
point in space with cartesian internal representation
Definition: Point3D.h:12
std::vector< CaloHit > ecalHitCache
double getEnergyDeposit() const
Definition: CaloG4Hit.h:79
uint32_t getUnitID() const
Definition: CaloG4Hit.h:66
int unitID(uint32_t id)
G4THitsCollection< CaloG4Hit > CaloG4HitCollection
double getTimeSlice() const
Definition: CaloG4Hit.h:67
Log< level::Warning, false > LogWarning
Geom::Theta< T > theta() const
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:29

◆ fillEvent()

void HcalTB04Analysis::fillEvent ( PHcalTB04Info product)
private

Definition at line 956 of file HcalTB04Analysis.cc.

References TauDecayModes::dec, ecalHitCache, eecalq, eecals, ehcalq, ehcals, enois, eqeta, eqie, eqlay, eqphi, eseta, esime, esimh, eslay, esphi, etaInit, etotq, etots, evNum, watchdog::group, hcalHitCache, mps_fire::i, hit::id, idHcal, idXtal, LEDCalibrationChannels::ieta, LEDCalibrationChannels::iphi, nPrimary, particleType, phiInit, pInit, pvMomentum, pvPosition, pvType, pvUVW, PHcalTB04Info::saveHit(), secEkin, secMomentum, secPartID, secTrackID, PHcalTB04Info::setEdep(), PHcalTB04Info::setEdepHcal(), PHcalTB04Info::setIDs(), PHcalTB04Info::setLongProf(), PHcalTB04Info::setPrimary(), PHcalTB04Info::setTrnsProf(), PHcalTB04Info::setVtxPrim(), PHcalTB04Info::setVtxSec(), HcalTestNumbering::unpackHcalIndex(), x, y, and z.

Referenced by produce().

956  {
957  //Setup the ID's
958  product.setIDs(idHcal, idXtal);
959 
960  //Beam Information
962 
963  //Energy deposits in the crystals and towers
964  product.setEdepHcal(esimh, eqie);
965  product.setEdepHcal(esime, enois);
966 
967  // Total Energy
968  product.setEdep(etots, eecals, ehcals, etotq, eecalq, ehcalq);
969 
970  // Lateral Profile
971  product.setTrnsProf(eseta, eqeta, esphi, eqphi);
972 
973  // Longitudianl profile
974  product.setLongProf(eslay, eqlay);
975 
976  //Save Hits
977  int i, nhit = 0;
978  std::vector<CaloHit>::iterator itr;
979  for (i = 0, itr = ecalHitCache.begin(); itr != ecalHitCache.end(); i++, itr++) {
980  uint32_t id = itr->id();
981  int det, z, group, ieta, iphi, lay;
983  product.saveHit(det, lay, ieta, iphi, itr->e(), itr->t());
984  nhit++;
985 #ifdef EDM_ML_DEBUG
986  edm::LogVerbatim("HcalTBSim") << "HcalTB04Analysis:: Save Hit " << std::setw(3) << i + 1 << " ID 0x" << std::hex
987  << group << std::dec << " " << std::setw(2) << det << " " << std::setw(2) << lay
988  << " " << std::setw(1) << z << " " << std::setw(3) << ieta << " " << std::setw(3)
989  << iphi << " T " << std::setw(6) << itr->t() << " E " << std::setw(6) << itr->e();
990 #endif
991  }
992  edm::LogVerbatim("HcalTBSim") << "HcalTB04Analysis:: Saves " << nhit << " hits from Crystals";
993  int hit = nhit;
994  nhit = 0;
995 
996  for (i = hit, itr = hcalHitCache.begin(); itr != hcalHitCache.end(); i++, itr++) {
997  uint32_t id = itr->id();
998  int det, z, group, ieta, iphi, lay;
1000  product.saveHit(det, lay, ieta, iphi, itr->e(), itr->t());
1001  nhit++;
1002 #ifdef EDM_ML_DEBUG
1003  edm::LogVerbatim("HcalTBSim") << "HcalTB04Analysis:: Save Hit " << std::setw(3) << i + 1 << " ID 0x" << std::hex
1004  << group << std::dec << " " << std::setw(2) << det << " " << std::setw(2) << lay
1005  << " " << std::setw(1) << z << " " << std::setw(3) << ieta << " " << std::setw(3)
1006  << iphi << " T " << std::setw(6) << itr->t() << " E " << std::setw(6) << itr->e();
1007 #endif
1008  }
1009  edm::LogVerbatim("HcalTBSim") << "HcalTB04Analysis:: Saves " << nhit << " hits from HCal";
1010 
1011  //Vertex associated quantities
1012  product.setVtxPrim(evNum,
1013  pvType,
1014  pvPosition.x(),
1015  pvPosition.y(),
1016  pvPosition.z(),
1017  pvUVW.x(),
1018  pvUVW.y(),
1019  pvUVW.z(),
1020  pvMomentum.x(),
1021  pvMomentum.y(),
1022  pvMomentum.z());
1023  for (unsigned int i = 0; i < secTrackID.size(); i++) {
1024  product.setVtxSec(
1026  }
1027 }
Log< level::Info, true > LogVerbatim
std::vector< double > secEkin
void setLongProf(const std::vector< double > &es, const std::vector< double > &eq)
std::vector< int > idHcal
std::vector< double > eqeta
std::vector< double > eqie
std::vector< int > secTrackID
std::vector< double > eqphi
void setPrimary(int primary, int id, double energy, double eta, double phi)
void setEdep(double simtot, double sime, double simh, double digtot, double dige, double digh)
void setTrnsProf(const std::vector< double > &es1, const std::vector< double > &eq1, const std::vector< double > &es2, const std::vector< double > &eq2)
void saveHit(int det, int lay, int eta, int phi, double e, double t)
std::vector< int > secPartID
std::vector< double > eseta
void setIDs(const std::vector< int > &, const std::vector< int > &)
void setVtxSec(int id, int pdg, double px, double py, double pz, double ek)
G4ThreeVector pvUVW
void setEdepHcal(const std::vector< double > &esim, const std::vector< double > &edig)
static void unpackHcalIndex(const uint32_t &idx, int &det, int &z, int &depth, int &eta, int &phi, int &lay)
std::vector< double > esime
std::vector< double > esphi
unsigned int id
std::vector< CaloHit > hcalHitCache
std::vector< int > idXtal
std::vector< CaloHit > ecalHitCache
std::vector< double > enois
void setVtxPrim(int evNum, int type, double x, double y, double z, double u, double v, double w, double px, double py, double pz)
std::vector< G4ThreeVector > secMomentum
G4ThreeVector pvMomentum
std::vector< double > eslay
std::vector< double > eqlay
G4ThreeVector pvPosition
std::vector< double > esimh

◆ finalAnalysis()

void HcalTB04Analysis::finalAnalysis ( )
private

Definition at line 845 of file HcalTB04Analysis.cc.

References StorageManager_cfg::e1, eecalq, eecals, ehcalq, ehcals, enois, eqeta, eqie, eqlay, eqphi, eseta, esime, esimh, eslay, esphi, etaInit, etotq, etots, HcalTB04Histo::fillEdep(), HcalTB04Histo::fillLongProf(), HcalTB04Histo::fillPrimary(), HcalTB04Histo::fillTrnsProf(), watchdog::group, histo, mps_fire::i, iceta, icphi, l1ctLayer2EG_cff::id, idTower, LEDCalibrationChannels::ieta, LEDCalibrationChannels::iphi, pixelTopology::layer, nCrystal, nTower, phiInit, pInit, HcalTestNumbering::unpackHcalIndex(), and z.

Referenced by update().

845  {
846  //Beam Information
848 
849  // Total Energy
850  eecals = ehcals = eecalq = ehcalq = 0.;
851  for (int i = 0; i < nTower; i++) {
852  ehcals += esimh[i];
853  ehcalq += eqie[i];
854  }
855  for (int i = 0; i < nCrystal; i++) {
856  eecals += esime[i];
857  eecalq += enois[i];
858  }
859  etots = eecals + ehcals;
860  etotq = eecalq + ehcalq;
861 #ifdef EDM_ML_DEBUG
862  edm::LogVerbatim("HcalTBSim") << "HcalTB04Analysis:: Energy deposit at Sim Level (Total) " << etots << " (ECal) "
863  << eecals << " (HCal) " << ehcals
864  << "\nHcalTB04Analysis:: Energy deposit at Qie Level (Total) " << etotq << " (ECal) "
865  << eecalq << " (HCal) " << ehcalq;
866 #endif
868 
869  // Lateral Profile
870  for (int i = 0; i < 5; i++) {
871  eseta[i] = 0.;
872  eqeta[i] = 0.;
873  }
874  for (int i = 0; i < 3; i++) {
875  esphi[i] = 0.;
876  eqphi[i] = 0.;
877  }
878  double e1 = 0, e2 = 0;
879  unsigned int id;
880  for (int i = 0; i < nTower; i++) {
881  int det, z, group, ieta, iphi, layer;
882  id = idTower[i];
884  iphi -= (icphi - 1);
885  if (icphi > 4) {
886  if (ieta == 0)
887  ieta = 2;
888  else
889  ieta = -1;
890  } else {
891  ieta = ieta - iceta + 2;
892  }
893  if (iphi >= 0 && iphi < 3 && ieta >= 0 && ieta < 5) {
894  eseta[ieta] += esimh[i];
895  esphi[iphi] += esimh[i];
896  e1 += esimh[i];
897  eqeta[ieta] += eqie[i];
898  eqphi[iphi] += eqie[i];
899  e2 += eqie[i];
900  }
901  }
902  for (int i = 0; i < 3; i++) {
903  if (e1 > 0)
904  esphi[i] /= e1;
905  if (e2 > 0)
906  eqphi[i] /= e2;
907  }
908  for (int i = 0; i < 5; i++) {
909  if (e1 > 0)
910  eseta[i] /= e1;
911  if (e2 > 0)
912  eqeta[i] /= e2;
913  }
914 #ifdef EDM_ML_DEBUG
915  edm::LogVerbatim("HcalTBSim") << "HcalTB04Analysis:: Energy fraction along Eta and Phi (Sim/Qie)";
916  for (int i = 0; i < 5; i++)
917  edm::LogVerbatim("HcalTBSim") << "HcalTB04Analysis:: [" << i << "] Eta Sim = " << eseta[i] << " Qie = " << eqeta[i]
918  << " Phi Sim = " << esphi[i] << " Qie = " << eqphi[i];
919 #endif
921 
922  // Longitudianl profile
923  for (int i = 0; i < 20; i++) {
924  eslay[i] = 0.;
925  eqlay[i] = 0.;
926  }
927  e1 = 0;
928  e2 = 0;
929  for (int i = 0; i < nTower; i++) {
930  int det, z, group, ieta, iphi, layer;
931  id = idTower[i];
933  iphi -= (icphi - 1);
934  layer -= 1;
935  if (iphi >= 0 && iphi < 3 && layer >= 0 && layer < 20) {
936  eslay[layer] += esimh[i];
937  e1 += esimh[i];
938  eqlay[layer] += eqie[i];
939  e2 += eqie[i];
940  }
941  }
942  for (int i = 0; i < 20; i++) {
943  if (e1 > 0)
944  eslay[i] /= e1;
945  if (e2 > 0)
946  eqlay[i] /= e2;
947  }
948 #ifdef EDM_ML_DEBUG
949  edm::LogVerbatim("HcalTBSim") << "HcalTB04Analysis:: Energy fraction along Layer";
950  for (int i = 0; i < 20; i++)
951  edm::LogVerbatim("HcalTBSim") << "HcalTB04Analysis:: [" << i << "] Sim = " << eslay[i] << " Qie = " << eqlay[i];
952 #endif
954 }
Log< level::Info, true > LogVerbatim
void fillPrimary(double energy, double eta, double phi)
std::vector< double > eqeta
std::vector< double > eqie
void fillTrnsProf(const std::vector< double > &es1, const std::vector< double > &eq1, const std::vector< double > &es2, const std::vector< double > &eq2)
std::vector< double > eqphi
constexpr std::array< uint8_t, layerIndexSize< TrackerTraits > > layer
std::vector< double > eseta
static void unpackHcalIndex(const uint32_t &idx, int &det, int &z, int &depth, int &eta, int &phi, int &lay)
std::vector< double > esime
std::vector< double > esphi
std::vector< double > enois
HcalTB04Histo * histo
std::vector< uint32_t > idTower
std::vector< double > eslay
std::vector< double > eqlay
void fillEdep(double etots, double eecals, double ehcals, double etotq, double eecalq, double ehcalq)
std::vector< double > esimh
void fillLongProf(const std::vector< double > &es, const std::vector< double > &eq)

◆ init()

void HcalTB04Analysis::init ( void  )
private

Definition at line 222 of file HcalTB04Analysis.cc.

References clear(), count, TauDecayModes::dec, eqeta, eqlay, eqphi, eseta, eslay, esphi, evNum, HcalTBNumberingScheme::getUnitIDs(), hcalOnly, mps_fire::i, globals_cff::id1, idEcal, idHcal, idTower, idXtal, mode, nCrystal, nTower, HcalTestNumbering::packHcalIndex(), and unitID().

Referenced by HcalTB04Analysis().

222  {
224  nTower = idTower.size();
225 #ifdef EDM_ML_DEBUG
226  edm::LogVerbatim("HcalTBSim") << "HcalTB04Analysis:: Save information from " << nTower << " HCal towers";
227 #endif
228  idHcal.reserve(nTower);
229  for (int i = 0; i < nTower; i++) {
230  int id = unitID(idTower[i]);
231  idHcal.push_back(id);
232 #ifdef EDM_ML_DEBUG
233  edm::LogVerbatim("HcalTBSim") << "\tTower[" << i << "] Original " << std::hex << idTower[i] << " Stored "
234  << idHcal[i] << std::dec;
235 #endif
236  }
237 
238  if (!hcalOnly) {
239  int det = 10;
240  uint32_t id1;
241  nCrystal = 0;
242  for (int lay = 1; lay < 8; lay++) {
243  for (int icr = 1; icr < 8; icr++) {
244  id1 = HcalTestNumbering::packHcalIndex(det, 0, 1, icr, lay, 1);
245  int id = unitID(id1);
246  idEcal.push_back(id1);
247  idXtal.push_back(id);
248  nCrystal++;
249  }
250  }
251  edm::LogVerbatim("HcalTBSim") << "HcalTB04Analysis:: Save information from " << nCrystal << " ECal Crystals";
252 #ifdef EDM_ML_DEBUG
253  for (int i = 0; i < nCrystal; i++) {
254  edm::LogVerbatim("HcalTBSim") << "\tCrystal[" << i << "] Original " << std::hex << idEcal[i] << " Stored "
255  << idXtal[i] << std::dec;
256  }
257 #endif
258  }
259  // Profile vectors
260  eseta.reserve(5);
261  eqeta.reserve(5);
262  esphi.reserve(3);
263  eqphi.reserve(3);
264  eslay.reserve(20);
265  eqlay.reserve(20);
266  for (int i = 0; i < 5; i++) {
267  eseta.push_back(0.);
268  eqeta.push_back(0.);
269  }
270  for (int i = 0; i < 3; i++) {
271  esphi.push_back(0.);
272  eqphi.push_back(0.);
273  }
274  for (int i = 0; i < 20; i++) {
275  eslay.push_back(0.);
276  eqlay.push_back(0.);
277  }
278 
279  // counter
280  count = 0;
281  evNum = 0;
282  clear();
283 }
Log< level::Info, true > LogVerbatim
std::vector< int > idHcal
std::vector< double > eqeta
std::vector< double > eqphi
static uint32_t packHcalIndex(int det, int z, int depth, int eta, int phi, int lay)
std::vector< uint32_t > idEcal
std::vector< double > eseta
static std::vector< uint32_t > getUnitIDs(const int type, const int mode)
std::vector< double > esphi
std::vector< int > idXtal
int unitID(uint32_t id)
std::vector< uint32_t > idTower
std::vector< double > eslay
std::vector< double > eqlay

◆ operator=()

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

◆ produce()

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

Implements SimProducer.

Definition at line 216 of file HcalTB04Analysis.cc.

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

216  {
217  std::unique_ptr<PHcalTB04Info> product(new PHcalTB04Info);
218  fillEvent(*product);
219  e.put(std::move(product));
220 }
def move(src, dest)
Definition: eostools.py:511
void fillEvent(PHcalTB04Info &)

◆ qieAnalysis()

void HcalTB04Analysis::qieAnalysis ( CLHEP::HepRandomEngine *  engine)
private

Definition at line 735 of file HcalTB04Analysis.cc.

References hippyaddtobaddatafiles::cd(), TauDecayModes::dec, eqie, esimh, HcalQie::getCode(), HcalQie::getEnergy(), hcalHitCache, hfClusterShapes_cfi::hits, l1ctLayer2EG_cff::id, hit::id, idTower, myQie, nTower, and DQMOfflineHeavyIons_cff::todo.

Referenced by update().

735  {
736  int hittot = hcalHitCache.size();
737  if (hittot <= 0)
738  hittot = 1;
739  std::vector<CaloHit> hits(hittot);
740  std::vector<int> todo(nTower, 0);
741 
742 #ifdef EDM_ML_DEBUG
743  edm::LogVerbatim("HcalTBSim") << "HcalTB04Analysis::qieAnalysis: Size " << hits.size() << " " << todo.size() << " "
744  << idTower.size() << " " << esimh.size() << " " << eqie.size();
745 #endif
746  // Loop over all HCal hits
747  for (unsigned int k1 = 0; k1 < hcalHitCache.size(); k1++) {
748  CaloHit hit = hcalHitCache[k1];
749  uint32_t id = hit.id();
750  int nhit = 0;
751  double esim = hit.e();
752  hits[nhit] = hit;
753  for (unsigned int k2 = k1 + 1; k2 < hcalHitCache.size(); k2++) {
754  hit = hcalHitCache[k2];
755  if (hit.id() == id) {
756  nhit++;
757  hits[nhit] = hit;
758  esim += hit.e();
759  }
760  }
761  k1 += nhit;
762  nhit++;
763  std::vector<int> cd = myQie->getCode(nhit, hits, engine);
764  double eq = myQie->getEnergy(cd);
765 #ifdef EDM_ML_DEBUG
766  edm::LogVerbatim("HcalTBSim") << "HcalTB04Analysis:: ID 0x" << std::hex << id << std::dec << " registers " << esim
767  << " energy from " << nhit << " hits starting with hit # " << k1
768  << " energy with noise " << eq;
769 #endif
770  for (int k2 = 0; k2 < nTower; k2++) {
771  if (id == idTower[k2]) {
772  todo[k2] = 1;
773  esimh[k2] = esim;
774  eqie[k2] = eq;
775  }
776  }
777  }
778 
779  // Towers with no hit
780  for (int k2 = 0; k2 < nTower; k2++) {
781  if (todo[k2] == 0) {
782  std::vector<int> cd = myQie->getCode(0, hits, engine);
783  double eq = myQie->getEnergy(cd);
784  esimh[k2] = 0;
785  eqie[k2] = eq;
786 #ifdef EDM_ML_DEBUG
787  edm::LogVerbatim("HcalTBSim") << "HcalTB04Analysis:: ID 0x" << std::hex << idTower[k2] << std::dec
788  << " registers " << esimh[k2] << " energy from hits and energy after QIE analysis "
789  << eqie[k2];
790 #endif
791  }
792  }
793 }
Log< level::Info, true > LogVerbatim
std::vector< double > eqie
double getEnergy(const std::vector< int > &)
Definition: HcalQie.cc:356
unsigned int id
std::vector< CaloHit > hcalHitCache
std::vector< int > getCode(int, const std::vector< CaloHit > &, CLHEP::HepRandomEngine *)
Definition: HcalQie.cc:268
std::vector< uint32_t > idTower
std::vector< double > esimh

◆ scale()

double HcalTB04Analysis::scale ( int  det,
int  layer 
)
private

Definition at line 1076 of file HcalTB04Analysis.cc.

References HcalBarrel, pixelTopology::layer, scaleHB0, scaleHB16, scaleHE0, scaleHO, and createJobs::tmp.

Referenced by fillBuffer().

1076  {
1077  double tmp = 1.;
1078  if (det == static_cast<int>(HcalBarrel)) {
1079  if (layer == 1)
1080  tmp = scaleHB0;
1081  else if (layer == 17)
1082  tmp = scaleHB16;
1083  else if (layer > 17)
1084  tmp = scaleHO;
1085  } else {
1086  if (layer <= 2)
1087  tmp = scaleHE0;
1088  }
1089  return tmp;
1090 }
const double scaleHB16
const double scaleHE0
constexpr std::array< uint8_t, layerIndexSize< TrackerTraits > > layer
const double scaleHB0
const double scaleHO
tmp
align.sh
Definition: createJobs.py:716

◆ timeOfFlight()

double HcalTB04Analysis::timeOfFlight ( int  det,
int  layer,
double  eta 
)
private

Definition at line 1092 of file HcalTB04Analysis.cc.

References beamOffset, funct::cos(), PVValHelper::eta, JetChargeProducer_cfi::exp, HcalBarrel, pixelTopology::layer, funct::sin(), theta(), and createJobs::tmp.

Referenced by fillBuffer().

1092  {
1093  double theta = 2.0 * std::atan(std::exp(-eta));
1094  double dist = beamOffset;
1095  if (det == static_cast<int>(HcalBarrel)) {
1096  const double rLay[19] = {1836.0,
1097  1902.0,
1098  1962.0,
1099  2022.0,
1100  2082.0,
1101  2142.0,
1102  2202.0,
1103  2262.0,
1104  2322.0,
1105  2382.0,
1106  2448.0,
1107  2514.0,
1108  2580.0,
1109  2646.0,
1110  2712.0,
1111  2776.0,
1112  2862.5,
1113  3847.0,
1114  4052.0};
1115  if (layer > 0 && layer <= 19)
1116  dist += rLay[layer - 1] * mm / sin(theta);
1117  } else {
1118  const double zLay[19] = {4034.0,
1119  4032.0,
1120  4123.0,
1121  4210.0,
1122  4297.0,
1123  4384.0,
1124  4471.0,
1125  4558.0,
1126  4645.0,
1127  4732.0,
1128  4819.0,
1129  4906.0,
1130  4993.0,
1131  5080.0,
1132  5167.0,
1133  5254.0,
1134  5341.0,
1135  5428.0,
1136  5515.0};
1137  if (layer > 0 && layer <= 19)
1138  dist += zLay[layer - 1] * mm / cos(theta);
1139  }
1140 
1141  double tmp = dist / c_light / ns;
1142 #ifdef EDM_ML_DEBUG
1143  edm::LogVerbatim("HcalTBSim") << "HcalTB04Analysis::timeOfFlight " << tmp << " for det/lay " << det << " " << layer
1144  << " eta/theta " << eta << " " << theta / deg << " dist " << dist;
1145 #endif
1146  return tmp;
1147 }
Log< level::Info, true > LogVerbatim
const double beamOffset
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
constexpr std::array< uint8_t, layerIndexSize< TrackerTraits > > layer
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
tmp
align.sh
Definition: createJobs.py:716
Geom::Theta< T > theta() const

◆ unitID()

int HcalTB04Analysis::unitID ( uint32_t  id)
private

Definition at line 1065 of file HcalTB04Analysis.cc.

References watchdog::group, LEDCalibrationChannels::ieta, LEDCalibrationChannels::iphi, HcalTestNumbering::unpackHcalIndex(), and z.

Referenced by fillBuffer(), and init().

1065  {
1066  int det, z, group, ieta, iphi, lay;
1068  group = (det & 15) << 20;
1069  group += ((lay - 1) & 31) << 15;
1070  group += (z & 1) << 14;
1071  group += (ieta & 127) << 7;
1072  group += (iphi & 127);
1073  return group;
1074 }
static void unpackHcalIndex(const uint32_t &idx, int &det, int &z, int &depth, int &eta, int &phi, int &lay)

◆ update() [1/4]

void HcalTB04Analysis::update ( const BeginOfRun )
overrideprivatevirtual

This routine will be called when the appropriate signal arrives.

Implements Observer< const BeginOfRun *>.

Definition at line 285 of file HcalTB04Analysis.cc.

References hcalOnly, names, ECalSD::setNumberingScheme(), HCalSD::setNumberingScheme(), and AlCaHLTBitMon_QueryRunRegistry::string.

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

285  {
286  int irun = (*run)()->GetRunID();
287  edm::LogVerbatim("HcalTBSim") << " =====> Begin of Run = " << irun;
288 
289  G4SDManager* sd = G4SDManager::GetSDMpointerIfExist();
290  if (sd != nullptr) {
291  std::string sdname = names[0];
292  G4VSensitiveDetector* aSD = sd->FindSensitiveDetector(sdname);
293  if (aSD == nullptr) {
294  edm::LogWarning("HcalTBSim") << "HcalTB04Analysis::beginOfRun: No SD"
295  << " with name " << sdname << " in this "
296  << "Setup";
297  } else {
298  HCalSD* theCaloSD = dynamic_cast<HCalSD*>(aSD);
299  edm::LogVerbatim("HcalTBSim") << "HcalTB04Analysis::beginOfRun: Finds SD with name " << theCaloSD->GetName()
300  << " in this Setup";
302  theCaloSD->setNumberingScheme(org);
303  edm::LogVerbatim("HcalTBSim") << "HcalTB04Analysis::beginOfRun: set a new numbering scheme";
304  }
305  if (!hcalOnly) {
306  sdname = names[1];
307  aSD = sd->FindSensitiveDetector(sdname);
308  if (aSD == nullptr) {
309  edm::LogWarning("HcalTBSim") << "HcalTB04Analysis::beginOfRun: No SD"
310  << " with name " << sdname << " in this "
311  << "Setup";
312  } else {
313  ECalSD* theCaloSD = dynamic_cast<ECalSD*>(aSD);
314  edm::LogVerbatim("HcalTBSim") << "HcalTB04Analysis::beginOfRun: Finds SD with name " << theCaloSD->GetName()
315  << " in this Setup";
317  theCaloSD->setNumberingScheme(org);
318  edm::LogVerbatim("HcalTBSim") << "HcalTB04Analysis::beginOfRun: set a new numbering scheme";
319  }
320  }
321  } else {
322  edm::LogWarning("HcalTBSim") << "HcalTB04Analysis::beginOfRun: Could "
323  << "not get SD Manager!";
324  }
325 }
Log< level::Info, true > LogVerbatim
void setNumberingScheme(HcalNumberingScheme *)
Definition: HCalSD.cc:545
Definition: HCalSD.h:38
const std::vector< std::string > names
Definition: ECalSD.h:31
Log< level::Warning, false > LogWarning
void setNumberingScheme(EcalNumberingScheme *)
Definition: ECalSD.cc:329

◆ update() [2/4]

void HcalTB04Analysis::update ( const BeginOfEvent )
overrideprivatevirtual

This routine will be called when the appropriate signal arrives.

Implements Observer< const BeginOfEvent *>.

Definition at line 327 of file HcalTB04Analysis.cc.

References clear(), and evNum.

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

327  {
328  clear();
329 #ifdef EDM_ML_DEBUG
330  evNum = (*evt)()->GetEventID();
331  edm::LogVerbatim("HcalTBSim") << "HcalTB04Analysis: =====> Begin of event = " << evNum;
332 #endif
333 }
Log< level::Info, true > LogVerbatim

◆ update() [3/4]

void HcalTB04Analysis::update ( const G4Step *  )
overrideprivatevirtual

This routine will be called when the appropriate signal arrives.

Implements Observer< const G4Step *>.

Definition at line 335 of file HcalTB04Analysis.cc.

References position, pvFound, pvMomentum, pvPosition, pvType, pvUVW, secEkin, secMomentum, secPartID, secTrackID, and shortLivedSecondaries.

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

335  {
336  if (aStep != nullptr) {
337  //Get Step properties
338  G4ThreeVector thePreStepPoint = aStep->GetPreStepPoint()->GetPosition();
339  G4ThreeVector thePostStepPoint;
340 
341  // Get Tracks properties
342  G4Track* aTrack = aStep->GetTrack();
343  int trackID = aTrack->GetTrackID();
344  int parentID = aTrack->GetParentID();
345  const G4ThreeVector& position = aTrack->GetPosition();
346  G4ThreeVector momentum = aTrack->GetMomentum();
347  G4String partType = aTrack->GetDefinition()->GetParticleType();
348  G4String partSubType = aTrack->GetDefinition()->GetParticleSubType();
349  int partPDGEncoding = aTrack->GetDefinition()->GetPDGEncoding();
350 #ifdef EDM_ML_DEBUG
351  bool isPDGStable = aTrack->GetDefinition()->GetPDGStable();
352 #endif
353  double pDGlifetime = aTrack->GetDefinition()->GetPDGLifeTime();
354  double gammaFactor = aStep->GetPreStepPoint()->GetGamma();
355 
356  if (!pvFound) { //search for v1
357  double stepDeltaEnergy = aStep->GetDeltaEnergy();
358  double kinEnergy = aTrack->GetKineticEnergy();
359 
360  // look for DeltaE > 10% kinEnergy of particle, or particle death - Ek=0
361  if (trackID == 1 && parentID == 0 && ((kinEnergy == 0.) || (std::fabs(stepDeltaEnergy / kinEnergy) > 0.1))) {
362  pvType = -1;
363  if (kinEnergy == 0.) {
364  pvType = 0;
365  } else {
366  if (std::fabs(stepDeltaEnergy / kinEnergy) > 0.1)
367  pvType = 1;
368  }
369  pvFound = true;
371  pvMomentum = momentum;
372  // Rotated coord.system:
373  pvUVW = (*beamline_RM) * (pvPosition);
374 
375  //Volume name requires some checks:
376  G4String thePostPVname = "NoName";
377  G4StepPoint* thePostPoint = aStep->GetPostStepPoint();
378  if (thePostPoint) {
379  thePostStepPoint = thePostPoint->GetPosition();
380  G4VPhysicalVolume* thePostPV = thePostPoint->GetPhysicalVolume();
381  if (thePostPV)
382  thePostPVname = thePostPV->GetName();
383  }
384 #ifdef EDM_ML_DEBUG
385  edm::LogVerbatim("HcalTBSim") << "HcalTB04Analysis:: V1 found at: " << thePostStepPoint
386  << " G4VPhysicalVolume: " << thePostPVname;
387  edm::LogVerbatim("HcalTBSim") << "HcalTB04Analysis::fill_v1Pos: Primary Track momentum: " << pvMomentum
388  << " psoition " << pvPosition << " u/v/w " << pvUVW;
389 #endif
390  }
391  } else {
392  // watch for secondaries originating @v1, including the surviving primary
393  if ((trackID != 1 && parentID == 1 && (aTrack->GetCurrentStepNumber() == 1) && (thePreStepPoint == pvPosition)) ||
394  (trackID == 1 && thePreStepPoint == pvPosition)) {
395 #ifdef EDM_ML_DEBUG
396  edm::LogVerbatim("HcalTBSim") << "HcalTB04Analysis::A secondary... PDG:" << partPDGEncoding
397  << " TrackID:" << trackID << " ParentID:" << parentID
398  << " stable: " << isPDGStable << " Tau: " << pDGlifetime
399  << " cTauGamma=" << c_light * pDGlifetime * gammaFactor * 1000.
400  << "um GammaFactor: " << gammaFactor;
401 #endif
402  secTrackID.push_back(trackID);
403  secPartID.push_back(partPDGEncoding);
404  secMomentum.push_back(momentum);
405  secEkin.push_back(aTrack->GetKineticEnergy());
406 
407  // Check for short-lived secondaries: cTauGamma<100um
408  double ctaugamma_um = CLHEP::c_light * pDGlifetime * gammaFactor * 1000.;
409  if ((ctaugamma_um > 0.) && (ctaugamma_um < 100.)) { //short-lived secondary
410  shortLivedSecondaries.push_back(trackID);
411  } else { //normal secondary - enter into the V1-calorimetric tree
412  // histos->fill_v1cSec (aTrack);
413  }
414  }
415  // Also watch for tertiary particles coming from
416  // short-lived secondaries from V1
417  if (aTrack->GetCurrentStepNumber() == 1) {
418  if (!shortLivedSecondaries.empty()) {
419  int pid = parentID;
420  std::vector<int>::iterator pos1 = shortLivedSecondaries.begin();
421  std::vector<int>::iterator pos2 = shortLivedSecondaries.end();
422  std::vector<int>::iterator pos;
423  for (pos = pos1; pos != pos2; pos++) {
424  if (*pos == pid) { //ParentID is on the list of short-lived
425  // secondary
426 #ifdef EDM_ML_DEBUG
427  edm::LogVerbatim("HcalTBSim")
428  << "HcalTB04Analysis:: A tertiary... PDG:" << partPDGEncoding << " TrackID:" << trackID
429  << " ParentID:" << parentID << " stable: " << isPDGStable << " Tau: " << pDGlifetime
430  << " cTauGamma=" << c_light * pDGlifetime * gammaFactor * 1000. << "um GammaFactor: " << gammaFactor;
431 #endif
432  }
433  }
434  }
435  }
436  }
437  }
438 }
Log< level::Info, true > LogVerbatim
std::vector< double > secEkin
std::vector< int > shortLivedSecondaries
std::vector< int > secTrackID
std::vector< int > secPartID
G4ThreeVector pvUVW
std::vector< G4ThreeVector > secMomentum
static int position[264][3]
Definition: ReadPGInfo.cc:289
G4ThreeVector pvMomentum
G4ThreeVector pvPosition

◆ update() [4/4]

void HcalTB04Analysis::update ( const EndOfEvent )
overrideprivatevirtual

This routine will be called when the appropriate signal arrives.

Implements Observer< const EndOfEvent *>.

Definition at line 440 of file HcalTB04Analysis.cc.

References count, ecalHitCache, fillBuffer(), finalAnalysis(), hcalHitCache, hcalOnly, qieAnalysis(), and xtalAnalysis().

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

440  {
441  count++;
442 
443  //fill the buffer
444 #ifdef EDM_ML_DEBUG
445  edm::LogVerbatim("HcalTBSim") << "HcalTB04Analysis::Fill event " << (*evt)()->GetEventID();
446 #endif
447  fillBuffer(evt);
448 
449  //QIE analysis
450 #ifdef EDM_ML_DEBUG
451  edm::LogVerbatim("HcalTBSim") << "HcalTB04Analysis::Do QIE analysis with " << hcalHitCache.size() << " hits";
452 #endif
453  CLHEP::HepRandomEngine* engine = G4Random::getTheEngine();
454  qieAnalysis(engine);
455 
456  //Energy in Crystal Matrix
457  if (!hcalOnly) {
458 #ifdef EDM_ML_DEBUG
459  edm::LogVerbatim("HcalTBSim") << "HcalTB04Analysis::Do Xtal analysis with " << ecalHitCache.size() << " hits";
460 #endif
461  xtalAnalysis(engine);
462  }
463 
464  //Final Analysis
465 #ifdef EDM_ML_DEBUG
466  edm::LogVerbatim("HcalTBSim") << "HcalTB04Analysis::Final analysis";
467 #endif
468  finalAnalysis();
469 
470  int iEvt = (*evt)()->GetEventID();
471  if (iEvt < 10)
472  edm::LogVerbatim("HcalTBSim") << "HcalTB04Analysis:: Event " << iEvt;
473  else if ((iEvt < 100) && (iEvt % 10 == 0))
474  edm::LogVerbatim("HcalTBSim") << "HcalTB04Analysis:: Event " << iEvt;
475  else if ((iEvt < 1000) && (iEvt % 100 == 0))
476  edm::LogVerbatim("HcalTBSim") << "HcalTB04Analysis:: Event " << iEvt;
477  else if ((iEvt < 10000) && (iEvt % 1000 == 0))
478  edm::LogVerbatim("HcalTBSim") << "HcalTB04Analysis:: Event " << iEvt;
479 }
Log< level::Info, true > LogVerbatim
void fillBuffer(const EndOfEvent *evt)
std::vector< CaloHit > hcalHitCache
void xtalAnalysis(CLHEP::HepRandomEngine *)
std::vector< CaloHit > ecalHitCache
void qieAnalysis(CLHEP::HepRandomEngine *)

◆ xtalAnalysis()

void HcalTB04Analysis::xtalAnalysis ( CLHEP::HepRandomEngine *  engine)
private

Definition at line 795 of file HcalTB04Analysis.cc.

References TauDecayModes::dec, ecalHitCache, ecalNoise, enois, esime, l1ctLayer2EG_cff::id, idEcal, and nCrystal.

Referenced by update().

795  {
796  CLHEP::RandGaussQ randGauss(*engine);
797 
798  // Crystal Data
799  std::vector<int> iok(nCrystal, 0);
800 #ifdef EDM_ML_DEBUG
801  edm::LogVerbatim("HcalTBSim") << "HcalTB04Analysis::xtalAnalysis: Size " << iok.size() << " " << idEcal.size() << " "
802  << esime.size() << " " << enois.size();
803 #endif
804  for (unsigned int k1 = 0; k1 < ecalHitCache.size(); k1++) {
805  uint32_t id = ecalHitCache[k1].id();
806  int nhit = 0;
807  double esim = ecalHitCache[k1].e();
808  for (unsigned int k2 = k1 + 1; k2 < ecalHitCache.size(); k2++) {
809  if (ecalHitCache[k2].id() == id) {
810  nhit++;
811  esim += ecalHitCache[k2].e();
812  }
813  }
814  k1 += nhit;
815  nhit++;
816  double eq = esim + randGauss.fire(0., ecalNoise);
817 #ifdef EDM_ML_DEBUG
818  edm::LogVerbatim("HcalTBSim") << "HcalTB04Analysis:: ID 0x" << std::hex << id << std::dec << " registers " << esim
819  << " energy from " << nhit << " hits starting with hit # " << k1
820  << " energy with noise " << eq;
821 #endif
822  for (int k2 = 0; k2 < nCrystal; k2++) {
823  if (id == idEcal[k2]) {
824  iok[k2] = 1;
825  esime[k2] = esim;
826  enois[k2] = eq;
827  }
828  }
829  }
830 
831  // Crystals with no hit
832  for (int k2 = 0; k2 < nCrystal; k2++) {
833  if (iok[k2] == 0) {
834  esime[k2] = 0;
835  enois[k2] = randGauss.fire(0., ecalNoise);
836 #ifdef EDM_ML_DEBUG
837  edm::LogVerbatim("HcalTBSim") << "HcalTB04Analysis:: ID 0x" << std::hex << idEcal[k2] << std::dec
838  << " registers " << esime[k2] << " energy from hits and energy from noise "
839  << enois[k2];
840 #endif
841  }
842  }
843 }
Log< level::Info, true > LogVerbatim
std::vector< uint32_t > idEcal
std::vector< double > esime
std::vector< CaloHit > ecalHitCache
std::vector< double > enois
const double ecalNoise

Member Data Documentation

◆ beamline_RM

G4RotationMatrix* HcalTB04Analysis::beamline_RM
private

Definition at line 120 of file HcalTB04Analysis.cc.

Referenced by HcalTB04Analysis().

◆ beamOffset

const double HcalTB04Analysis::beamOffset
private

Definition at line 112 of file HcalTB04Analysis.cc.

Referenced by HcalTB04Analysis(), and timeOfFlight().

◆ count

int HcalTB04Analysis::count
private

Definition at line 123 of file HcalTB04Analysis.cc.

Referenced by init(), update(), and ~HcalTB04Analysis().

◆ ecalHitCache

std::vector<CaloHit> HcalTB04Analysis::ecalHitCache
private

Definition at line 131 of file HcalTB04Analysis.cc.

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

◆ ecalNoise

const double HcalTB04Analysis::ecalNoise
private

Definition at line 112 of file HcalTB04Analysis.cc.

Referenced by HcalTB04Analysis(), and xtalAnalysis().

◆ eecalq

double HcalTB04Analysis::eecalq
private

Definition at line 135 of file HcalTB04Analysis.cc.

Referenced by fillEvent(), and finalAnalysis().

◆ eecals

double HcalTB04Analysis::eecals
private

Definition at line 135 of file HcalTB04Analysis.cc.

Referenced by fillEvent(), and finalAnalysis().

◆ ehcalq

double HcalTB04Analysis::ehcalq
private

Definition at line 135 of file HcalTB04Analysis.cc.

Referenced by fillEvent(), and finalAnalysis().

◆ ehcals

double HcalTB04Analysis::ehcals
private

Definition at line 135 of file HcalTB04Analysis.cc.

Referenced by fillEvent(), and finalAnalysis().

◆ enois

std::vector<double> HcalTB04Analysis::enois
private

Definition at line 133 of file HcalTB04Analysis.cc.

Referenced by clear(), fillEvent(), finalAnalysis(), and xtalAnalysis().

◆ eqeta

std::vector<double> HcalTB04Analysis::eqeta
private

Definition at line 134 of file HcalTB04Analysis.cc.

Referenced by fillEvent(), finalAnalysis(), and init().

◆ eqie

std::vector<double> HcalTB04Analysis::eqie
private

Definition at line 133 of file HcalTB04Analysis.cc.

Referenced by clear(), fillEvent(), finalAnalysis(), and qieAnalysis().

◆ eqlay

std::vector<double> HcalTB04Analysis::eqlay
private

Definition at line 134 of file HcalTB04Analysis.cc.

Referenced by fillEvent(), finalAnalysis(), and init().

◆ eqphi

std::vector<double> HcalTB04Analysis::eqphi
private

Definition at line 134 of file HcalTB04Analysis.cc.

Referenced by fillEvent(), finalAnalysis(), and init().

◆ eseta

std::vector<double> HcalTB04Analysis::eseta
private

Definition at line 134 of file HcalTB04Analysis.cc.

Referenced by fillEvent(), finalAnalysis(), and init().

◆ esime

std::vector<double> HcalTB04Analysis::esime
private

Definition at line 133 of file HcalTB04Analysis.cc.

Referenced by clear(), fillEvent(), finalAnalysis(), and xtalAnalysis().

◆ esimh

std::vector<double> HcalTB04Analysis::esimh
private

Definition at line 133 of file HcalTB04Analysis.cc.

Referenced by clear(), fillEvent(), finalAnalysis(), and qieAnalysis().

◆ eslay

std::vector<double> HcalTB04Analysis::eslay
private

Definition at line 134 of file HcalTB04Analysis.cc.

Referenced by fillEvent(), finalAnalysis(), and init().

◆ esphi

std::vector<double> HcalTB04Analysis::esphi
private

Definition at line 134 of file HcalTB04Analysis.cc.

Referenced by fillEvent(), finalAnalysis(), and init().

◆ etaInit

double HcalTB04Analysis::etaInit
private

Definition at line 130 of file HcalTB04Analysis.cc.

Referenced by clear(), fillBuffer(), fillEvent(), and finalAnalysis().

◆ etotq

double HcalTB04Analysis::etotq
private

Definition at line 135 of file HcalTB04Analysis.cc.

Referenced by fillEvent(), and finalAnalysis().

◆ etots

double HcalTB04Analysis::etots
private

Definition at line 135 of file HcalTB04Analysis.cc.

Referenced by fillEvent(), and finalAnalysis().

◆ evNum

int HcalTB04Analysis::evNum
private

Definition at line 138 of file HcalTB04Analysis.cc.

Referenced by fillBuffer(), fillEvent(), init(), and update().

◆ hcalHitCache

std::vector<CaloHit> HcalTB04Analysis::hcalHitCache
private

Definition at line 132 of file HcalTB04Analysis.cc.

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

◆ hcalHitLayer

std::vector<CaloHit> HcalTB04Analysis::hcalHitLayer
private

Definition at line 132 of file HcalTB04Analysis.cc.

Referenced by clear(), and fillBuffer().

◆ hcalOnly

const bool HcalTB04Analysis::hcalOnly
private

Definition at line 110 of file HcalTB04Analysis.cc.

Referenced by HcalTB04Analysis(), init(), and update().

◆ histo

HcalTB04Histo* HcalTB04Analysis::histo
private

Definition at line 117 of file HcalTB04Analysis.cc.

Referenced by finalAnalysis(), HcalTB04Analysis(), and ~HcalTB04Analysis().

◆ iceta

int HcalTB04Analysis::iceta
private

Definition at line 119 of file HcalTB04Analysis.cc.

Referenced by finalAnalysis(), and HcalTB04Analysis().

◆ icphi

int HcalTB04Analysis::icphi
private

Definition at line 119 of file HcalTB04Analysis.cc.

Referenced by finalAnalysis(), and HcalTB04Analysis().

◆ idEcal

std::vector<uint32_t> HcalTB04Analysis::idEcal
private

Definition at line 126 of file HcalTB04Analysis.cc.

Referenced by init(), and xtalAnalysis().

◆ idHcal

std::vector<int> HcalTB04Analysis::idHcal
private

Definition at line 125 of file HcalTB04Analysis.cc.

Referenced by fillEvent(), and init().

◆ idTower

std::vector<uint32_t> HcalTB04Analysis::idTower
private

Definition at line 126 of file HcalTB04Analysis.cc.

Referenced by finalAnalysis(), init(), and qieAnalysis().

◆ idXtal

std::vector<int> HcalTB04Analysis::idXtal
private

Definition at line 125 of file HcalTB04Analysis.cc.

Referenced by fillEvent(), and init().

◆ m_Anal

const edm::ParameterSet HcalTB04Analysis::m_Anal
private

Definition at line 109 of file HcalTB04Analysis.cc.

Referenced by HcalTB04Analysis().

◆ mode

const int HcalTB04Analysis::mode
private

Definition at line 111 of file HcalTB04Analysis.cc.

Referenced by fillBuffer(), HcalTB04Analysis(), and init().

◆ myQie

HcalQie* HcalTB04Analysis::myQie
private

Definition at line 116 of file HcalTB04Analysis.cc.

Referenced by HcalTB04Analysis(), qieAnalysis(), and ~HcalTB04Analysis().

◆ names

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

Definition at line 114 of file HcalTB04Analysis.cc.

Referenced by fillBuffer(), and update().

◆ nCrystal

int HcalTB04Analysis::nCrystal
private

Definition at line 124 of file HcalTB04Analysis.cc.

Referenced by clear(), finalAnalysis(), init(), and xtalAnalysis().

◆ nPrimary

int HcalTB04Analysis::nPrimary
private

Definition at line 129 of file HcalTB04Analysis.cc.

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

◆ nTower

int HcalTB04Analysis::nTower
private

Definition at line 124 of file HcalTB04Analysis.cc.

Referenced by clear(), finalAnalysis(), init(), and qieAnalysis().

◆ particleType

int HcalTB04Analysis::particleType
private

Definition at line 129 of file HcalTB04Analysis.cc.

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

◆ phiInit

double HcalTB04Analysis::phiInit
private

Definition at line 130 of file HcalTB04Analysis.cc.

Referenced by clear(), fillBuffer(), fillEvent(), and finalAnalysis().

◆ pInit

double HcalTB04Analysis::pInit
private

Definition at line 130 of file HcalTB04Analysis.cc.

Referenced by clear(), fillBuffer(), fillEvent(), and finalAnalysis().

◆ pvFound

bool HcalTB04Analysis::pvFound
private

Definition at line 137 of file HcalTB04Analysis.cc.

Referenced by clear(), and update().

◆ pvMomentum

G4ThreeVector HcalTB04Analysis::pvMomentum
private

Definition at line 139 of file HcalTB04Analysis.cc.

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

◆ pvPosition

G4ThreeVector HcalTB04Analysis::pvPosition
private

Definition at line 139 of file HcalTB04Analysis.cc.

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

◆ pvType

int HcalTB04Analysis::pvType
private

Definition at line 138 of file HcalTB04Analysis.cc.

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

◆ pvUVW

G4ThreeVector HcalTB04Analysis::pvUVW
private

Definition at line 139 of file HcalTB04Analysis.cc.

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

◆ scaleHB0

const double HcalTB04Analysis::scaleHB0
private

Definition at line 113 of file HcalTB04Analysis.cc.

Referenced by scale().

◆ scaleHB16

const double HcalTB04Analysis::scaleHB16
private

Definition at line 113 of file HcalTB04Analysis.cc.

Referenced by scale().

◆ scaleHE0

const double HcalTB04Analysis::scaleHE0
private

Definition at line 113 of file HcalTB04Analysis.cc.

Referenced by scale().

◆ scaleHO

const double HcalTB04Analysis::scaleHO
private

Definition at line 113 of file HcalTB04Analysis.cc.

Referenced by scale().

◆ secEkin

std::vector<double> HcalTB04Analysis::secEkin
private

Definition at line 142 of file HcalTB04Analysis.cc.

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

◆ secMomentum

std::vector<G4ThreeVector> HcalTB04Analysis::secMomentum
private

Definition at line 141 of file HcalTB04Analysis.cc.

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

◆ secPartID

std::vector<int> HcalTB04Analysis::secPartID
private

Definition at line 140 of file HcalTB04Analysis.cc.

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

◆ secTrackID

std::vector<int> HcalTB04Analysis::secTrackID
private

Definition at line 140 of file HcalTB04Analysis.cc.

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

◆ shortLivedSecondaries

std::vector<int> HcalTB04Analysis::shortLivedSecondaries
private

Definition at line 143 of file HcalTB04Analysis.cc.

Referenced by clear(), and update().

◆ type

const int HcalTB04Analysis::type
private

Definition at line 111 of file HcalTB04Analysis.cc.