CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Member Functions | Private Attributes
HcalTB04Analysis Class Reference

#include <SimG4CMS/HcalTestBeam/interface/HcalTB04Analysis.h>

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)
 
virtual void produce (edm::Event &, const edm::EventSetup &)
 
virtual ~HcalTB04Analysis ()
 
- Public Member Functions inherited from SimProducer
void registerProducts (edm::EDProducer &iProd)
 
 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 &)
 
void init ()
 
const HcalTB04Analysisoperator= (const HcalTB04Analysis &)
 
void qieAnalysis ()
 
double scale (int det, int layer)
 
double timeOfFlight (int det, int layer, double eta)
 
int unitID (uint32_t id)
 
void update (const BeginOfRun *run)
 This routine will be called when the appropriate signal arrives. More...
 
void update (const BeginOfEvent *evt)
 This routine will be called when the appropriate signal arrives. More...
 
void update (const G4Step *step)
 This routine will be called when the appropriate signal arrives. More...
 
void update (const EndOfEvent *evt)
 This routine will be called when the appropriate signal arrives. More...
 
void xtalAnalysis ()
 

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

Description: Analysis of 2004 Hcal Test beam simulation

Usage: A Simwatcher class and can be activated from Oscarproducer module

Definition at line 48 of file HcalTB04Analysis.h.

Constructor & Destructor Documentation

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

Definition at line 60 of file HcalTB04Analysis.cc.

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

60  : myQie(0),
61  histo(0) {
62 
63  edm::ParameterSet m_Anal = p.getParameter<edm::ParameterSet>("HcalTB04Analysis");
64  hcalOnly = m_Anal.getParameter<bool>("HcalOnly");
65  mode = m_Anal.getParameter<int>("Mode");
66  type = m_Anal.getParameter<int>("Type");
67  ecalNoise = m_Anal.getParameter<double>("EcalNoise");
68  scaleHB0 = m_Anal.getParameter<double>("ScaleHB0");
69  scaleHB16 = m_Anal.getParameter<double>("ScaleHB16");
70  scaleHO = m_Anal.getParameter<double>("ScaleHO");
71  scaleHE0 = m_Anal.getParameter<double>("ScaleHE0");
72  names = m_Anal.getParameter<std::vector<std::string> >("Names");
73  beamOffset =-m_Anal.getParameter<double>("BeamPosition")*cm;
74  double fMinEta = m_Anal.getParameter<double>("MinEta");
75  double fMaxEta = m_Anal.getParameter<double>("MaxEta");
76  double fMinPhi = m_Anal.getParameter<double>("MinPhi");
77  double fMaxPhi = m_Anal.getParameter<double>("MaxPhi");
78  double beamEta = (fMaxEta+fMinEta)/2.;
79  double beamPhi = (fMaxPhi+fMinPhi)/2.;
80  double beamThet= 2*atan(exp(-beamEta));
81  if (beamPhi < 0) beamPhi += twopi;
82  iceta = (int)(beamEta/0.087) + 1;
83  icphi = (int)(fabs(beamPhi)/0.087) + 5;
84  if (icphi > 72) icphi -= 73;
85 
86  produces<PHcalTB04Info>();
87 
88  beamline_RM = new G4RotationMatrix;
89  beamline_RM->rotateZ(-beamPhi);
90  beamline_RM->rotateY(-beamThet);
91 
92  edm::LogInfo("HcalTBSim") << "HcalTB04:: Initialised as observer of BeginOf"
93  << "Job/BeginOfRun/BeginOfEvent/G4Step/EndOfEvent"
94  << " with Parameter values:\n \thcalOnly = "
95  << hcalOnly << "\tecalNoise = " << ecalNoise
96  << "\n\tMode = " << mode << " (0: HB2 Standard; "
97  << "1:HB2 Segmented)" << "\tType = " << type
98  << " (0: HB; 1 HE; 2 HB+HE)\n\tbeamOffset = "
99  << beamOffset << "\ticeta = " << iceta
100  << "\ticphi = " << icphi << "\n\tbeamline_RM = "
101  << *beamline_RM;
102 
103  init();
104 
105  myQie = new HcalQie(p);
106  histo = new HcalTB04Histo(m_Anal);
107 }
type
Definition: HCALResponse.h:21
T getParameter(std::string const &) const
G4RotationMatrix * beamline_RM
HcalTB04Histo * histo
std::vector< std::string > names
HcalTB04Analysis::~HcalTB04Analysis ( )
virtual

Definition at line 109 of file HcalTB04Analysis.cc.

References count, histo, and myQie.

109  {
110 
111  edm::LogInfo("HcalTBSim") << "\n --------> Total number of selected entries"
112  << " : " << count << "\nPointers:: QIE " << myQie
113  << " Histo " << histo;
114  if (myQie) {
115  delete myQie;
116  myQie = 0;
117  }
118  if (histo) {
119  delete histo;
120  histo = 0;
121  }
122 }
HcalTB04Histo * histo
HcalTB04Analysis::HcalTB04Analysis ( const HcalTB04Analysis )
private

Member Function Documentation

void HcalTB04Analysis::clear ( void  )
private

Definition at line 954 of file HcalTB04Analysis.cc.

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

Referenced by init(), and update().

954  {
955  pvFound = false;
956  pvType =-2;
957  pvPosition = G4ThreeVector();
958  pvMomentum = G4ThreeVector();
959  pvUVW = G4ThreeVector();
960  secTrackID.clear();
961  secPartID.clear();
962  secMomentum.clear();
963  secEkin.clear();
964  shortLivedSecondaries.clear();
965 
966  ecalHitCache.erase(ecalHitCache.begin(), ecalHitCache.end());
967  hcalHitCache.erase(hcalHitCache.begin(), hcalHitCache.end());
968  hcalHitLayer.erase(hcalHitLayer.begin(), hcalHitLayer.end());
969  nPrimary = particleType = 0;
970  pInit = etaInit = phiInit = 0;
971 
972  esimh.clear();
973  eqie.clear();
974  esimh.reserve(nTower);
975  eqie.reserve(nTower);
976  for (int i=0; i<nTower; i++) {
977  esimh.push_back(0.);
978  eqie.push_back(0.);
979  }
980  esime.clear();
981  enois.clear();
982  esime.reserve(nCrystal);
983  enois.reserve(nCrystal);
984  for (int i=0; i<nCrystal; i++) {
985  esime.push_back(0.);
986  enois.push_back(0.);
987  }
988 }
int i
Definition: DBlmapReader.cc:9
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 401 of file HcalTB04Analysis.cc.

References alignCSCRings::e, ecalHitCache, eta(), etaInit, evNum, CaloG4Hit::getEnergyDeposit(), CaloG4Hit::getEntry(), CaloG4Hit::getTimeSlice(), CaloG4Hit::getTrackID(), HcalTBNumberingScheme::getUnitID(), CaloG4Hit::getUnitID(), hcalHitCache, hcalHitLayer, i, customizeTrackingMonitorSeedNumber::idx, j, create_public_lumi_plots::log, LogDebug, max(), min, mode, names, npart, nPrimary, AlCaHLTBitMon_ParallelJobs::p, particleType, phi, phiInit, pInit, pos, funct::pow(), scale(), python.multivaluedict::sort(), mathSSE::sqrt(), AlCaHLTBitMon_QueryRunRegistry::string, funct::tan(), theta(), cond::rpcobgas::time, timeOfFlight(), unitID(), HcalTestNumbering::unpackHcalIndex(), and detailsBasic3DVector::z.

Referenced by update().

