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)
 
void produce (edm::Event &, const edm::EventSetup &) override
 
 ~HcalTB04Analysis () override
 
- Public Member Functions inherited from SimProducer
void registerProducts (edm::ProducesCollector producesCollector)
 
 SimProducer ()
 
- Public Member Functions inherited from SimWatcher
 SimWatcher ()
 
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 ()
 
 HcalTB04Analysis (const HcalTB04Analysis &)=delete
 
void init ()
 
const HcalTB04Analysisoperator= (const HcalTB04Analysis &)=delete
 
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
 
double beamOffset
 
int count
 
std::vector< CaloHitecalHitCache
 
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
 
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
 
int mode
 
HcalQiemyQie
 
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
 
double scaleHB0
 
double scaleHB16
 
double scaleHE0
 
double scaleHO
 
std::vector< double > secEkin
 
std::vector< G4ThreeVector > secMomentum
 
std::vector< int > secPartID
 
std::vector< int > secTrackID
 
std::vector< int > shortLivedSecondaries
 
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)
 

Detailed Description

Definition at line 70 of file HcalTB04Analysis.cc.

Constructor & Destructor Documentation

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

Definition at line 146 of file HcalTB04Analysis.cc.

References beamline_RM, beamOffset, ecalNoise, JetChargeProducer_cfi::exp, edm::ParameterSet::getParameter(), hcalOnly, histo, iceta, icphi, init(), createfilelist::int, mode, myQie, names, scaleHB0, scaleHB16, scaleHE0, and scaleHO.

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

Definition at line 192 of file HcalTB04Analysis.cc.

References count, histo, and myQie.

192  {
193  edm::LogInfo("HcalTBSim") << "\n --------> Total number of selected entries"
194  << " : " << count << "\nPointers:: QIE " << myQie << " Histo " << histo;
195  if (myQie) {
196  delete myQie;
197  myQie = nullptr;
198  }
199  if (histo) {
200  delete histo;
201  histo = nullptr;
202  }
203 }
HcalTB04Histo * histo
HcalTB04Analysis::HcalTB04Analysis ( const HcalTB04Analysis )
privatedelete

Member Function Documentation

void HcalTB04Analysis::clear ( void  )
private

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

984  {
985  pvFound = false;
986  pvType = -2;
987  pvPosition = G4ThreeVector();
988  pvMomentum = G4ThreeVector();
989  pvUVW = G4ThreeVector();
990  secTrackID.clear();
991  secPartID.clear();
992  secMomentum.clear();
993  secEkin.clear();
994  shortLivedSecondaries.clear();
995 
996  ecalHitCache.erase(ecalHitCache.begin(), ecalHitCache.end());
997  hcalHitCache.erase(hcalHitCache.begin(), hcalHitCache.end());
998  hcalHitLayer.erase(hcalHitLayer.begin(), hcalHitLayer.end());
999  nPrimary = particleType = 0;
1000  pInit = etaInit = phiInit = 0;
1001 
1002  esimh.clear();
1003  eqie.clear();
1004  esimh.reserve(nTower);
1005  eqie.reserve(nTower);
1006  for (int i = 0; i < nTower; i++) {
1007  esimh.push_back(0.);
1008  eqie.push_back(0.);
1009  }
1010  esime.clear();
1011  enois.clear();
1012  esime.reserve(nCrystal);
1013  enois.reserve(nCrystal);
1014  for (int i = 0; i < nCrystal; i++) {
1015  esime.push_back(0.);
1016  enois.push_back(0.);
1017  }
1018 }
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
void HcalTB04Analysis::fillBuffer ( const EndOfEvent evt)
private

Definition at line 460 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(), GeV, watchdog::group, hcalHitCache, hcalHitLayer, hfClusterShapes_cfi::hits, mps_fire::i, training_settings::idx, LEDCalibrationChannels::ieta, createfilelist::int, LEDCalibrationChannels::iphi, dqmiolumiharvest::j, dqm-mbProfile::log, LogDebug, SiStripPI::max, 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(), mathSSE::sqrt(), AlCaHLTBitMon_QueryRunRegistry::string, funct::tan(), theta(), ntuplemaker::time, timeOfFlight(), unitID(), HcalTestNumbering::unpackHcalIndex(), and z.

Referenced by update().

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

Definition at line 911 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, LogDebug, 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().

