21 #include "G4LogicalVolumeStore.hh"
22 #include "G4LogicalVolume.hh"
25 #include "G4ParticleTable.hh"
26 #include "G4VProcess.hh"
32 #include "G4SystemOfUnits.hh"
40 CaloSD(name, cpv, clg, p, manager,
41 p.getParameter<edm::
ParameterSet>(
"HCalSD").getParameter<int>(
"TimeSliceUnit"),
42 p.getParameter<edm::
ParameterSet>(
"HCalSD").getParameter<bool>(
"IgnoreTrackID")),
44 showerParam(0), showerPMT(0), showerBundle(0), m_HEDarkening(0),
69 bool ageingFlagHE= m_HC.
getParameter<
bool>(
"HEDarkening");
70 bool ageingFlagHF= m_HC.
getParameter<
bool>(
"HFDarkening");
76 applyFidCut = m_HF.getParameter<
bool>(
"ApplyFiducialCut");
79 LogDebug(
"HcalSim") <<
"***************************************************"
83 <<
"* Constructing a HCalSD with name " << name <<
"\n"
86 <<
"***************************************************";
88 edm::LogInfo(
"HcalSim") <<
"HCalSD:: Use of HF code is set to " << useHF
89 <<
"\nUse of shower parametrization set to "
90 << useParam <<
"\nUse of shower library is set to "
91 << useShowerLibrary <<
"\nUse PMT Hit is set to "
92 << usePMTHit <<
" with beta Threshold "<< betaThr
93 <<
"\nUSe of FibreBundle Hit set to "<<useFibreBundle
94 <<
"\n Use of Birks law is set to "
95 << useBirk <<
" with three constants kB = "
96 << birk1 <<
", C1 = " << birk2 <<
", C2 = " <<
birk3;
100 <<
" ions below " <<
kmaxIon <<
" MeV\n"
101 <<
" Threshold for storing hits in HB: "
102 << eminHitHB <<
" HE: " << eminHitHE <<
" HO: "
103 << eminHitHO <<
" HF: " << eminHitHF <<
"\n"
104 <<
"Delivered luminosity for Darkening "
105 << deliveredLumi <<
" Flag (HE) " << ageingFlagHE
106 <<
" Flag (HF) " << ageingFlagHF <<
"\n"
111 if (testNumber || forTBH2)
117 const G4LogicalVolumeStore * lvs = G4LogicalVolumeStore::GetInstance();
118 std::vector<G4LogicalVolume *>::const_iterator lvcite;
130 attribute =
"Volume";
133 DDValue ddv0(attribute, value, 0);
141 edm::LogInfo(
"HcalSim") <<
"HCalSD: Names to be tested for " << attribute
142 <<
" = " << value <<
" has " <<
hfNames.size()
144 for (
unsigned int i=0;
i <
hfNames.size(); ++
i) {
147 for(lvcite=lvs->begin(); lvcite!=lvs->end(); lvcite++)
148 if((*lvcite)->GetName()==namv) {
153 int level =
static_cast<int>(temp[
i]);
156 <<
" LV " <<
hfLV[
i] <<
" at level "
163 DDValue ddv1(attribute,value,0);
168 edm::LogInfo(
"HcalSim") <<
"HCalSD: Names to be tested for " << attribute
169 <<
" = " << value <<
":";
173 for (lvcite = lvs->begin(); lvcite != lvs->end(); ++lvcite) {
174 if ((*lvcite)->GetName() == namv) {
187 DDValue ddv3(attribute,value,0);
191 std::vector<G4String> pmtNames =
getNames(fv3);
192 edm::LogInfo(
"HcalSim") <<
"HCalSD: Names to be tested for " << attribute
193 <<
" = " << value <<
" have " << pmtNames.size()
195 for (
unsigned int i=0;
i<pmtNames.size(); ++
i) {
196 G4String namv = pmtNames[
i];
198 for (lvcite = lvs->begin(); lvcite != lvs->end(); ++lvcite)
199 if ((*lvcite)->GetName() == namv) {
204 edm::LogInfo(
"HcalSim") <<
"HCalSD: (" <<
i <<
") " << pmtNames[
i]
210 value =
"HFFibreBundleStraight";
212 DDValue ddv4(attribute,value,0);
217 edm::LogInfo(
"HcalSim") <<
"HCalSD: Names to be tested for " << attribute
218 <<
" = " << value <<
" have " << fibreNames.size()
220 for (
unsigned int i=0;
i<fibreNames.size(); ++
i) {
221 G4String namv = fibreNames[
i];
223 for (lvcite = lvs->begin(); lvcite != lvs->end(); lvcite++)
224 if ((*lvcite)->GetName() == namv) {
229 edm::LogInfo(
"HcalSim") <<
"HCalSD: (" <<
i <<
") " << fibreNames[
i]
234 value =
"HFFibreBundleConical";
236 DDValue ddv5(attribute,value,0);
241 edm::LogInfo(
"HcalSim") <<
"HCalSD: Names to be tested for " << attribute
242 <<
" = " << value <<
" have " << fibreNames.size()
244 for (
unsigned int i=0;
i<fibreNames.size(); ++
i) {
245 G4String namv = fibreNames[
i];
247 for (lvcite = lvs->begin(); lvcite != lvs->end(); ++lvcite)
248 if ((*lvcite)->GetName() == namv) {
253 edm::LogInfo(
"HcalSim") <<
"HCalSD: (" <<
i <<
") " << fibreNames[
i]
259 attribute =
"ReadOutName";
262 DDValue ddv6(attribute,value,0);
270 edm::LogInfo(
"HFShower") <<
"HFShowerParam: " << gpar.size()
272 for (
unsigned int ig=0; ig<gpar.size(); ig++)
273 edm::LogInfo(
"HFShower") <<
"HFShowerParam: gpar[" << ig <<
"] = "
274 << gpar[ig]/cm <<
" cm";
277 <<
" view for " << attribute <<
" matching "
283 attribute =
"ReadOutName";
285 DDValue ddv2(attribute,name,0);
294 edm::LogInfo(
"HcalSim") <<
"HCalSD: " << layer0wt.size() <<
" Layer0Wt";
295 for (
unsigned int it=0; it<layer0wt.size(); ++it)
296 edm::LogInfo(
"HcalSim") <<
"HCalSD: [" << it <<
"] " << layer0wt[it];
298 const G4MaterialTable * matTab = G4Material::GetMaterialTable();
299 std::vector<G4Material*>::const_iterator matite;
315 for (matite = matTab->begin(); matite != matTab->end(); ++matite) {
316 if ((*matite)->GetName() == namx) {
327 edm::LogInfo(
"HcalSim") <<
"HCalSD: Material names for " << attribute
328 <<
" = " << name <<
":";
346 static const char *
const labels[] = {
"HB",
"HE",
"HO",
"HF Absorber",
"HF PMT",
347 "HF Absorber Long",
"HF Absorber Short",
348 "HF PMT Long",
"HF PMT Short"};
350 char name[20],
title[60];
351 for (
int i=0;
i<9; ++
i) {
352 sprintf (title,
"Hit energy in %s", labels[
i]);
353 sprintf (name,
"HCalSDHit%d", i);
355 sprintf (title,
"Energy (MeV)");
356 hit_[
i]->GetXaxis()->SetTitle(title);
357 hit_[
i]->GetYaxis()->SetTitle(
"Hits");
358 sprintf (title,
"Time of the hit in %s", labels[i]);
359 sprintf (name,
"HCalSDTime%d", i);
361 sprintf (title,
"Time (ns)");
362 time_[
i]->GetXaxis()->SetTitle(title);
363 time_[
i]->GetYaxis()->SetTitle(
"Hits");
364 sprintf (title,
"Longitudinal profile in %s", labels[i]);
365 sprintf (name,
"HCalSDDist%d", i);
367 sprintf (title,
"Distance (mm)");
368 dist_[
i]->GetXaxis()->SetTitle(title);
369 dist_[
i]->GetYaxis()->SetTitle(
"Hits");
371 if (useHF && (!useParam)) {
372 hzvem = hcDir.
make<TH1F>(
"hzvem",
"Longitudinal Profile (EM Part)",330,0.0,1650.0);
373 hzvem->GetXaxis()->SetTitle(
"Longitudinal Profile (EM Part)");
374 hzvhad = hcDir.
make<TH1F>(
"hzvhad",
"Longitudinal Profile (Had Part)",330,0.0,1650.0);
375 hzvhad->GetXaxis()->SetTitle(
"Longitudinal Profile (Hadronic Part)");
401 G4LogicalVolume* lv =
402 aStep->GetPreStepPoint()->GetPhysicalVolume()->GetLogicalVolume();
403 G4String nameVolume = lv->GetName();
405 G4int parCode = aStep->GetTrack()->GetDefinition()->GetPDGEncoding();
408 G4ThreeVector hitPoint = aStep->GetPreStepPoint()->GetPosition();
409 double r = hitPoint.perp()/CLHEP::cm;
410 double z =
std::abs(hitPoint.z())/CLHEP::cm;
411 float dose_acquired = 0.;
412 if (z>=1100 && z <= 1300) {
413 int hfZLayer = (int)((z - 1100)/20);
414 if (hfZLayer > 9) hfZLayer = 9;
416 for (
int i = hfZLayer;
i <= 9; ++
i) {
422 LogDebug(
"HcalSim") <<
"HCalSD: HFLumiDarkening at r = " << r
423 <<
", z = " << z <<
" Dose " << dose_acquired
430 <<
" hits from parametrization in " << nameVolume
431 <<
" for Track " << aStep->GetTrack()->GetTrackID()
432 <<
" (" << aStep->GetTrack()->GetDefinition()->GetParticleName()
438 <<
" hits afterParamS*";
441 bool notaMuon =
true;
442 if (parCode ==
mupPDG || parCode ==
mumPDG ) notaMuon =
false;
445 LogDebug(
"HcalSim") <<
"HCalSD: Starts shower library from "
446 << nameVolume <<
" for Track "
447 << aStep->GetTrack()->GetTrackID() <<
" ("
448 << aStep->GetTrack()->GetDefinition()->GetParticleName() <<
")";
453 LogDebug(
"HcalSim") <<
"HCalSD: Hit at Fibre in " << nameVolume
455 << aStep->GetTrack()->GetTrackID() <<
" ("
456 << aStep->GetTrack()->GetDefinition()->GetParticleName() <<
")";
463 LogDebug(
"HcalSim") <<
"HCalSD: Hit from PMT parametrization from "
464 << nameVolume <<
" for Track "
465 << aStep->GetTrack()->GetTrackID() <<
" ("
466 << aStep->GetTrack()->GetDefinition()->GetParticleName() <<
")";
471 LogDebug(
"HcalSim") <<
"HCalSD: Hit from FibreBundle from "
472 << nameVolume <<
" for Track "
473 << aStep->GetTrack()->GetTrackID() <<
" ("
474 << aStep->GetTrack()->GetDefinition()->GetParticleName() <<
")";
480 LogDebug(
"HcalSim") <<
"HCalSD: Hit from standard path from "
481 << nameVolume <<
" for Track "
482 << aStep->GetTrack()->GetTrackID() <<
" ("
483 << aStep->GetTrack()->GetDefinition()->GetParticleName() <<
")";
488 plotProfile(aStep, aStep->GetPreStepPoint()->GetPosition(),
499 double destep = aStep->GetTotalEnergyDeposit();
501 G4Track*
theTrack = aStep->GetTrack();
503 const G4VTouchable* touch = aStep->GetPreStepPoint()->GetTouchable();
504 int depth = (touch->GetReplicaNumber(0))%10;
505 int det = ((touch->GetReplicaNumber(1))/1000)-3;
506 if (depth==0 && (det==0 || det==1)) weight =
layer0wt[det];
508 int lay = (touch->GetReplicaNumber(0)/10)%100 + 1;
509 G4ThreeVector hitPoint = aStep->GetPreStepPoint()->GetPosition();
514 int lay = (touch->GetReplicaNumber(0)/10)%100 + 1;
518 int det,
z, depth,
eta,
phi, lay;
524 edm::LogInfo(
"HcalSimDark") <<
"HCalSD:HE_Darkening >>> ieta: "<< ieta
525 <<
" lay: " << lay-2;
531 <<
" coefficient = " << dweight;
538 int pdg = theTrack->GetDefinition()->GetPDGEncoding();
540 double ke = theTrack->GetKineticEnergy()/MeV;
541 if ( pdg/1000000000 == 1 && (pdg/10000)%100 > 0 &&
542 (pdg/10)%100 > 0 && ke <
kmaxIon ) weight = 0;
543 if ((pdg == 2212) && (ke <
kmaxProton)) weight = 0;
544 if ((pdg == 2112) && (ke <
kmaxNeutron)) weight = 0;
548 << theTrack->GetTrackID() <<
" Type "
549 << theTrack->GetDefinition()->GetParticleName()
550 <<
" Kinetic Energy " << ke <<
" MeV";
559 G4Material* mat = aStep->GetPreStepPoint()->GetMaterial();
563 double wt2 = theTrack->GetWeight();
579 edm::LogInfo(
"HcalSim") <<
"HCalSD: Detector " << det+3 <<
" Depth " << depth
580 <<
" weight " << weight0 <<
" " << weight <<
" " << wt1
583 double edep = weight*wt1*destep;
584 if(wt2 > 0.0) { edep *= wt2; }
591 const G4VTouchable* touch = preStepPoint->GetTouchable();
592 G4ThreeVector hitPoint = preStepPoint->GetPosition();
594 int depth = (touch->GetReplicaNumber(0))%10 + 1;
595 int lay = (touch->GetReplicaNumber(0)/10)%100 + 1;
596 int det = (touch->GetReplicaNumber(1))/1000;
603 edm::LogInfo(
"HcalSim") <<
"HCalSD: updates numbering scheme for " << GetName();
610 G4ParticleTable * theParticleTable = G4ParticleTable::GetParticleTable();
611 G4String particleName;
612 mumPDG = theParticleTable->FindParticle(particleName=
"mu-")->GetPDGEncoding();
613 mupPDG = theParticleTable->FindParticle(particleName=
"mu+")->GetPDGEncoding();
615 LogDebug(
"HcalSim") <<
"HCalSD: Particle code for mu- = " <<
mumPDG
616 <<
" for mu+ = " <<
mupPDG;
626 switch (theId.subdetId()) {
656 LogDebug(
"HcalSim") <<
"HCalSD:getDDDArray called for " << str;
663 const std::vector<double> & fvec = value.
doubles();
664 int nval = fvec.size();
666 edm::LogError(
"HcalSim") <<
"HCalSD : # of " << str <<
" bins " << nval
667 <<
" < 2 ==> illegal";
668 throw cms::Exception(
"Unknown",
"HCalSD") <<
"nval < 2 for array " << str <<
"\n";
673 edm::LogError(
"HcalSim") <<
"HCalSD : cannot get array " << str;
674 throw cms::Exception(
"Unknown",
"HCalSD") <<
"cannot get array " << str <<
"\n";
680 std::vector<G4String>
tmp;
686 for (
unsigned int i=0;
i<tmp.size(); ++
i) {
687 if (!strcmp(tmp[
i].c_str(), log.
name().
name().c_str())) {
692 if (ok) tmp.push_back(log.
name().
name());
699 const G4VTouchable* touch = aStep->GetPreStepPoint()->GetTouchable();
700 int levels = (touch->GetHistoryDepth()) + 1;
701 for (
unsigned int it=0; it <
hfNames.size(); ++it) {
703 G4LogicalVolume* lv = touch->GetVolume(levels-
hfLevels[it])->GetLogicalVolume();
704 if (lv ==
hfLV[it])
return true;
711 std::vector<G4String>::const_iterator it =
hfNames.begin();
712 for (; it !=
hfNames.end(); ++it)
if (name == *it)
return true;
717 std::vector<G4LogicalVolume*>::const_iterator ite =
fibreLV.begin();
718 for (; ite !=
fibreLV.end(); ++ite)
if (lv == *ite)
return true;
723 std::vector<G4String>::const_iterator it =
fibreNames.begin();
724 for (; it !=
fibreNames.end(); ++it)
if (name == *it)
return true;
729 std::vector<G4LogicalVolume*>::const_iterator ite =
pmtLV.begin();
730 for (; ite !=
pmtLV.end(); ++ite)
if (lv == *ite)
return true;
735 std::vector<G4LogicalVolume*>::const_iterator ite =
fibre1LV.begin();
736 for (; ite !=
fibre1LV.end(); ++ite)
if (lv == *ite)
return true;
741 std::vector<G4LogicalVolume*>::const_iterator ite =
fibre2LV.begin();
742 for (; ite !=
fibre2LV.end(); ++ite)
if (lv == *ite)
return true;
747 std::vector<G4Material*>::const_iterator ite =
materials.begin();
748 for (; ite !=
materials.end(); ++ite)
if (mat == *ite)
return true;
757 edm::LogInfo(
"HcalSim") <<
"HCalSD::isItinFidVolume:#PMT= " << npmt
758 <<
" for hit point " << hitPoint;
760 if (npmt <= 0) flag =
false;
763 edm::LogInfo(
"HcalSim") <<
"HCalSD::isItinFidVolume: point " << hitPoint
764 <<
" return flag " << flag;
784 G4int particleCode =
theTrack->GetDefinition()->GetPDGEncoding();
793 edm::LogInfo(
"HcalSim") <<
"HCalSD::getFromLibrary " <<hits.size()
794 <<
" hits for " << GetName() <<
" of " << primaryID
795 <<
" with " <<
theTrack->GetDefinition()->GetParticleName()
796 <<
" of " <<
preStepPoint->GetKineticEnergy()/GeV <<
" GeV";
798 for (
unsigned int i=0;
i<hits.size(); ++
i) {
799 G4ThreeVector hitPoint = hits[
i].position;
801 int depth = hits[
i].depth;
802 double time = hits[
i].time;
803 unsigned int unitID =
setDetUnitId(det, hitPoint, depth);
806 plotProfile(aStep, hitPoint, 1.0*GeV, time, depth);
824 theTrack->SetTrackStatus(fStopAndKill);
825 G4TrackVector tv = *(aStep->GetSecondary());
826 for (
unsigned int kk=0;
kk<tv.size(); ++
kk)
828 tv[
kk]->SetTrackStatus(fStopAndKill);
841 G4int particleCode =
theTrack->GetDefinition()->GetPDGEncoding();
851 edm::LogInfo(
"HcalSim") <<
"HCalSD::hitForFibre " << hits.size()
852 <<
" hits for " << GetName() <<
" of " << primaryID
853 <<
" with " <<
theTrack->GetDefinition()->GetParticleName()
855 <<
" GeV in detector type " << det;
857 if (hits.size() > 0) {
858 for (
unsigned int i=0;
i<hits.size(); ++
i) {
859 G4ThreeVector hitPoint = hits[
i].position;
861 int depth = hits[
i].depth;
862 double time = hits[
i].time;
863 unsigned int unitID =
setDetUnitId(det, hitPoint, depth);
886 int nHit =
static_cast<int>(hits.size());
894 edm::LogInfo(
"HcalSim") <<
"HCalSD::getFromParam " << nHit <<
" hits for "
895 << GetName() <<
" of " << primaryID <<
" with "
896 << aStep->GetTrack()->GetDefinition()->GetParticleName()
898 <<
" GeV in detector type " << det;
900 for (
int i = 0;
i<nHit; ++
i) {
901 G4ThreeVector hitPoint = hits[
i].position;
902 int depth = hits[
i].depth;
903 double time = hits[
i].time;
904 unsigned int unitID =
setDetUnitId(det, hitPoint, depth);
935 primaryID =
theTrack->GetParentID();
936 if (primaryID == 0) primaryID =
theTrack->GetTrackID();
945 double rr = (hitPoint.x()*hitPoint.x() + hitPoint.y()*hitPoint.y());
946 double phi = (rr == 0. ? 0. :atan2(hitPoint.y(),hitPoint.x()));
953 if (hitPoint.z() < 0) etaR =-etaR;
955 edm::LogInfo(
"HcalSim") <<
"HCalSD::Hit for Detector " << det <<
" etaR "
956 << etaR <<
" phi " << phi/deg <<
" depth " <<depth;
958 double time = (aStep->GetPostStepPoint()->GetGlobalTime());
970 plotProfile(aStep, hitPoint, edep*GeV, time, depth);
974 LogDebug(
"HcalSim") <<
"HCalSD::getHitPMT 1 hit for " << GetName()
975 <<
" of " << primaryID <<
" with "
976 <<
theTrack->GetDefinition()->GetParticleName()
978 <<
" GeV with velocity " << beta <<
" UnitID "
979 << std::hex << unitID << std::dec;
1001 primaryID =
theTrack->GetParentID();
1002 if (primaryID == 0) primaryID =
theTrack->GetTrackID();
1011 double rr = (hitPoint.x()*hitPoint.x() + hitPoint.y()*hitPoint.y());
1012 double phi = (rr == 0. ? 0. :atan2(hitPoint.y(),hitPoint.x()));
1019 if (hitPoint.z() < 0) etaR =-etaR;
1021 LogDebug(
"HcalSim") <<
"HCalSD::Hit for Detector " << det <<
" etaR "
1022 << etaR <<
" phi " << phi/deg <<
" depth " <<depth;
1024 double time = (aStep->GetPostStepPoint()->GetGlobalTime());
1025 uint32_t unitID = 0;
1036 plotProfile(aStep, hitPoint, edep*GeV, time, depth);
1040 LogDebug(
"HcalSim") <<
"HCalSD::getHitFibreBundle 1 hit for " << GetName()
1041 <<
" of " << primaryID <<
" with "
1042 <<
theTrack->GetDefinition()->GetParticleName()
1044 <<
" GeV with velocity " << beta <<
" UnitID "
1045 << std::hex << unitID << std::dec;
1059 if (primaryID == 0) {
1061 edm::LogInfo(
"HcalSim") <<
"HCalSD: Problem with primaryID **** set by "
1062 <<
"force to TkID **** " <<
theTrack->GetTrackID();
1064 primaryID =
theTrack->GetTrackID();
1079 int det, zside, etaR,
phi, lay;
1081 while (infile >> det >> zside >> etaR >> phi >> lay >> wt) {
1083 layerWeights.insert(std::pair<uint32_t,double>(
id,wt));
1086 edm::LogInfo(
"HcalSim") <<
"HCalSD::readWeightFromFile:Entry " << entry
1087 <<
" ID " << std::hex <<
id << std::dec <<
" ("
1088 << det <<
"/" << zside <<
"/1/" << etaR <<
"/"
1089 << phi <<
"/" << lay <<
") Weight " << wt;
1094 edm::LogInfo(
"HcalSim") <<
"HCalSD::readWeightFromFile: reads " << entry
1095 <<
" weights from " << fName;
1108 std::map<uint32_t,double>::const_iterator ite =
layerWeights.find(
id);
1111 edm::LogInfo(
"HcalSim") <<
"HCalSD::layerWeight: ID " << std::hex <<
id
1112 << std::dec <<
" (" << tmp.
subdet <<
"/"
1113 << tmp.
zside <<
"/1/" << tmp.
etaR <<
"/"
1114 << tmp.
phis <<
"/" << tmp.
lay <<
") Weight " <<wt;
1121 double time,
int id) {
1123 const G4VTouchable* touch = aStep->GetPreStepPoint()->GetTouchable();
1124 static G4String modName[8] = {
"HEModule",
"HVQF" ,
"HBModule",
"MBAT",
1125 "MBBT" ,
"MBBTC",
"MBBT_R1P",
"MBBT_R1M"};
1126 G4ThreeVector local;
1130 for (
int n=0;
n<touch->GetHistoryDepth(); ++
n) {
1131 G4String
name = touch->GetVolume(
n)->GetName();
1133 LogDebug(
"HcalSim") <<
"plotProfile Depth " <<
n <<
" Name " <<
name;
1135 for (
unsigned int ii=0;
ii<8; ++
ii) {
1136 if (name == modName[
ii]) {
1138 int dn = touch->GetHistoryDepth() -
n;
1139 local = touch->GetHistory()->GetTransform(dn).TransformPoint(global);
1140 if (ii == 0) {depth = local.z() - 4006.5; idx = 1;}
1141 else if (ii == 1) {depth = local.z() + 825.0; idx = 3;}
1142 else if (ii == 2) {depth = local.x() - 1775.; idx = 0;}
1143 else {depth = local.y() + 15.; idx = 2;}
1149 if (!found) depth =
std::abs(global.z()) - 11500;
1151 LogDebug(
"HcalSim") <<
"plotProfile Found " << found <<
" Global " << global
1152 <<
" Local " << local <<
" depth " << depth <<
" ID "
1153 <<
id <<
" EDEP " << edep <<
" Time " <<
time;
1158 int jd = 2*idx +
id - 7;
1159 if (jd >= 0 && jd < 4) {
1161 if (
hit_[jd] != 0)
hit_[jd]->Fill(edep);
1162 if (
time_[jd] != 0)
time_[jd]->Fill(time,edep);
1163 if (
dist_[jd] != 0)
dist_[jd]->Fill(depth,edep);
T getParameter(std::string const &) const
std::vector< double > layer0wt
T getUntrackedParameter(std::string const &, T const &) const
HFShowerParam * showerParam
float int_lumi(float intlumi)
const DDLogicalPart & logicalPart() const
The logical-part of the current node in the filtered-view.
const std::vector< double > & doubles() const
a reference to the double-valued values stored in the given instance of DDValue
void addFilter(const DDFilter &, log_op op=AND)
void updateHit(CaloG4Hit *)
void hitForFibre(G4Step *step, double weight)
void getFromParam(G4Step *step, double weight)
void initRun(G4ParticleTable *)
bool isItStraightBundle(G4LogicalVolume *)
virtual bool ProcessHits(G4Step *, G4TouchableHistory *)
std::vector< double > gpar
bool isItinFidVolume(G4ThreeVector &)
std::vector< Hit > getHits(G4Step *aStep, bool &ok, double weight, bool onlyLong=false)
virtual uint32_t getUnitID(const HcalNumberingFromDDD::HcalID &id)
HFShowerFibreBundle * showerBundle
std::vector< G4LogicalVolume * > fibre1LV
std::vector< G4LogicalVolume * > fibreLV
std::vector< double > getDDDArray(const std::string &, const DDsvalues_type &)
double getHits(G4Step *aStep, bool type)
virtual uint32_t setDetUnitId(G4Step *step)
int setTrackID(G4Step *step)
void getFromLibrary(G4Step *step, double weight)
void setNumberingScheme(HcalNumberingScheme *)
type of data representation of DDCompactView
bool DDfetch(const DDsvalues_type *, DDValue &)
helper for retrieving DDValues from DDsvalues_type *.
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e g
static int PMTNumber(const G4ThreeVector &pe_effect)
static TrackerG4SimHitNumberingScheme & numberingScheme(const DDCompactView &cpv, const GeometricDet &det)
bool isItConicalBundle(G4LogicalVolume *)
static uint32_t packHcalIndex(int det, int z, int depth, int eta, int phi, int lay)
void resetForNewPrimary(const G4ThreeVector &, double)
std::vector< G4LogicalVolume * > pmtLV
std::vector< G4LogicalVolume * > hfLV
bool isItScintillator(G4Material *)
bool next()
set current node to the next node in the filtered tree
virtual double getEnergyDeposit(G4Step *)
void plotHF(G4ThreeVector &pos, bool emType)
std::vector< std::pair< unsigned int, DDValue > > DDsvalues_type
std::maps an index to a DDValue. The index corresponds to the index assigned to the name of the std::...
float degradation(float mrad)
std::vector< Hit > getHits(G4Step *aStep, double weight)
Abs< T >::type abs(const T &t)
static void unpackHcalIndex(const uint32_t &idx, int &det, int &z, int &depth, int &eta, int &phi, int &lay)
A DDLogicalPart aggregates information concerning material, solid and sensitveness ...
HcalNumberingScheme * numberingScheme
void getHitPMT(G4Step *step)
T * make(const Args &...args) const
make new ROOT object
HFDarkening * m_HFDarkening
double getAttenuation(G4Step *aStep, double birk1, double birk2, double birk3)
std::vector< int > hfLevels
virtual std::vector< std::string > getNames()
void plotProfile(G4Step *step, const G4ThreeVector &pos, double edep, double time, int id)
HEDarkening * m_HEDarkening
void NaNTrap(G4Step *step)
virtual G4bool getStepInfo(G4Step *aStep)
bool isItPMT(G4LogicalVolume *)
int ietaAbs() const
get the absolute value of the cell ieta
void setID(uint32_t unitID, double timeSlice, int trackID, uint16_t depth=0)
G4StepPoint * preStepPoint
static const G4LogicalVolume * GetVolume(const std::string &name)
TFileDirectory mkdir(const std::string &dir, const std::string &descr="")
create a new subdirectory
std::vector< Hit > getHits(G4Step *aStep, double weight)
void readWeightFromFile(std::string)
tuple idx
DEBUGGING if hasattr(process,"trackMonIterativeTracking2012"): print "trackMonIterativeTracking2012 D...
void getHitFibreBundle(G4Step *step, bool type)
DDsvalues_type mergedSpecifics() const
double getHits(G4Step *aStep)
void initRun(G4ParticleTable *theParticleTable)
HcalNumberingFromDDD * numberingFromDDD
double layerWeight(int, const G4ThreeVector &, int, int)
std::vector< std::vector< double > > tmp
float dose(int layer, float radius)
double getResponseWt(G4Track *)
void initRun(G4ParticleTable *)
std::vector< G4String > fibreNames
bool firstChild()
set the current node to the first child ...
std::vector< G4Material * > materials
virtual bool filterHit(CaloG4Hit *, double)
void setCriteria(const DDValue &nameVal, comp_op, log_op l=AND, bool asString=true, bool merged=true)
std::vector< G4String > hfNames
std::map< uint32_t, double > layerWeights
uint32_t getUnitID() const
HcalID unitID(int det, const CLHEP::Hep3Vector &pos, int depth, int lay=-1) const
float degradation(float intlumi, int ieta, int lay)
HCalSD(G4String, const DDCompactView &, SensitiveDetectorCatalog &, edm::ParameterSet const &, const SimTrackManager *)
HFShowerLibrary * showerLibrary
std::vector< G4LogicalVolume * > fibre2LV
const std::string & name() const
Returns the name.
const DDMaterial & material(void) const
Returns a reference object of the material this LogicalPart is made of.
CaloG4Hit * createNewHit()
std::vector< G4String > matNames
bool isItFibre(G4LogicalVolume *)
double getEnergyDeposit() const
The DDGenericFilter is a runtime-parametrized Filter looking on DDSpecifcs.