401  {
402 
403  std::vector<CaloHit> hhits, hhitl;
404  int idHC, j;
405  CaloG4HitCollection* theHC;
406  std::map<int,float,std::less<int> > primaries;
407  double etot1=0, etot2=0;
408 
409  // Look for the Hit Collection of HCal
410  G4HCofThisEvent* allHC = (*evt)()->GetHCofThisEvent();
411  std::string sdName = names[0];
412  idHC = G4SDManager::GetSDMpointer()->GetCollectionID(sdName);
413  theHC = (CaloG4HitCollection*) allHC->GetHC(idHC);
414  LogDebug("HcalTBSim") << "HcalTB04Analysis:: Hit Collection for " << sdName
415  << " of ID " << idHC << " is obtained at " << theHC;
416 
417  if (idHC >= 0 && theHC > 0) {
418  hhits.reserve(theHC->entries());
419  hhitl.reserve(theHC->entries());
420  for (j = 0; j < theHC->entries(); j++) {
421  CaloG4Hit* aHit = (*theHC)[j];
422  double e = aHit->getEnergyDeposit()/GeV;
423  double time = aHit->getTimeSlice();
424  math::XYZPoint pos = aHit->getEntry();
425  unsigned int id = aHit->getUnitID();
426  double theta = pos.theta();
427  double eta = -log(tan(theta * 0.5));
428  double phi = pos.phi();
429  int det, z, group, ieta, iphi, layer;
430  HcalTestNumbering::unpackHcalIndex(id,det,z,group,ieta,iphi,layer);
431  double jitter = time-timeOfFlight(det,layer,eta);
432  if (jitter<0) jitter = 0;
433  if (e < 0 || e > 1.) e = 0;
434  double escl = e * scale(det,layer);
435  unsigned int idx= HcalTBNumberingScheme::getUnitID(id,mode);
436  CaloHit hit(det,layer,escl,eta,phi,jitter,idx);
437  hhits.push_back(hit);
438  CaloHit hitl(det,layer,escl,eta,phi,jitter,id);
439  hhitl.push_back(hitl);
440  primaries[aHit->getTrackID()]+= e;
441  etot1 += escl;
442 #ifdef ddebug
443  LogDebug("HcalTBSim") << "HcalTB04Analysis:: Hcal Hit i/p " << j
444  << " ID 0x" << std::hex << id << " 0x" << idx
445  << std::dec << " time " << std::setw(6) << time
446  << " " << std::setw(6) << jitter << " theta "
447  << std::setw(8) << theta << " eta " << std::setw(8)
448  << eta << " phi " << std::setw(8) << phi << " e "
449  << std::setw(8) << e << " " << std::setw(8) <<escl;
450 #endif
451  }
452  }
453 
454  // Add hits in the same channel within same time slice
455  std::vector<CaloHit>::iterator itr;
456  int nHit = hhits.size();
457  std::vector<CaloHit*> hits(nHit);
458  for (j = 0, itr = hhits.begin(); itr != hhits.end(); j++, itr++) {
459  hits[j] = &hhits[j];
460  }
461  sort(hits.begin(),hits.end(),CaloHitIdMore());
462  std::vector<CaloHit*>::iterator k1, k2;
463  int nhit = 0;
464  for (k1 = hits.begin(); k1 != hits.end(); k1++) {
465  int det = (**k1).det();
466  int layer = (**k1).layer();
467  double ehit = (**k1).e();
468  double eta = (**k1).eta();
469  double phi = (**k1).phi();
470  double jitter = (**k1).t();
471  uint32_t unitID = (**k1).id();
472  int jump = 0;
473  for (k2 = k1+1; k2 != hits.end() && fabs(jitter-(**k2).t())<1 &&
474  unitID==(**k2).id(); k2++) {
475  ehit += (**k2).e();
476  jump++;
477  }
478  nhit++;
479  CaloHit hit(det, layer, ehit, eta, phi, jitter, unitID);
480  hcalHitCache.push_back(hit);
481  etot2 += ehit;
482  k1 += jump;
483 #ifdef ddebug
484  LogDebug("HcalTBSim") << "HcalTB04Analysis:: Hcal Hit store " << nhit
485  << " ID 0x" << std::hex << unitID << std::dec
486  << " time " << std::setw(6) << jitter << " eta "
487  << std::setw(8) << eta << " phi " << std::setw(8)
488  << phi << " e " << std::setw(8) << ehit;
489 #endif
490  }
491  LogDebug("HcalTBSim") << "HcalTB04Analysis:: Stores " << nhit << " HCal hits"
492  << " from " << nHit << " input hits E(Hcal) " << etot1
493  << " " << etot2;
494 
495  //Repeat for Hit in each layer (hhits and hhitl sizes are the same)
496  for (j = 0, itr = hhitl.begin(); itr != hhitl.end(); j++, itr++) {
497  hits[j] = &hhitl[j];
498  }
499  sort(hits.begin(),hits.end(),CaloHitIdMore());
500  int nhitl = 0;
501  double etotl = 0;
502  for (k1 = hits.begin(); k1 != hits.end(); k1++) {
503  int det = (**k1).det();
504  int layer = (**k1).layer();
505  double ehit = (**k1).e();
506  double eta = (**k1).eta();
507  double phi = (**k1).phi();
508  double jitter = (**k1).t();
509  uint32_t unitID = (**k1).id();
510  int jump = 0;
511  for (k2 = k1+1; k2 != hits.end() && fabs(jitter-(**k2).t())<1 &&
512  unitID==(**k2).id(); k2++) {
513  ehit += (**k2).e();
514  jump++;
515  }
516  nhitl++;
517  CaloHit hit(det, layer, ehit, eta, phi, jitter, unitID);
518  hcalHitLayer.push_back(hit);
519  etotl += ehit;
520  k1 += jump;
521 #ifdef ddebug
522  LogDebug("HcalTBSim") << "HcalTB04Analysis:: Hcal Hit store " << nhitl
523  << " ID 0x" << std::hex << unitID << std::dec
524  << " time " << std::setw(6) << jitter << " eta "
525  << std::setw(8) << eta << " phi " << std::setw(8)
526  << phi << " e " << std::setw(8) << ehit;
527 #endif
528  }
529  LogDebug("HcalTBSim") << "HcalTB04Analysis:: Stores " << nhitl << " HCal "
530  << "hits from " << nHit << " input hits E(Hcal) "
531  << etot1 << " " << etotl;
532 
533  // Look for the Hit Collection of ECal
534  std::vector<CaloHit> ehits;
535  sdName= names[1];
536  idHC = G4SDManager::GetSDMpointer()->GetCollectionID(sdName);
537  theHC = (CaloG4HitCollection*) allHC->GetHC(idHC);
538  etot1 = etot2 = 0;
539  LogDebug("HcalTBSim") << "HcalTB04Analysis:: Hit Collection for " << sdName
540  << " of ID " << idHC << " is obtained at " << theHC;
541  if (idHC >= 0 && theHC > 0) {
542  ehits.reserve(theHC->entries());
543  for (j = 0; j < theHC->entries(); j++) {
544  CaloG4Hit* aHit = (*theHC)[j];
545  double e = aHit->getEnergyDeposit()/GeV;
546  double time = aHit->getTimeSlice();
547  math::XYZPoint pos = aHit->getEntry();
548  unsigned int id = aHit->getUnitID();
549  double theta = pos.theta();
550  double eta = -log(tan(theta * 0.5));
551  double phi = pos.phi();
552  if (e < 0 || e > 100000.) e = 0;
553  int det, z, group, ieta, iphi, layer;
554  HcalTestNumbering::unpackHcalIndex(id,det,z,group,ieta,iphi,layer);
555  CaloHit hit(det,0,e,eta,phi,time,id);
556  ehits.push_back(hit);
557  primaries[aHit->getTrackID()]+= e;
558  etot1 += e;
559 #ifdef ddebug
560  LogDebug("HcalTBSim") << "HcalTB04Analysis:: Ecal Hit i/p " << j
561  << " ID 0x" << std::hex << id << std::dec
562  << " time " << std::setw(6) << time << " theta "
563  << std::setw(8) << theta << " eta " <<std::setw(8)
564  << eta << " phi " << std::setw(8) << phi << " e "
565  << std::setw(8) << e;
566 #endif
567  }
568  }
569 
570  // Add hits in the same channel within same time slice
571  nHit = ehits.size();
572  std::vector<CaloHit*> hite(nHit);
573  for (j = 0, itr = ehits.begin(); itr != ehits.end(); j++, itr++) {
574  hite[j] = &ehits[j];
575  }
576  sort(hite.begin(),hite.end(),CaloHitIdMore());
577  nhit = 0;
578  for (k1 = hite.begin(); k1 != hite.end(); k1++) {
579  int det = (**k1).det();
580  int layer = (**k1).layer();
581  double ehit = (**k1).e();
582  double eta = (**k1).eta();
583  double phi = (**k1).phi();
584  double jitter = (**k1).t();
585  uint32_t unitID = (**k1).id();
586  int jump = 0;
587  for (k2 = k1+1; k2 != hite.end() && fabs(jitter-(**k2).t())<1 &&
588  unitID==(**k2).id(); k2++) {
589  ehit += (**k2).e();
590  jump++;
591  }
592  nhit++;
593  CaloHit hit(det, layer, ehit, eta, phi, jitter, unitID);
594  ecalHitCache.push_back(hit);
595  etot2 += ehit;
596  k1 += jump;
597 #ifdef ddebug
598  LogDebug("HcalTBSim") << "HcalTB04Analysis:: Ecal Hit store " << nhit
599  << " ID 0x" << std::hex << unitID << std::dec
600  << " time " << std::setw(6) << jitter << " eta "
601  << std::setw(8) << eta << " phi " << std::setw(8)
602  << phi << " e " << std::setw(8) << ehit;
603 #endif
604  }
605  LogDebug("HcalTBSim") << "HcalTB04Analysis:: Stores " << nhit << " ECal hits"
606  << " from " << nHit << " input hits E(Ecal) " << etot1
607  << " " << etot2;
608 
609  // Find Primary info:
610  nPrimary = (int)(primaries.size());
611  int trackID = 0;
612  G4PrimaryParticle* thePrim=0;
613  int nvertex = (*evt)()->GetNumberOfPrimaryVertex();
614  LogDebug("HcalTBSim") << "HcalTB04Analysis:: Event has " << nvertex
615  << " verteices";
616  if (nvertex<=0)
617  edm::LogInfo("HcalTBSim") << "HcalTB04Analysis::EndOfEvent ERROR: no "
618  << "vertex found for event " << evNum;
619 
620  for (int i = 0 ; i<nvertex; i++) {
621  G4PrimaryVertex* avertex = (*evt)()->GetPrimaryVertex(i);
622  if (avertex == 0) {
623  edm::LogInfo("HcalTBSim") << "HcalTB04Analysis::EndOfEvent ERR: pointer "
624  << "to vertex = 0 for event " << evNum;
625  } else {
626  LogDebug("HcalTBSim") << "HcalTB04Analysis::Vertex number :" << i << " "
627  << avertex->GetPosition();
628  int npart = avertex->GetNumberOfParticle();
629  if (npart == 0)
630  edm::LogWarning("HcalTBSim") << "HcalTB04Analysis::End Of Event ERR: "
631  << "no primary!";
632  if (thePrim==0) thePrim=avertex->GetPrimary(trackID);
633  }
634  }
635 
636  if (thePrim != 0) {
637  double px = thePrim->GetPx();
638  double py = thePrim->GetPy();
639  double pz = thePrim->GetPz();
640  double p = std::sqrt(pow(px,2.)+pow(py,2.)+pow(pz,2.));
641  pInit = p/GeV;
642  if (p==0)
643  edm::LogWarning("HcalTBSim") << "HcalTB04Analysis:: EndOfEvent ERR: "
644  << "primary has p=0 ";
645  else {
646  double costheta = pz/p;
647  double theta = acos(std::min(std::max(costheta,-1.),1.));
648  etaInit = -log(tan(theta/2));
649  if (px != 0 || py != 0) phiInit = atan2(py,px);
650  }
651  particleType = thePrim->GetPDGcode();
652  } else
653  edm::LogWarning("HcalTBSim") << "HcalTB04Analysis::EndOfEvent ERR: could "
654  << "not find primary";
655 
656 }
#define LogDebug(id)
int i
Definition: DBlmapReader.cc:9
std::vector< CaloHit > hcalHitLayer
Geom::Theta< T > theta() const
double npart
Definition: HydjetWrapper.h:45
#define min(a, b)
Definition: mlp_lapack.h:161
T eta() const
float float float z
const T & max(const T &a, const T &b)
T sqrt(T t)
Definition: SSEVec.h:48
Tan< T >::type tan(const T &t)
Definition: Tan.h:22
int j
Definition: DBlmapReader.cc:9
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)
std::vector< CaloHit > hcalHitCache
int getTrackID() const
Definition: CaloG4Hit.h:68
static uint32_t getUnitID(const uint32_t id, const int mode)
XYZPointD XYZPoint
point in space with cartesian internal representation
Definition: Point3D.h:13
tuple idx
DEBUGGING if hasattr(process,&quot;trackMonIterativeTracking2012&quot;): print &quot;trackMonIterativeTracking2012 D...
std::vector< CaloHit > ecalHitCache
int unitID(uint32_t id)
G4THitsCollection< CaloG4Hit > CaloG4HitCollection
double getTimeSlice() const
Definition: CaloG4Hit.h:70
math::XYZPoint getEntry() const
Definition: CaloG4Hit.h:50
uint32_t getUnitID() const
Definition: CaloG4Hit.h:69
std::vector< std::string > names
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:40
double getEnergyDeposit() const
Definition: CaloG4Hit.h:81
Definition: DDAxes.h:10
void HcalTB04Analysis::fillEvent ( PHcalTB04Info product)
private

