44 #include "CLHEP/Random/RandGaussQ.h"
46 #include "G4SDManager.hh"
47 #include "G4VProcess.hh"
48 #include "G4HCofThisEvent.hh"
49 #include "CLHEP/Units/GlobalSystemOfUnits.h"
50 #include "CLHEP/Units/GlobalPhysicalConstants.h"
51 #include "CLHEP/Random/Random.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();
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 "
374 CLHEP::HepRandomEngine* engine = CLHEP::HepRandom::getTheEngine();
379 LogDebug(
"HcalTBSim") <<
"HcalTB04Analysis::Do Xtal analysis with "
385 LogDebug(
"HcalTBSim") <<
"HcalTB04Analysis::Final analysis";
388 int iEvt = (*evt)()->GetEventID();
390 edm::LogInfo(
"HcalTBSim") <<
"HcalTB04Analysis:: Event " << iEvt;
391 else if ((iEvt < 100) && (iEvt%10 == 0))
392 edm::LogInfo(
"HcalTBSim") <<
"HcalTB04Analysis:: Event " << iEvt;
393 else if ((iEvt < 1000) && (iEvt%100 == 0))
394 edm::LogInfo(
"HcalTBSim") <<
"HcalTB04Analysis:: Event " << iEvt;
395 else if ((iEvt < 10000) && (iEvt%1000 == 0))
396 edm::LogInfo(
"HcalTBSim") <<
"HcalTB04Analysis:: Event " << iEvt;
401 std::vector<CaloHit> hhits, hhitl;
404 std::map<int,float,std::less<int> > primaries;
405 double etot1=0, etot2=0;
408 G4HCofThisEvent* allHC = (*evt)()->GetHCofThisEvent();
410 idHC = G4SDManager::GetSDMpointer()->GetCollectionID(sdName);
412 LogDebug(
"HcalTBSim") <<
"HcalTB04Analysis:: Hit Collection for " << sdName
413 <<
" of ID " << idHC <<
" is obtained at " << theHC;
415 if (idHC >= 0 && theHC > 0) {
416 hhits.reserve(theHC->entries());
417 hhitl.reserve(theHC->entries());
418 for (j = 0; j < theHC->entries(); j++) {
424 double theta = pos.theta();
426 double phi = pos.phi();
427 int det,
z,
group, ieta, iphi, layer;
430 if (jitter<0) jitter = 0;
431 if (e < 0 || e > 1.) e = 0;
432 double escl = e *
scale(det,layer);
434 CaloHit hit(det,layer,escl,eta,phi,jitter,idx);
435 hhits.push_back(hit);
436 CaloHit hitl(det,layer,escl,eta,phi,jitter,
id);
437 hhitl.push_back(hitl);
441 LogDebug(
"HcalTBSim") <<
"HcalTB04Analysis:: Hcal Hit i/p " << j
442 <<
" ID 0x" << std::hex <<
id <<
" 0x" << idx
443 << std::dec <<
" time " << std::setw(6) << time
444 <<
" " << std::setw(6) << jitter <<
" theta "
445 << std::setw(8) << theta <<
" eta " << std::setw(8)
446 << eta <<
" phi " << std::setw(8) << phi <<
" e "
447 << std::setw(8) << e <<
" " << std::setw(8) <<escl;
453 std::vector<CaloHit>::iterator itr;
454 int nHit = hhits.size();
455 std::vector<CaloHit*> hits(nHit);
456 for (j = 0, itr = hhits.begin(); itr != hhits.end(); j++, itr++) {
460 std::vector<CaloHit*>::iterator k1, k2;
462 for (k1 = hits.begin(); k1 != hits.end(); k1++) {
463 int det = (**k1).det();
464 int layer = (**k1).layer();
465 double ehit = (**k1).e();
466 double eta = (**k1).eta();
467 double phi = (**k1).phi();
468 double jitter = (**k1).t();
469 uint32_t
unitID = (**k1).id();
471 for (k2 = k1+1; k2 != hits.end() && fabs(jitter-(**k2).t())<1 &&
472 unitID==(**k2).id(); k2++) {
477 CaloHit hit(det, layer, ehit, eta, phi, jitter, unitID);
482 LogDebug(
"HcalTBSim") <<
"HcalTB04Analysis:: Hcal Hit store " << nhit
483 <<
" ID 0x" << std::hex << unitID << std::dec
484 <<
" time " << std::setw(6) << jitter <<
" eta "
485 << std::setw(8) << eta <<
" phi " << std::setw(8)
486 << phi <<
" e " << std::setw(8) << ehit;
489 LogDebug(
"HcalTBSim") <<
"HcalTB04Analysis:: Stores " << nhit <<
" HCal hits"
490 <<
" from " << nHit <<
" input hits E(Hcal) " << etot1
494 for (j = 0, itr = hhitl.begin(); itr != hhitl.end(); j++, itr++) {
500 for (k1 = hits.begin(); k1 != hits.end(); k1++) {
501 int det = (**k1).det();
502 int layer = (**k1).layer();
503 double ehit = (**k1).e();
504 double eta = (**k1).eta();
505 double phi = (**k1).phi();
506 double jitter = (**k1).t();
507 uint32_t
unitID = (**k1).id();
509 for (k2 = k1+1; k2 != hits.end() && fabs(jitter-(**k2).t())<1 &&
510 unitID==(**k2).id(); k2++) {
515 CaloHit hit(det, layer, ehit, eta, phi, jitter, unitID);
520 LogDebug(
"HcalTBSim") <<
"HcalTB04Analysis:: Hcal Hit store " << nhitl
521 <<
" ID 0x" << std::hex << unitID << std::dec
522 <<
" time " << std::setw(6) << jitter <<
" eta "
523 << std::setw(8) << eta <<
" phi " << std::setw(8)
524 << phi <<
" e " << std::setw(8) << ehit;
527 LogDebug(
"HcalTBSim") <<
"HcalTB04Analysis:: Stores " << nhitl <<
" HCal "
528 <<
"hits from " << nHit <<
" input hits E(Hcal) "
529 << etot1 <<
" " << etotl;
532 std::vector<CaloHit> ehits;
534 idHC = G4SDManager::GetSDMpointer()->GetCollectionID(sdName);
537 LogDebug(
"HcalTBSim") <<
"HcalTB04Analysis:: Hit Collection for " << sdName
538 <<
" of ID " << idHC <<
" is obtained at " << theHC;
539 if (idHC >= 0 && theHC > 0) {
540 ehits.reserve(theHC->entries());
541 for (j = 0; j < theHC->entries(); j++) {
547 double theta = pos.theta();
549 double phi = pos.phi();
550 if (e < 0 || e > 100000.) e = 0;
551 int det,
z,
group, ieta, iphi, layer;
554 ehits.push_back(hit);
558 LogDebug(
"HcalTBSim") <<
"HcalTB04Analysis:: Ecal Hit i/p " << j
559 <<
" ID 0x" << std::hex <<
id << std::dec
560 <<
" time " << std::setw(6) << time <<
" theta "
561 << std::setw(8) << theta <<
" eta " <<std::setw(8)
562 << eta <<
" phi " << std::setw(8) << phi <<
" e "
563 << std::setw(8) <<
e;
570 std::vector<CaloHit*> hite(nHit);
571 for (j = 0, itr = ehits.begin(); itr != ehits.end(); j++, itr++) {
576 for (k1 = hite.begin(); k1 != hite.end(); k1++) {
577 int det = (**k1).det();
578 int layer = (**k1).layer();
579 double ehit = (**k1).e();
580 double eta = (**k1).eta();
581 double phi = (**k1).phi();
582 double jitter = (**k1).t();
583 uint32_t
unitID = (**k1).id();
585 for (k2 = k1+1; k2 != hite.end() && fabs(jitter-(**k2).t())<1 &&
586 unitID==(**k2).id(); k2++) {
591 CaloHit hit(det, layer, ehit, eta, phi, jitter, unitID);
596 LogDebug(
"HcalTBSim") <<
"HcalTB04Analysis:: Ecal Hit store " << nhit
597 <<
" ID 0x" << std::hex << unitID << std::dec
598 <<
" time " << std::setw(6) << jitter <<
" eta "
599 << std::setw(8) << eta <<
" phi " << std::setw(8)
600 << phi <<
" e " << std::setw(8) << ehit;
603 LogDebug(
"HcalTBSim") <<
"HcalTB04Analysis:: Stores " << nhit <<
" ECal hits"
604 <<
" from " << nHit <<
" input hits E(Ecal) " << etot1
610 G4PrimaryParticle* thePrim=0;
611 int nvertex = (*evt)()->GetNumberOfPrimaryVertex();
612 LogDebug(
"HcalTBSim") <<
"HcalTB04Analysis:: Event has " << nvertex
615 edm::LogInfo(
"HcalTBSim") <<
"HcalTB04Analysis::EndOfEvent ERROR: no "
616 <<
"vertex found for event " <<
evNum;
618 for (
int i = 0 ;
i<nvertex;
i++) {
619 G4PrimaryVertex* avertex = (*evt)()->GetPrimaryVertex(
i);
621 edm::LogInfo(
"HcalTBSim") <<
"HcalTB04Analysis::EndOfEvent ERR: pointer "
622 <<
"to vertex = 0 for event " <<
evNum;
624 LogDebug(
"HcalTBSim") <<
"HcalTB04Analysis::Vertex number :" <<
i <<
" "
625 << avertex->GetPosition();
626 int npart = avertex->GetNumberOfParticle();
630 if (thePrim==0) thePrim=avertex->GetPrimary(trackID);
635 double px = thePrim->GetPx();
636 double py = thePrim->GetPy();
637 double pz = thePrim->GetPz();
642 <<
"primary has p=0 ";
644 double costheta = pz/
p;
647 if (px != 0 || py != 0)
phiInit = atan2(py,px);
651 edm::LogWarning(
"HcalTBSim") <<
"HcalTB04Analysis::EndOfEvent ERR: could "
652 <<
"not find primary";
659 if (hittot<=0) hittot = 1;
660 std::vector<CaloHit> hits(hittot);
661 std::vector<int> todo(
nTower,0);
663 LogDebug(
"HcalTBSim") <<
"HcalTB04Analysis::qieAnalysis: Size "
664 << hits.size() <<
" " << todo.size() <<
" "
668 for (
unsigned int k1 = 0; k1 <
hcalHitCache.size(); k1++) {
670 uint32_t
id = hit.
id();
672 double esim = hit.
e();
674 for (
unsigned int k2 = k1+1; k2 <
hcalHitCache.size(); k2++) {
676 if (hit.
id() == id) {
684 std::vector<int> cd =
myQie->
getCode(nhit, hits, engine);
686 LogDebug(
"HcalTBSim") <<
"HcalTB04Analysis:: ID 0x" << std::hex <<
id
687 << std::dec <<
" registers " << esim <<
" energy "
688 <<
"from " << nhit <<
" hits starting with hit # "
689 << k1 <<
" energy with noise " <<
eq;
690 for (
int k2 = 0; k2 <
nTower; k2++) {
700 for (
int k2 = 0; k2 <
nTower; k2++) {
707 LogDebug(
"HcalTBSim") <<
"HcalTB04Analysis:: ID 0x" << std::hex
708 <<
idTower[k2] << std::dec <<
" registers "
709 <<
esimh[k2] <<
" energy from hits and energy "
710 <<
"after QIE analysis " <<
eqie[k2];
718 CLHEP::RandGaussQ randGauss(*engine);
722 LogDebug(
"HcalTBSim") <<
"HcalTB04Analysis::xtalAnalysis: Size " <<iok.size()
723 <<
" " <<
idEcal.size() <<
" " <<
esime.size() <<
" "
725 for (
unsigned int k1 = 0; k1 <
ecalHitCache.size(); k1++) {
729 for (
unsigned int k2 = k1+1; k2 <
ecalHitCache.size(); k2++) {
739 LogDebug(
"HcalTBSim") <<
"HcalTB04Analysis:: ID 0x" << std::hex <<
id
740 << std::dec <<
" registers " << esim <<
" energy "
741 <<
"from " << nhit <<
" hits starting with hit # "
742 << k1 <<
" energy with noise " <<
eq;
744 for (
int k2 = 0; k2 <
nCrystal; k2++) {
754 for (
int k2 = 0; k2 <
nCrystal; k2++) {
759 LogDebug(
"HcalTBSim") <<
"HcalTB04Analysis:: ID 0x" << std::hex
760 <<
idEcal[k2] << std::dec <<
" registers "
761 <<
esime[k2] <<
" energy from hits and energy from"
762 <<
" noise " <<
enois[k2];
785 LogDebug(
"HcalTBSim") <<
"HcalTB04Analysis:: Energy deposit at Sim Level "
787 <<
" (HCal) " << ehcals <<
"\nHcalTB04Analysis:: "
788 <<
"Energy deposit at Qie Level (Total) " <<
etotq
793 for (
int i=0;
i<5;
i++) {
797 for (
int i=0;
i<3;
i++) {
804 int det,
z,
group, ieta, iphi, layer;
809 if (ieta == 0) ieta = 2;
812 ieta = ieta -
iceta + 2;
814 if (iphi >= 0 && iphi < 3 && ieta >= 0 && ieta < 5) {
823 for (
int i=0;
i<3;
i++) {
827 for (
int i=0;
i<5;
i++) {
831 LogDebug(
"HcalTBSim") <<
"HcalTB04Analysis:: Energy fraction along Eta and"
833 for (
int i=0;
i<5;
i++)
834 LogDebug(
"HcalTBSim") <<
"HcalTB04Analysis:: [" <<
i <<
"] Eta Sim = "
840 for (
int i=0;
i<20;
i++) {
846 int det,
z,
group, ieta, iphi, layer;
851 if (iphi >= 0 && iphi < 3 && layer >= 0 && layer < 20) {
858 for (
int i=0;
i<20;
i++) {
862 LogDebug(
"HcalTBSim") <<
"HcalTB04Analysis:: Energy fraction along Layer";
863 for (
int i=0;
i<20;
i++)
864 LogDebug(
"HcalTBSim") <<
"HcalTB04Analysis:: [" <<
i <<
"] Sim = "
893 std::vector<CaloHit>::iterator itr;
895 uint32_t
id = itr->id();
896 int det,
z,
group, ieta, iphi, lay;
898 product.
saveHit(det, lay, ieta, iphi, itr->e(), itr->t());
901 LogDebug(
"HcalTBSim") <<
"HcalTB04Analysis:: Save Hit " << std::setw(3)
902 << i+1 <<
" ID 0x" << std::hex << group << std::dec
903 <<
" " << std::setw(2) << det <<
" " << std::setw(2)
904 << lay <<
" " << std::setw(1) << z <<
" "
905 << std::setw(3) << ieta <<
" " << std::setw(3) <<iphi
906 <<
" T " << std::setw(6) << itr->t() <<
" E "
907 << std::setw(6) << itr->e();
910 LogDebug(
"HcalTBSim") <<
"HcalTB04Analysis:: Saves " << nhit
911 <<
" hits from Crystals";
916 uint32_t
id = itr->
id();
917 int det,
z,
group, ieta, iphi, lay;
919 product.
saveHit(det, lay, ieta, iphi, itr->e(), itr->t());
922 LogDebug(
"HcalTBSim") <<
"HcalTB04Analysis:: Save Hit " << std::setw(3)
923 << i+1 <<
" ID 0x" << std::hex << group << std::dec
924 <<
" " << std::setw(2) << det <<
" " << std::setw(2)
925 << lay <<
" " << std::setw(1) << z <<
" "
926 << std::setw(3) << ieta <<
" " << std::setw(3) <<iphi
927 <<
" T " << std::setw(6) << itr->t() <<
" E "
928 << std::setw(6) << itr->e();
931 LogDebug(
"HcalTBSim") <<
"HcalTB04Analysis:: Saves " << nhit
932 <<
" hits from HCal";
938 for (
unsigned int i = 0; i <
secTrackID.size(); i++) {
949 pvUVW = G4ThreeVector();
982 int det,
z,
group, ieta, iphi, lay;
984 group = (det&15)<<20;
985 group += ((lay-1)&31)<<15;
987 group += (ieta&127)<<7;
998 else if (layer > 17) tmp =
scaleHO;
1007 double theta = 2.0*atan(
exp(-eta));
1010 const double rLay[19] = {
1011 1836.0, 1902.0, 1962.0, 2022.0, 2082.0, 2142.0, 2202.0, 2262.0, 2322.0,
1012 2382.0, 2448.0, 2514.0, 2580.0, 2646.0, 2712.0, 2776.0, 2862.5, 3847.0,
1014 if (layer>0 && layer<=19) dist += rLay[layer-1]*mm/
sin(theta);
1016 const double zLay[19] = {
1017 4034.0, 4032.0, 4123.0, 4210.0, 4297.0, 4384.0, 4471.0, 4558.0, 4645.0,
1018 4732.0, 4819.0, 4906.0, 4993.0, 5080.0, 5167.0, 5254.0, 5341.0, 5428.0,
1020 if (layer>0 && layer<=19) dist += zLay[layer-1]*mm/
cos(theta);
1023 double tmp = dist/c_light/ns;
1025 LogDebug(
"HcalTBSim") <<
"HcalTB04Analysis::timeOfFlight " << tmp
1026 <<
" for det/lay " << det <<
" " << layer
1027 <<
" eta/theta " << eta <<
" " << theta/deg
1028 <<
" 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
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< CaloHit > hcalHitCache
void xtalAnalysis(CLHEP::HepRandomEngine *)
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
std::vector< int > getCode(int, const std::vector< CaloHit > &, CLHEP::HepRandomEngine *)
G4THitsCollection< CaloG4Hit > CaloG4HitCollection
double getTimeSlice() const
virtual ~HcalTB04Analysis()
std::vector< uint32_t > idTower
void qieAnalysis(CLHEP::HepRandomEngine *)
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)