47 #include "CLHEP/Random/RandGaussQ.h"
50 #include "G4SDManager.hh"
51 #include "G4VProcess.hh"
52 #include "G4HCofThisEvent.hh"
53 #include "CLHEP/Units/GlobalSystemOfUnits.h"
54 #include "CLHEP/Units/GlobalPhysicalConstants.h"
78 double beamEta = (fMaxEta+fMinEta)/2.;
79 double beamPhi = (fMaxPhi+fMinPhi)/2.;
80 double beamThet= 2*atan(
exp(-beamEta));
81 if (beamPhi < 0) beamPhi += twopi;
82 iceta = (int)(beamEta/0.087) + 1;
83 icphi = (int)(fabs(beamPhi)/0.087) + 5;
86 produces<PHcalTB04Info>();
89 beamline_RM->rotateZ(-beamPhi);
90 beamline_RM->rotateY(-beamThet);
92 edm::LogInfo(
"HcalTBSim") <<
"HcalTB04:: Initialised as observer of BeginOf"
93 <<
"Job/BeginOfRun/BeginOfEvent/G4Step/EndOfEvent"
94 <<
" with Parameter values:\n \thcalOnly = "
95 << hcalOnly <<
"\tecalNoise = " << ecalNoise
96 <<
"\n\tMode = " << mode <<
" (0: HB2 Standard; "
97 <<
"1:HB2 Segmented)" <<
"\tType = " << type
98 <<
" (0: HB; 1 HE; 2 HB+HE)\n\tbeamOffset = "
99 << beamOffset <<
"\ticeta = " <<
iceta
100 <<
"\ticphi = " <<
icphi <<
"\n\tbeamline_RM = "
111 edm::LogInfo(
"HcalTBSim") <<
"\n --------> Total number of selected entries"
112 <<
" : " <<
count <<
"\nPointers:: QIE " <<
myQie
113 <<
" Histo " <<
histo;
139 edm::LogInfo(
"HcalTBSim") <<
"HcalTB04Analysis:: Save information from "
140 <<
nTower <<
" HCal towers";
145 LogDebug(
"HcalTBSim") <<
"\tTower[" << i <<
"] Original " << std::hex
153 for (
int lay=1; lay<8; lay++) {
154 for (
int icr=1; icr<8; icr++) {
162 edm::LogInfo(
"HcalTBSim") <<
"HcalTB04Analysis:: Save information from "
165 LogDebug(
"HcalTBSim") <<
"\tCrystal[" <<
i <<
"] Original " << std::hex
176 for (
int i=0;
i<5;
i++) {
180 for (
int i=0;
i<3;
i++) {
184 for (
int i=0;
i<20;
i++) {
197 int irun = (*run)()->GetRunID();
198 edm::LogInfo(
"HcalTBSim") <<
" =====> Begin of Run = " << irun;
200 G4SDManager*
sd = G4SDManager::GetSDMpointerIfExist();
203 G4VSensitiveDetector* aSD = sd->FindSensitiveDetector(sdname);
206 <<
" with name " << sdname <<
" in this "
210 edm::LogInfo(
"HcalTBSim") <<
"HcalTB04Analysis::beginOfRun: Finds SD "
211 <<
"with name " << theCaloSD->GetName()
215 edm::LogInfo(
"HcalTBSim") <<
"HcalTB04Analysis::beginOfRun: set a "
216 <<
"new numbering scheme";
220 aSD = sd->FindSensitiveDetector(sdname);
223 <<
" with name " << sdname <<
" in this "
227 edm::LogInfo(
"HcalTBSim") <<
"HcalTB04Analysis::beginOfRun: Finds SD "
228 <<
"with name " << theCaloSD->GetName()
232 edm::LogInfo(
"HcalTBSim") <<
"HcalTB04Analysis::beginOfRun: set a "
233 <<
"new numbering scheme";
238 <<
"not get SD Manager!";
245 evNum = (*evt) ()->GetEventID ();
247 edm::LogInfo(
"HcalTBSim") <<
"HcalTB04Analysis: =====> Begin of event = "
255 G4ThreeVector thePreStepPoint = aStep->GetPreStepPoint()->GetPosition();
256 G4ThreeVector thePostStepPoint;
259 G4Track* aTrack = aStep->GetTrack();
260 int trackID = aTrack->GetTrackID();
261 int parentID = aTrack->GetParentID();
262 G4ThreeVector
position = aTrack->GetPosition();
263 G4ThreeVector momentum = aTrack->GetMomentum();
264 G4String partType = aTrack->GetDefinition()->GetParticleType();
265 G4String partSubType = aTrack->GetDefinition()->GetParticleSubType();
266 int partPDGEncoding = aTrack->GetDefinition()->GetPDGEncoding();
268 bool isPDGStable = aTrack->GetDefinition()->GetPDGStable();
270 double pDGlifetime = aTrack->GetDefinition()->GetPDGLifeTime();
271 double gammaFactor = aStep->GetPreStepPoint()->GetGamma();
274 double stepDeltaEnergy = aStep->GetDeltaEnergy ();
275 double kinEnergy = aTrack->GetKineticEnergy ();
278 if (trackID == 1 && parentID == 0 &&
279 ((kinEnergy == 0.) || (fabs (stepDeltaEnergy / kinEnergy) > 0.1))) {
281 if (kinEnergy == 0.) {
284 if (fabs (stepDeltaEnergy / kinEnergy) > 0.1)
pvType = 1;
293 G4String thePostPVname =
"NoName";
294 G4StepPoint * thePostPoint = aStep->GetPostStepPoint ();
296 thePostStepPoint = thePostPoint->GetPosition();
297 G4VPhysicalVolume * thePostPV = thePostPoint->GetPhysicalVolume ();
298 if (thePostPV) thePostPVname = thePostPV->GetName ();
301 LogDebug(
"HcalTBSim") <<
"HcalTB04Analysis:: V1 found at: "
302 << thePostStepPoint <<
" G4VPhysicalVolume: "
305 LogDebug(
"HcalTBSim") <<
"HcalTB04Analysis::fill_v1Pos: Primary Track "
311 if ((trackID != 1 && parentID == 1 &&
312 (aTrack->GetCurrentStepNumber () == 1) &&
314 (trackID == 1 && thePreStepPoint ==
pvPosition)) {
316 LogDebug(
"HcalTBSim") <<
"HcalTB04Analysis::A secondary... PDG:"
317 << partPDGEncoding <<
" TrackID:" << trackID
318 <<
" ParentID:" << parentID <<
" stable: "
319 << isPDGStable <<
" Tau: " << pDGlifetime
321 << c_light*pDGlifetime*gammaFactor*1000.
322 <<
"um" <<
" GammaFactor: " << gammaFactor;
327 secEkin.push_back(aTrack->GetKineticEnergy());
330 double ctaugamma_um = c_light * pDGlifetime * gammaFactor * 1000.;
331 if ((ctaugamma_um>0.) && (ctaugamma_um<100.)) {
339 if (aTrack->GetCurrentStepNumber() == 1) {
344 std::vector<int>::iterator
pos;
345 for (pos = pos1; pos != pos2; pos++) {
349 LogDebug(
"HcalTBSim") <<
"HcalTB04Analysis:: A tertiary... PDG:"
350 << partPDGEncoding <<
" TrackID:" <<trackID
351 <<
" ParentID:" << parentID <<
" stable: "
352 << isPDGStable <<
" Tau: " << pDGlifetime
354 << c_light*pDGlifetime*gammaFactor*1000.
355 <<
"um GammaFactor: " << gammaFactor;
370 LogDebug(
"HcalTBSim") <<
"HcalTB04Analysis::Fill event "
371 << (*evt)()->GetEventID();
375 LogDebug(
"HcalTBSim") <<
"HcalTB04Analysis::Do QIE analysis with "
381 LogDebug(
"HcalTBSim") <<
"HcalTB04Analysis::Do Xtal analysis with "
387 LogDebug(
"HcalTBSim") <<
"HcalTB04Analysis::Final analysis";
390 int iEvt = (*evt)()->GetEventID();
392 edm::LogInfo(
"HcalTBSim") <<
"HcalTB04Analysis:: Event " << iEvt;
393 else if ((iEvt < 100) && (iEvt%10 == 0))
394 edm::LogInfo(
"HcalTBSim") <<
"HcalTB04Analysis:: Event " << iEvt;
395 else if ((iEvt < 1000) && (iEvt%100 == 0))
396 edm::LogInfo(
"HcalTBSim") <<
"HcalTB04Analysis:: Event " << iEvt;
397 else if ((iEvt < 10000) && (iEvt%1000 == 0))
398 edm::LogInfo(
"HcalTBSim") <<
"HcalTB04Analysis:: Event " << iEvt;
403 std::vector<CaloHit> hhits, hhitl;
406 std::map<int,float,std::less<int> > primaries;
407 double etot1=0, etot2=0;
410 G4HCofThisEvent* allHC = (*evt)()->GetHCofThisEvent();
412 idHC = G4SDManager::GetSDMpointer()->GetCollectionID(sdName);
414 LogDebug(
"HcalTBSim") <<
"HcalTB04Analysis:: Hit Collection for " << sdName
415 <<
" of ID " << idHC <<
" is obtained at " << theHC;
417 if (idHC >= 0 && theHC > 0) {
418 hhits.reserve(theHC->entries());
419 hhitl.reserve(theHC->entries());
420 for (j = 0; j < theHC->entries(); j++) {
426 double theta = pos.theta();
428 double phi = pos.phi();
429 int det,
z, group, ieta, iphi, layer;
432 if (jitter<0) jitter = 0;
433 if (e < 0 || e > 1.) e = 0;
434 double escl = e *
scale(det,layer);
436 CaloHit hit(det,layer,escl,eta,phi,jitter,idx);
437 hhits.push_back(hit);
438 CaloHit hitl(det,layer,escl,eta,phi,jitter,
id);
439 hhitl.push_back(hitl);
443 LogDebug(
"HcalTBSim") <<
"HcalTB04Analysis:: Hcal Hit i/p " << j
444 <<
" ID 0x" << std::hex <<
id <<
" 0x" << idx
445 << std::dec <<
" time " << std::setw(6) << time
446 <<
" " << std::setw(6) << jitter <<
" theta "
447 << std::setw(8) << theta <<
" eta " << std::setw(8)
448 << eta <<
" phi " << std::setw(8) << phi <<
" e "
449 << std::setw(8) << e <<
" " << std::setw(8) <<escl;
455 std::vector<CaloHit>::iterator itr;
456 int nHit = hhits.size();
457 std::vector<CaloHit*> hits(nHit);
458 for (j = 0, itr = hhits.begin(); itr != hhits.end(); j++, itr++) {
462 std::vector<CaloHit*>::iterator k1, k2;
464 for (k1 = hits.begin(); k1 != hits.end(); k1++) {
465 int det = (**k1).det();
466 int layer = (**k1).layer();
467 double ehit = (**k1).e();
468 double eta = (**k1).eta();
469 double phi = (**k1).phi();
470 double jitter = (**k1).t();
471 uint32_t
unitID = (**k1).id();
473 for (k2 = k1+1; k2 != hits.end() && fabs(jitter-(**k2).t())<1 &&
474 unitID==(**k2).id(); k2++) {
479 CaloHit hit(det, layer, ehit, eta, phi, jitter, unitID);
484 LogDebug(
"HcalTBSim") <<
"HcalTB04Analysis:: Hcal Hit store " << nhit
485 <<
" ID 0x" << std::hex << unitID << std::dec
486 <<
" time " << std::setw(6) << jitter <<
" eta "
487 << std::setw(8) << eta <<
" phi " << std::setw(8)
488 << phi <<
" e " << std::setw(8) << ehit;
491 LogDebug(
"HcalTBSim") <<
"HcalTB04Analysis:: Stores " << nhit <<
" HCal hits"
492 <<
" from " << nHit <<
" input hits E(Hcal) " << etot1
496 for (j = 0, itr = hhitl.begin(); itr != hhitl.end(); j++, itr++) {
502 for (k1 = hits.begin(); k1 != hits.end(); k1++) {
503 int det = (**k1).det();
504 int layer = (**k1).layer();
505 double ehit = (**k1).e();
506 double eta = (**k1).eta();
507 double phi = (**k1).phi();
508 double jitter = (**k1).t();
509 uint32_t
unitID = (**k1).id();
511 for (k2 = k1+1; k2 != hits.end() && fabs(jitter-(**k2).t())<1 &&
512 unitID==(**k2).id(); k2++) {
517 CaloHit hit(det, layer, ehit, eta, phi, jitter, unitID);
522 LogDebug(
"HcalTBSim") <<
"HcalTB04Analysis:: Hcal Hit store " << nhitl
523 <<
" ID 0x" << std::hex << unitID << std::dec
524 <<
" time " << std::setw(6) << jitter <<
" eta "
525 << std::setw(8) << eta <<
" phi " << std::setw(8)
526 << phi <<
" e " << std::setw(8) << ehit;
529 LogDebug(
"HcalTBSim") <<
"HcalTB04Analysis:: Stores " << nhitl <<
" HCal "
530 <<
"hits from " << nHit <<
" input hits E(Hcal) "
531 << etot1 <<
" " << etotl;
534 std::vector<CaloHit> ehits;
536 idHC = G4SDManager::GetSDMpointer()->GetCollectionID(sdName);
539 LogDebug(
"HcalTBSim") <<
"HcalTB04Analysis:: Hit Collection for " << sdName
540 <<
" of ID " << idHC <<
" is obtained at " << theHC;
541 if (idHC >= 0 && theHC > 0) {
542 ehits.reserve(theHC->entries());
543 for (j = 0; j < theHC->entries(); j++) {
549 double theta = pos.theta();
551 double phi = pos.phi();
552 if (e < 0 || e > 100000.) e = 0;
553 int det,
z, group, ieta, iphi, layer;
556 ehits.push_back(hit);
560 LogDebug(
"HcalTBSim") <<
"HcalTB04Analysis:: Ecal Hit i/p " << j
561 <<
" ID 0x" << std::hex <<
id << std::dec
562 <<
" time " << std::setw(6) << time <<
" theta "
563 << std::setw(8) << theta <<
" eta " <<std::setw(8)
564 << eta <<
" phi " << std::setw(8) << phi <<
" e "
565 << std::setw(8) <<
e;
572 std::vector<CaloHit*> hite(nHit);
573 for (j = 0, itr = ehits.begin(); itr != ehits.end(); j++, itr++) {
578 for (k1 = hite.begin(); k1 != hite.end(); k1++) {
579 int det = (**k1).det();
580 int layer = (**k1).layer();
581 double ehit = (**k1).e();
582 double eta = (**k1).eta();
583 double phi = (**k1).phi();
584 double jitter = (**k1).t();
585 uint32_t
unitID = (**k1).id();
587 for (k2 = k1+1; k2 != hite.end() && fabs(jitter-(**k2).t())<1 &&
588 unitID==(**k2).id(); k2++) {
593 CaloHit hit(det, layer, ehit, eta, phi, jitter, unitID);
598 LogDebug(
"HcalTBSim") <<
"HcalTB04Analysis:: Ecal Hit store " << nhit
599 <<
" ID 0x" << std::hex << unitID << std::dec
600 <<
" time " << std::setw(6) << jitter <<
" eta "
601 << std::setw(8) << eta <<
" phi " << std::setw(8)
602 << phi <<
" e " << std::setw(8) << ehit;
605 LogDebug(
"HcalTBSim") <<
"HcalTB04Analysis:: Stores " << nhit <<
" ECal hits"
606 <<
" from " << nHit <<
" input hits E(Ecal) " << etot1
612 G4PrimaryParticle* thePrim=0;
613 int nvertex = (*evt)()->GetNumberOfPrimaryVertex();
614 LogDebug(
"HcalTBSim") <<
"HcalTB04Analysis:: Event has " << nvertex
617 edm::LogInfo(
"HcalTBSim") <<
"HcalTB04Analysis::EndOfEvent ERROR: no "
618 <<
"vertex found for event " <<
evNum;
620 for (
int i = 0 ;
i<nvertex;
i++) {
621 G4PrimaryVertex* avertex = (*evt)()->GetPrimaryVertex(
i);
623 edm::LogInfo(
"HcalTBSim") <<
"HcalTB04Analysis::EndOfEvent ERR: pointer "
624 <<
"to vertex = 0 for event " <<
evNum;
626 LogDebug(
"HcalTBSim") <<
"HcalTB04Analysis::Vertex number :" <<
i <<
" "
627 << avertex->GetPosition();
628 int npart = avertex->GetNumberOfParticle();
632 if (thePrim==0) thePrim=avertex->GetPrimary(trackID);
637 double px = thePrim->GetPx();
638 double py = thePrim->GetPy();
639 double pz = thePrim->GetPz();
644 <<
"primary has p=0 ";
646 double costheta = pz/
p;
649 if (px != 0 || py != 0)
phiInit = atan2(py,px);
653 edm::LogWarning(
"HcalTBSim") <<
"HcalTB04Analysis::EndOfEvent ERR: could "
654 <<
"not find primary";
661 if (hittot<=0) hittot = 1;
662 std::vector<CaloHit> hits(hittot);
663 std::vector<int> todo(
nTower,0);
665 LogDebug(
"HcalTBSim") <<
"HcalTB04Analysis::qieAnalysis: Size "
666 << hits.size() <<
" " << todo.size() <<
" "
670 for (
unsigned int k1 = 0; k1 <
hcalHitCache.size(); k1++) {
672 uint32_t
id = hit.
id();
674 double esim = hit.
e();
676 for (
unsigned int k2 = k1+1; k2 <
hcalHitCache.size(); k2++) {
678 if (hit.
id() == id) {
688 LogDebug(
"HcalTBSim") <<
"HcalTB04Analysis:: ID 0x" << std::hex <<
id
689 << std::dec <<
" registers " << esim <<
" energy "
690 <<
"from " << nhit <<
" hits starting with hit # "
691 << k1 <<
" energy with noise " <<
eq;
692 for (
int k2 = 0; k2 <
nTower; k2++) {
702 for (
int k2 = 0; k2 <
nTower; k2++) {
709 LogDebug(
"HcalTBSim") <<
"HcalTB04Analysis:: ID 0x" << std::hex
710 <<
idTower[k2] << std::dec <<
" registers "
711 <<
esimh[k2] <<
" energy from hits and energy "
712 <<
"after QIE analysis " <<
eqie[k2];
723 <<
"HcalTB04Analysis requires the RandomNumberGeneratorService\n"
724 <<
"which is not present in the configuration file. "
725 <<
"You must add the service\n in the configuration file or "
726 <<
"remove the modules that require it.";
728 CLHEP::RandGaussQ randGauss(rng->
getEngine());
732 LogDebug(
"HcalTBSim") <<
"HcalTB04Analysis::xtalAnalysis: Size " <<iok.size()
733 <<
" " <<
idEcal.size() <<
" " <<
esime.size() <<
" "
735 for (
unsigned int k1 = 0; k1 <
ecalHitCache.size(); k1++) {
739 for (
unsigned int k2 = k1+1; k2 <
ecalHitCache.size(); k2++) {
749 LogDebug(
"HcalTBSim") <<
"HcalTB04Analysis:: ID 0x" << std::hex <<
id
750 << std::dec <<
" registers " << esim <<
" energy "
751 <<
"from " << nhit <<
" hits starting with hit # "
752 << k1 <<
" energy with noise " <<
eq;
754 for (
int k2 = 0; k2 <
nCrystal; k2++) {
764 for (
int k2 = 0; k2 <
nCrystal; k2++) {
769 LogDebug(
"HcalTBSim") <<
"HcalTB04Analysis:: ID 0x" << std::hex
770 <<
idEcal[k2] << std::dec <<
" registers "
771 <<
esime[k2] <<
" energy from hits and energy from"
772 <<
" noise " <<
enois[k2];
795 LogDebug(
"HcalTBSim") <<
"HcalTB04Analysis:: Energy deposit at Sim Level "
797 <<
" (HCal) " << ehcals <<
"\nHcalTB04Analysis:: "
798 <<
"Energy deposit at Qie Level (Total) " <<
etotq
803 for (
int i=0;
i<5;
i++) {
807 for (
int i=0;
i<3;
i++) {
814 int det,
z, group, ieta, iphi, layer;
819 if (ieta == 0) ieta = 2;
822 ieta = ieta -
iceta + 2;
824 if (iphi >= 0 && iphi < 3 && ieta >= 0 && ieta < 5) {
833 for (
int i=0;
i<3;
i++) {
837 for (
int i=0;
i<5;
i++) {
841 LogDebug(
"HcalTBSim") <<
"HcalTB04Analysis:: Energy fraction along Eta and"
843 for (
int i=0;
i<5;
i++)
844 LogDebug(
"HcalTBSim") <<
"HcalTB04Analysis:: [" <<
i <<
"] Eta Sim = "
850 for (
int i=0;
i<20;
i++) {
856 int det,
z, group, ieta, iphi, layer;
861 if (iphi >= 0 && iphi < 3 && layer >= 0 && layer < 20) {
868 for (
int i=0;
i<20;
i++) {
872 LogDebug(
"HcalTBSim") <<
"HcalTB04Analysis:: Energy fraction along Layer";
873 for (
int i=0;
i<20;
i++)
874 LogDebug(
"HcalTBSim") <<
"HcalTB04Analysis:: [" <<
i <<
"] Sim = "
903 std::vector<CaloHit>::iterator itr;
905 uint32_t
id = itr->id();
906 int det,
z, group, ieta, iphi, lay;
908 product.
saveHit(det, lay, ieta, iphi, itr->e(), itr->t());
911 LogDebug(
"HcalTBSim") <<
"HcalTB04Analysis:: Save Hit " << std::setw(3)
912 << i+1 <<
" ID 0x" << std::hex << group << std::dec
913 <<
" " << std::setw(2) << det <<
" " << std::setw(2)
914 << lay <<
" " << std::setw(1) << z <<
" "
915 << std::setw(3) << ieta <<
" " << std::setw(3) <<iphi
916 <<
" T " << std::setw(6) << itr->t() <<
" E "
917 << std::setw(6) << itr->e();
920 LogDebug(
"HcalTBSim") <<
"HcalTB04Analysis:: Saves " << nhit
921 <<
" hits from Crystals";
926 uint32_t
id = itr->
id();
927 int det,
z, group, ieta, iphi, lay;
929 product.
saveHit(det, lay, ieta, iphi, itr->e(), itr->t());
932 LogDebug(
"HcalTBSim") <<
"HcalTB04Analysis:: Save Hit " << std::setw(3)
933 << i+1 <<
" ID 0x" << std::hex << group << std::dec
934 <<
" " << std::setw(2) << det <<
" " << std::setw(2)
935 << lay <<
" " << std::setw(1) << z <<
" "
936 << std::setw(3) << ieta <<
" " << std::setw(3) <<iphi
937 <<
" T " << std::setw(6) << itr->t() <<
" E "
938 << std::setw(6) << itr->e();
941 LogDebug(
"HcalTBSim") <<
"HcalTB04Analysis:: Saves " << nhit
942 <<
" hits from HCal";
948 for (
unsigned int i = 0; i <
secTrackID.size(); i++) {
959 pvUVW = G4ThreeVector();
992 int det,
z, group, ieta, iphi, lay;
994 group = (det&15)<<20;
995 group += ((lay-1)&31)<<15;
997 group += (ieta&127)<<7;
1008 else if (layer > 17) tmp =
scaleHO;
1017 double theta = 2.0*atan(
exp(-eta));
1020 const double rLay[19] = {
1021 1836.0, 1902.0, 1962.0, 2022.0, 2082.0, 2142.0, 2202.0, 2262.0, 2322.0,
1022 2382.0, 2448.0, 2514.0, 2580.0, 2646.0, 2712.0, 2776.0, 2862.5, 3847.0,
1024 if (layer>0 && layer<=19) dist += rLay[layer-1]*mm/
sin(theta);
1026 const double zLay[19] = {
1027 4034.0, 4032.0, 4123.0, 4210.0, 4297.0, 4384.0, 4471.0, 4558.0, 4645.0,
1028 4732.0, 4819.0, 4906.0, 4993.0, 5080.0, 5167.0, 5254.0, 5341.0, 5428.0,
1030 if (layer>0 && layer<=19) dist += zLay[layer-1]*mm/
cos(theta);
1033 double tmp = dist/c_light/ns;
1035 LogDebug(
"HcalTBSim") <<
"HcalTB04Analysis::timeOfFlight " << tmp
1036 <<
" for det/lay " << det <<
" " << layer
1037 <<
" eta/theta " << eta <<
" " << theta/deg
1038 <<
" 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.
#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)
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
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)
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)