Definition at line 880 of file HcalTB04Analysis.cc.

References ecalHitCache, eecalq, eecals, ehcalq, ehcals, enois, eqeta, eqie, eqlay, eqphi, eseta, esime, esimh, eslay, esphi, etaInit, etotq, etots, evNum, hcalHitCache, i, hit::id, idHcal, idXtal, 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, detailsBasic3DVector::y, and detailsBasic3DVector::z.

Referenced by produce().

880  {
881 
882  //Setup the ID's
883  product.setIDs(idHcal, idXtal);
884 
885  //Beam Information
887 
888  //Energy deposits in the crystals and towers
889  product.setEdepHcal(esimh, eqie);
890  product.setEdepHcal(esime, enois);
891 
892  // Total Energy
893  product.setEdep(etots, eecals, ehcals, etotq, eecalq, ehcalq);
894 
895  // Lateral Profile
896  product.setTrnsProf(eseta,eqeta,esphi,eqphi);
897 
898  // Longitudianl profile
899  product.setLongProf(eslay, eqlay);
900 
901  //Save Hits
902  int i, nhit=0;
903  std::vector<CaloHit>::iterator itr;
904  for (i=0, itr=ecalHitCache.begin(); itr!=ecalHitCache.end(); i++,itr++) {
905  uint32_t id = itr->id();
906  int det, z, group, ieta, iphi, lay;
907  HcalTestNumbering::unpackHcalIndex(id,det,z,group,ieta,iphi,lay);
908  product.saveHit(det, lay, ieta, iphi, itr->e(), itr->t());
909  nhit++;
910 #ifdef debug
911  LogDebug("HcalTBSim") << "HcalTB04Analysis:: Save Hit " << std::setw(3)
912  << i+1 << " ID 0x" << std::hex << group << std::dec
913  << " " << std::setw(2) << det << " " << std::setw(2)
914  << lay << " " << std::setw(1) << z << " "
915  << std::setw(3) << ieta << " " << std::setw(3) <<iphi
916  << " T " << std::setw(6) << itr->t() << " E "
917  << std::setw(6) << itr->e();
918 #endif
919  }
920  LogDebug("HcalTBSim") << "HcalTB04Analysis:: Saves " << nhit
921  << " hits from Crystals";
922  int hit = nhit;
923  nhit = 0;
924 
925  for (i=hit, itr=hcalHitCache.begin(); itr!=hcalHitCache.end(); i++,itr++) {
926  uint32_t id = itr->id();
927  int det, z, group, ieta, iphi, lay;
928  HcalTestNumbering::unpackHcalIndex(id,det,z,group,ieta,iphi,lay);
929  product.saveHit(det, lay, ieta, iphi, itr->e(), itr->t());
930  nhit++;
931 #ifdef debug
932  LogDebug("HcalTBSim") << "HcalTB04Analysis:: Save Hit " << std::setw(3)
933  << i+1 << " ID 0x" << std::hex << group << std::dec
934  << " " << std::setw(2) << det << " " << std::setw(2)
935  << lay << " " << std::setw(1) << z << " "
936  << std::setw(3) << ieta << " " << std::setw(3) <<iphi
937  << " T " << std::setw(6) << itr->t() << " E "
938  << std::setw(6) << itr->e();
939 #endif
940  }
941  LogDebug("HcalTBSim") << "HcalTB04Analysis:: Saves " << nhit
942  << " hits from HCal";
943 
944  //Vertex associated quantities
945  product.setVtxPrim(evNum, pvType, pvPosition.x(), pvPosition.y(),
946  pvPosition.z(), pvUVW.x(), pvUVW.y(), pvUVW.z(),
947  pvMomentum.x(), pvMomentum.y(), pvMomentum.z());
948  for (unsigned int i = 0; i < secTrackID.size(); i++) {
949  product.setVtxSec(secTrackID[i], secPartID[i], secMomentum[i].x(),
950  secMomentum[i].y(), secMomentum[i].z(), secEkin[i]);
951  }
952 }
#define LogDebug(id)
int i
Definition: DBlmapReader.cc:9
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)
float float float z
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
Definition: DDAxes.h:10
G4ThreeVector pvPosition
std::vector< double > esimh
void HcalTB04Analysis::finalAnalysis ( )
private