911  {
912  //Setup the ID's
913  product.setIDs(idHcal, idXtal);
914 
915  //Beam Information
917 
918  //Energy deposits in the crystals and towers
919  product.setEdepHcal(esimh, eqie);
920  product.setEdepHcal(esime, enois);
921 
922  // Total Energy
923  product.setEdep(etots, eecals, ehcals, etotq, eecalq, ehcalq);
924 
925  // Lateral Profile
926  product.setTrnsProf(eseta, eqeta, esphi, eqphi);
927 
928  // Longitudianl profile
929  product.setLongProf(eslay, eqlay);
930 
931  //Save Hits
932  int i, nhit = 0;
933  std::vector<CaloHit>::iterator itr;
934  for (i = 0, itr = ecalHitCache.begin(); itr != ecalHitCache.end(); i++, itr++) {
935  uint32_t id = itr->id();
936  int det, z, group, ieta, iphi, lay;
937  HcalTestNumbering::unpackHcalIndex(id, det, z, group, ieta, iphi, lay);
938  product.saveHit(det, lay, ieta, iphi, itr->e(), itr->t());
939  nhit++;
940 #ifdef debug
941  LogDebug("HcalTBSim") << "HcalTB04Analysis:: Save Hit " << std::setw(3) << i + 1 << " ID 0x" << std::hex << group
942  << std::dec << " " << std::setw(2) << det << " " << std::setw(2) << lay << " " << std::setw(1)
943  << z << " " << std::setw(3) << ieta << " " << std::setw(3) << iphi << " T " << std::setw(6)
944  << itr->t() << " E " << std::setw(6) << itr->e();
945 #endif
946  }
947  LogDebug("HcalTBSim") << "HcalTB04Analysis:: Saves " << nhit << " hits from Crystals";
948  int hit = nhit;
949  nhit = 0;
950 
951  for (i = hit, itr = hcalHitCache.begin(); itr != hcalHitCache.end(); i++, itr++) {
952  uint32_t id = itr->id();
953  int det, z, group, ieta, iphi, lay;
954  HcalTestNumbering::unpackHcalIndex(id, det, z, group, ieta, iphi, lay);
955  product.saveHit(det, lay, ieta, iphi, itr->e(), itr->t());
956  nhit++;
957 #ifdef debug
958  LogDebug("HcalTBSim") << "HcalTB04Analysis:: Save Hit " << std::setw(3) << i + 1 << " ID 0x" << std::hex << group
959  << std::dec << " " << std::setw(2) << det << " " << std::setw(2) << lay << " " << std::setw(1)
960  << z << " " << std::setw(3) << ieta << " " << std::setw(3) << iphi << " T " << std::setw(6)
961  << itr->t() << " E " << std::setw(6) << itr->e();
962 #endif
963  }
964  LogDebug("HcalTBSim") << "HcalTB04Analysis:: Saves " << nhit << " hits from HCal";
965 
966  //Vertex associated quantities
967  product.setVtxPrim(evNum,
968  pvType,
969  pvPosition.x(),
970  pvPosition.y(),
971  pvPosition.z(),
972  pvUVW.x(),
973  pvUVW.y(),
974  pvUVW.z(),
975  pvMomentum.x(),
976  pvMomentum.y(),
977  pvMomentum.z());
978  for (unsigned int i = 0; i < secTrackID.size(); i++) {
979  product.setVtxSec(
980  secTrackID[i], secPartID[i], secMomentum[i].x(), secMomentum[i].y(), secMomentum[i].z(), secEkin[i]);
981  }
982 }
#define LogDebug(id)
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
void HcalTB04Analysis::finalAnalysis ( )
private

Definition at line 804 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, triggerObjects_cff::id, idTower, LEDCalibrationChannels::ieta, LEDCalibrationChannels::iphi, LogDebug, nCrystal, nTower, phiInit, pInit, HcalTestNumbering::unpackHcalIndex(), and z.

Referenced by update().

804  {
805  //Beam Information
807 
808  // Total Energy
809  eecals = ehcals = eecalq = ehcalq = 0.;
810  for (int i = 0; i < nTower; i++) {
811  ehcals += esimh[i];
812  ehcalq += eqie[i];
813  }
814  for (int i = 0; i < nCrystal; i++) {
815  eecals += esime[i];
816  eecalq += enois[i];
817  }
818  etots = eecals + ehcals;
819  etotq = eecalq + ehcalq;
820  LogDebug("HcalTBSim") << "HcalTB04Analysis:: Energy deposit at Sim Level "
821  << "(Total) " << etots << " (ECal) " << eecals << " (HCal) " << ehcals
822  << "\nHcalTB04Analysis:: "
823  << "Energy deposit at Qie Level (Total) " << etotq << " (ECal) " << eecalq << " (HCal) "
824  << ehcalq;
825  histo->fillEdep(etots, eecals, ehcals, etotq, eecalq, ehcalq);
826 
827  // Lateral Profile
828  for (int i = 0; i < 5; i++) {
829  eseta[i] = 0.;
830  eqeta[i] = 0.;
831  }
832  for (int i = 0; i < 3; i++) {
833  esphi[i] = 0.;
834  eqphi[i] = 0.;
835  }
836  double e1 = 0, e2 = 0;
837  unsigned int id;
838  for (int i = 0; i < nTower; i++) {
839  int det, z, group, ieta, iphi, layer;
840  id = idTower[i];
841  HcalTestNumbering::unpackHcalIndex(id, det, z, group, ieta, iphi, layer);
842  iphi -= (icphi - 1);
843  if (icphi > 4) {
844  if (ieta == 0)
845  ieta = 2;
846  else
847  ieta = -1;
848  } else {
849  ieta = ieta - iceta + 2;
850  }
851  if (iphi >= 0 && iphi < 3 && ieta >= 0 && ieta < 5) {
852  eseta[ieta] += esimh[i];
853  esphi[iphi] += esimh[i];
854  e1 += esimh[i];
855  eqeta[ieta] += eqie[i];
856  eqphi[iphi] += eqie[i];
857  e2 += eqie[i];
858  }
859  }
860  for (int i = 0; i < 3; i++) {
861  if (e1 > 0)
862  esphi[i] /= e1;
863  if (e2 > 0)
864  eqphi[i] /= e2;
865  }
866  for (int i = 0; i < 5; i++) {
867  if (e1 > 0)
868  eseta[i] /= e1;
869  if (e2 > 0)
870  eqeta[i] /= e2;
871  }
872  LogDebug("HcalTBSim") << "HcalTB04Analysis:: Energy fraction along Eta and"
873  << " Phi (Sim/Qie)";
874  for (int i = 0; i < 5; i++)
875  LogDebug("HcalTBSim") << "HcalTB04Analysis:: [" << i << "] Eta Sim = " << eseta[i] << " Qie = " << eqeta[i]
876  << " Phi Sim = " << esphi[i] << " Qie = " << eqphi[i];
877  histo->fillTrnsProf(eseta, eqeta, esphi, eqphi);
878 
879  // Longitudianl profile
880  for (int i = 0; i < 20; i++) {
881  eslay[i] = 0.;
882  eqlay[i] = 0.;
883  }
884  e1 = 0;
885  e2 = 0;
886  for (int i = 0; i < nTower; i++) {
887  int det, z, group, ieta, iphi, layer;
888  id = idTower[i];
889  HcalTestNumbering::unpackHcalIndex(id, det, z, group, ieta, iphi, layer);
890  iphi -= (icphi - 1);
891  layer -= 1;
892  if (iphi >= 0 && iphi < 3 && layer >= 0 && layer < 20) {
893  eslay[layer] += esimh[i];
894  e1 += esimh[i];
895  eqlay[layer] += eqie[i];
896  e2 += eqie[i];
897  }
898  }
899  for (int i = 0; i < 20; i++) {
900  if (e1 > 0)
901  eslay[i] /= e1;
902  if (e2 > 0)
903  eqlay[i] /= e2;
904  }
905  LogDebug("HcalTBSim") << "HcalTB04Analysis:: Energy fraction along Layer";
906  for (int i = 0; i < 20; i++)
907  LogDebug("HcalTBSim") << "HcalTB04Analysis:: [" << i << "] Sim = " << eslay[i] << " Qie = " << eqlay[i];
908  histo->fillLongProf(eslay, eqlay);
909 }
#define LogDebug(id)
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
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)
void HcalTB04Analysis::init ( void  )
private

