46 #include "CLHEP/Random/RandGaussQ.h"
49 #include "G4SDManager.hh"
50 #include "G4VProcess.hh"
51 #include "G4HCofThisEvent.hh"
52 #include "CLHEP/Units/GlobalSystemOfUnits.h"
53 #include "CLHEP/Units/GlobalPhysicalConstants.h"
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;
85 produces<PHcalTB04Info>();
88 beamline_RM->rotateZ(-beamPhi);
89 beamline_RM->rotateY(-beamThet);
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 = "
110 edm::LogInfo(
"HcalTBSim") <<
"\n --------> Total number of selected entries"
111 <<
" : " <<
count <<
"\nPointers:: QIE " <<
myQie
112 <<
" Histo " <<
histo;
138 edm::LogInfo(
"HcalTBSim") <<
"HcalTB04Analysis:: Save information from "
139 <<
nTower <<
" HCal towers";
144 LogDebug(
"HcalTBSim") <<
"\tTower[" << i <<
"] Original " << std::hex
152 for (
int lay=1; lay<8; lay++) {
153 for (
int icr=1; icr<8; icr++) {
161 edm::LogInfo(
"HcalTBSim") <<
"HcalTB04Analysis:: Save information from "
164 LogDebug(
"HcalTBSim") <<
"\tCrystal[" <<
i <<
"] Original " << std::hex
175 for (
int i=0;
i<5;
i++) {
179 for (
int i=0;
i<3;
i++) {
183 for (
int i=0;
i<20;
i++) {
196 int irun = (*run)()->GetRunID();
197 edm::LogInfo(
"HcalTBSim") <<
" =====> Begin of Run = " << irun;
199 G4SDManager*
sd = G4SDManager::GetSDMpointerIfExist();
202 G4VSensitiveDetector* aSD = sd->FindSensitiveDetector(sdname);
205 <<
" with name " << sdname <<
" in this "
209 edm::LogInfo(
"HcalTBSim") <<
"HcalTB04Analysis::beginOfRun: Finds SD "
210 <<
"with name " << theCaloSD->GetName()
214 edm::LogInfo(
"HcalTBSim") <<
"HcalTB04Analysis::beginOfRun: set a "
215 <<
"new numbering scheme";
219 aSD = sd->FindSensitiveDetector(sdname);
222 <<
" with name " << sdname <<
" in this "
226 edm::LogInfo(
"HcalTBSim") <<
"HcalTB04Analysis::beginOfRun: Finds SD "
227 <<
"with name " << theCaloSD->GetName()
231 edm::LogInfo(
"HcalTBSim") <<
"HcalTB04Analysis::beginOfRun: set a "
232 <<
"new numbering scheme";
237 <<
"not get SD Manager!";
244 evNum = (*evt) ()->GetEventID ();
246 edm::LogInfo(
"HcalTBSim") <<
"HcalTB04Analysis: =====> Begin of event = "
254 G4ThreeVector thePreStepPoint = aStep->GetPreStepPoint()->GetPosition();
255 G4ThreeVector thePostStepPoint;
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();
267 bool isPDGStable = aTrack->GetDefinition()->GetPDGStable();
269 double pDGlifetime = aTrack->GetDefinition()->GetPDGLifeTime();
270 double gammaFactor = aStep->GetPreStepPoint()->GetGamma();
273 double stepDeltaEnergy = aStep->GetDeltaEnergy ();
274 double kinEnergy = aTrack->GetKineticEnergy ();
277 if (trackID == 1 && parentID == 0 &&
278 ((kinEnergy == 0.) || (fabs (stepDeltaEnergy / kinEnergy) > 0.1))) {
280 if (kinEnergy == 0.) {
283 if (fabs (stepDeltaEnergy / kinEnergy) > 0.1)
pvType = 1;
292 G4String thePostPVname =
"NoName";
293 G4StepPoint * thePostPoint = aStep->GetPostStepPoint ();
295 thePostStepPoint = thePostPoint->GetPosition();
296 G4VPhysicalVolume * thePostPV = thePostPoint->GetPhysicalVolume ();
297 if (thePostPV) thePostPVname = thePostPV->GetName ();
300 LogDebug(
"HcalTBSim") <<
"HcalTB04Analysis:: V1 found at: "
301 << thePostStepPoint <<
" G4VPhysicalVolume: "
304 LogDebug(
"HcalTBSim") <<
"HcalTB04Analysis::fill_v1Pos: Primary Track "
310 if ((trackID != 1 && parentID == 1 &&
311 (aTrack->GetCurrentStepNumber () == 1) &&
313 (trackID == 1 && thePreStepPoint ==
pvPosition)) {
315 LogDebug(
"HcalTBSim") <<
"HcalTB04Analysis::A secondary... PDG:"
316 << partPDGEncoding <<
" TrackID:" << trackID
317 <<
" ParentID:" << parentID <<
" stable: "
318 << isPDGStable <<
" Tau: " << pDGlifetime
320 << c_light*pDGlifetime*gammaFactor*1000.
321 <<
"um" <<
" GammaFactor: " << gammaFactor;
326 secEkin.push_back(aTrack->GetKineticEnergy());
329 double ctaugamma_um = c_light * pDGlifetime * gammaFactor * 1000.;
330 if ((ctaugamma_um>0.) && (ctaugamma_um<100.)) {
338 if (aTrack->GetCurrentStepNumber() == 1) {
343 std::vector<int>::iterator pos;
344 for (pos = pos1; pos != pos2; pos++) {
348 LogDebug(
"HcalTBSim") <<
"HcalTB04Analysis:: A tertiary... PDG:"
349 << partPDGEncoding <<
" TrackID:" <<trackID
350 <<
" ParentID:" << parentID <<
" stable: "
351 << isPDGStable <<
" Tau: " << pDGlifetime
353 << c_light*pDGlifetime*gammaFactor*1000.
354 <<
"um GammaFactor: " << gammaFactor;
369 LogDebug(
"HcalTBSim") <<
"HcalTB04Analysis::Fill event "
370 << (*evt)()->GetEventID();
374 LogDebug(
"HcalTBSim") <<
"HcalTB04Analysis::Do QIE analysis with "
380 LogDebug(
"HcalTBSim") <<
"HcalTB04Analysis::Do Xtal analysis with "
386 LogDebug(
"HcalTBSim") <<
"HcalTB04Analysis::Final analysis";
389 int iEvt = (*evt)()->GetEventID();
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;
402 std::vector<CaloHit> hhits, hhitl;
405 std::map<int,float,std::less<int> > primaries;
406 double etot1=0, etot2=0;
409 G4HCofThisEvent* allHC = (*evt)()->GetHCofThisEvent();
411 idHC = G4SDManager::GetSDMpointer()->GetCollectionID(sdName);
413 LogDebug(
"HcalTBSim") <<
"HcalTB04Analysis:: Hit Collection for " << sdName
414 <<
" of ID " << idHC <<
" is obtained at " << theHC;
416 if (idHC >= 0 && theHC > 0) {
417 hhits.reserve(theHC->entries());
418 hhitl.reserve(theHC->entries());
419 for (j = 0; j < theHC->entries(); j++) {
425 double theta = pos.theta();
427 double phi = pos.phi();
428 int det,
z, group, ieta, iphi, layer;
431 if (jitter<0) jitter = 0;
432 if (e < 0 || e > 1.) e = 0;
433 double escl = e *
scale(det,layer);
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);
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;
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++) {
461 std::vector<CaloHit*>::iterator k1, k2;
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();
472 for (k2 = k1+1; k2 != hits.end() && fabs(jitter-(**k2).t())<1 &&
473 unitID==(**k2).id(); k2++) {
478 CaloHit hit(det, layer, ehit, eta, phi, jitter, unitID);
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;
490 LogDebug(
"HcalTBSim") <<
"HcalTB04Analysis:: Stores " << nhit <<
" HCal hits"
491 <<
" from " << nHit <<
" input hits E(Hcal) " << etot1
495 for (j = 0, itr = hhitl.begin(); itr != hhitl.end(); j++, itr++) {
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();
510 for (k2 = k1+1; k2 != hits.end() && fabs(jitter-(**k2).t())<1 &&
511 unitID==(**k2).id(); k2++) {
516 CaloHit hit(det, layer, ehit, eta, phi, jitter, unitID);
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;
528 LogDebug(
"HcalTBSim") <<
"HcalTB04Analysis:: Stores " << nhitl <<
" HCal "
529 <<
"hits from " << nHit <<
" input hits E(Hcal) "
530 << etot1 <<
" " << etotl;
533 std::vector<CaloHit> ehits;
535 idHC = G4SDManager::GetSDMpointer()->GetCollectionID(sdName);
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++) {
548 double theta = pos.theta();
550 double phi = pos.phi();
551 if (e < 0 || e > 100000.) e = 0;
552 int det,
z, group, ieta, iphi, layer;
555 ehits.push_back(hit);
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;
571 std::vector<CaloHit*> hite(nHit);
572 for (j = 0, itr = ehits.begin(); itr != ehits.end(); j++, itr++) {
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();
586 for (k2 = k1+1; k2 != hite.end() && fabs(jitter-(**k2).t())<1 &&
587 unitID==(**k2).id(); k2++) {
592 CaloHit hit(det, layer, ehit, eta, phi, jitter, unitID);
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;
604 LogDebug(
"HcalTBSim") <<
"HcalTB04Analysis:: Stores " << nhit <<
" ECal hits"
605 <<
" from " << nHit <<
" input hits E(Ecal) " << etot1
611 G4PrimaryParticle* thePrim=0;
612 int nvertex = (*evt)()->GetNumberOfPrimaryVertex();
613 LogDebug(
"HcalTBSim") <<
"HcalTB04Analysis:: Event has " << nvertex
616 edm::LogInfo(
"HcalTBSim") <<
"HcalTB04Analysis::EndOfEvent ERROR: no "
617 <<
"vertex found for event " <<
evNum;
619 for (
int i = 0 ;
i<nvertex;
i++) {
620 G4PrimaryVertex* avertex = (*evt)()->GetPrimaryVertex(
i);
622 edm::LogInfo(
"HcalTBSim") <<
"HcalTB04Analysis::EndOfEvent ERR: pointer "
623 <<
"to vertex = 0 for event " <<
evNum;
625 LogDebug(
"HcalTBSim") <<
"HcalTB04Analysis::Vertex number :" <<
i <<
" "
626 << avertex->GetPosition();
627 int npart = avertex->GetNumberOfParticle();
631 if (thePrim==0) thePrim=avertex->GetPrimary(trackID);
636 double px = thePrim->GetPx();
637 double py = thePrim->GetPy();
638 double pz = thePrim->GetPz();
643 <<
"primary has p=0 ";
645 double costheta = pz/
p;
648 if (px != 0 || py != 0)
phiInit = atan2(py,px);
652 edm::LogWarning(
"HcalTBSim") <<
"HcalTB04Analysis::EndOfEvent ERR: could "
653 <<
"not find primary";
660 if (hittot<=0) hittot = 1;
661 std::vector<CaloHit> hits(hittot);
662 std::vector<int> todo(
nTower,0);
664 LogDebug(
"HcalTBSim") <<
"HcalTB04Analysis::qieAnalysis: Size "
665 << hits.size() <<
" " << todo.size() <<
" "
669 for (
unsigned int k1 = 0; k1 <
hcalHitCache.size(); k1++) {
671 uint32_t
id = hit.
id();
673 double esim = hit.
e();
675 for (
unsigned int k2 = k1+1; k2 <
hcalHitCache.size(); k2++) {
677 if (hit.
id() == id) {
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++) {
701 for (
int k2 = 0; k2 <
nTower; k2++) {
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];
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.";
727 CLHEP::RandGaussQ randGauss(rng->
getEngine());
731 LogDebug(
"HcalTBSim") <<
"HcalTB04Analysis::xtalAnalysis: Size " <<iok.size()
732 <<
" " <<
idEcal.size() <<
" " <<
esime.size() <<
" "
734 for (
unsigned int k1 = 0; k1 <
ecalHitCache.size(); k1++) {
738 for (
unsigned int k2 = k1+1; k2 <
ecalHitCache.size(); k2++) {
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;
753 for (
int k2 = 0; k2 <
nCrystal; k2++) {
763 for (
int k2 = 0; k2 <
nCrystal; k2++) {
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];
794 LogDebug(
"HcalTBSim") <<
"HcalTB04Analysis:: Energy deposit at Sim Level "
796 <<
" (HCal) " << ehcals <<
"\nHcalTB04Analysis:: "
797 <<
"Energy deposit at Qie Level (Total) " <<
etotq
802 for (
int i=0;
i<5;
i++) {
806 for (
int i=0;
i<3;
i++) {
813 int det,
z, group, ieta, iphi, layer;
818 if (ieta == 0) ieta = 2;
821 ieta = ieta -
iceta + 2;
823 if (iphi >= 0 && iphi < 3 && ieta >= 0 && ieta < 5) {
832 for (
int i=0;
i<3;
i++) {
836 for (
int i=0;
i<5;
i++) {
840 LogDebug(
"HcalTBSim") <<
"HcalTB04Analysis:: Energy fraction along Eta and"
842 for (
int i=0;
i<5;
i++)
843 LogDebug(
"HcalTBSim") <<
"HcalTB04Analysis:: [" <<
i <<
"] Eta Sim = "
849 for (
int i=0;
i<20;
i++) {
855 int det,
z, group, ieta, iphi, layer;
860 if (iphi >= 0 && iphi < 3 && layer >= 0 && layer < 20) {
867 for (
int i=0;
i<20;
i++) {
871 LogDebug(
"HcalTBSim") <<
"HcalTB04Analysis:: Energy fraction along Layer";
872 for (
int i=0;
i<20;
i++)
873 LogDebug(
"HcalTBSim") <<
"HcalTB04Analysis:: [" <<
i <<
"] Sim = "
902 std::vector<CaloHit>::iterator itr;
904 uint32_t
id = itr->id();
905 int det,
z, group, ieta, iphi, lay;
907 product.
saveHit(det, lay, ieta, iphi, itr->e(), itr->t());
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();
919 LogDebug(
"HcalTBSim") <<
"HcalTB04Analysis:: Saves " << nhit
920 <<
" hits from Crystals";
925 uint32_t
id = itr->
id();
926 int det,
z, group, ieta, iphi, lay;
928 product.
saveHit(det, lay, ieta, iphi, itr->e(), itr->t());
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();
940 LogDebug(
"HcalTBSim") <<
"HcalTB04Analysis:: Saves " << nhit
941 <<
" hits from HCal";
947 for (
unsigned int i = 0; i <
secTrackID.size(); i++) {
958 pvUVW = G4ThreeVector();
991 int det,
z, group, ieta, iphi, lay;
993 group = (det&15)<<20;
994 group += ((lay-1)&31)<<15;
996 group += (ieta&127)<<7;
1007 else if (layer > 17) tmp =
scaleHO;
1016 double theta = 2.0*atan(
exp(-eta));
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,
1023 if (layer>0 && layer<=19) dist += rLay[layer-1]*mm/
sin(theta);
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,
1029 if (layer>0 && layer<=19) dist += zLay[layer-1]*mm/
cos(theta);
1032 double tmp = dist/c_light/ns;
1034 LogDebug(
"HcalTBSim") <<
"HcalTB04Analysis::timeOfFlight " << tmp
1035 <<
" for det/lay " << det <<
" " << layer
1036 <<
" eta/theta " << eta <<
" " << theta/deg
1037 <<
" dist " << dist;
T getParameter(std::string const &) const
void update(const BeginOfRun *run)
This routine will be called when the appropriate signal arrives.
#define DEFINE_SIMWATCHER(type)
std::vector< double > secEkin
void setLongProf(const std::vector< double > &es, const 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
void fillTrnsProf(const std::vector< double > &es1, const std::vector< double > &eq1, const std::vector< double > &es2, const std::vector< double > &eq2)
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 *)
static int position[TOTALCHAMBERS][3]
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
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 setIDs(const std::vector< int > &, const std::vector< int > &)
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.
void setEdepHcal(const std::vector< double > &esim, const std::vector< double > &edig)
double getEnergy(const std::vector< int > &)
Cos< T >::type cos(const T &t)
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
std::vector< int > getCode(int, const std::vector< CaloHit > &)
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< CaloHit > hcalHitCache
static uint32_t getUnitID(const uint32_t id, const int mode)
HcalTB04Analysis(const edm::ParameterSet &p)
XYZPointD XYZPoint
point in space with cartesian internal representation
tuple idx
DEBUGGING if hasattr(process,"trackMonIterativeTracking2012"): print "trackMonIterativeTracking2012 D...
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
double getTimeSlice() const
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
void fillLongProf(const std::vector< double > &es, const std::vector< double > &eq)