Definition at line 778 of file HcalTB04Analysis.cc.

References reco::e1, reco::e2, 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(), histo, i, iceta, icphi, idTower, LogDebug, nCrystal, nTower, phiInit, pInit, HcalTestNumbering::unpackHcalIndex(), and detailsBasic3DVector::z.

Referenced by update().

778  {
779 
780  //Beam Information
782 
783  // Total Energy
784  eecals = ehcals = eecalq = ehcalq = 0.;
785  for (int i=0; i<nTower; i++) {
786  ehcals += esimh[i];
787  ehcalq += eqie[i];
788  }
789  for (int i=0; i<nCrystal; i++) {
790  eecals += esime[i];
791  eecalq += enois[i];
792  }
793  etots = eecals + ehcals;
794  etotq = eecalq + ehcalq;
795  LogDebug("HcalTBSim") << "HcalTB04Analysis:: Energy deposit at Sim Level "
796  << "(Total) " << etots << " (ECal) " << eecals
797  << " (HCal) " << ehcals << "\nHcalTB04Analysis:: "
798  << "Energy deposit at Qie Level (Total) " << etotq
799  << " (ECal) " << eecalq << " (HCal) " << ehcalq;
800  histo->fillEdep(etots, eecals, ehcals, etotq, eecalq, ehcalq);
801 
802  // Lateral Profile
803  for (int i=0; i<5; i++) {
804  eseta[i] = 0.;
805  eqeta[i] = 0.;
806  }
807  for (int i=0; i<3; i++) {
808  esphi[i] = 0.;
809  eqphi[i] = 0.;
810  }
811  double e1=0, e2=0;
812  unsigned int id;
813  for (int i=0; i<nTower; i++) {
814  int det, z, group, ieta, iphi, layer;
815  id = idTower[i];
816  HcalTestNumbering::unpackHcalIndex(id,det,z,group,ieta,iphi,layer);
817  iphi -= (icphi - 1);
818  if (icphi > 4) {
819  if (ieta == 0) ieta = 2;
820  else ieta =-1;
821  } else {
822  ieta = ieta - iceta + 2;
823  }
824  if (iphi >= 0 && iphi < 3 && ieta >= 0 && ieta < 5) {
825  eseta[ieta] += esimh[i];
826  esphi[iphi] += esimh[i];
827  e1 += esimh[i];
828  eqeta[ieta] += eqie[i];
829  eqphi[iphi] += eqie[i];
830  e2 += eqie[i];
831  }
832  }
833  for (int i=0; i<3; i++) {
834  if (e1>0) esphi[i] /= e1;
835  if (e2>0) eqphi[i] /= e2;
836  }
837  for (int i=0; i<5; i++) {
838  if (e1>0) eseta[i] /= e1;
839  if (e2>0) eqeta[i] /= e2;
840  }
841  LogDebug("HcalTBSim") << "HcalTB04Analysis:: Energy fraction along Eta and"
842  << " Phi (Sim/Qie)";
843  for (int i=0; i<5; i++)
844  LogDebug("HcalTBSim") << "HcalTB04Analysis:: [" << i << "] Eta Sim = "
845  << eseta[i] << " Qie = " << eqeta[i] << " Phi Sim = "
846  << esphi[i] << " Qie = " << eqphi[i];
848 
849  // Longitudianl profile
850  for (int i=0; i<20; i++) {
851  eslay[i] = 0.;
852  eqlay[i] = 0.;
853  }
854  e1=0; e2=0;
855  for (int i=0; i<nTower; i++) {
856  int det, z, group, ieta, iphi, layer;
857  id = idTower[i];
858  HcalTestNumbering::unpackHcalIndex(id,det,z,group,ieta,iphi,layer);
859  iphi -= (icphi - 1);
860  layer -= 1;
861  if (iphi >= 0 && iphi < 3 && layer >= 0 && layer < 20) {
862  eslay[layer] += esimh[i];
863  e1 += esimh[i];
864  eqlay[layer] += eqie[i];
865  e2 += eqie[i];
866  }
867  }
868  for (int i=0; i<20; i++) {
869  if (e1>0) eslay[i] /= e1;
870  if (e2>0) eqlay[i] /= e2;
871  }
872  LogDebug("HcalTBSim") << "HcalTB04Analysis:: Energy fraction along Layer";
873  for (int i=0; i<20; i++)
874  LogDebug("HcalTBSim") << "HcalTB04Analysis:: [" << i << "] Sim = "
875  << eslay[i] << " Qie = " << eqlay[i];
876  histo->fillLongProf(eslay, eqlay);
877 }
#define LogDebug(id)
int i
Definition: DBlmapReader.cc:9
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
float float float z
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
Float e1
Definition: deltaR.h:22
std::vector< double > enois
Float e2
Definition: deltaR.h:23
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 135 of file HcalTB04Analysis.cc.

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

Referenced by HcalTB04Analysis().