Definition at line 215 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, LogDebug, mode, nCrystal, nTower, HcalTestNumbering::packHcalIndex(), and unitID().

Referenced by HcalTB04Analysis().

215  {
217  nTower = idTower.size();
218  edm::LogInfo("HcalTBSim") << "HcalTB04Analysis:: Save information from " << nTower << " HCal towers";
219  idHcal.reserve(nTower);
220  for (int i = 0; i < nTower; i++) {
221  int id = unitID(idTower[i]);
222  idHcal.push_back(id);
223  LogDebug("HcalTBSim") << "\tTower[" << i << "] Original " << std::hex << idTower[i] << " Stored " << idHcal[i]
224  << std::dec;
225  }
226 
227  if (!hcalOnly) {
228  int det = 10;
229  uint32_t id1;
230  nCrystal = 0;
231  for (int lay = 1; lay < 8; lay++) {
232  for (int icr = 1; icr < 8; icr++) {
233  id1 = HcalTestNumbering::packHcalIndex(det, 0, 1, icr, lay, 1);
234  int id = unitID(id1);
235  idEcal.push_back(id1);
236  idXtal.push_back(id);
237  nCrystal++;
238  }
239  }
240  edm::LogInfo("HcalTBSim") << "HcalTB04Analysis:: Save information from " << nCrystal << " ECal Crystals";
241  for (int i = 0; i < nCrystal; i++) {
242  LogDebug("HcalTBSim") << "\tCrystal[" << i << "] Original " << std::hex << idEcal[i] << " Stored " << idXtal[i]
243  << std::dec;
244  }
245  }
246  // Profile vectors
247  eseta.reserve(5);
248  eqeta.reserve(5);
249  esphi.reserve(3);
250  eqphi.reserve(3);
251  eslay.reserve(20);
252  eqlay.reserve(20);
253  for (int i = 0; i < 5; i++) {
254  eseta.push_back(0.);
255  eqeta.push_back(0.);
256  }
257  for (int i = 0; i < 3; i++) {
258  esphi.push_back(0.);
259  eqphi.push_back(0.);
260  }
261  for (int i = 0; i < 20; i++) {
262  eslay.push_back(0.);
263  eqlay.push_back(0.);
264  }
265 
266  // counter
267  count = 0;
268  evNum = 0;
269  clear();
270 }
#define LogDebug(id)
type
Definition: HCALResponse.h:21
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
const HcalTB04Analysis& HcalTB04Analysis::operator= ( const HcalTB04Analysis )
privatedelete
void HcalTB04Analysis::produce ( edm::Event e,
const edm::EventSetup  
)
overridevirtual

Implements SimProducer.

Definition at line 209 of file HcalTB04Analysis.cc.

References fillEvent(), eostools::move(), and edm::Event::put().

209  {
210  std::unique_ptr<PHcalTB04Info> product(new PHcalTB04Info);
211  fillEvent(*product);
212  e.put(std::move(product));
213 }
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
Definition: Event.h:131
def move(src, dest)
Definition: eostools.py:511
void fillEvent(PHcalTB04Info &)
void HcalTB04Analysis::qieAnalysis ( CLHEP::HepRandomEngine *  engine)
private

Definition at line 700 of file HcalTB04Analysis.cc.

References hippyaddtobaddatafiles::cd(), TauDecayModes::dec, CaloHit::e(), Vispa.Plugins.EdmBrowser.EdmDataAccessor::eq(), eqie, esimh, HcalQie::getCode(), HcalQie::getEnergy(), hcalHitCache, hfClusterShapes_cfi::hits, CaloHit::id(), triggerObjects_cff::id, idTower, LogDebug, myQie, nTower, and DQMOfflineHeavyIons_cff::todo.

Referenced by update().

