44 #include "CLHEP/Random/RandGaussQ.h"
47 #include "G4SDManager.hh"
48 #include "G4VProcess.hh"
49 #include "G4HCofThisEvent.hh"
50 #include "CLHEP/Units/GlobalSystemOfUnits.h"
51 #include "CLHEP/Units/GlobalPhysicalConstants.h"
75 double beamEta = (fMaxEta+fMinEta)/2.;
76 double beamPhi = (fMaxPhi+fMinPhi)/2.;
77 double beamThet= 2*atan(
exp(-beamEta));
78 if (beamPhi < 0) beamPhi += twopi;
79 iceta = (int)(beamEta/0.087) + 1;
80 icphi = (int)(fabs(beamPhi)/0.087) + 5;
83 produces<PHcalTB04Info>();
86 beamline_RM->rotateZ(-beamPhi);
87 beamline_RM->rotateY(-beamThet);
89 edm::LogInfo(
"HcalTBSim") <<
"HcalTB04:: Initialised as observer of BeginOf"
90 <<
"Job/BeginOfRun/BeginOfEvent/G4Step/EndOfEvent"
91 <<
" with Parameter values:\n \thcalOnly = "
92 << hcalOnly <<
"\tecalNoise = " << ecalNoise
93 <<
"\n\tMode = " << mode <<
" (0: HB2 Standard; "
94 <<
"1:HB2 Segmented)" <<
"\tType = " << type
95 <<
" (0: HB; 1 HE; 2 HB+HE)\n\tbeamOffset = "
96 << beamOffset <<
"\ticeta = " <<
iceta
97 <<
"\ticphi = " <<
icphi <<
"\n\tbeamline_RM = "
108 edm::LogInfo(
"HcalTBSim") <<
"\n --------> Total number of selected entries"
109 <<
" : " <<
count <<
"\nPointers:: QIE " <<
myQie
110 <<
" Histo " <<
histo;
136 edm::LogInfo(
"HcalTBSim") <<
"HcalTB04Analysis:: Save information from "
137 <<
nTower <<
" HCal towers";
142 LogDebug(
"HcalTBSim") <<
"\tTower[" << i <<
"] Original " << std::hex
150 for (
int lay=1; lay<8; lay++) {
151 for (
int icr=1; icr<8; icr++) {
159 edm::LogInfo(
"HcalTBSim") <<
"HcalTB04Analysis:: Save information from "
162 LogDebug(
"HcalTBSim") <<
"\tCrystal[" <<
i <<
"] Original " << std::hex
173 for (
int i=0;
i<5;
i++) {
177 for (
int i=0;
i<3;
i++) {
181 for (
int i=0;
i<20;
i++) {
194 int irun = (*run)()->GetRunID();
195 edm::LogInfo(
"HcalTBSim") <<
" =====> Begin of Run = " << irun;
197 G4SDManager*
sd = G4SDManager::GetSDMpointerIfExist();
199 std::string sdname =
names[0];
200 G4VSensitiveDetector* aSD = sd->FindSensitiveDetector(sdname);
203 <<
" with name " << sdname <<
" in this "
207 edm::LogInfo(
"HcalTBSim") <<
"HcalTB04Analysis::beginOfRun: Finds SD "
208 <<
"with name " << theCaloSD->GetName()
212 edm::LogInfo(
"HcalTBSim") <<
"HcalTB04Analysis::beginOfRun: set a "
213 <<
"new numbering scheme";
217 aSD = sd->FindSensitiveDetector(sdname);
220 <<
" with name " << sdname <<
" in this "
224 edm::LogInfo(
"HcalTBSim") <<
"HcalTB04Analysis::beginOfRun: Finds SD "
225 <<
"with name " << theCaloSD->GetName()
229 edm::LogInfo(
"HcalTBSim") <<
"HcalTB04Analysis::beginOfRun: set a "
230 <<
"new numbering scheme";
235 <<
"not get SD Manager!";
242 evNum = (*evt) ()->GetEventID ();
244 edm::LogInfo(
"HcalTBSim") <<
"HcalTB04Analysis: =====> Begin of event = "
252 G4ThreeVector thePreStepPoint = aStep->GetPreStepPoint()->GetPosition();
253 G4ThreeVector thePostStepPoint;
256 G4Track* aTrack = aStep->GetTrack();
257 int trackID = aTrack->GetTrackID();
258 int parentID = aTrack->GetParentID();
259 G4ThreeVector
position = aTrack->GetPosition();
260 G4ThreeVector momentum = aTrack->GetMomentum();
261 G4String partType = aTrack->GetDefinition()->GetParticleType();
262 G4String partSubType = aTrack->GetDefinition()->GetParticleSubType();
263 int partPDGEncoding = aTrack->GetDefinition()->GetPDGEncoding();
265 bool isPDGStable = aTrack->GetDefinition()->GetPDGStable();
267 double pDGlifetime = aTrack->GetDefinition()->GetPDGLifeTime();
268 double gammaFactor = aStep->GetPreStepPoint()->GetGamma();
271 double stepDeltaEnergy = aStep->GetDeltaEnergy ();
272 double kinEnergy = aTrack->GetKineticEnergy ();
275 if (trackID == 1 && parentID == 0 &&
276 ((kinEnergy == 0.) || (fabs (stepDeltaEnergy / kinEnergy) > 0.1))) {
278 if (kinEnergy == 0.) {
281 if (fabs (stepDeltaEnergy / kinEnergy) > 0.1)
pvType = 1;
290 G4String thePostPVname =
"NoName";
291 G4StepPoint * thePostPoint = aStep->GetPostStepPoint ();
293 thePostStepPoint = thePostPoint->GetPosition();
294 G4VPhysicalVolume * thePostPV = thePostPoint->GetPhysicalVolume ();
295 if (thePostPV) thePostPVname = thePostPV->GetName ();
298 LogDebug(
"HcalTBSim") <<
"HcalTB04Analysis:: V1 found at: "
299 << thePostStepPoint <<
" G4VPhysicalVolume: "
302 LogDebug(
"HcalTBSim") <<
"HcalTB04Analysis::fill_v1Pos: Primary Track "
308 if ((trackID != 1 && parentID == 1 &&
309 (aTrack->GetCurrentStepNumber () == 1) &&
311 (trackID == 1 && thePreStepPoint ==
pvPosition)) {
313 LogDebug(
"HcalTBSim") <<
"HcalTB04Analysis::A secondary... PDG:"
314 << partPDGEncoding <<
" TrackID:" << trackID
315 <<
" ParentID:" << parentID <<
" stable: "
316 << isPDGStable <<
" Tau: " << pDGlifetime
318 << c_light*pDGlifetime*gammaFactor*1000.
319 <<
"um" <<
" GammaFactor: " << gammaFactor;
324 secEkin.push_back(aTrack->GetKineticEnergy());
327 double ctaugamma_um = c_light * pDGlifetime * gammaFactor * 1000.;
328 if ((ctaugamma_um>0.) && (ctaugamma_um<100.)) {
336 if (aTrack->GetCurrentStepNumber() == 1) {
341 std::vector<int>::iterator
pos;
342 for (pos = pos1; pos != pos2; pos++) {
346 LogDebug(
"HcalTBSim") <<
"HcalTB04Analysis:: A tertiary... PDG:"
347 << partPDGEncoding <<
" TrackID:" <<trackID
348 <<
" ParentID:" << parentID <<
" stable: "
349 << isPDGStable <<
" Tau: " << pDGlifetime
351 << c_light*pDGlifetime*gammaFactor*1000.
352 <<
"um GammaFactor: " << gammaFactor;
367 LogDebug(
"HcalTBSim") <<
"HcalTB04Analysis::Fill event "
368 << (*evt)()->GetEventID();
372 LogDebug(
"HcalTBSim") <<
"HcalTB04Analysis::Do QIE analysis with "
378 LogDebug(
"HcalTBSim") <<
"HcalTB04Analysis::Do Xtal analysis with "
384 LogDebug(
"HcalTBSim") <<
"HcalTB04Analysis::Final analysis";
387 int iEvt = (*evt)()->GetEventID();
389 edm::LogInfo(
"HcalTBSim") <<
"HcalTB04Analysis:: Event " << iEvt;
390 else if ((iEvt < 100) && (iEvt%10 == 0))
391 edm::LogInfo(
"HcalTBSim") <<
"HcalTB04Analysis:: Event " << iEvt;
392 else if ((iEvt < 1000) && (iEvt%100 == 0))
393 edm::LogInfo(
"HcalTBSim") <<
"HcalTB04Analysis:: Event " << iEvt;
394 else if ((iEvt < 10000) && (iEvt%1000 == 0))
395 edm::LogInfo(
"HcalTBSim") <<
"HcalTB04Analysis:: Event " << iEvt;
400 std::vector<CaloHit> hhits, hhitl;
403 std::map<int,float,std::less<int> > primaries;
404 double etot1=0, etot2=0;
407 G4HCofThisEvent* allHC = (*evt)()->GetHCofThisEvent();
408 std::string sdName =
names[0];
409 idHC = G4SDManager::GetSDMpointer()->GetCollectionID(sdName);
411 LogDebug(
"HcalTBSim") <<
"HcalTB04Analysis:: Hit Collection for " << sdName
412 <<
" of ID " << idHC <<
" is obtained at " << theHC;
414 if (idHC >= 0 && theHC > 0) {
415 hhits.reserve(theHC->entries());
416 hhitl.reserve(theHC->entries());
417 for (j = 0; j < theHC->entries(); j++) {
423 double theta = pos.theta();
425 double phi = pos.phi();
426 int det,
z, group, ieta, iphi, layer;
429 if (jitter<0) jitter = 0;
430 if (e < 0 || e > 1.) e = 0;
431 double escl = e *
scale(det,layer);
433 CaloHit hit(det,layer,escl,eta,phi,jitter,idx);
434 hhits.push_back(hit);
435 CaloHit hitl(det,layer,escl,eta,phi,jitter,
id);
436 hhitl.push_back(hitl);
440 LogDebug(
"HcalTBSim") <<
"HcalTB04Analysis:: Hcal Hit i/p " << j
441 <<
" ID 0x" << std::hex <<
id <<
" 0x" << idx
442 << std::dec <<
" time " << std::setw(6) << time
443 <<
" " << std::setw(6) << jitter <<
" theta "
444 << std::setw(8) << theta <<
" eta " << std::setw(8)
445 << eta <<
" phi " << std::setw(8) << phi <<
" e "
446 << std::setw(8) << e <<
" " << std::setw(8) <<escl;
452 std::vector<CaloHit>::iterator itr;
453 int nHit = hhits.size();
454 std::vector<CaloHit*> hits(nHit);
455 for (j = 0, itr = hhits.begin(); itr != hhits.end(); j++, itr++) {
459 std::vector<CaloHit*>::iterator k1, k2;
461 for (k1 = hits.begin(); k1 != hits.end(); k1++) {
462 int det = (**k1).det();
463 int layer = (**k1).layer();
464 double ehit = (**k1).e();
465 double eta = (**k1).eta();
466 double phi = (**k1).phi();
467 double jitter = (**k1).t();
468 uint32_t
unitID = (**k1).id();
470 for (k2 = k1+1; k2 != hits.end() && fabs(jitter-(**k2).t())<1 &&
471 unitID==(**k2).id(); k2++) {
476 CaloHit hit(det, layer, ehit, eta, phi, jitter, unitID);
481 LogDebug(
"HcalTBSim") <<
"HcalTB04Analysis:: Hcal Hit store " << nhit
482 <<
" ID 0x" << std::hex << unitID << std::dec
483 <<
" time " << std::setw(6) << jitter <<
" eta "
484 << std::setw(8) << eta <<
" phi " << std::setw(8)
485 << phi <<
" e " << std::setw(8) << ehit;
488 LogDebug(
"HcalTBSim") <<
"HcalTB04Analysis:: Stores " << nhit <<
" HCal hits"
489 <<
" from " << nHit <<
" input hits E(Hcal) " << etot1
493 for (j = 0, itr = hhitl.begin(); itr != hhitl.end(); j++, itr++) {
499 for (k1 = hits.begin(); k1 != hits.end(); k1++) {
500 int det = (**k1).det();
501 int layer = (**k1).layer();
502 double ehit = (**k1).e();
503 double eta = (**k1).eta();
504 double phi = (**k1).phi();
505 double jitter = (**k1).t();
506 uint32_t
unitID = (**k1).id();
508 for (k2 = k1+1; k2 != hits.end() && fabs(jitter-(**k2).t())<1 &&
509 unitID==(**k2).id(); k2++) {
514 CaloHit hit(det, layer, ehit, eta, phi, jitter, unitID);
519 LogDebug(
"HcalTBSim") <<
"HcalTB04Analysis:: Hcal Hit store " << nhitl
520 <<
" ID 0x" << std::hex << unitID << std::dec
521 <<
" time " << std::setw(6) << jitter <<
" eta "
522 << std::setw(8) << eta <<
" phi " << std::setw(8)
523 << phi <<
" e " << std::setw(8) << ehit;
526 LogDebug(
"HcalTBSim") <<
"HcalTB04Analysis:: Stores " << nhitl <<
" HCal "
527 <<
"hits from " << nHit <<
" input hits E(Hcal) "
528 << etot1 <<
" " << etotl;
531 std::vector<CaloHit> ehits;
533 idHC = G4SDManager::GetSDMpointer()->GetCollectionID(sdName);
536 LogDebug(
"HcalTBSim") <<
"HcalTB04Analysis:: Hit Collection for " << sdName
537 <<
" of ID " << idHC <<
" is obtained at " << theHC;
538 if (idHC >= 0 && theHC > 0) {
539 ehits.reserve(theHC->entries());
540 for (j = 0; j < theHC->entries(); j++) {
546 double theta = pos.theta();
548 double phi = pos.phi();
549 if (e < 0 || e > 100000.) e = 0;
550 int det,
z, group, ieta, iphi, layer;
553 ehits.push_back(hit);
557 LogDebug(
"HcalTBSim") <<
"HcalTB04Analysis:: Ecal Hit i/p " << j
558 <<
" ID 0x" << std::hex <<
id << std::dec
559 <<
" time " << std::setw(6) << time <<
" theta "
560 << std::setw(8) << theta <<
" eta " <<std::setw(8)
561 << eta <<
" phi " << std::setw(8) << phi <<
" e "
562 << std::setw(8) <<
e;
569 std::vector<CaloHit*> hite(nHit);
570 for (j = 0, itr = ehits.begin(); itr != ehits.end(); j++, itr++) {
575 for (k1 = hite.begin(); k1 != hite.end(); k1++) {
576 int det = (**k1).det();
577 int layer = (**k1).layer();
578 double ehit = (**k1).e();
579 double eta = (**k1).eta();
580 double phi = (**k1).phi();
581 double jitter = (**k1).t();
582 uint32_t
unitID = (**k1).id();
584 for (k2 = k1+1; k2 != hite.end() && fabs(jitter-(**k2).t())<1 &&
585 unitID==(**k2).id(); k2++) {
590 CaloHit hit(det, layer, ehit, eta, phi, jitter, unitID);
595 LogDebug(
"HcalTBSim") <<
"HcalTB04Analysis:: Ecal Hit store " << nhit
596 <<
" ID 0x" << std::hex << unitID << std::dec
597 <<
" time " << std::setw(6) << jitter <<
" eta "
598 << std::setw(8) << eta <<
" phi " << std::setw(8)
599 << phi <<
" e " << std::setw(8) << ehit;
602 LogDebug(
"HcalTBSim") <<
"HcalTB04Analysis:: Stores " << nhit <<
" ECal hits"
603 <<
" from " << nHit <<
" input hits E(Ecal) " << etot1
609 G4PrimaryParticle* thePrim=0;
610 int nvertex = (*evt)()->GetNumberOfPrimaryVertex();
611 LogDebug(
"HcalTBSim") <<
"HcalTB04Analysis:: Event has " << nvertex
614 edm::LogInfo(
"HcalTBSim") <<
"HcalTB04Analysis::EndOfEvent ERROR: no "
615 <<
"vertex found for event " <<
evNum;
617 for (
int i = 0 ;
i<nvertex;
i++) {
618 G4PrimaryVertex* avertex = (*evt)()->GetPrimaryVertex(
i);
620 edm::LogInfo(
"HcalTBSim") <<
"HcalTB04Analysis::EndOfEvent ERR: pointer "
621 <<
"to vertex = 0 for event " <<
evNum;
623 LogDebug(
"HcalTBSim") <<
"HcalTB04Analysis::Vertex number :" <<
i <<
" "
624 << avertex->GetPosition();
625 int npart = avertex->GetNumberOfParticle();
629 if (thePrim==0) thePrim=avertex->GetPrimary(trackID);
634 double px = thePrim->GetPx();
635 double py = thePrim->GetPy();
636 double pz = thePrim->GetPz();
641 <<
"primary has p=0 ";
643 double costheta = pz/
p;
646 if (px != 0 || py != 0)
phiInit = atan2(py,px);
650 edm::LogWarning(
"HcalTBSim") <<
"HcalTB04Analysis::EndOfEvent ERR: could "
651 <<
"not find primary";
658 if (hittot<=0) hittot = 1;
659 std::vector<CaloHit> hits(hittot);
660 std::vector<int> todo(
nTower,0);
662 LogDebug(
"HcalTBSim") <<
"HcalTB04Analysis::qieAnalysis: Size "
663 << hits.size() <<
" " << todo.size() <<
" "
667 for (
unsigned int k1 = 0; k1 <
hcalHitCache.size(); k1++) {
669 uint32_t
id = hit.
id();
671 double esim = hit.
e();
673 for (
unsigned int k2 = k1+1; k2 <
hcalHitCache.size(); k2++) {
675 if (hit.
id() ==
id) {
685 LogDebug(
"HcalTBSim") <<
"HcalTB04Analysis:: ID 0x" << std::hex <<
id
686 << std::dec <<
" registers " << esim <<
" energy "
687 <<
"from " << nhit <<
" hits starting with hit # "
688 << k1 <<
" energy with noise " <<
eq;
689 for (
int k2 = 0; k2 <
nTower; k2++) {
699 for (
int k2 = 0; k2 <
nTower; k2++) {
706 LogDebug(
"HcalTBSim") <<
"HcalTB04Analysis:: ID 0x" << std::hex
707 <<
idTower[k2] << std::dec <<
" registers "
708 <<
esimh[k2] <<
" energy from hits and energy "
709 <<
"after QIE analysis " <<
eqie[k2];
720 <<
"HcalTB04Analysis requires the RandomNumberGeneratorService\n"
721 <<
"which is not present in the configuration file. "
722 <<
"You must add the service\n in the configuration file or "
723 <<
"remove the modules that require it.";
725 CLHEP::RandGaussQ randGauss(rng->
getEngine());
729 LogDebug(
"HcalTBSim") <<
"HcalTB04Analysis::xtalAnalysis: Size " <<iok.size()
730 <<
" " <<
idEcal.size() <<
" " <<
esime.size() <<
" "
732 for (
unsigned int k1 = 0; k1 <
ecalHitCache.size(); k1++) {
736 for (
unsigned int k2 = k1+1; k2 <
ecalHitCache.size(); k2++) {
746 LogDebug(
"HcalTBSim") <<
"HcalTB04Analysis:: ID 0x" << std::hex <<
id
747 << std::dec <<
" registers " << esim <<
" energy "
748 <<
"from " << nhit <<
" hits starting with hit # "
749 << k1 <<
" energy with noise " <<
eq;
751 for (
int k2 = 0; k2 <
nCrystal; k2++) {
761 for (
int k2 = 0; k2 <
nCrystal; k2++) {
766 LogDebug(
"HcalTBSim") <<
"HcalTB04Analysis:: ID 0x" << std::hex
767 <<
idEcal[k2] << std::dec <<
" registers "
768 <<
esime[k2] <<
" energy from hits and energy from"
769 <<
" noise " <<
enois[k2];
792 LogDebug(
"HcalTBSim") <<
"HcalTB04Analysis:: Energy deposit at Sim Level "
794 <<
" (HCal) " << ehcals <<
"\nHcalTB04Analysis:: "
795 <<
"Energy deposit at Qie Level (Total) " <<
etotq
800 for (
int i=0;
i<5;
i++) {
804 for (
int i=0;
i<3;
i++) {
811 int det,
z, group, ieta, iphi, layer;
816 if (ieta == 0) ieta = 2;
819 ieta = ieta -
iceta + 2;
821 if (iphi >= 0 && iphi < 3 && ieta >= 0 && ieta < 5) {
830 for (
int i=0;
i<3;
i++) {
834 for (
int i=0;
i<5;
i++) {
838 LogDebug(
"HcalTBSim") <<
"HcalTB04Analysis:: Energy fraction along Eta and"
840 for (
int i=0;
i<5;
i++)
841 LogDebug(
"HcalTBSim") <<
"HcalTB04Analysis:: [" <<
i <<
"] Eta Sim = "
847 for (
int i=0;
i<20;
i++) {
853 int det,
z, group, ieta, iphi, layer;
858 if (iphi >= 0 && iphi < 3 && layer >= 0 && layer < 20) {
865 for (
int i=0;
i<20;
i++) {
869 LogDebug(
"HcalTBSim") <<
"HcalTB04Analysis:: Energy fraction along Layer";
870 for (
int i=0;
i<20;
i++)
871 LogDebug(
"HcalTBSim") <<
"HcalTB04Analysis:: [" <<
i <<
"] Sim = "
900 std::vector<CaloHit>::iterator itr;
902 uint32_t
id = itr->id();
903 int det,
z, group, ieta, iphi, lay;
905 product.
saveHit(det, lay, ieta, iphi, itr->e(), itr->t());
908 LogDebug(
"HcalTBSim") <<
"HcalTB04Analysis:: Save Hit " << std::setw(3)
909 << i+1 <<
" ID 0x" << std::hex << group << std::dec
910 <<
" " << std::setw(2) << det <<
" " << std::setw(2)
911 << lay <<
" " << std::setw(1) << z <<
" "
912 << std::setw(3) << ieta <<
" " << std::setw(3) <<iphi
913 <<
" T " << std::setw(6) << itr->t() <<
" E "
914 << std::setw(6) << itr->e();
917 LogDebug(
"HcalTBSim") <<
"HcalTB04Analysis:: Saves " << nhit
918 <<
" hits from Crystals";
923 uint32_t
id = itr->
id();
924 int det,
z, group, ieta, iphi, lay;
926 product.
saveHit(det, lay, ieta, iphi, itr->e(), itr->t());
929 LogDebug(
"HcalTBSim") <<
"HcalTB04Analysis:: Save Hit " << std::setw(3)
930 << i+1 <<
" ID 0x" << std::hex << group << std::dec
931 <<
" " << std::setw(2) << det <<
" " << std::setw(2)
932 << lay <<
" " << std::setw(1) << z <<
" "
933 << std::setw(3) << ieta <<
" " << std::setw(3) <<iphi
934 <<
" T " << std::setw(6) << itr->t() <<
" E "
935 << std::setw(6) << itr->e();
938 LogDebug(
"HcalTBSim") <<
"HcalTB04Analysis:: Saves " << nhit
939 <<
" hits from HCal";
945 for (
unsigned int i = 0; i <
secTrackID.size(); i++) {
956 pvUVW = G4ThreeVector();
989 int det,
z, group, ieta, iphi, lay;
991 group = (det&15)<<20;
992 group += ((lay-1)&31)<<15;
994 group += (ieta&127)<<7;
1005 else if (layer > 17) tmp =
scaleHO;
1014 double theta = 2.0*atan(
exp(-eta));
1017 const double rLay[19] = {
1018 1836.0, 1902.0, 1962.0, 2022.0, 2082.0, 2142.0, 2202.0, 2262.0, 2322.0,
1019 2382.0, 2448.0, 2514.0, 2580.0, 2646.0, 2712.0, 2776.0, 2862.5, 3847.0,
1021 if (layer>0 && layer<=19) dist += rLay[layer-1]*mm/
sin(theta);
1023 const double zLay[19] = {
1024 4034.0, 4032.0, 4123.0, 4210.0, 4297.0, 4384.0, 4471.0, 4558.0, 4645.0,
1025 4732.0, 4819.0, 4906.0, 4993.0, 5080.0, 5167.0, 5254.0, 5341.0, 5428.0,
1027 if (layer>0 && layer<=19) dist += zLay[layer-1]*mm/
cos(theta);
1030 double tmp = dist/c_light/ns;
1032 LogDebug(
"HcalTBSim") <<
"HcalTB04Analysis::timeOfFlight " << tmp
1033 <<
" for det/lay " << det <<
" " << layer
1034 <<
" eta/theta " << eta <<
" " << theta/deg
1035 <<
" dist " << dist;
T getParameter(std::string const &) const
double getEnergy(std::vector< int >)
void update(const BeginOfRun *run)
This routine will be called when the appropriate signal arrives.
std::vector< double > secEkin
void fillLongProf(std::vector< double > es, std::vector< double > eq)
std::vector< int > idHcal
void fillPrimary(double energy, double eta, double phi)
std::vector< CaloHit > hcalHitLayer
std::vector< double > eqeta
std::vector< double > eqie
Sin< T >::type sin(const T &t)
virtual void produce(edm::Event &, const edm::EventSetup &)
void fillBuffer(const EndOfEvent *evt)
std::vector< int > shortLivedSecondaries
Geom::Theta< T > theta() const
std::vector< int > secTrackID
std::vector< double > eqphi
void setPrimary(int primary, int id, double energy, double eta, double phi)
void setNumberingScheme(HcalNumberingScheme *)
void setLongProf(std::vector< double > es, std::vector< double > eq)
void setEdepHcal(std::vector< double > esim, std::vector< double > edig)
void setEdep(double simtot, double sime, double simh, double digtot, double dige, double digh)
void saveHit(int det, int lay, int eta, int phi, double e, double t)
std::vector< int > secPartID
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
void setVtxSec(int id, int pdg, double px, double py, double pz, double ek)
const T & max(const T &a, const T &b)
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
Cos< T >::type cos(const T &t)
void fillTrnsProf(std::vector< double > es1, std::vector< double > eq1, std::vector< double > es2, std::vector< double > eq2)
Tan< T >::type tan(const T &t)
static void unpackHcalIndex(const uint32_t &idx, int &det, int &z, int &depth, int &eta, int &phi, int &lay)
G4RotationMatrix * beamline_RM
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
static std::vector< uint32_t > getUnitIDs(const int type, const int mode)
double scale(int det, int layer)
std::vector< double > esphi
double timeOfFlight(int det, int layer, double eta)
std::vector< int > getCode(int, std::vector< CaloHit >)
std::vector< CaloHit > hcalHitCache
static uint32_t getUnitID(const uint32_t id, const int mode)
HcalTB04Analysis(const edm::ParameterSet &p)
void setIDs(std::vector< int >, std::vector< int >)
XYZPointD XYZPoint
point in space with cartesian internal representation
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
std::vector< std::vector< double > > tmp
G4THitsCollection< CaloG4Hit > CaloG4HitCollection
static int position[264][3]
double getTimeSlice() const
void setTrnsProf(std::vector< double > es1, std::vector< double > eq1, std::vector< double > es2, std::vector< double > eq2)
virtual ~HcalTB04Analysis()
std::vector< uint32_t > idTower
std::vector< double > eslay
math::XYZPoint getEntry() const
std::vector< double > eqlay
uint32_t getUnitID() const
void setNumberingScheme(EcalNumberingScheme *)
std::vector< std::string > names
Power< A, B >::type pow(const A &a, const B &b)
void fillEdep(double etots, double eecals, double ehcals, double etotq, double eecalq, double ehcalq)
void fillEvent(PHcalTB04Info &)
double getEnergyDeposit() const
std::vector< double > esimh