135  {
136 
138  nTower = idTower.size();
139  edm::LogInfo("HcalTBSim") << "HcalTB04Analysis:: Save information from "
140  << nTower << " HCal towers";
141  idHcal.reserve(nTower);
142  for (int i=0; i<nTower; i++) {
143  int id = unitID(idTower[i]);
144  idHcal.push_back(id);
145  LogDebug("HcalTBSim") << "\tTower[" << i << "] Original " << std::hex
146  << idTower[i] << " Stored " << idHcal[i] << std::dec;
147  }
148 
149  if (!hcalOnly) {
150  int det = 10;
151  uint32_t id1;
152  nCrystal = 0;
153  for (int lay=1; lay<8; lay++) {
154  for (int icr=1; icr<8; icr++) {
155  id1 = HcalTestNumbering::packHcalIndex(det,0,1,icr,lay,1);
156  int id = unitID(id1);
157  idEcal.push_back(id1);
158  idXtal.push_back(id);
159  nCrystal++;
160  }
161  }
162  edm::LogInfo("HcalTBSim") << "HcalTB04Analysis:: Save information from "
163  << nCrystal << " ECal Crystals";
164  for (int i=0; i<nCrystal; i++) {
165  LogDebug("HcalTBSim") << "\tCrystal[" << i << "] Original " << std::hex
166  << idEcal[i] << " Stored " << idXtal[i] <<std::dec;
167  }
168  }
169  // Profile vectors
170  eseta.reserve(5);
171  eqeta.reserve(5);
172  esphi.reserve(3);
173  eqphi.reserve(3);
174  eslay.reserve(20);
175  eqlay.reserve(20);
176  for (int i=0; i<5; i++) {
177  eseta.push_back(0.);
178  eqeta.push_back(0.);
179  }
180  for (int i=0; i<3; i++) {
181  esphi.push_back(0.);
182  eqphi.push_back(0.);
183  }
184  for (int i=0; i<20; i++) {
185  eslay.push_back(0.);
186  eqlay.push_back(0.);
187  }
188 
189  // counter
190  count = 0;
191  evNum = 0;
192  clear();
193 }
#define LogDebug(id)
type
Definition: HCALResponse.h:21
int i
Definition: DBlmapReader.cc:9
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 )
private
void HcalTB04Analysis::produce ( edm::Event e,
const edm::EventSetup  
)
virtual

Implements SimProducer.

Definition at line 128 of file HcalTB04Analysis.cc.

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

128  {
129 
130  std::auto_ptr<PHcalTB04Info> product(new PHcalTB04Info);
131  fillEvent(*product);
132  e.put(product);
133 }
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
Definition: Event.h:94
void fillEvent(PHcalTB04Info &)
void HcalTB04Analysis::qieAnalysis ( )
private

Definition at line 658 of file HcalTB04Analysis.cc.

References CaloHit::e(), Vispa.Plugins.EdmBrowser.EdmDataAccessor::eq(), eqie, esimh, HcalQie::getCode(), HcalQie::getEnergy(), hcalHitCache, CaloHit::id(), idTower, LogDebug, myQie, and nTower.

Referenced by update().

658  {
659 
660  int hittot = hcalHitCache.size();
661  if (hittot<=0) hittot = 1;
662  std::vector<CaloHit> hits(hittot);
663  std::vector<int> todo(nTower,0);
664 
665  LogDebug("HcalTBSim") << "HcalTB04Analysis::qieAnalysis: Size "
666  << hits.size() << " " << todo.size() << " "
667  << idTower.size() << " " << esimh.size() << " "
668  << eqie.size();
669  // Loop over all HCal hits
670  for (unsigned int k1 = 0; k1 < hcalHitCache.size(); k1++) {
671  CaloHit hit = hcalHitCache[k1];
672  uint32_t id = hit.id();
673  int nhit = 0;
674  double esim = hit.e();
675  hits[nhit] = hit;
676  for (unsigned int k2 = k1+1; k2 < hcalHitCache.size(); k2++) {
677  hit = hcalHitCache[k2];
678  if (hit.id() == id) {
679  nhit++;
680  hits[nhit] = hit;
681  esim += hit.e();
682  }
683  }
684  k1 += nhit;
685  nhit++;
686  std::vector<int> cd = myQie->getCode(nhit,hits);
687  double eq = myQie->getEnergy(cd);
688  LogDebug("HcalTBSim") << "HcalTB04Analysis:: ID 0x" << std::hex << id
689  << std::dec << " registers " << esim << " energy "
690  << "from " << nhit << " hits starting with hit # "
691  << k1 << " energy with noise " << eq;
692  for (int k2 = 0; k2 < nTower; k2++) {
693  if (id == idTower[k2]) {
694  todo[k2] = 1;
695  esimh[k2] = esim;
696  eqie[k2] = eq;
697  }
698  }
699  }
700 
701  // Towers with no hit
702  for (int k2 = 0; k2 < nTower; k2++) {
703  if (todo[k2] == 0) {
704  std::vector<int> cd = myQie->getCode(0,hits);
705  double eq = myQie->getEnergy(cd);
706  esimh[k2] = 0;
707  eqie[k2] = eq;
708 #ifdef ddebug
709  LogDebug("HcalTBSim") << "HcalTB04Analysis:: ID 0x" << std::hex
710  << idTower[k2] << std::dec << " registers "
711  << esimh[k2] << " energy from hits and energy "
712  << "after QIE analysis " << eqie[k2];
713 #endif
714  }
715  }
716 }
#define LogDebug(id)
double getEnergy(std::vector< int >)
Definition: HcalQie.cc:403
std::vector< double > eqie
uint32_t id() const
Definition: CaloHit.h:28
std::vector< int > getCode(int, std::vector< CaloHit >)
Definition: HcalQie.cc:299
std::vector< CaloHit > hcalHitCache
double e() const
Definition: CaloHit.h:24
std::vector< uint32_t > idTower
std::vector< double > esimh
double HcalTB04Analysis::scale ( int  det,
int  layer 
)
private

Definition at line 1002 of file HcalTB04Analysis.cc.

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

Referenced by fillBuffer().

1002  {
1003 
1004  double tmp = 1.;
1005  if (det == static_cast<int>(HcalBarrel)) {
1006  if (layer == 1) tmp = scaleHB0;
1007  else if (layer == 17) tmp = scaleHB16;
1008  else if (layer > 17) tmp = scaleHO;
1009  } else {
1010  if (layer <= 2) tmp = scaleHE0;
1011  }
1012  return tmp;
1013 }
std::vector< std::vector< double > > tmp
Definition: MVATrainer.cc:100
double HcalTB04Analysis::timeOfFlight ( int  det,
int  layer,
double  eta 
)
private

Definition at line 1015 of file HcalTB04Analysis.cc.

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

Referenced by fillBuffer().

1015  {
1016 
1017  double theta = 2.0*atan(exp(-eta));
1018  double dist = beamOffset;
1019  if (det == static_cast<int>(HcalBarrel)) {
1020  const double rLay[19] = {
1021  1836.0, 1902.0, 1962.0, 2022.0, 2082.0, 2142.0, 2202.0, 2262.0, 2322.0,
1022  2382.0, 2448.0, 2514.0, 2580.0, 2646.0, 2712.0, 2776.0, 2862.5, 3847.0,
1023  4052.0};
1024  if (layer>0 && layer<=19) dist += rLay[layer-1]*mm/sin(theta);
1025  } else {
1026  const double zLay[19] = {
1027  4034.0, 4032.0, 4123.0, 4210.0, 4297.0, 4384.0, 4471.0, 4558.0, 4645.0,
1028  4732.0, 4819.0, 4906.0, 4993.0, 5080.0, 5167.0, 5254.0, 5341.0, 5428.0,
1029  5515.0};
1030  if (layer>0 && layer<=19) dist += zLay[layer-1]*mm/cos(theta);
1031  }
1032 
1033  double tmp = dist/c_light/ns;
1034 #ifdef ddebug
1035  LogDebug("HcalTBSim") << "HcalTB04Analysis::timeOfFlight " << tmp
1036  << " for det/lay " << det << " " << layer
1037  << " eta/theta " << eta << " " << theta/deg
1038  << " dist " << dist;
1039 #endif
1040  return tmp;
1041 }
#define LogDebug(id)
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
Geom::Theta< T > theta() const
T eta() const
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
std::vector< std::vector< double > > tmp
Definition: MVATrainer.cc:100
int HcalTB04Analysis::unitID ( uint32_t  id)
private

