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::ProducerBase &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 47 of file HcalTB04Analysis.h.

Constructor & Destructor Documentation

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

Definition at line 59 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.

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

References count, histo, and myQie.

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

Member Function Documentation

void HcalTB04Analysis::clear ( void  )
private

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

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

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

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

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

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

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

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

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

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

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

Referenced by fillBuffer().

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

Definition at line 1014 of file HcalTB04Analysis.cc.

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

Referenced by fillBuffer().

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

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

Referenced by fillBuffer(), and init().

989  {
990 
991  int det, z, group, ieta, iphi, lay;
992  HcalTestNumbering::unpackHcalIndex(id,det,z,group,ieta,iphi,lay);
993  group = (det&15)<<20;
994  group += ((lay-1)&31)<<15;
995  group += (z&1)<<14;
996  group += (ieta&127)<<7;
997  group += (iphi&127);
998  return group;
999 }
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 194 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().

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

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

This routine will be called when the appropriate signal arrives.

Implements Observer< const G4Step * >.

Definition at line 250 of file HcalTB04Analysis.cc.

References LogDebug, NULL, sysUtil::pid, 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().

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

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

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

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

Referenced by HcalTB04Analysis().

double HcalTB04Analysis::beamOffset
private

Definition at line 93 of file HcalTB04Analysis.h.

Referenced by HcalTB04Analysis(), and timeOfFlight().

int HcalTB04Analysis::count
private

Definition at line 100 of file HcalTB04Analysis.h.

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

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

Definition at line 108 of file HcalTB04Analysis.h.

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

double HcalTB04Analysis::ecalNoise
private

Definition at line 93 of file HcalTB04Analysis.h.

Referenced by HcalTB04Analysis(), and xtalAnalysis().

double HcalTB04Analysis::eecalq
private

Definition at line 112 of file HcalTB04Analysis.h.

Referenced by fillEvent(), and finalAnalysis().

double HcalTB04Analysis::eecals
private

Definition at line 112 of file HcalTB04Analysis.h.

Referenced by fillEvent(), and finalAnalysis().

double HcalTB04Analysis::ehcalq
private

Definition at line 112 of file HcalTB04Analysis.h.

Referenced by fillEvent(), and finalAnalysis().

double HcalTB04Analysis::ehcals
private

Definition at line 112 of file HcalTB04Analysis.h.

Referenced by fillEvent(), and finalAnalysis().

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

Definition at line 110 of file HcalTB04Analysis.h.

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

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

Definition at line 111 of file HcalTB04Analysis.h.

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

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

Definition at line 110 of file HcalTB04Analysis.h.

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

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

Definition at line 111 of file HcalTB04Analysis.h.

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

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

Definition at line 111 of file HcalTB04Analysis.h.

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

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

Definition at line 111 of file HcalTB04Analysis.h.

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

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

Definition at line 110 of file HcalTB04Analysis.h.

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

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

Definition at line 110 of file HcalTB04Analysis.h.

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

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

Definition at line 111 of file HcalTB04Analysis.h.

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

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

Definition at line 111 of file HcalTB04Analysis.h.

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

double HcalTB04Analysis::etaInit
private

Definition at line 107 of file HcalTB04Analysis.h.

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

double HcalTB04Analysis::etotq
private

Definition at line 112 of file HcalTB04Analysis.h.

Referenced by fillEvent(), and finalAnalysis().

double HcalTB04Analysis::etots
private

Definition at line 112 of file HcalTB04Analysis.h.

Referenced by fillEvent(), and finalAnalysis().

int HcalTB04Analysis::evNum
private

Definition at line 115 of file HcalTB04Analysis.h.

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

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

Definition at line 109 of file HcalTB04Analysis.h.

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

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

Definition at line 109 of file HcalTB04Analysis.h.

Referenced by clear(), and fillBuffer().

bool HcalTB04Analysis::hcalOnly
private

Definition at line 91 of file HcalTB04Analysis.h.

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

HcalTB04Histo* HcalTB04Analysis::histo
private

Definition at line 88 of file HcalTB04Analysis.h.

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

int HcalTB04Analysis::iceta
private

Definition at line 94 of file HcalTB04Analysis.h.

Referenced by finalAnalysis(), and HcalTB04Analysis().

int HcalTB04Analysis::icphi
private

Definition at line 94 of file HcalTB04Analysis.h.

Referenced by finalAnalysis(), and HcalTB04Analysis().

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

Definition at line 103 of file HcalTB04Analysis.h.

Referenced by init(), and xtalAnalysis().

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

Definition at line 102 of file HcalTB04Analysis.h.

Referenced by fillEvent(), and init().

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

Definition at line 103 of file HcalTB04Analysis.h.

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

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

Definition at line 102 of file HcalTB04Analysis.h.

Referenced by fillEvent(), and init().

int HcalTB04Analysis::mode
private

Definition at line 92 of file HcalTB04Analysis.h.

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

HcalQie* HcalTB04Analysis::myQie
private

Definition at line 87 of file HcalTB04Analysis.h.

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

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

Definition at line 96 of file HcalTB04Analysis.h.

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

int HcalTB04Analysis::nCrystal
private

Definition at line 101 of file HcalTB04Analysis.h.

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

int HcalTB04Analysis::nPrimary
private

Definition at line 106 of file HcalTB04Analysis.h.

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

int HcalTB04Analysis::nTower
private

Definition at line 101 of file HcalTB04Analysis.h.

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

int HcalTB04Analysis::particleType
private

Definition at line 106 of file HcalTB04Analysis.h.

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

double HcalTB04Analysis::phiInit
private

Definition at line 107 of file HcalTB04Analysis.h.

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

double HcalTB04Analysis::pInit
private

Definition at line 107 of file HcalTB04Analysis.h.

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

bool HcalTB04Analysis::pvFound
private

Definition at line 114 of file HcalTB04Analysis.h.

Referenced by clear(), and update().

G4ThreeVector HcalTB04Analysis::pvMomentum
private

Definition at line 116 of file HcalTB04Analysis.h.

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

G4ThreeVector HcalTB04Analysis::pvPosition
private

Definition at line 116 of file HcalTB04Analysis.h.

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

int HcalTB04Analysis::pvType
private

Definition at line 115 of file HcalTB04Analysis.h.

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

G4ThreeVector HcalTB04Analysis::pvUVW
private

Definition at line 116 of file HcalTB04Analysis.h.

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

double HcalTB04Analysis::scaleHB0
private

Definition at line 95 of file HcalTB04Analysis.h.

Referenced by HcalTB04Analysis(), and scale().

double HcalTB04Analysis::scaleHB16
private

Definition at line 95 of file HcalTB04Analysis.h.

Referenced by HcalTB04Analysis(), and scale().

double HcalTB04Analysis::scaleHE0
private

Definition at line 95 of file HcalTB04Analysis.h.

Referenced by HcalTB04Analysis(), and scale().

double HcalTB04Analysis::scaleHO
private

Definition at line 95 of file HcalTB04Analysis.h.

Referenced by HcalTB04Analysis(), and scale().

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

Definition at line 119 of file HcalTB04Analysis.h.

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

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

Definition at line 118 of file HcalTB04Analysis.h.

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

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

Definition at line 117 of file HcalTB04Analysis.h.

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

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

Definition at line 117 of file HcalTB04Analysis.h.

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

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

Definition at line 120 of file HcalTB04Analysis.h.

Referenced by clear(), and update().

int HcalTB04Analysis::type
private