25 #include "G4LogicalVolumeStore.hh"
26 #include "G4LogicalVolume.hh"
29 #include "G4ParticleTable.hh"
30 #include "G4VProcess.hh"
32 #include "G4SystemOfUnits.hh"
33 #include "G4PhysicalConstants.hh"
45 CaloSD(name, cpv, clg, p, manager,
46 (float)(p.getParameter<edm::
ParameterSet>(
"HCalSD").getParameter<double>(
"TimeSliceUnit")),
47 p.getParameter<edm::
ParameterSet>(
"HCalSD").getParameter<bool>(
"IgnoreTrackID")),
48 hcalConstants(0), numberingFromDDD(0),
numberingScheme(0), showerLibrary(0),
49 hfshower(0), showerParam(0), showerPMT(0), showerBundle(0), m_HEDarkening(0),
73 bool ageingFlagHE= m_HC.
getParameter<
bool>(
"HEDarkening");
74 bool ageingFlagHF= m_HC.
getParameter<
bool>(
"HFDarkening");
80 applyFidCut = m_HF.getParameter<
bool>(
"ApplyFiducialCut");
83 LogDebug(
"HcalSim") <<
"***************************************************"
87 <<
"* Constructing a HCalSD with name " << name <<
"\n"
90 <<
"***************************************************";
92 edm::LogInfo(
"HcalSim") <<
"HCalSD:: Use of HF code is set to " << useHF
93 <<
"\nUse of shower parametrization set to "
94 << useParam <<
"\nUse of shower library is set to "
95 << useShowerLibrary <<
"\nUse PMT Hit is set to "
96 << usePMTHit <<
" with beta Threshold "<< betaThr
97 <<
"\nUSe of FibreBundle Hit set to "<<useFibreBundle
98 <<
"\n Use of Birks law is set to "
99 << useBirk <<
" with three constants kB = "
100 << birk1 <<
", C1 = " << birk2 <<
", C2 = " <<
birk3;
104 <<
" ions below " <<
kmaxIon <<
" MeV\n"
105 <<
" Threshold for storing hits in HB: "
106 << eminHitHB <<
" HE: " << eminHitHE <<
" HO: "
107 << eminHitHO <<
" HF: " << eminHitHF <<
"\n"
108 <<
"Delivered luminosity for Darkening "
109 << deliveredLumi <<
" Flag (HE) " << ageingFlagHE
110 <<
" Flag (HF) " << ageingFlagHF <<
"\n"
114 if (testNumber || forTBH2)
120 const G4LogicalVolumeStore * lvs = G4LogicalVolumeStore::GetInstance();
121 std::vector<G4LogicalVolume *>::const_iterator lvcite;
133 attribute =
"Volume";
136 DDValue ddv0(attribute, value, 0);
144 edm::LogInfo(
"HcalSim") <<
"HCalSD: Names to be tested for " << attribute
145 <<
" = " << value <<
" has " <<
hfNames.size()
147 for (
unsigned int i=0;
i <
hfNames.size(); ++
i) {
150 for(lvcite=lvs->begin(); lvcite!=lvs->end(); lvcite++)
151 if((*lvcite)->GetName()==namv) {
156 int level =
static_cast<int>(temp[
i]);
159 <<
" LV " <<
hfLV[
i] <<
" at level "
166 DDValue ddv1(attribute,value,0);
171 edm::LogInfo(
"HcalSim") <<
"HCalSD: Names to be tested for " << attribute
172 <<
" = " << value <<
":";
176 for (lvcite = lvs->begin(); lvcite != lvs->end(); ++lvcite) {
177 if ((*lvcite)->GetName() == namv) {
190 DDValue ddv3(attribute,value,0);
194 std::vector<G4String> pmtNames =
getNames(fv3);
195 edm::LogInfo(
"HcalSim") <<
"HCalSD: Names to be tested for " << attribute
196 <<
" = " << value <<
" have " << pmtNames.size()
198 for (
unsigned int i=0;
i<pmtNames.size(); ++
i) {
199 G4String namv = pmtNames[
i];
201 for (lvcite = lvs->begin(); lvcite != lvs->end(); ++lvcite)
202 if ((*lvcite)->GetName() == namv) {
207 edm::LogInfo(
"HcalSim") <<
"HCalSD: (" <<
i <<
") " << pmtNames[
i]
213 value =
"HFFibreBundleStraight";
215 DDValue ddv4(attribute,value,0);
220 edm::LogInfo(
"HcalSim") <<
"HCalSD: Names to be tested for " << attribute
221 <<
" = " << value <<
" have " << fibreNames.size()
223 for (
unsigned int i=0;
i<fibreNames.size(); ++
i) {
224 G4String namv = fibreNames[
i];
226 for (lvcite = lvs->begin(); lvcite != lvs->end(); lvcite++)
227 if ((*lvcite)->GetName() == namv) {
232 edm::LogInfo(
"HcalSim") <<
"HCalSD: (" <<
i <<
") " << fibreNames[
i]
237 value =
"HFFibreBundleConical";
239 DDValue ddv5(attribute,value,0);
244 edm::LogInfo(
"HcalSim") <<
"HCalSD: Names to be tested for " << attribute
245 <<
" = " << value <<
" have " << fibreNames.size()
247 for (
unsigned int i=0;
i<fibreNames.size(); ++
i) {
248 G4String namv = fibreNames[
i];
250 for (lvcite = lvs->begin(); lvcite != lvs->end(); ++lvcite)
251 if ((*lvcite)->GetName() == namv) {
256 edm::LogInfo(
"HcalSim") <<
"HCalSD: (" <<
i <<
") " << fibreNames[
i]
264 const G4MaterialTable * matTab = G4Material::GetMaterialTable();
265 std::vector<G4Material*>::const_iterator matite;
266 attribute =
"OnlyForHcalSimNumbering";
269 DDValue ddv2(attribute,value,0);
291 G4Material* mat =
nullptr;
292 for (matite = matTab->begin(); matite != matTab->end(); ++matite) {
293 if ((*matite)->GetName() == namx) {
304 edm::LogInfo(
"HcalSim") <<
"HCalSD: Material names for " << attribute
305 <<
" = " << name <<
":";
323 static const char *
const labels[] = {
"HB",
"HE",
"HO",
"HF Absorber",
"HF PMT",
324 "HF Absorber Long",
"HF Absorber Short",
325 "HF PMT Long",
"HF PMT Short"};
327 char name[20],
title[60];
328 for (
int i=0;
i<9; ++
i) {
329 sprintf (title,
"Hit energy in %s", labels[
i]);
330 sprintf (name,
"HCalSDHit%d", i);
332 sprintf (title,
"Energy (MeV)");
333 hit_[
i]->GetXaxis()->SetTitle(title);
334 hit_[
i]->GetYaxis()->SetTitle(
"Hits");
335 sprintf (title,
"Time of the hit in %s", labels[i]);
336 sprintf (name,
"HCalSDTime%d", i);
338 sprintf (title,
"Time (ns)");
339 time_[
i]->GetXaxis()->SetTitle(title);
340 time_[
i]->GetYaxis()->SetTitle(
"Hits");
341 sprintf (title,
"Longitudinal profile in %s", labels[i]);
342 sprintf (name,
"HCalSDDist%d", i);
344 sprintf (title,
"Distance (mm)");
345 dist_[
i]->GetXaxis()->SetTitle(title);
346 dist_[
i]->GetYaxis()->SetTitle(
"Hits");
348 if (useHF && (!useParam)) {
349 hzvem = hcDir.
make<TH1F>(
"hzvem",
"Longitudinal Profile (EM Part)",330,0.0,1650.0);
350 hzvem->GetXaxis()->SetTitle(
"Longitudinal Profile (EM Part)");
351 hzvhad = hcDir.
make<TH1F>(
"hzvhad",
"Longitudinal Profile (Had Part)",330,0.0,1650.0);
352 hzvhad->GetXaxis()->SetTitle(
"Longitudinal Profile (Hadronic Part)");
378 G4LogicalVolume* lv =
379 aStep->GetPreStepPoint()->GetPhysicalVolume()->GetLogicalVolume();
380 G4String nameVolume = lv->GetName();
382 G4int parCode = aStep->GetTrack()->GetDefinition()->GetPDGEncoding();
385 G4ThreeVector hitPoint = aStep->GetPreStepPoint()->GetPosition();
386 double r = hitPoint.perp()/CLHEP::cm;
387 double z =
std::abs(hitPoint.z())/CLHEP::cm;
388 double dose_acquired = 0.;
399 LogDebug(
"HcalSim") <<
"HCalSD: HFLumiDarkening at r = " << r
400 <<
", z = " << z <<
" Dose " << dose_acquired
407 <<
" hits from parametrization in " << nameVolume
408 <<
" for Track " << aStep->GetTrack()->GetTrackID()
409 <<
" (" << aStep->GetTrack()->GetDefinition()->GetParticleName()
415 <<
" hits afterParamS*";
418 bool notaMuon =
true;
419 if (parCode ==
mupPDG || parCode ==
mumPDG ) notaMuon =
false;
422 LogDebug(
"HcalSim") <<
"HCalSD: Starts shower library from "
423 << nameVolume <<
" for Track "
424 << aStep->GetTrack()->GetTrackID() <<
" ("
425 << aStep->GetTrack()->GetDefinition()->GetParticleName() <<
")";
430 LogDebug(
"HcalSim") <<
"HCalSD: Hit at Fibre in " << nameVolume
432 << aStep->GetTrack()->GetTrackID() <<
" ("
433 << aStep->GetTrack()->GetDefinition()->GetParticleName() <<
")";
440 LogDebug(
"HcalSim") <<
"HCalSD: Hit from PMT parametrization from "
441 << nameVolume <<
" for Track "
442 << aStep->GetTrack()->GetTrackID() <<
" ("
443 << aStep->GetTrack()->GetDefinition()->GetParticleName() <<
")";
448 LogDebug(
"HcalSim") <<
"HCalSD: Hit from FibreBundle from "
449 << nameVolume <<
" for Track "
450 << aStep->GetTrack()->GetTrackID() <<
" ("
451 << aStep->GetTrack()->GetDefinition()->GetParticleName() <<
")";
457 LogDebug(
"HcalSim") <<
"HCalSD: Hit from standard path from "
458 << nameVolume <<
" for Track "
459 << aStep->GetTrack()->GetTrackID() <<
" ("
460 << aStep->GetTrack()->GetDefinition()->GetParticleName() <<
")";
465 plotProfile(aStep, aStep->GetPreStepPoint()->GetPosition(),
476 double destep = aStep->GetTotalEnergyDeposit();
478 G4Track*
theTrack = aStep->GetTrack();
480 const G4VTouchable* touch = aStep->GetPreStepPoint()->GetTouchable();
481 int depth = (touch->GetReplicaNumber(0))%10;
482 int det = ((touch->GetReplicaNumber(1))/1000)-3;
483 if (depth==0 && (det==0 || det==1)) weight =
layer0wt[det];
485 int lay = (touch->GetReplicaNumber(0)/10)%100 + 1;
486 G4ThreeVector hitPoint = aStep->GetPreStepPoint()->GetPosition();
491 int lay = (touch->GetReplicaNumber(0)/10)%100 + 1;
501 edm::LogInfo(
"HcalSim") <<
"HCalSD:HE_Darkening >>> ieta: "<< ieta
502 <<
" lay: " << lay-2;
508 <<
" coefficient = " << dweight;
515 int pdg = theTrack->GetDefinition()->GetPDGEncoding();
517 double ke = theTrack->GetKineticEnergy()/
MeV;
518 if ( pdg/1000000000 == 1 && (pdg/10000)%100 > 0 &&
519 (pdg/10)%100 > 0 && ke <
kmaxIon ) weight = 0;
520 if ((pdg == 2212) && (ke <
kmaxProton)) weight = 0;
521 if ((pdg == 2112) && (ke <
kmaxNeutron)) weight = 0;
525 << theTrack->GetTrackID() <<
" Type "
526 << theTrack->GetDefinition()->GetParticleName()
527 <<
" Kinetic Energy " << ke <<
" MeV";
536 G4Material* mat = aStep->GetPreStepPoint()->GetMaterial();
540 double wt2 = theTrack->GetWeight();
542 edm::LogInfo(
"HcalSim") <<
"HCalSD: Detector " << det+3 <<
" Depth " << depth
543 <<
" weight " << weight0 <<
" " << weight <<
" " << wt1
546 double edep = weight*wt1*destep;
547 if(wt2 > 0.0) { edep *= wt2; }
554 const G4VTouchable* touch = preStepPoint->GetTouchable();
555 G4ThreeVector hitPoint = preStepPoint->GetPosition();
557 int depth = (touch->GetReplicaNumber(0))%10 + 1;
558 int lay = (touch->GetReplicaNumber(0)/10)%100 + 1;
559 int det = (touch->GetReplicaNumber(1))/1000;
566 edm::LogInfo(
"HcalSim") <<
"HCalSD: updates numbering scheme for " << GetName();
580 edm::LogError(
"HcalSim") <<
"HCalSD : Cannot find HcalDDDSimConstant";
581 throw cms::Exception(
"Unknown",
"HCalSD") <<
"Cannot find HcalDDDSimConstant" <<
"\n";
591 for (
unsigned int ig=0; ig<
gpar.size(); ig++)
592 edm::LogInfo(
"HcalSim") <<
"HCalSD: gpar[" << ig <<
"] = "
593 <<
gpar[ig]/cm <<
" cm";
598 for (
unsigned int it=0; it<
layer0wt.size(); ++it)
604 G4ParticleTable * theParticleTable = G4ParticleTable::GetParticleTable();
605 G4String particleName;
606 mumPDG = theParticleTable->FindParticle(particleName=
"mu-")->GetPDGEncoding();
607 mupPDG = theParticleTable->FindParticle(particleName=
"mu+")->GetPDGEncoding();
609 LogDebug(
"HcalSim") <<
"HCalSD: Particle code for mu- = " <<
mumPDG
610 <<
" for mu+ = " <<
mupPDG;
622 switch (theId.subdetId()) {
652 LogDebug(
"HcalSim") <<
"HCalSD:getDDDArray called for " << str;
659 const std::vector<double> & fvec = value.
doubles();
660 int nval = fvec.size();
662 edm::LogError(
"HcalSim") <<
"HCalSD : # of " << str <<
" bins " << nval
663 <<
" < 2 ==> illegal";
664 throw cms::Exception(
"Unknown",
"HCalSD") <<
"nval < 2 for array " << str <<
"\n";
669 edm::LogError(
"HcalSim") <<
"HCalSD : cannot get array " << str;
670 throw cms::Exception(
"Unknown",
"HCalSD") <<
"cannot get array " << str <<
"\n";
676 std::vector<G4String>
tmp;
682 for (
unsigned int i=0;
i<tmp.size(); ++
i) {
683 if (!strcmp(tmp[
i].c_str(), log.
name().
name().c_str())) {
688 if (ok) tmp.push_back(log.
name().
name());
695 const G4VTouchable* touch = aStep->GetPreStepPoint()->GetTouchable();
696 int levels = (touch->GetHistoryDepth()) + 1;
697 for (
unsigned int it=0; it <
hfNames.size(); ++it) {
699 G4LogicalVolume* lv = touch->GetVolume(levels-
hfLevels[it])->GetLogicalVolume();
700 if (lv ==
hfLV[it])
return true;
707 std::vector<G4String>::const_iterator it =
hfNames.begin();
708 for (; it !=
hfNames.end(); ++it)
if (name == *it)
return true;
713 std::vector<G4LogicalVolume*>::const_iterator ite =
fibreLV.begin();
714 for (; ite !=
fibreLV.end(); ++ite)
if (lv == *ite)
return true;
719 std::vector<G4String>::const_iterator it =
fibreNames.begin();
720 for (; it !=
fibreNames.end(); ++it)
if (name == *it)
return true;
725 std::vector<G4LogicalVolume*>::const_iterator ite =
pmtLV.begin();
726 for (; ite !=
pmtLV.end(); ++ite)
if (lv == *ite)
return true;
731 std::vector<G4LogicalVolume*>::const_iterator ite =
fibre1LV.begin();
732 for (; ite !=
fibre1LV.end(); ++ite)
if (lv == *ite)
return true;
737 std::vector<G4LogicalVolume*>::const_iterator ite =
fibre2LV.begin();
738 for (; ite !=
fibre2LV.end(); ++ite)
if (lv == *ite)
return true;
743 std::vector<G4Material*>::const_iterator ite =
materials.begin();
744 for (; ite !=
materials.end(); ++ite)
if (mat == *ite)
return true;
753 edm::LogInfo(
"HcalSim") <<
"HCalSD::isItinFidVolume:#PMT= " << npmt
754 <<
" for hit point " << hitPoint;
756 if (npmt <= 0) flag =
false;
759 edm::LogInfo(
"HcalSim") <<
"HCalSD::isItinFidVolume: point " << hitPoint
760 <<
" return flag " << flag;
780 G4int particleCode =
theTrack->GetDefinition()->GetPDGEncoding();
789 edm::LogInfo(
"HcalSim") <<
"HCalSD::getFromLibrary " <<hits.size()
790 <<
" hits for " << GetName() <<
" of " << primaryID
791 <<
" with " <<
theTrack->GetDefinition()->GetParticleName()
794 for (
unsigned int i=0;
i<hits.size(); ++
i) {
795 G4ThreeVector hitPoint = hits[
i].position;
797 int depth = hits[
i].depth;
798 double time = hits[
i].time;
799 unsigned int unitID =
setDetUnitId(det, hitPoint, depth);
820 theTrack->SetTrackStatus(fStopAndKill);
821 G4TrackVector tv = *(aStep->GetSecondary());
822 for (
unsigned int kk=0;
kk<tv.size(); ++
kk)
824 tv[
kk]->SetTrackStatus(fStopAndKill);
837 G4int particleCode =
theTrack->GetDefinition()->GetPDGEncoding();
847 edm::LogInfo(
"HcalSim") <<
"HCalSD::hitForFibre " << hits.size()
848 <<
" hits for " << GetName() <<
" of " << primaryID
849 <<
" with " <<
theTrack->GetDefinition()->GetParticleName()
851 <<
" GeV in detector type " << det;
853 if (hits.size() > 0) {
854 for (
unsigned int i=0;
i<hits.size(); ++
i) {
855 G4ThreeVector hitPoint = hits[
i].position;
857 int depth = hits[
i].depth;
858 double time = hits[
i].time;
859 unsigned int unitID =
setDetUnitId(det, hitPoint, depth);
882 int nHit =
static_cast<int>(hits.size());
890 edm::LogInfo(
"HcalSim") <<
"HCalSD::getFromParam " << nHit <<
" hits for "
891 << GetName() <<
" of " << primaryID <<
" with "
892 << aStep->GetTrack()->GetDefinition()->GetParticleName()
894 <<
" GeV in detector type " << det;
896 for (
int i = 0;
i<nHit; ++
i) {
897 G4ThreeVector hitPoint = hits[
i].position;
898 int depth = hits[
i].depth;
899 double time = hits[
i].time;
900 unsigned int unitID =
setDetUnitId(det, hitPoint, depth);
931 primaryID =
theTrack->GetParentID();
932 if (primaryID == 0) primaryID =
theTrack->GetTrackID();
941 double rr = (hitPoint.x()*hitPoint.x() + hitPoint.y()*hitPoint.y());
942 double phi = (rr == 0. ? 0. :atan2(hitPoint.y(),hitPoint.x()));
949 if (hitPoint.z() < 0) etaR =-etaR;
951 edm::LogInfo(
"HcalSim") <<
"HCalSD::Hit for Detector " << det <<
" etaR "
952 << etaR <<
" phi " << phi/deg <<
" depth " <<
depth;
954 double time = (aStep->GetPostStepPoint()->GetGlobalTime());
971 LogDebug(
"HcalSim") <<
"HCalSD::getHitPMT 1 hit for " << GetName()
972 <<
" of " << primaryID <<
" with "
973 <<
theTrack->GetDefinition()->GetParticleName()
975 <<
" GeV with velocity " << beta <<
" UnitID "
998 primaryID =
theTrack->GetParentID();
999 if (primaryID == 0) primaryID =
theTrack->GetTrackID();
1008 double rr = (hitPoint.x()*hitPoint.x() + hitPoint.y()*hitPoint.y());
1009 double phi = (rr == 0. ? 0. :atan2(hitPoint.y(),hitPoint.x()));
1016 if (hitPoint.z() < 0) etaR =-etaR;
1018 LogDebug(
"HcalSim") <<
"HCalSD::Hit for Detector " << det <<
" etaR "
1019 << etaR <<
" phi " << phi/deg <<
" depth " <<
depth;
1021 double time = (aStep->GetPostStepPoint()->GetGlobalTime());
1022 uint32_t unitID = 0;
1038 LogDebug(
"HcalSim") <<
"HCalSD::getHitFibreBundle 1 hit for " << GetName()
1039 <<
" of " << primaryID <<
" with "
1040 <<
theTrack->GetDefinition()->GetParticleName()
1042 <<
" GeV with velocity " << beta <<
" UnitID "
1057 if (primaryID == 0) {
1059 edm::LogInfo(
"HcalSim") <<
"HCalSD: Problem with primaryID **** set by "
1060 <<
"force to TkID **** " <<
theTrack->GetTrackID();
1062 primaryID =
theTrack->GetTrackID();
1079 while (infile >> det >> zside >> etaR >> phi >> lay >> wt) {
1081 layerWeights.insert(std::pair<uint32_t,double>(
id,wt));
1084 edm::LogInfo(
"HcalSim") <<
"HCalSD::readWeightFromFile:Entry " << entry
1085 <<
" ID " << std::hex <<
id <<
std::dec <<
" ("
1086 << det <<
"/" << zside <<
"/1/" << etaR <<
"/"
1087 << phi <<
"/" << lay <<
") Weight " << wt;
1092 edm::LogInfo(
"HcalSim") <<
"HCalSD::readWeightFromFile: reads " << entry
1093 <<
" weights from " <<
fName;
1107 std::map<uint32_t,double>::const_iterator ite =
layerWeights.find(
id);
1110 edm::LogInfo(
"HcalSim") <<
"HCalSD::layerWeight: ID " << std::hex <<
id
1112 << tmp.
zside <<
"/1/" << tmp.
etaR <<
"/"
1113 << tmp.
phis <<
"/" << tmp.
lay <<
") Weight " <<wt;
1120 double time,
int id) {
1122 const G4VTouchable* touch = aStep->GetPreStepPoint()->GetTouchable();
1123 static const G4String modName[8] = {
"HEModule",
"HVQF" ,
"HBModule",
"MBAT",
1124 "MBBT" ,
"MBBTC",
"MBBT_R1P",
"MBBT_R1M"};
1125 G4ThreeVector local;
1129 for (
int n=0;
n<touch->GetHistoryDepth(); ++
n) {
1130 G4String
name = touch->GetVolume(
n)->GetName();
1132 LogDebug(
"HcalSim") <<
"plotProfile Depth " <<
n <<
" Name " <<
name;
1134 for (
unsigned int ii=0;
ii<8; ++
ii) {
1135 if (name == modName[
ii]) {
1137 int dn = touch->GetHistoryDepth() -
n;
1138 local = touch->GetHistory()->GetTransform(dn).TransformPoint(global);
1139 if (ii == 0) {depth = local.z() - 4006.5; idx = 1;}
1140 else if (ii == 1) {depth = local.z() + 825.0; idx = 3;}
1141 else if (ii == 2) {depth = local.x() - 1775.; idx = 0;}
1142 else {depth = local.y() + 15.; idx = 2;}
1148 if (!found) depth =
std::abs(global.z()) - 11500;
1150 LogDebug(
"HcalSim") <<
"plotProfile Found " << found <<
" Global " << global
1151 <<
" Local " << local <<
" depth " << depth <<
" ID "
1152 <<
id <<
" EDEP " << edep <<
" Time " << time;
1154 if (
hit_[idx] != 0)
hit_[idx]->Fill(edep);
1155 if (
time_[idx] != 0)
time_[idx]->Fill(time,edep);
1156 if (
dist_[idx] != 0)
dist_[idx]->Fill(depth,edep);
1157 int jd = 2*idx +
id - 7;
1158 if (jd >= 0 && jd < 4) {
1160 if (
hit_[jd] != 0)
hit_[jd]->Fill(edep);
1161 if (
time_[jd] != 0)
time_[jd]->Fill(time,edep);
1162 if (
dist_[jd] != 0)
dist_[jd]->Fill(depth,edep);
1176 if (
id.subdet == 4) {
1177 int ieta = (
id.zside == 0) ? -
id.etaR :
id.etaR;
1179 if (
id.
depth <= 2) {
1180 if (G4UniformRand() > 0.5)
id.depth += 2;
HCalSD(G4String, const DDCompactView &, const SensitiveDetectorCatalog &, edm::ParameterSet const &, const SimTrackManager *)
T getParameter(std::string const &) const
std::vector< double > layer0wt
T getUntrackedParameter(std::string const &, T const &) const
HFShowerParam * showerParam
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 updateHit(CaloG4Hit *)
void hitForFibre(G4Step *step, double weight)
void getFromParam(G4Step *step, double weight)
void addFilter(const DDFilter &, DDLogOp op=DDLogOp::AND)
virtual void update(const BeginOfJob *)
This routine will be called when the appropriate signal arrives.
bool isItStraightBundle(G4LogicalVolume *)
double dose(unsigned int layer, double radius)
virtual bool ProcessHits(G4Step *, G4TouchableHistory *)
std::vector< double > gpar
bool isItinFidVolume(G4ThreeVector &)
void initRun(G4ParticleTable *, HcalDDDSimConstants *)
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 &)
int getMaxDepth(const int type) const
double getHits(G4Step *aStep, bool type)
virtual uint32_t setDetUnitId(G4Step *step)
int setTrackID(G4Step *step)
void getFromLibrary(G4Step *step, double weight)
static const unsigned int numberOfZLayers
void modifyDepth(HcalNumberingFromDDD::HcalID &id)
void setNumberingScheme(HcalNumberingScheme *)
type of data representation of DDCompactView
bool DDfetch(const DDsvalues_type *, DDValue &)
helper for retrieving DDValues from DDsvalues_type *.
double degradation(double mrad)
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)
void initRun(G4ParticleTable *, HcalDDDSimConstants *)
double int_lumi(double intlumi)
bool isItConicalBundle(G4LogicalVolume *)
static uint32_t packHcalIndex(int det, int z, int depth, int eta, int phi, int lay)
const std::vector< double > & getLayer0Wt() const
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::...
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)
void initRun(G4ParticleTable *, HcalDDDSimConstants *)
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
const std::vector< double > & getGparHF() const
static const unsigned int lowZLimit
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)
static const unsigned int upperZLimit
void readWeightFromFile(std::string)
void initRun(G4ParticleTable *, HcalDDDSimConstants *)
void getHitFibreBundle(G4Step *step, bool type)
DDsvalues_type mergedSpecifics() const
double getHits(G4Step *aStep)
HcalNumberingFromDDD * numberingFromDDD
double layerWeight(int, const G4ThreeVector &, int, int)
std::vector< std::vector< double > > tmp
double getResponseWt(G4Track *)
std::vector< G4String > fibreNames
bool firstChild()
set the current node to the first child ...
std::vector< G4Material * > materials
virtual bool filterHit(CaloG4Hit *, double)
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)
HFShowerLibrary * showerLibrary
void initRun(G4ParticleTable *, HcalDDDSimConstants *)
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.
void setCriteria(const DDValue &nameVal, DDCompOp, DDLogOp l=DDLogOp::AND, bool asString=true, bool merged=true)
CaloG4Hit * createNewHit()
std::vector< G4String > matNames
bool isItFibre(G4LogicalVolume *)
double getEnergyDeposit() const
int maxHFDepth(int ieta, int iphi) const
HcalDDDSimConstants * hcalConstants
The DDGenericFilter is a runtime-parametrized Filter looking on DDSpecifcs.