Definition at line 990 of file HcalTB04Analysis.cc.

References HcalTestNumbering::unpackHcalIndex(), and detailsBasic3DVector::z.

Referenced by fillBuffer(), and init().

990  {
991 
992  int det, z, group, ieta, iphi, lay;
993  HcalTestNumbering::unpackHcalIndex(id,det,z,group,ieta,iphi,lay);
994  group = (det&15)<<20;
995  group += ((lay-1)&31)<<15;
996  group += (z&1)<<14;
997  group += (ieta&127)<<7;
998  group += (iphi&127);
999  return group;
1000 }
float float float z
static void unpackHcalIndex(const uint32_t &idx, int &det, int &z, int &depth, int &eta, int &phi, int &lay)
void HcalTB04Analysis::update ( const BeginOfRun )
privatevirtual

This routine will be called when the appropriate signal arrives.

Implements Observer< const BeginOfRun * >.

Definition at line 195 of file HcalTB04Analysis.cc.

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

Referenced by progressbar.ProgressBar::__next__(), relval_steps.Matrix::__setitem__(), relval_steps.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(), relval_steps.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().

195  {
196 
197  int irun = (*run)()->GetRunID();
198  edm::LogInfo("HcalTBSim") <<" =====> Begin of Run = " << irun;
199 
200  G4SDManager* sd = G4SDManager::GetSDMpointerIfExist();
201  if (sd != 0) {
202  std::string sdname = names[0];
203  G4VSensitiveDetector* aSD = sd->FindSensitiveDetector(sdname);
204  if (aSD==0) {
205  edm::LogWarning("HcalTBSim") << "HcalTB04Analysis::beginOfRun: No SD"
206  << " with name " << sdname << " in this "
207  << "Setup";
208  } else {
209  HCalSD* theCaloSD = dynamic_cast<HCalSD*>(aSD);
210  edm::LogInfo("HcalTBSim") << "HcalTB04Analysis::beginOfRun: Finds SD "
211  << "with name " << theCaloSD->GetName()
212  << " in this Setup";
214  theCaloSD->setNumberingScheme(org);
215  edm::LogInfo("HcalTBSim") << "HcalTB04Analysis::beginOfRun: set a "
216  << "new numbering scheme";
217  }
218  if (!hcalOnly) {
219  sdname = names[1];
220  aSD = sd->FindSensitiveDetector(sdname);
221  if (aSD==0) {
222  edm::LogWarning("HcalTBSim") << "HcalTB04Analysis::beginOfRun: No SD"
223  << " with name " << sdname << " in this "
224  << "Setup";
225  } else {
226  ECalSD* theCaloSD = dynamic_cast<ECalSD*>(aSD);
227  edm::LogInfo("HcalTBSim") << "HcalTB04Analysis::beginOfRun: Finds SD "
228  << "with name " << theCaloSD->GetName()
229  << " in this Setup";
231  theCaloSD->setNumberingScheme(org);
232  edm::LogInfo("HcalTBSim") << "HcalTB04Analysis::beginOfRun: set a "
233  << "new numbering scheme";
234  }
235  }
236  } else {
237  edm::LogWarning("HcalTBSim") << "HcalTB04Analysis::beginOfRun: Could "
238  << "not get SD Manager!";
239  }
240 
241 }
void setNumberingScheme(HcalNumberingScheme *)
Definition: HCalSD.cc:599
Definition: HCalSD.h:33
Definition: ECalSD.h:26
double sd
void setNumberingScheme(EcalNumberingScheme *)
Definition: ECalSD.cc:264
std::vector< std::string > names
void HcalTB04Analysis::update ( const BeginOfEvent )
privatevirtual

This routine will be called when the appropriate signal arrives.

Implements Observer< const BeginOfEvent * >.

Definition at line 243 of file HcalTB04Analysis.cc.

References clear(), and evNum.

Referenced by progressbar.ProgressBar::__next__(), relval_steps.Matrix::__setitem__(), relval_steps.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(), relval_steps.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().

243  {
244 
245  evNum = (*evt) ()->GetEventID ();
246  clear();
247  edm::LogInfo("HcalTBSim") << "HcalTB04Analysis: =====> Begin of event = "
248  << evNum;
249 }
void HcalTB04Analysis::update ( const G4Step *  )
privatevirtual

This routine will be called when the appropriate signal arrives.

Implements Observer< const G4Step * >.

Definition at line 251 of file HcalTB04Analysis.cc.

References LogDebug, NULL, evf::utils::pid, pos, position, pvFound, pvMomentum, pvPosition, pvType, pvUVW, secEkin, secMomentum, secPartID, secTrackID, and shortLivedSecondaries.

Referenced by progressbar.ProgressBar::__next__(), relval_steps.Matrix::__setitem__(), relval_steps.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(), relval_steps.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().