700  {
701  int hittot = hcalHitCache.size();
702  if (hittot <= 0)
703  hittot = 1;
704  std::vector<CaloHit> hits(hittot);
705  std::vector<int> todo(nTower, 0);
706 
707  LogDebug("HcalTBSim") << "HcalTB04Analysis::qieAnalysis: Size " << hits.size() << " " << todo.size() << " "
708  << idTower.size() << " " << esimh.size() << " " << eqie.size();
709  // Loop over all HCal hits
710  for (unsigned int k1 = 0; k1 < hcalHitCache.size(); k1++) {
711  CaloHit hit = hcalHitCache[k1];
712  uint32_t id = hit.id();
713  int nhit = 0;
714  double esim = hit.e();
715  hits[nhit] = hit;
716  for (unsigned int k2 = k1 + 1; k2 < hcalHitCache.size(); k2++) {
717  hit = hcalHitCache[k2];
718  if (hit.id() == id) {
719  nhit++;
720  hits[nhit] = hit;
721  esim += hit.e();
722  }
723  }
724  k1 += nhit;
725  nhit++;
726  std::vector<int> cd = myQie->getCode(nhit, hits, engine);
727  double eq = myQie->getEnergy(cd);
728  LogDebug("HcalTBSim") << "HcalTB04Analysis:: ID 0x" << std::hex << id << std::dec << " registers " << esim
729  << " energy "
730  << "from " << nhit << " hits starting with hit # " << k1 << " energy with noise " << eq;
731  for (int k2 = 0; k2 < nTower; k2++) {
732  if (id == idTower[k2]) {
733  todo[k2] = 1;
734  esimh[k2] = esim;
735  eqie[k2] = eq;
736  }
737  }
738  }
739 
740  // Towers with no hit
741  for (int k2 = 0; k2 < nTower; k2++) {
742  if (todo[k2] == 0) {
743  std::vector<int> cd = myQie->getCode(0, hits, engine);
744  double eq = myQie->getEnergy(cd);
745  esimh[k2] = 0;
746  eqie[k2] = eq;
747 #ifdef ddebug
748  LogDebug("HcalTBSim") << "HcalTB04Analysis:: ID 0x" << std::hex << idTower[k2] << std::dec << " registers "
749  << esimh[k2] << " energy from hits and energy "
750  << "after QIE analysis " << eqie[k2];
751 #endif
752  }
753  }
754 }
#define LogDebug(id)
std::vector< double > eqie
uint32_t id() const
Definition: CaloHit.h:25
double getEnergy(const std::vector< int > &)
Definition: HcalQie.cc:354
std::vector< CaloHit > hcalHitCache
double e() const
Definition: CaloHit.h:21
std::vector< int > getCode(int, const std::vector< CaloHit > &, CLHEP::HepRandomEngine *)
Definition: HcalQie.cc:268
std::vector< uint32_t > idTower
std::vector< double > esimh
double HcalTB04Analysis::scale ( int  det,
int  layer 
)
private

Definition at line 1031 of file HcalTB04Analysis.cc.

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

Referenced by fillBuffer().

1031  {
1032  double tmp = 1.;
1033  if (det == static_cast<int>(HcalBarrel)) {
1034  if (layer == 1)
1035  tmp = scaleHB0;
1036  else if (layer == 17)
1037  tmp = scaleHB16;
1038  else if (layer > 17)
1039  tmp = scaleHO;
1040  } else {
1041  if (layer <= 2)
1042  tmp = scaleHE0;
1043  }
1044  return tmp;
1045 }
tmp
align.sh
Definition: createJobs.py:716
double HcalTB04Analysis::timeOfFlight ( int  det,
int  layer,
double  eta 
)
private

Definition at line 1047 of file HcalTB04Analysis.cc.

References beamOffset, funct::cos(), DEFINE_SIMWATCHER, JetChargeProducer_cfi::exp, HcalBarrel, LogDebug, funct::sin(), theta(), and createJobs::tmp.

Referenced by fillBuffer().

1047  {
1048  double theta = 2.0 * atan(exp(-eta));
1049  double dist = beamOffset;
1050  if (det == static_cast<int>(HcalBarrel)) {
1051  const double rLay[19] = {1836.0,
1052  1902.0,
1053  1962.0,
1054  2022.0,
1055  2082.0,
1056  2142.0,
1057  2202.0,
1058  2262.0,
1059  2322.0,
1060  2382.0,
1061  2448.0,
1062  2514.0,
1063  2580.0,
1064  2646.0,
1065  2712.0,
1066  2776.0,
1067  2862.5,
1068  3847.0,
1069  4052.0};
1070  if (layer > 0 && layer <= 19)
1071  dist += rLay[layer - 1] * mm / sin(theta);
1072  } else {
1073  const double zLay[19] = {4034.0,
1074  4032.0,
1075  4123.0,
1076  4210.0,
1077  4297.0,
1078  4384.0,
1079  4471.0,
1080  4558.0,
1081  4645.0,
1082  4732.0,
1083  4819.0,
1084  4906.0,
1085  4993.0,
1086  5080.0,
1087  5167.0,
1088  5254.0,
1089  5341.0,
1090  5428.0,
1091  5515.0};
1092  if (layer > 0 && layer <= 19)
1093  dist += zLay[layer - 1] * mm / cos(theta);
1094  }
1095 
1096  double tmp = dist / c_light / ns;
1097 #ifdef ddebug
1098  LogDebug("HcalTBSim") << "HcalTB04Analysis::timeOfFlight " << tmp << " for det/lay " << det << " " << layer
1099  << " eta/theta " << eta << " " << theta / deg << " dist " << dist;
1100 #endif
1101  return tmp;
1102 }
#define LogDebug(id)
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
Geom::Theta< T > theta() const
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
tmp
align.sh
Definition: createJobs.py:716
int HcalTB04Analysis::unitID ( uint32_t  id)
private

Definition at line 1020 of file HcalTB04Analysis.cc.

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

Referenced by fillBuffer(), and init().

