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),
50 m_HFDarkening(0), depth_(1) {
74 bool ageingFlagHE= m_HC.
getParameter<
bool>(
"HEDarkening");
75 bool ageingFlagHF= m_HC.
getParameter<
bool>(
"HFDarkening");
81 applyFidCut = m_HF.getParameter<
bool>(
"ApplyFiducialCut");
84 LogDebug(
"HcalSim") <<
"***************************************************"
88 <<
"* Constructing a HCalSD with name " << name <<
"\n"
91 <<
"***************************************************";
93 edm::LogInfo(
"HcalSim") <<
"HCalSD:: Use of HF code is set to " << useHF
94 <<
"\nUse of shower parametrization set to "
95 << useParam <<
"\nUse of shower library is set to "
96 << useShowerLibrary <<
"\nUse PMT Hit is set to "
97 << usePMTHit <<
" with beta Threshold "<< betaThr
98 <<
"\nUSe of FibreBundle Hit set to "<<useFibreBundle
99 <<
"\n Use of Birks law is set to "
100 << useBirk <<
" with three constants kB = "
101 << birk1 <<
", C1 = " << birk2 <<
", C2 = " <<
birk3;
105 <<
" ions below " <<
kmaxIon <<
" MeV\n"
106 <<
" Threshold for storing hits in HB: "
107 << eminHitHB <<
" HE: " << eminHitHE <<
" HO: "
108 << eminHitHO <<
" HF: " << eminHitHF <<
"\n"
109 <<
"Delivered luminosity for Darkening "
110 << deliveredLumi <<
" Flag (HE) " << ageingFlagHE
111 <<
" Flag (HF) " << ageingFlagHF <<
"\n"
112 <<
"Application of Fiducial Cut " << applyFidCut
113 <<
"Flag for test number|neutral density filter "
117 if (testNumber || forTBH2)
123 const G4LogicalVolumeStore * lvs = G4LogicalVolumeStore::GetInstance();
124 std::vector<G4LogicalVolume *>::const_iterator lvcite;
136 attribute =
"Volume";
139 DDValue ddv0(attribute, value, 0);
147 edm::LogInfo(
"HcalSim") <<
"HCalSD: Names to be tested for " << attribute
148 <<
" = " << value <<
" has " <<
hfNames.size()
150 for (
unsigned int i=0;
i <
hfNames.size(); ++
i) {
153 for(lvcite=lvs->begin(); lvcite!=lvs->end(); lvcite++)
154 if((*lvcite)->GetName()==namv) {
159 int level =
static_cast<int>(temp[
i]);
162 <<
" LV " <<
hfLV[
i] <<
" at level "
169 DDValue ddv1(attribute,value,0);
174 edm::LogInfo(
"HcalSim") <<
"HCalSD: Names to be tested for " << attribute
175 <<
" = " << value <<
":";
179 for (lvcite = lvs->begin(); lvcite != lvs->end(); ++lvcite) {
180 if ((*lvcite)->GetName() == namv) {
193 DDValue ddv3(attribute,value,0);
197 std::vector<G4String> pmtNames =
getNames(fv3);
198 edm::LogInfo(
"HcalSim") <<
"HCalSD: Names to be tested for " << attribute
199 <<
" = " << value <<
" have " << pmtNames.size()
201 for (
unsigned int i=0;
i<pmtNames.size(); ++
i) {
202 G4String namv = pmtNames[
i];
204 for (lvcite = lvs->begin(); lvcite != lvs->end(); ++lvcite)
205 if ((*lvcite)->GetName() == namv) {
210 edm::LogInfo(
"HcalSim") <<
"HCalSD: (" <<
i <<
") " << pmtNames[
i]
216 value =
"HFFibreBundleStraight";
218 DDValue ddv4(attribute,value,0);
223 edm::LogInfo(
"HcalSim") <<
"HCalSD: Names to be tested for " << attribute
224 <<
" = " << value <<
" have " << fibreNames.size()
226 for (
unsigned int i=0;
i<fibreNames.size(); ++
i) {
227 G4String namv = fibreNames[
i];
229 for (lvcite = lvs->begin(); lvcite != lvs->end(); lvcite++)
230 if ((*lvcite)->GetName() == namv) {
235 edm::LogInfo(
"HcalSim") <<
"HCalSD: (" <<
i <<
") " << fibreNames[
i]
240 value =
"HFFibreBundleConical";
242 DDValue ddv5(attribute,value,0);
247 edm::LogInfo(
"HcalSim") <<
"HCalSD: Names to be tested for " << attribute
248 <<
" = " << value <<
" have " << fibreNames.size()
250 for (
unsigned int i=0;
i<fibreNames.size(); ++
i) {
251 G4String namv = fibreNames[
i];
253 for (lvcite = lvs->begin(); lvcite != lvs->end(); ++lvcite)
254 if ((*lvcite)->GetName() == namv) {
259 edm::LogInfo(
"HcalSim") <<
"HCalSD: (" <<
i <<
") " << fibreNames[
i]
267 const G4MaterialTable * matTab = G4Material::GetMaterialTable();
268 std::vector<G4Material*>::const_iterator matite;
269 attribute =
"OnlyForHcalSimNumbering";
272 DDValue ddv2(attribute,value,0);
294 G4Material* mat =
nullptr;
295 for (matite = matTab->begin(); matite != matTab->end(); ++matite) {
296 if ((*matite)->GetName() == namx) {
307 edm::LogInfo(
"HcalSim") <<
"HCalSD: Material names for " << attribute
308 <<
" = " << name <<
":";
326 static const char *
const labels[] = {
"HB",
"HE",
"HO",
"HF Absorber",
"HF PMT",
327 "HF Absorber Long",
"HF Absorber Short",
328 "HF PMT Long",
"HF PMT Short"};
330 char name[20],
title[60];
331 for (
int i=0;
i<9; ++
i) {
332 sprintf (title,
"Hit energy in %s", labels[
i]);
333 sprintf (name,
"HCalSDHit%d", i);
335 sprintf (title,
"Energy (MeV)");
336 hit_[
i]->GetXaxis()->SetTitle(title);
337 hit_[
i]->GetYaxis()->SetTitle(
"Hits");
338 sprintf (title,
"Time of the hit in %s", labels[i]);
339 sprintf (name,
"HCalSDTime%d", i);
341 sprintf (title,
"Time (ns)");
342 time_[
i]->GetXaxis()->SetTitle(title);
343 time_[
i]->GetYaxis()->SetTitle(
"Hits");
344 sprintf (title,
"Longitudinal profile in %s", labels[i]);
345 sprintf (name,
"HCalSDDist%d", i);
347 sprintf (title,
"Distance (mm)");
348 dist_[
i]->GetXaxis()->SetTitle(title);
349 dist_[
i]->GetYaxis()->SetTitle(
"Hits");
351 if (useHF && (!useParam)) {
352 hzvem = hcDir.
make<TH1F>(
"hzvem",
"Longitudinal Profile (EM Part)",330,0.0,1650.0);
353 hzvem->GetXaxis()->SetTitle(
"Longitudinal Profile (EM Part)");
354 hzvhad = hcDir.
make<TH1F>(
"hzvhad",
"Longitudinal Profile (Had Part)",330,0.0,1650.0);
355 hzvhad->GetXaxis()->SetTitle(
"Longitudinal Profile (Hadronic Part)");
381 depth_ = (aStep->GetPreStepPoint()->GetTouchable()->GetReplicaNumber(0))%10;
382 G4LogicalVolume* lv =
383 aStep->GetPreStepPoint()->GetPhysicalVolume()->GetLogicalVolume();
384 G4String nameVolume = lv->GetName();
386 G4int parCode = aStep->GetTrack()->GetDefinition()->GetPDGEncoding();
389 G4ThreeVector hitPoint = aStep->GetPreStepPoint()->GetPosition();
390 double r = hitPoint.perp()/CLHEP::cm;
391 double z =
std::abs(hitPoint.z())/CLHEP::cm;
392 double dose_acquired = 0.;
403 LogDebug(
"HcalSim") <<
"HCalSD: HFLumiDarkening at r = " << r
404 <<
", z = " << z <<
" Dose " << dose_acquired
411 <<
" hits from parametrization in " << nameVolume
412 <<
" for Track " << aStep->GetTrack()->GetTrackID()
413 <<
" (" << aStep->GetTrack()->GetDefinition()->GetParticleName()
419 <<
" hits afterParamS*";
422 bool notaMuon =
true;
423 if (parCode ==
mupPDG || parCode ==
mumPDG ) notaMuon =
false;
426 LogDebug(
"HcalSim") <<
"HCalSD: Starts shower library from "
427 << nameVolume <<
" for Track "
428 << aStep->GetTrack()->GetTrackID() <<
" ("
429 << aStep->GetTrack()->GetDefinition()->GetParticleName() <<
")";
434 LogDebug(
"HcalSim") <<
"HCalSD: Hit at Fibre in " << nameVolume
436 << aStep->GetTrack()->GetTrackID() <<
" ("
437 << aStep->GetTrack()->GetDefinition()->GetParticleName() <<
")";
444 LogDebug(
"HcalSim") <<
"HCalSD: Hit from PMT parametrization from "
445 << nameVolume <<
" for Track "
446 << aStep->GetTrack()->GetTrackID() <<
" ("
447 << aStep->GetTrack()->GetDefinition()->GetParticleName() <<
")";
452 LogDebug(
"HcalSim") <<
"HCalSD: Hit from FibreBundle from "
453 << nameVolume <<
" for Track "
454 << aStep->GetTrack()->GetTrackID() <<
" ("
455 << aStep->GetTrack()->GetDefinition()->GetParticleName() <<
")";
461 LogDebug(
"HcalSim") <<
"HCalSD: Hit from standard path from "
462 << nameVolume <<
" for Track "
463 << aStep->GetTrack()->GetTrackID() <<
" ("
464 << aStep->GetTrack()->GetDefinition()->GetParticleName() <<
")";
469 plotProfile(aStep, aStep->GetPreStepPoint()->GetPosition(),
480 double destep = aStep->GetTotalEnergyDeposit();
482 G4Track*
theTrack = aStep->GetTrack();
484 const G4VTouchable* touch = aStep->GetPreStepPoint()->GetTouchable();
486 int det(0), ieta(0),
phi(0),
z(0), lay,
depth(-1);
497 lay = (touch->GetReplicaNumber(0)/10)%100 + 1;
499 edm::LogInfo(
"HcalSim") <<
"HCalSD: det: " << det <<
" ieta: "<< ieta
500 <<
" iphi: " <<
phi <<
" zside " <<
z <<
" lay: "
506 G4ThreeVector hitPoint = aStep->GetPreStepPoint()->GetPosition();
515 <<
" coefficient = " << dweight;
522 int pdg = theTrack->GetDefinition()->GetPDGEncoding();
524 double ke = theTrack->GetKineticEnergy()/
MeV;
525 if ( pdg/1000000000 == 1 && (pdg/10000)%100 > 0 &&
526 (pdg/10)%100 > 0 && ke <
kmaxIon ) weight = 0;
527 if ((pdg == 2212) && (ke <
kmaxProton)) weight = 0;
528 if ((pdg == 2112) && (ke <
kmaxNeutron)) weight = 0;
532 << theTrack->GetTrackID() <<
" Type "
533 << theTrack->GetDefinition()->GetParticleName()
534 <<
" Kinetic Energy " << ke <<
" MeV";
543 G4Material* mat = aStep->GetPreStepPoint()->GetMaterial();
547 double wt2 = theTrack->GetWeight();
550 <<
" weight " << weight0 <<
" " << weight <<
" " << wt1
553 double edep = weight*wt1*destep;
554 if (wt2 > 0.0) { edep *= wt2; }
561 const G4VTouchable* touch = preStepPoint->GetTouchable();
562 G4ThreeVector hitPoint = preStepPoint->GetPosition();
564 int depth = (touch->GetReplicaNumber(0))%10 + 1;
565 int lay = (touch->GetReplicaNumber(0)/10)%100 + 1;
566 int det = (touch->GetReplicaNumber(1))/1000;
573 edm::LogInfo(
"HcalSim") <<
"HCalSD: updates numbering scheme for " << GetName();
587 edm::LogError(
"HcalSim") <<
"HCalSD : Cannot find HcalDDDSimConstant";
588 throw cms::Exception(
"Unknown",
"HCalSD") <<
"Cannot find HcalDDDSimConstant" <<
"\n";
598 for (
unsigned int ig=0; ig<
gpar.size(); ig++)
599 edm::LogInfo(
"HcalSim") <<
"HCalSD: gpar[" << ig <<
"] = "
600 <<
gpar[ig]/cm <<
" cm";
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;
1183 }
else if ((
id.subdet == 1 ||
id.subdet ==2) &&
testNumber) {
HCalSD(G4String, const DDCompactView &, const SensitiveDetectorCatalog &, edm::ParameterSet const &, const SimTrackManager *)
T getParameter(std::string const &) const
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 &)
int zside() const
get the z-side of the cell (1/-1)
double getLayer0Wt(int det, int phi, int zside) const
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)
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
int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
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
int iphi() const
get the cell iphi
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.