251  {
252 
253  if (aStep != NULL) {
254  //Get Step properties
255  G4ThreeVector thePreStepPoint = aStep->GetPreStepPoint()->GetPosition();
256  G4ThreeVector thePostStepPoint;
257 
258  // Get Tracks properties
259  G4Track* aTrack = aStep->GetTrack();
260  int trackID = aTrack->GetTrackID();
261  int parentID = aTrack->GetParentID();
262  G4ThreeVector position = aTrack->GetPosition();
263  G4ThreeVector momentum = aTrack->GetMomentum();
264  G4String partType = aTrack->GetDefinition()->GetParticleType();
265  G4String partSubType = aTrack->GetDefinition()->GetParticleSubType();
266  int partPDGEncoding = aTrack->GetDefinition()->GetPDGEncoding();
267 #ifdef ddebug
268  bool isPDGStable = aTrack->GetDefinition()->GetPDGStable();
269 #endif
270  double pDGlifetime = aTrack->GetDefinition()->GetPDGLifeTime();
271  double gammaFactor = aStep->GetPreStepPoint()->GetGamma();
272 
273  if (!pvFound) { //search for v1
274  double stepDeltaEnergy = aStep->GetDeltaEnergy ();
275  double kinEnergy = aTrack->GetKineticEnergy ();
276 
277  // look for DeltaE > 10% kinEnergy of particle, or particle death - Ek=0
278  if (trackID == 1 && parentID == 0 &&
279  ((kinEnergy == 0.) || (fabs (stepDeltaEnergy / kinEnergy) > 0.1))) {
280  pvType = -1;
281  if (kinEnergy == 0.) {
282  pvType = 0;
283  } else {
284  if (fabs (stepDeltaEnergy / kinEnergy) > 0.1) pvType = 1;
285  }
286  pvFound = true;
288  pvMomentum = momentum;
289  // Rotated coord.system:
290  pvUVW = (*beamline_RM)*(pvPosition);
291 
292  //Volume name requires some checks:
293  G4String thePostPVname = "NoName";
294  G4StepPoint * thePostPoint = aStep->GetPostStepPoint ();
295  if (thePostPoint) {
296  thePostStepPoint = thePostPoint->GetPosition();
297  G4VPhysicalVolume * thePostPV = thePostPoint->GetPhysicalVolume ();
298  if (thePostPV) thePostPVname = thePostPV->GetName ();
299  }
300 #ifdef ddebug
301  LogDebug("HcalTBSim") << "HcalTB04Analysis:: V1 found at: "
302  << thePostStepPoint << " G4VPhysicalVolume: "
303  << thePostPVname;
304 #endif
305  LogDebug("HcalTBSim") << "HcalTB04Analysis::fill_v1Pos: Primary Track "
306  << "momentum: " << pvMomentum << " psoition "
307  << pvPosition << " u/v/w " << pvUVW;
308  }
309  } else {
310  // watch for secondaries originating @v1, including the surviving primary
311  if ((trackID != 1 && parentID == 1 &&
312  (aTrack->GetCurrentStepNumber () == 1) &&
313  (thePreStepPoint == pvPosition)) ||
314  (trackID == 1 && thePreStepPoint == pvPosition)) {
315 #ifdef ddebug
316  LogDebug("HcalTBSim") << "HcalTB04Analysis::A secondary... PDG:"
317  << partPDGEncoding << " TrackID:" << trackID
318  << " ParentID:" << parentID << " stable: "
319  << isPDGStable << " Tau: " << pDGlifetime
320  << " cTauGamma="
321  << c_light*pDGlifetime*gammaFactor*1000.
322  << "um" << " GammaFactor: " << gammaFactor;
323 #endif
324  secTrackID.push_back(trackID);
325  secPartID.push_back(partPDGEncoding);
326  secMomentum.push_back(momentum);
327  secEkin.push_back(aTrack->GetKineticEnergy());
328 
329  // Check for short-lived secondaries: cTauGamma<100um
330  double ctaugamma_um = c_light * pDGlifetime * gammaFactor * 1000.;
331  if ((ctaugamma_um>0.) && (ctaugamma_um<100.)) {//short-lived secondary
332  shortLivedSecondaries.push_back(trackID);
333  } else {//normal secondary - enter into the V1-calorimetric tree
334  // histos->fill_v1cSec (aTrack);
335  }
336  }
337  // Also watch for tertiary particles coming from
338  // short-lived secondaries from V1
339  if (aTrack->GetCurrentStepNumber() == 1) {
340  if (shortLivedSecondaries.size() > 0) {
341  int pid = parentID;
342  std::vector<int>::iterator pos1= shortLivedSecondaries.begin();
343  std::vector<int>::iterator pos2 = shortLivedSecondaries.end();
344  std::vector<int>::iterator pos;
345  for (pos = pos1; pos != pos2; pos++) {
346  if (*pos == pid) {//ParentID is on the list of short-lived
347  // secondary
348 #ifdef ddebug
349  LogDebug("HcalTBSim") << "HcalTB04Analysis:: A tertiary... PDG:"
350  << partPDGEncoding << " TrackID:" <<trackID
351  << " ParentID:" << parentID << " stable: "
352  << isPDGStable << " Tau: " << pDGlifetime
353  << " cTauGamma="
354  << c_light*pDGlifetime*gammaFactor*1000.
355  << "um GammaFactor: " << gammaFactor;
356 #endif
357  }
358  }
359  }
360  }
361  }
362  }
363 }
#define LogDebug(id)
std::vector< double > secEkin
std::vector< int > shortLivedSecondaries
std::vector< int > secTrackID
#define NULL
Definition: scimark2.h:8
static int position[TOTALCHAMBERS][3]
Definition: ReadPGInfo.cc:509
std::vector< int > secPartID
G4ThreeVector pvUVW
std::vector< G4ThreeVector > secMomentum
G4ThreeVector pvMomentum
G4ThreeVector pvPosition
void HcalTB04Analysis::update ( const EndOfEvent )
privatevirtual

This routine will be called when the appropriate signal arrives.

Implements Observer< const EndOfEvent * >.

Definition at line 365 of file HcalTB04Analysis.cc.

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

Referenced by progressbar.ProgressBar::__next__(), relval_steps.Matrix::__setitem__(), relval_steps.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(), relval_steps.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().

365  {
366 
367  count++;
368 
369  //fill the buffer
370  LogDebug("HcalTBSim") << "HcalTB04Analysis::Fill event "
371  << (*evt)()->GetEventID();
372  fillBuffer (evt);
373 
374  //QIE analysis
375  LogDebug("HcalTBSim") << "HcalTB04Analysis::Do QIE analysis with "
376  << hcalHitCache.size() << " hits";
377  qieAnalysis();
378 
379  //Energy in Crystal Matrix
380  if (!hcalOnly) {
381  LogDebug("HcalTBSim") << "HcalTB04Analysis::Do Xtal analysis with "
382  << ecalHitCache.size() << " hits";
383  xtalAnalysis();
384  }
385 
386  //Final Analysis
387  LogDebug("HcalTBSim") << "HcalTB04Analysis::Final analysis";
388  finalAnalysis();
389 
390  int iEvt = (*evt)()->GetEventID();
391  if (iEvt < 10)
392  edm::LogInfo("HcalTBSim") << "HcalTB04Analysis:: Event " << iEvt;
393  else if ((iEvt < 100) && (iEvt%10 == 0))
394  edm::LogInfo("HcalTBSim") << "HcalTB04Analysis:: Event " << iEvt;
395  else if ((iEvt < 1000) && (iEvt%100 == 0))
396  edm::LogInfo("HcalTBSim") << "HcalTB04Analysis:: Event " << iEvt;
397  else if ((iEvt < 10000) && (iEvt%1000 == 0))
398  edm::LogInfo("HcalTBSim") << "HcalTB04Analysis:: Event " << iEvt;
399 }
#define LogDebug(id)
void fillBuffer(const EndOfEvent *evt)
std::vector< CaloHit > hcalHitCache
std::vector< CaloHit > ecalHitCache
void HcalTB04Analysis::xtalAnalysis ( )
private

Definition at line 718 of file HcalTB04Analysis.cc.

References ecalHitCache, ecalNoise, enois, Vispa.Plugins.EdmBrowser.EdmDataAccessor::eq(), esime, edm::hlt::Exception, edm::RandomNumberGenerator::getEngine(), idEcal, edm::Service< T >::isAvailable(), LogDebug, and nCrystal.

Referenced by update().

718  {
719 
721  if ( ! rng.isAvailable()) {
722  throw cms::Exception("Configuration")
723  << "HcalTB04Analysis requires the RandomNumberGeneratorService\n"
724  << "which is not present in the configuration file. "
725  << "You must add the service\n in the configuration file or "
726  << "remove the modules that require it.";
727  }
728  CLHEP::RandGaussQ randGauss(rng->getEngine());
729 
730  // Crystal Data
731  std::vector<int> iok(nCrystal,0);
732  LogDebug("HcalTBSim") << "HcalTB04Analysis::xtalAnalysis: Size " <<iok.size()
733  << " " << idEcal.size() << " " << esime.size() << " "
734  << enois.size();
735  for (unsigned int k1 = 0; k1 < ecalHitCache.size(); k1++) {
736  uint32_t id = ecalHitCache[k1].id();
737  int nhit = 0;
738  double esim = ecalHitCache[k1].e();
739  for (unsigned int k2 = k1+1; k2 < ecalHitCache.size(); k2++) {
740  if (ecalHitCache[k2].id() == id) {
741  nhit++;
742  esim += ecalHitCache[k2].e();
743  }
744  }
745  k1 += nhit;
746  nhit++;
747  double eq = esim + randGauss.fire(0., ecalNoise);
748 #ifdef ddebug
749  LogDebug("HcalTBSim") << "HcalTB04Analysis:: ID 0x" << std::hex << id
750  << std::dec << " registers " << esim << " energy "
751  << "from " << nhit << " hits starting with hit # "
752  << k1 << " energy with noise " << eq;
753 #endif
754  for (int k2 = 0; k2 < nCrystal; k2++) {
755  if (id == idEcal[k2]) {
756  iok[k2] = 1;
757  esime[k2] = esim;
758  enois[k2] = eq;
759  }
760  }
761  }
762 
763  // Crystals with no hit
764  for (int k2 = 0; k2 < nCrystal; k2++) {
765  if (iok[k2] == 0) {
766  esime[k2] = 0;
767  enois[k2] = randGauss.fire(0., ecalNoise);
768 #ifdef ddebug
769  LogDebug("HcalTBSim") << "HcalTB04Analysis:: ID 0x" << std::hex
770  << idEcal[k2] << std::dec << " registers "
771  << esime[k2] << " energy from hits and energy from"
772  << " noise " << enois[k2];
773 #endif
774  }
775  }
776 }
#define LogDebug(id)
std::vector< uint32_t > idEcal
bool isAvailable() const
Definition: Service.h:47
virtual CLHEP::HepRandomEngine & getEngine() const =0
Use this to get the random number engine, this is the only function most users should call...
std::vector< double > esime
std::vector< CaloHit > ecalHitCache
std::vector< double > enois