1020  {
1021  int det, z, group, ieta, iphi, lay;
1022  HcalTestNumbering::unpackHcalIndex(id, det, z, group, ieta, iphi, lay);
1023  group = (det & 15) << 20;
1024  group += ((lay - 1) & 31) << 15;
1025  group += (z & 1) << 14;
1026  group += (ieta & 127) << 7;
1027  group += (iphi & 127);
1028  return group;
1029 }
static void unpackHcalIndex(const uint32_t &idx, int &det, int &z, int &depth, int &eta, int &phi, int &lay)
void HcalTB04Analysis::update ( const BeginOfRun )
overrideprivatevirtual

This routine will be called when the appropriate signal arrives.

Implements Observer< const BeginOfRun * >.

Definition at line 272 of file HcalTB04Analysis.cc.

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

Referenced by progressbar.ProgressBar::__next__(), MatrixUtil.Matrix::__setitem__(), MatrixUtil.Steps::__setitem__(), Vispa.Gui.VispaWidget.VispaWidget::autosize(), Vispa.Views.LineDecayView.LineDecayContainer::createObject(), Vispa.Views.LineDecayView.LineDecayContainer::deselectAllObjects(), Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::deselectAllWidgets(), Vispa.Gui.VispaWidget.VispaWidget::enableAutosizing(), progressbar.ProgressBar::finish(), Vispa.Gui.MenuWidget.MenuWidget::leaveEvent(), Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::mouseMoveEvent(), Vispa.Gui.MenuWidget.MenuWidget::mouseMoveEvent(), Vispa.Views.LineDecayView.LineDecayContainer::mouseMoveEvent(), Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::mouseReleaseEvent(), Vispa.Views.LineDecayView.LineDecayContainer::objectMoved(), MatrixUtil.Steps::overwrite(), Vispa.Views.LineDecayView.LineDecayContainer::removeObject(), Vispa.Gui.ConnectableWidget.ConnectableWidget::removePorts(), Vispa.Gui.FindDialog.FindDialog::reset(), Vispa.Gui.PortConnection.PointToPointConnection::select(), Vispa.Gui.VispaWidget.VispaWidget::select(), Vispa.Views.LineDecayView.LineDecayContainer::select(), Vispa.Gui.VispaWidget.VispaWidget::setText(), Vispa.Gui.VispaWidget.VispaWidget::setTitle(), Vispa.Gui.ZoomableWidget.ZoomableWidget::setZoom(), Vispa.Views.LineDecayView.LineDecayContainer::setZoom(), and Vispa.Gui.PortConnection.PointToPointConnection::updateConnection().

272  {
273  int irun = (*run)()->GetRunID();
274  edm::LogInfo("HcalTBSim") << " =====> Begin of Run = " << irun;
275 
276  G4SDManager* sd = G4SDManager::GetSDMpointerIfExist();
277  if (sd != nullptr) {
278  std::string sdname = names[0];
279  G4VSensitiveDetector* aSD = sd->FindSensitiveDetector(sdname);
280  if (aSD == nullptr) {
281  edm::LogWarning("HcalTBSim") << "HcalTB04Analysis::beginOfRun: No SD"
282  << " with name " << sdname << " in this "
283  << "Setup";
284  } else {
285  HCalSD* theCaloSD = dynamic_cast<HCalSD*>(aSD);
286  edm::LogInfo("HcalTBSim") << "HcalTB04Analysis::beginOfRun: Finds SD "
287  << "with name " << theCaloSD->GetName() << " in this Setup";
289  theCaloSD->setNumberingScheme(org);
290  edm::LogInfo("HcalTBSim") << "HcalTB04Analysis::beginOfRun: set a "
291  << "new numbering scheme";
292  }
293  if (!hcalOnly) {
294  sdname = names[1];
295  aSD = sd->FindSensitiveDetector(sdname);
296  if (aSD == nullptr) {
297  edm::LogWarning("HcalTBSim") << "HcalTB04Analysis::beginOfRun: No SD"
298  << " with name " << sdname << " in this "
299  << "Setup";
300  } else {
301  ECalSD* theCaloSD = dynamic_cast<ECalSD*>(aSD);
302  edm::LogInfo("HcalTBSim") << "HcalTB04Analysis::beginOfRun: Finds SD "
303  << "with name " << theCaloSD->GetName() << " in this Setup";
305  theCaloSD->setNumberingScheme(org);
306  edm::LogInfo("HcalTBSim") << "HcalTB04Analysis::beginOfRun: set a "
307  << "new numbering scheme";
308  }
309  }
310  } else {
311  edm::LogWarning("HcalTBSim") << "HcalTB04Analysis::beginOfRun: Could "
312  << "not get SD Manager!";
313  }
314 }
void setNumberingScheme(HcalNumberingScheme *)
Definition: HCalSD.cc:550
Definition: HCalSD.h:38
Definition: ECalSD.h:30
double sd
void setNumberingScheme(EcalNumberingScheme *)
Definition: ECalSD.cc:308
std::vector< std::string > names
void HcalTB04Analysis::update ( const BeginOfEvent )
overrideprivatevirtual

This routine will be called when the appropriate signal arrives.

Implements Observer< const BeginOfEvent * >.

Definition at line 316 of file HcalTB04Analysis.cc.

References clear(), and evNum.