Member Data Documentation

G4RotationMatrix* HcalTB04Analysis::beamline_RM
private

Definition at line 98 of file HcalTB04Analysis.h.

Referenced by HcalTB04Analysis().

double HcalTB04Analysis::beamOffset
private

Definition at line 94 of file HcalTB04Analysis.h.

Referenced by HcalTB04Analysis(), and timeOfFlight().

int HcalTB04Analysis::count
private

Definition at line 101 of file HcalTB04Analysis.h.

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

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

Definition at line 109 of file HcalTB04Analysis.h.

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

double HcalTB04Analysis::ecalNoise
private

Definition at line 94 of file HcalTB04Analysis.h.

Referenced by HcalTB04Analysis(), and xtalAnalysis().

double HcalTB04Analysis::eecalq
private

Definition at line 113 of file HcalTB04Analysis.h.

Referenced by fillEvent(), and finalAnalysis().

double HcalTB04Analysis::eecals
private

Definition at line 113 of file HcalTB04Analysis.h.

Referenced by fillEvent(), and finalAnalysis().

double HcalTB04Analysis::ehcalq
private

Definition at line 113 of file HcalTB04Analysis.h.

Referenced by fillEvent(), and finalAnalysis().

double HcalTB04Analysis::ehcals
private

Definition at line 113 of file HcalTB04Analysis.h.

Referenced by fillEvent(), and finalAnalysis().

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

Definition at line 111 of file HcalTB04Analysis.h.

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

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

Definition at line 112 of file HcalTB04Analysis.h.

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

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

Definition at line 111 of file HcalTB04Analysis.h.

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

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

Definition at line 112 of file HcalTB04Analysis.h.

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

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

Definition at line 112 of file HcalTB04Analysis.h.

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

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

Definition at line 112 of file HcalTB04Analysis.h.

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

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

Definition at line 111 of file HcalTB04Analysis.h.

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

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

Definition at line 111 of file HcalTB04Analysis.h.

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

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

Definition at line 112 of file HcalTB04Analysis.h.

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

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

Definition at line 112 of file HcalTB04Analysis.h.

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

double HcalTB04Analysis::etaInit
private

Definition at line 108 of file HcalTB04Analysis.h.

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

double HcalTB04Analysis::etotq
private

Definition at line 113 of file HcalTB04Analysis.h.

Referenced by fillEvent(), and finalAnalysis().

double HcalTB04Analysis::etots
private

Definition at line 113 of file HcalTB04Analysis.h.

Referenced by fillEvent(), and finalAnalysis().

int HcalTB04Analysis::evNum
private

Definition at line 116 of file HcalTB04Analysis.h.

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

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

Definition at line 110 of file HcalTB04Analysis.h.

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

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

Definition at line 110 of file HcalTB04Analysis.h.

Referenced by clear(), and fillBuffer().

bool HcalTB04Analysis::hcalOnly
private

Definition at line 92 of file HcalTB04Analysis.h.

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

HcalTB04Histo* HcalTB04Analysis::histo
private

Definition at line 89 of file HcalTB04Analysis.h.

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

int HcalTB04Analysis::iceta
private

Definition at line 95 of file HcalTB04Analysis.h.

Referenced by finalAnalysis(), and HcalTB04Analysis().

int HcalTB04Analysis::icphi
private

Definition at line 95 of file HcalTB04Analysis.h.

Referenced by finalAnalysis(), and HcalTB04Analysis().

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

Definition at line 104 of file HcalTB04Analysis.h.

Referenced by init(), and xtalAnalysis().

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

Definition at line 103 of file HcalTB04Analysis.h.

Referenced by fillEvent(), and init().

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

Definition at line 104 of file HcalTB04Analysis.h.

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

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

Definition at line 103 of file HcalTB04Analysis.h.

Referenced by fillEvent(), and init().

int HcalTB04Analysis::mode
private

Definition at line 93 of file HcalTB04Analysis.h.

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

HcalQie* HcalTB04Analysis::myQie
private

Definition at line 88 of file HcalTB04Analysis.h.

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

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

Definition at line 97 of file HcalTB04Analysis.h.

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

int HcalTB04Analysis::nCrystal
private

Definition at line 102 of file HcalTB04Analysis.h.

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

int HcalTB04Analysis::nPrimary
private

Definition at line 107 of file HcalTB04Analysis.h.

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

int HcalTB04Analysis::nTower
private

Definition at line 102 of file HcalTB04Analysis.h.

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

int HcalTB04Analysis::particleType
private

Definition at line 107 of file HcalTB04Analysis.h.

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

double HcalTB04Analysis::phiInit
private

Definition at line 108 of file HcalTB04Analysis.h.

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

double HcalTB04Analysis::pInit
private

Definition at line 108 of file HcalTB04Analysis.h.

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

bool HcalTB04Analysis::pvFound
private

Definition at line 115 of file HcalTB04Analysis.h.

Referenced by clear(), and update().

G4ThreeVector HcalTB04Analysis::pvMomentum
private

Definition at line 117 of file HcalTB04Analysis.h.

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

G4ThreeVector HcalTB04Analysis::pvPosition
private

Definition at line 117 of file HcalTB04Analysis.h.

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

int HcalTB04Analysis::pvType
private

Definition at line 116 of file HcalTB04Analysis.h.

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

G4ThreeVector HcalTB04Analysis::pvUVW
private

Definition at line 117 of file HcalTB04Analysis.h.

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

double HcalTB04Analysis::scaleHB0
private

Definition at line 96 of file HcalTB04Analysis.h.

Referenced by HcalTB04Analysis(), and scale().

double HcalTB04Analysis::scaleHB16
private

Definition at line 96 of file HcalTB04Analysis.h.

Referenced by HcalTB04Analysis(), and scale().

double HcalTB04Analysis::scaleHE0
private

Definition at line 96 of file HcalTB04Analysis.h.

Referenced by HcalTB04Analysis(), and scale().

double HcalTB04Analysis::scaleHO
private

Definition at line 96 of file HcalTB04Analysis.h.

Referenced by HcalTB04Analysis(), and scale().

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

Definition at line 120 of file HcalTB04Analysis.h.

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

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

Definition at line 119 of file HcalTB04Analysis.h.

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

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

Definition at line 118 of file HcalTB04Analysis.h.

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

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

Definition at line 118 of file HcalTB04Analysis.h.

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

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

Definition at line 121 of file HcalTB04Analysis.h.

Referenced by clear(), and update().

int HcalTB04Analysis::type
private