Referenced by progressbar.ProgressBar::__next__(), MatrixUtil.Matrix::__setitem__(), MatrixUtil.Steps::__setitem__(), Vispa.Gui.VispaWidget.VispaWidget::autosize(), Vispa.Views.LineDecayView.LineDecayContainer::createObject(), Vispa.Views.LineDecayView.LineDecayContainer::deselectAllObjects(), Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::deselectAllWidgets(), Vispa.Gui.VispaWidget.VispaWidget::enableAutosizing(), progressbar.ProgressBar::finish(), Vispa.Gui.MenuWidget.MenuWidget::leaveEvent(), Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::mouseMoveEvent(), Vispa.Gui.MenuWidget.MenuWidget::mouseMoveEvent(), Vispa.Views.LineDecayView.LineDecayContainer::mouseMoveEvent(), Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::mouseReleaseEvent(), Vispa.Views.LineDecayView.LineDecayContainer::objectMoved(), MatrixUtil.Steps::overwrite(), Vispa.Views.LineDecayView.LineDecayContainer::removeObject(), Vispa.Gui.ConnectableWidget.ConnectableWidget::removePorts(), Vispa.Gui.FindDialog.FindDialog::reset(), Vispa.Gui.PortConnection.PointToPointConnection::select(), Vispa.Gui.VispaWidget.VispaWidget::select(), Vispa.Views.LineDecayView.LineDecayContainer::select(), Vispa.Gui.VispaWidget.VispaWidget::setText(), Vispa.Gui.VispaWidget.VispaWidget::setTitle(), Vispa.Gui.ZoomableWidget.ZoomableWidget::setZoom(), Vispa.Views.LineDecayView.LineDecayContainer::setZoom(), and Vispa.Gui.PortConnection.PointToPointConnection::updateConnection().

316  {
317  evNum = (*evt)()->GetEventID();
318  clear();
319  edm::LogInfo("HcalTBSim") << "HcalTB04Analysis: =====> Begin of event = " << evNum;
320 }
void HcalTB04Analysis::update ( const G4Step *  )
overrideprivatevirtual

This routine will be called when the appropriate signal arrives.

Implements Observer< const G4Step * >.

Definition at line 322 of file HcalTB04Analysis.cc.

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

Referenced by progressbar.ProgressBar::__next__(), MatrixUtil.Matrix::__setitem__(), MatrixUtil.Steps::__setitem__(), Vispa.Gui.VispaWidget.VispaWidget::autosize(), Vispa.Views.LineDecayView.LineDecayContainer::createObject(), Vispa.Views.LineDecayView.LineDecayContainer::deselectAllObjects(), Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::deselectAllWidgets(), Vispa.Gui.VispaWidget.VispaWidget::enableAutosizing(), progressbar.ProgressBar::finish(), Vispa.Gui.MenuWidget.MenuWidget::leaveEvent(), Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::mouseMoveEvent(), Vispa.Gui.MenuWidget.MenuWidget::mouseMoveEvent(), Vispa.Views.LineDecayView.LineDecayContainer::mouseMoveEvent(), Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::mouseReleaseEvent(), Vispa.Views.LineDecayView.LineDecayContainer::objectMoved(), MatrixUtil.Steps::overwrite(), Vispa.Views.LineDecayView.LineDecayContainer::removeObject(), Vispa.Gui.ConnectableWidget.ConnectableWidget::removePorts(), Vispa.Gui.FindDialog.FindDialog::reset(), Vispa.Gui.PortConnection.PointToPointConnection::select(), Vispa.Gui.VispaWidget.VispaWidget::select(), Vispa.Views.LineDecayView.LineDecayContainer::select(), Vispa.Gui.VispaWidget.VispaWidget::setText(), Vispa.Gui.VispaWidget.VispaWidget::setTitle(), Vispa.Gui.ZoomableWidget.ZoomableWidget::setZoom(), Vispa.Views.LineDecayView.LineDecayContainer::setZoom(), and Vispa.Gui.PortConnection.PointToPointConnection::updateConnection().

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

This routine will be called when the appropriate signal arrives.

Implements Observer< const EndOfEvent * >.

Definition at line 427 of file HcalTB04Analysis.cc.

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

Referenced by progressbar.ProgressBar::__next__(), MatrixUtil.Matrix::__setitem__(), MatrixUtil.Steps::__setitem__(), Vispa.Gui.VispaWidget.VispaWidget::autosize(), Vispa.Views.LineDecayView.LineDecayContainer::createObject(), Vispa.Views.LineDecayView.LineDecayContainer::deselectAllObjects(), Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::deselectAllWidgets(), Vispa.Gui.VispaWidget.VispaWidget::enableAutosizing(), progressbar.ProgressBar::finish(), Vispa.Gui.MenuWidget.MenuWidget::leaveEvent(), Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::mouseMoveEvent(), Vispa.Gui.MenuWidget.MenuWidget::mouseMoveEvent(), Vispa.Views.LineDecayView.LineDecayContainer::mouseMoveEvent(), Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::mouseReleaseEvent(), Vispa.Views.LineDecayView.LineDecayContainer::objectMoved(), MatrixUtil.Steps::overwrite(), Vispa.Views.LineDecayView.LineDecayContainer::removeObject(), Vispa.Gui.ConnectableWidget.ConnectableWidget::removePorts(), Vispa.Gui.FindDialog.FindDialog::reset(), Vispa.Gui.PortConnection.PointToPointConnection::select(), Vispa.Gui.VispaWidget.VispaWidget::select(), Vispa.Views.LineDecayView.LineDecayContainer::select(), Vispa.Gui.VispaWidget.VispaWidget::setText(), Vispa.Gui.VispaWidget.VispaWidget::setTitle(), Vispa.Gui.ZoomableWidget.ZoomableWidget::setZoom(), Vispa.Views.LineDecayView.LineDecayContainer::setZoom(), and Vispa.Gui.PortConnection.PointToPointConnection::updateConnection().

427  {
428  count++;
429 
430  //fill the buffer
431  LogDebug("HcalTBSim") << "HcalTB04Analysis::Fill event " << (*evt)()->GetEventID();
432  fillBuffer(evt);
433 
434  //QIE analysis
435  LogDebug("HcalTBSim") << "HcalTB04Analysis::Do QIE analysis with " << hcalHitCache.size() << " hits";
436  CLHEP::HepRandomEngine* engine = G4Random::getTheEngine();
437  qieAnalysis(engine);
438 
439  //Energy in Crystal Matrix
440  if (!hcalOnly) {
441  LogDebug("HcalTBSim") << "HcalTB04Analysis::Do Xtal analysis with " << ecalHitCache.size() << " hits";
442  xtalAnalysis(engine);
443  }
444 
445  //Final Analysis
446  LogDebug("HcalTBSim") << "HcalTB04Analysis::Final analysis";
447  finalAnalysis();
448 
449  int iEvt = (*evt)()->GetEventID();
450  if (iEvt < 10)
451  edm::LogInfo("HcalTBSim") << "HcalTB04Analysis:: Event " << iEvt;
452  else if ((iEvt < 100) && (iEvt % 10 == 0))
453  edm::LogInfo("HcalTBSim") << "HcalTB04Analysis:: Event " << iEvt;
454  else if ((iEvt < 1000) && (iEvt % 100 == 0))
455  edm::LogInfo("HcalTBSim") << "HcalTB04Analysis:: Event " << iEvt;
456  else if ((iEvt < 10000) && (iEvt % 1000 == 0))
457  edm::LogInfo("HcalTBSim") << "HcalTB04Analysis:: Event " << iEvt;
458 }
#define LogDebug(id)
void fillBuffer(const EndOfEvent *evt)
std::vector< CaloHit > hcalHitCache
void xtalAnalysis(CLHEP::HepRandomEngine *)
std::vector< CaloHit > ecalHitCache
void qieAnalysis(CLHEP::HepRandomEngine *)
void HcalTB04Analysis::xtalAnalysis ( CLHEP::HepRandomEngine *  engine)
private

Definition at line 756 of file HcalTB04Analysis.cc.

References TauDecayModes::dec, ecalHitCache, ecalNoise, enois, Vispa.Plugins.EdmBrowser.EdmDataAccessor::eq(), esime, triggerObjects_cff::id, idEcal, LogDebug, and nCrystal.

Referenced by update().

756  {
757  CLHEP::RandGaussQ randGauss(*engine);
758 
759  // Crystal Data
760  std::vector<int> iok(nCrystal, 0);
761  LogDebug("HcalTBSim") << "HcalTB04Analysis::xtalAnalysis: Size " << iok.size() << " " << idEcal.size() << " "
762  << esime.size() << " " << enois.size();
763  for (unsigned int k1 = 0; k1 < ecalHitCache.size(); k1++) {
764  uint32_t id = ecalHitCache[k1].id();
765  int nhit = 0;
766  double esim = ecalHitCache[k1].e();
767  for (unsigned int k2 = k1 + 1; k2 < ecalHitCache.size(); k2++) {
768  if (ecalHitCache[k2].id() == id) {
769  nhit++;
770  esim += ecalHitCache[k2].e();
771  }
772  }
773  k1 += nhit;
774  nhit++;
775  double eq = esim + randGauss.fire(0., ecalNoise);
776 #ifdef ddebug
777  LogDebug("HcalTBSim") << "HcalTB04Analysis:: ID 0x" << std::hex << id << std::dec << " registers " << esim
778  << " energy "
779  << "from " << nhit << " hits starting with hit # " << k1 << " energy with noise " << eq;
780 #endif
781  for (int k2 = 0; k2 < nCrystal; k2++) {
782  if (id == idEcal[k2]) {
783  iok[k2] = 1;
784  esime[k2] = esim;
785  enois[k2] = eq;
786  }
787  }
788  }
789 
790  // Crystals with no hit
791  for (int k2 = 0; k2 < nCrystal; k2++) {
792  if (iok[k2] == 0) {
793  esime[k2] = 0;
794  enois[k2] = randGauss.fire(0., ecalNoise);
795 #ifdef ddebug
796  LogDebug("HcalTBSim") << "HcalTB04Analysis:: ID 0x" << std::hex << idEcal[k2] << std::dec << " registers "
797  << esime[k2] << " energy from hits and energy from"
798  << " noise " << enois[k2];
799 #endif
800  }
801  }
802 }
#define LogDebug(id)
std::vector< uint32_t > idEcal
std::vector< double > esime
std::vector< CaloHit > ecalHitCache
std::vector< double > enois

Member Data Documentation

G4RotationMatrix* HcalTB04Analysis::beamline_RM
private

Definition at line 116 of file HcalTB04Analysis.cc.

Referenced by HcalTB04Analysis().

double HcalTB04Analysis::beamOffset
private

Definition at line 112 of file HcalTB04Analysis.cc.

Referenced by HcalTB04Analysis(), and timeOfFlight().

int HcalTB04Analysis::count
private

Definition at line 119 of file HcalTB04Analysis.cc.

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

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

Definition at line 127 of file HcalTB04Analysis.cc.

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

double HcalTB04Analysis::ecalNoise
private

Definition at line 112 of file HcalTB04Analysis.cc.

Referenced by HcalTB04Analysis(), and xtalAnalysis().

double HcalTB04Analysis::eecalq
private

Definition at line 131 of file HcalTB04Analysis.cc.

Referenced by fillEvent(), and finalAnalysis().

double HcalTB04Analysis::eecals
private

Definition at line 131 of file HcalTB04Analysis.cc.

Referenced by fillEvent(), and finalAnalysis().

double HcalTB04Analysis::ehcalq
private

Definition at line 131 of file HcalTB04Analysis.cc.

Referenced by fillEvent(), and finalAnalysis().

double HcalTB04Analysis::ehcals
private

Definition at line 131 of file HcalTB04Analysis.cc.

Referenced by fillEvent(), and finalAnalysis().

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

Definition at line 129 of file HcalTB04Analysis.cc.

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

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

Definition at line 130 of file HcalTB04Analysis.cc.

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

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

Definition at line 129 of file HcalTB04Analysis.cc.

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

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

Definition at line 130 of file HcalTB04Analysis.cc.

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

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

Definition at line 130 of file HcalTB04Analysis.cc.

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

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

Definition at line 130 of file HcalTB04Analysis.cc.

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

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

Definition at line 129 of file HcalTB04Analysis.cc.

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

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

Definition at line 129 of file HcalTB04Analysis.cc.

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

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

Definition at line 130 of file HcalTB04Analysis.cc.

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

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

Definition at line 130 of file HcalTB04Analysis.cc.

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

double HcalTB04Analysis::etaInit
private

Definition at line 126 of file HcalTB04Analysis.cc.

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

double HcalTB04Analysis::etotq
private

Definition at line 131 of file HcalTB04Analysis.cc.

Referenced by fillEvent(), and finalAnalysis().

double HcalTB04Analysis::etots
private

Definition at line 131 of file HcalTB04Analysis.cc.

Referenced by fillEvent(), and finalAnalysis().

int HcalTB04Analysis::evNum
private

Definition at line 134 of file HcalTB04Analysis.cc.

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

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

Definition at line 128 of file HcalTB04Analysis.cc.

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

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

Definition at line 128 of file HcalTB04Analysis.cc.

Referenced by clear(), and fillBuffer().

bool HcalTB04Analysis::hcalOnly
private

Definition at line 110 of file HcalTB04Analysis.cc.

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

HcalTB04Histo* HcalTB04Analysis::histo
private

Definition at line 107 of file HcalTB04Analysis.cc.

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

int HcalTB04Analysis::iceta
private

Definition at line 113 of file HcalTB04Analysis.cc.

Referenced by finalAnalysis(), and HcalTB04Analysis().

int HcalTB04Analysis::icphi
private

Definition at line 113 of file HcalTB04Analysis.cc.

Referenced by finalAnalysis(), and HcalTB04Analysis().

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

Definition at line 122 of file HcalTB04Analysis.cc.

Referenced by init(), and xtalAnalysis().

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

Definition at line 121 of file HcalTB04Analysis.cc.

Referenced by fillEvent(), and init().

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

Definition at line 122 of file HcalTB04Analysis.cc.

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

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

Definition at line 121 of file HcalTB04Analysis.cc.

Referenced by fillEvent(), and init().

int HcalTB04Analysis::mode
private

Definition at line 111 of file HcalTB04Analysis.cc.

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

HcalQie* HcalTB04Analysis::myQie
private

Definition at line 106 of file HcalTB04Analysis.cc.

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

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

Definition at line 115 of file HcalTB04Analysis.cc.

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

int HcalTB04Analysis::nCrystal
private

Definition at line 120 of file HcalTB04Analysis.cc.

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

int HcalTB04Analysis::nPrimary
private

Definition at line 125 of file HcalTB04Analysis.cc.

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

int HcalTB04Analysis::nTower
private

Definition at line 120 of file HcalTB04Analysis.cc.

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

int HcalTB04Analysis::particleType
private

Definition at line 125 of file HcalTB04Analysis.cc.

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

double HcalTB04Analysis::phiInit
private

Definition at line 126 of file HcalTB04Analysis.cc.

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

double HcalTB04Analysis::pInit
private

Definition at line 126 of file HcalTB04Analysis.cc.

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

bool HcalTB04Analysis::pvFound
private

Definition at line 133 of file HcalTB04Analysis.cc.

Referenced by clear(), and update().

G4ThreeVector HcalTB04Analysis::pvMomentum
private

Definition at line 135 of file HcalTB04Analysis.cc.

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

G4ThreeVector HcalTB04Analysis::pvPosition
private

Definition at line 135 of file HcalTB04Analysis.cc.

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

int HcalTB04Analysis::pvType
private

Definition at line 134 of file HcalTB04Analysis.cc.

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

G4ThreeVector HcalTB04Analysis::pvUVW
private

Definition at line 135 of file HcalTB04Analysis.cc.

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

double HcalTB04Analysis::scaleHB0
private

Definition at line 114 of file HcalTB04Analysis.cc.

Referenced by HcalTB04Analysis(), and scale().

double HcalTB04Analysis::scaleHB16
private

Definition at line 114 of file HcalTB04Analysis.cc.

Referenced by HcalTB04Analysis(), and scale().

double HcalTB04Analysis::scaleHE0
private

Definition at line 114 of file HcalTB04Analysis.cc.

Referenced by HcalTB04Analysis(), and scale().

double HcalTB04Analysis::scaleHO
private

Definition at line 114 of file HcalTB04Analysis.cc.

Referenced by HcalTB04Analysis(), and scale().

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

Definition at line 138 of file HcalTB04Analysis.cc.

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

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

Definition at line 137 of file HcalTB04Analysis.cc.

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

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

Definition at line 136 of file HcalTB04Analysis.cc.

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

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

Definition at line 136 of file HcalTB04Analysis.cc.

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

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

Definition at line 139 of file HcalTB04Analysis.cc.

Referenced by clear(), and update().

int HcalTB04Analysis::type
private