19 #include "G4LogicalVolumeStore.hh"
20 #include "G4LogicalVolume.hh"
24 #include "G4SystemOfUnits.hh"
25 #include "G4PhysicalConstants.hh"
26 #include "Randomize.hh"
28 #include "DD4hep/Filter.h"
55 (float)(p.getParameter<edm::
ParameterSet>(
"HCalSD").getParameter<double>(
"TimeSliceUnit")),
56 p.getParameter<edm::
ParameterSet>(
"HCalSD").getParameter<bool>(
"IgnoreTrackID")),
58 hcalSimConstants_(hscs),
81 useBirk = m_HC.getParameter<
bool>(
"UseBirkLaw");
83 birk1 = m_HC.getParameter<
double>(
"BirkC1") * bunit;
84 birk2 = m_HC.getParameter<
double>(
"BirkC2");
85 birk3 = m_HC.getParameter<
double>(
"BirkC3");
87 useParam = m_HC.getParameter<
bool>(
"UseParametrize");
88 testNumber = m_HC.getParameter<
bool>(
"TestNumberingScheme");
89 neutralDensity = m_HC.getParameter<
bool>(
"doNeutralDensityFilter");
90 usePMTHit = m_HC.getParameter<
bool>(
"UsePMTHits");
91 betaThr = m_HC.getParameter<
double>(
"BetaThreshold");
92 eminHitHB = m_HC.getParameter<
double>(
"EminHitHB") *
MeV;
93 eminHitHE = m_HC.getParameter<
double>(
"EminHitHE") *
MeV;
94 eminHitHO = m_HC.getParameter<
double>(
"EminHitHO") *
MeV;
95 eminHitHF = m_HC.getParameter<
double>(
"EminHitHF") *
MeV;
98 agingFlagHB = m_HC.getParameter<
bool>(
"HBDarkening");
99 agingFlagHE = m_HC.getParameter<
bool>(
"HEDarkening");
100 bool agingFlagHF = m_HC.getParameter<
bool>(
"HFDarkening");
101 useHF = m_HC.getUntrackedParameter<
bool>(
"UseHF",
true);
102 bool forTBHC = m_HC.getUntrackedParameter<
bool>(
"ForTBHCAL",
false);
103 bool forTBH2 = m_HC.getUntrackedParameter<
bool>(
"ForTBH2",
false);
104 useLayerWt = m_HC.getUntrackedParameter<
bool>(
"UseLayerWt",
false);
106 testNS_ = m_HC.getUntrackedParameter<
bool>(
"TestNS",
false);
108 applyFidCut = m_HF.getParameter<
bool>(
"ApplyFiducialCut");
109 bool dumpGeom = m_HC.getUntrackedParameter<
bool>(
"DumpGeometry",
false);
112 edm::LogVerbatim(
"HcalSim") <<
"***************************************************"
114 <<
"* Constructing a HCalSD with name " << name <<
"\n"
116 <<
"***************************************************";
118 edm::LogVerbatim(
"HcalSim") <<
"HCalSD:: Use of HF code is set to " << useHF
119 <<
"\n Use of shower parametrization set to " << useParam
120 <<
"\n Use of shower library is set to " << useShowerLibrary
121 <<
"\n Use PMT Hit is set to " << usePMTHit <<
" with beta Threshold " << betaThr
122 <<
"\n USe of FibreBundle Hit set to " << useFibreBundle
123 <<
"\n Use of Birks law is set to " << useBirk
124 <<
" with three constants kB = " <<
birk1 / bunit <<
", C1 = " << birk2
125 <<
", C2 = " <<
birk3;
129 <<
" ions below " <<
kmaxIon <<
" MeV\n"
130 <<
" Threshold for storing hits in HB: " << eminHitHB <<
" HE: " << eminHitHE
131 <<
" HO: " << eminHitHO <<
" HF: " << eminHitHF <<
"\n"
132 <<
"Delivered luminosity for Darkening " << deliveredLumi <<
" Flag (HE) " << agingFlagHE
133 <<
" Flag (HB) " << agingFlagHB <<
" Flag (HF) " << agingFlagHF <<
"\n"
134 <<
"Application of Fiducial Cut " << applyFidCut
135 <<
"Flag for test number|neutral density filter " << testNumber <<
" " <<
neutralDensity;
139 matNames.emplace_back(
"Scintillator");
145 if (testNumber || forTBH2) {
155 const G4LogicalVolumeStore* lvs = G4LogicalVolumeStore::GetInstance();
157 const G4LogicalVolume* lv;
164 if (useShowerLibrary) {
174 std::stringstream ss0;
175 ss0 <<
"HCalSD: Names to be tested for Volume = HF has " <<
hfNames.size() <<
" elements";
177 int addlevel = dd4hep ? 1 : 0;
178 for (
unsigned int i = 0;
i <
hfNames.size(); ++
i) {
179 G4String namv(static_cast<std::string>(dd4hep::dd::noNamespace(
hfNames[
i])));
181 for (
auto lvol : *lvs) {
182 if (dd4hep::dd::noNamespace(lvol->GetName()) == namv) {
187 hfLV.emplace_back(lv);
188 hfLevels.emplace_back(temp[i] + addlevel);
190 ss0 <<
"\n HF[" << i <<
"] = " << namv <<
" LV " << lv <<
" at level " << (temp[
i] + addlevel);
208 const G4MaterialTable* matTab = G4Material::GetMaterialTable();
209 std::vector<G4Material*>::const_iterator matite;
211 const G4Material* mat =
nullptr;
212 for (matite = matTab->begin(); matite != matTab->end(); ++matite) {
213 if (static_cast<std::string>(dd4hep::dd::noNamespace((*matite)->GetName())) == namx) {
221 std::stringstream ss1;
222 for (
unsigned int i = 0;
i < matNames.size(); ++
i) {
223 if (
i / 10 * 10 ==
i) {
226 ss1 <<
" " << matNames[
i];
228 edm::LogVerbatim(
"HcalSim") <<
"HCalSD: Material names for HCAL: " << ss1.str();
238 std::stringstream ss2;
239 for (
unsigned int ig = 0; ig < gpar.size(); ig++) {
240 ss2 <<
"\n gpar[" << ig <<
"] = " << gpar[ig] / cm <<
" cm";
243 <<
" gpar (cm)" << ss2.str();
250 for (
int i = 0;
i < 9; ++
i) {
262 static const char*
const labels[] = {
"HB",
272 char name[20],
title[60];
273 for (
int i = 0;
i < 9; ++
i) {
274 sprintf(title,
"Hit energy in %s", labels[
i]);
275 sprintf(name,
"HCalSDHit%d", i);
277 sprintf(title,
"Energy (MeV)");
278 hit_[
i]->GetXaxis()->SetTitle(title);
279 hit_[
i]->GetYaxis()->SetTitle(
"Hits");
280 sprintf(title,
"Time of the hit in %s", labels[i]);
281 sprintf(name,
"HCalSDTime%d", i);
283 sprintf(title,
"Time (ns)");
284 time_[
i]->GetXaxis()->SetTitle(title);
285 time_[
i]->GetYaxis()->SetTitle(
"Hits");
286 sprintf(title,
"Longitudinal profile in %s", labels[i]);
287 sprintf(name,
"HCalSDDist%d", i);
289 sprintf(title,
"Distance (mm)");
290 dist_[
i]->GetXaxis()->SetTitle(title);
291 dist_[
i]->GetYaxis()->SetTitle(
"Hits");
293 if (useHF && (!useParam)) {
294 hzvem = hcDir.
make<TH1F>(
"hzvem",
"Longitudinal Profile (EM Part)", 330, 0.0, 1650.0);
295 hzvem->GetXaxis()->SetTitle(
"Longitudinal Profile (EM Part)");
296 hzvhad = hcDir.
make<TH1F>(
"hzvhad",
"Longitudinal Profile (Had Part)", 330, 0.0, 1650.0);
297 hzvhad->GetXaxis()->SetTitle(
"Longitudinal Profile (Hadronic Part)");
302 std::unique_ptr<HcalNumberingFromDDD> hcn = std::make_unique<HcalNumberingFromDDD>(
hcalConstants_);
310 const std::vector<std::string>& lvnames,
311 std::vector<const G4LogicalVolume*>& lvvec) {
312 const G4LogicalVolumeStore* lvs = G4LogicalVolumeStore::GetInstance();
313 const G4LogicalVolume* lv;
314 std::stringstream ss3;
315 ss3 <<
"HCalSD: " << lvnames.size() <<
" names to be tested for Volume <" << value <<
">:";
316 for (
unsigned int i = 0;
i < lvnames.size(); ++
i) {
317 G4String namv(static_cast<std::string>(dd4hep::dd::noNamespace(lvnames[
i])));
319 for (
auto lvol : *lvs) {
320 if (dd4hep::dd::noNamespace(lvol->GetName()) == namv) {
325 lvvec.emplace_back(lv);
326 if (i / 10 * 10 == i) {
335 auto const track = aStep->GetTrack();
336 depth_ = (aStep->GetPreStepPoint()->GetTouchable()->GetReplicaNumber(0)) % 10;
349 G4ThreeVector hitPoint = aStep->GetPreStepPoint()->GetPosition();
350 const double invcm = 1. / CLHEP::cm;
351 double r = hitPoint.perp() * invcm;
352 double z =
std::abs(hitPoint.z()) * invcm;
353 double dose_acquired = 0.;
365 edm::LogVerbatim(
"HcalSim") <<
"HCalSD::getFromLibrary: HFLumiDarkening at "
366 <<
"r= " << r <<
", z= " << z <<
" Dose= " << dose_acquired <<
" weight= " <<
weight_;
373 G4String nameVolume = aStep->GetPreStepPoint()->GetPhysicalVolume()->GetLogicalVolume()->GetName();
375 <<
" for Track " <<
track->GetTrackID() <<
" ("
376 <<
track->GetDefinition()->GetParticleName() <<
")";
381 auto nameVolume = aStep->GetPreStepPoint()->GetPhysicalVolume()->GetLogicalVolume()->GetName();
382 edm::LogVerbatim(
"HcalSim") <<
"HCalSD: Starts shower library from " << nameVolume <<
" for Track "
383 <<
track->GetTrackID() <<
" (" <<
track->GetDefinition()->GetParticleName() <<
")";
392 <<
track->GetDefinition()->GetParticleName() <<
") kill= " << kill
400 auto const lv = aStep->GetPreStepPoint()->GetPhysicalVolume()->GetLogicalVolume();
401 auto const theTrack = aStep->GetTrack();
406 edm::LogVerbatim(
"HcalSim") <<
"HCalSD: Hit at Fibre in LV " << lv->GetName() <<
" for track "
407 << aStep->GetTrack()->GetTrackID() <<
" ("
408 << aStep->GetTrack()->GetDefinition()->GetParticleName() <<
")";
420 edm::LogVerbatim(
"HcalSim") <<
"HCalSD: Hit from PMT parametrization in LV " << lv->GetName() <<
" for Track "
421 << aStep->GetTrack()->GetTrackID() <<
" ("
422 << aStep->GetTrack()->GetDefinition()->GetParticleName() <<
")";
431 edm::LogVerbatim(
"HcalSim") <<
"HCalSD: Hit from straight FibreBundle in LV: " << lv->GetName() <<
" for track "
432 << aStep->GetTrack()->GetTrackID() <<
" ("
433 << aStep->GetTrack()->GetDefinition()->GetParticleName() <<
")";
442 edm::LogVerbatim(
"HcalSim") <<
"HCalSD: Hit from conical FibreBundle PV: " << lv->GetName() <<
" for track "
443 << aStep->GetTrack()->GetTrackID() <<
" ("
444 << aStep->GetTrack()->GetDefinition()->GetParticleName() <<
")";
450 destep = aStep->GetTotalEnergyDeposit();
452 const G4VTouchable* touch = aStep->GetPreStepPoint()->GetTouchable();
454 int det(0), ieta(0),
phi(0),
z(0), lay,
depth(-1);
467 lay = (touch->GetReplicaNumber(0) / 10) % 100 + 1;
469 edm::LogVerbatim(
"HcalSim") <<
"HCalSD: det: " << det <<
" ieta: " << ieta <<
" iphi: " <<
phi <<
" zside " <<
z
470 <<
" lay: " << lay - 2;
475 G4ThreeVector hitPoint = aStep->GetPreStepPoint()->GetPosition();
500 int pdg = theTrack->GetDefinition()->GetPDGEncoding();
502 double ke = theTrack->GetKineticEnergy();
503 if (pdg / 1000000000 == 1 && (pdg / 10000) % 100 > 0 && (pdg / 10) % 100 > 0 && ke <
kmaxIon)
514 const G4Material* mat = aStep->GetPreStepPoint()->GetMaterial();
520 double wt2 = theTrack->GetWeight();
521 double edep =
weight_ * wt1 * destep;
527 <<
" weight= " <<
weight_ <<
" wt0= " << wt0 <<
" wt1= " << wt1 <<
" wt2= " << wt2;
533 auto const prePoint = aStep->GetPreStepPoint();
534 auto const touch = prePoint->GetTouchable();
535 const G4ThreeVector& hitPoint = prePoint->GetPosition();
537 int depth = (touch->GetReplicaNumber(0)) % 10 + 1;
538 int lay = (touch->GetReplicaNumber(0) / 10) % 100 + 1;
539 int det = (touch->GetReplicaNumber(1)) / 1000;
545 if (scheme !=
nullptr) {
546 edm::LogVerbatim(
"HcalSim") <<
"HCalSD: updates numbering scheme for " << GetName();
558 switch (theId.subdetId()) {
595 <<
" does not match one from relabller for " << tmp.
subdet <<
":" << tmp.
etaR <<
":"
596 << tmp.
phi <<
":" << tmp.
phis <<
":" << tmp.
depth <<
":" << tmp.
lay << std::endl;
602 const G4VTouchable* touch = aStep->GetPreStepPoint()->GetTouchable();
603 int levels = (touch->GetHistoryDepth()) + 1;
604 for (
unsigned int it = 0; it <
hfNames.size(); ++it) {
606 const G4LogicalVolume* lv = touch->GetVolume(levels -
hfLevels[it])->GetLogicalVolume();
615 for (
const auto& nam :
hfNames)
616 if (name == static_cast<G4String>(nam)) {
632 if (name == static_cast<G4String>(nam)) {
639 for (
auto lvol :
pmtLV)
675 edm::LogVerbatim(
"HcalSim") <<
"HCalSD::isItinFidVolume:#PMT= " << npmt <<
" for hit point " << hitPoint;
681 edm::LogVerbatim(
"HcalSim") <<
"HCalSD::isItinFidVolume: point " << hitPoint <<
" return flag " << flag;
687 std::vector<HFShowerLibrary::Hit> hits =
showerLibrary->getHits(aStep, isKilled,
weight_,
false);
688 if (!isKilled || hits.empty()) {
697 auto const theTrack = aStep->GetTrack();
708 edm::LogVerbatim(
"HcalSim") <<
"HCalSD::getFromLibrary " << hits.size() <<
" hits for " << GetName() <<
" of "
709 << primaryID <<
" with " << theTrack->GetDefinition()->GetParticleName() <<
" of "
710 << aStep->GetPreStepPoint()->GetKineticEnergy() /
GeV <<
" GeV";
712 for (
unsigned int i = 0;
i < hits.size(); ++
i) {
713 G4ThreeVector hitPoint = hits[
i].position;
715 int depth = hits[
i].depth;
716 double time = hits[
i].time;
717 unsigned int unitID =
setDetUnitId(det, hitPoint, depth);
736 auto const theTrack = aStep->GetTrack();
749 edm::LogVerbatim(
"HcalSim") <<
"HCalSD::hitForFibre " << hits.size() <<
" hits for " << GetName() <<
" of "
750 << primaryID <<
" with " << theTrack->GetDefinition()->GetParticleName() <<
" of "
751 << aStep->GetPreStepPoint()->GetKineticEnergy() /
GeV <<
" GeV in detector type " << det;
754 for (
unsigned int i = 0;
i < hits.size(); ++
i) {
755 G4ThreeVector hitPoint = hits[
i].position;
757 int depth = hits[
i].depth;
758 double time = hits[
i].time;
759 unsigned int unitID =
setDetUnitId(det, hitPoint, depth);
763 bool emType = (
edepositEM > 0.) ?
true :
false;
772 std::vector<HFShowerParam::Hit> hits =
showerParam->getHits(aStep,
weight_, isKilled);
773 if (!isKilled || hits.empty()) {
781 edm::LogVerbatim(
"HcalSim") <<
"HCalSD::getFromParam " << hits.size() <<
" hits for " << GetName() <<
" of "
782 << primaryID <<
" with " << aStep->GetTrack()->GetDefinition()->GetParticleName()
783 <<
" of " << aStep->GetPreStepPoint()->GetKineticEnergy() /
GeV
784 <<
" GeV in detector type " << det;
786 for (
unsigned int i = 0;
i < hits.size(); ++
i) {
787 G4ThreeVector hitPoint = hits[
i].position;
788 int depth = hits[
i].depth;
789 double time = hits[
i].time;
790 unsigned int unitID =
setDetUnitId(det, hitPoint, depth);
802 auto const preStepPoint = aStep->GetPreStepPoint();
803 auto const theTrack = aStep->GetTrack();
808 double etrack = preStepPoint->GetKineticEnergy();
811 primaryID = theTrack->GetTrackID();
813 primaryID = theTrack->GetParentID();
815 primaryID = theTrack->GetTrackID();
821 const G4ThreeVector& hitPoint = preStepPoint->GetPosition();
822 double rr = (hitPoint.x() * hitPoint.x() + hitPoint.y() * hitPoint.y());
823 double phi = (rr == 0. ? 0. : atan2(hitPoint.y(), hitPoint.x()));
830 if (hitPoint.z() < 0)
833 edm::LogVerbatim(
"HcalSim") <<
"HCalSD::Hit for Detector " << det <<
" etaR " << etaR <<
" phi " << phi / deg
834 <<
" depth " <<
depth;
836 double time = (aStep->GetPostStepPoint()->GetGlobalTime());
850 double beta = preStepPoint->GetBeta();
851 edm::LogVerbatim(
"HcalSim") <<
"HCalSD::getHitPMT 1 hit for " << GetName() <<
" of " << primaryID <<
" with "
852 << theTrack->GetDefinition()->GetParticleName() <<
" of "
853 << preStepPoint->GetKineticEnergy() /
GeV <<
" GeV with velocity " << beta <<
" UnitID "
861 auto const preStepPoint = aStep->GetPreStepPoint();
862 auto const theTrack = aStep->GetTrack();
867 double etrack = preStepPoint->GetKineticEnergy();
870 primaryID = theTrack->GetTrackID();
872 primaryID = theTrack->GetParentID();
874 primaryID = theTrack->GetTrackID();
880 const G4ThreeVector& hitPoint = preStepPoint->GetPosition();
881 double rr = hitPoint.x() * hitPoint.x() + hitPoint.y() * hitPoint.y();
882 double phi = rr == 0. ? 0. : atan2(hitPoint.y(), hitPoint.x());
889 if (hitPoint.z() < 0.)
892 edm::LogVerbatim(
"HcalSim") <<
"HCalSD::Hit for Detector " << det <<
" etaR " << etaR <<
" phi " << phi / deg
893 <<
" depth " <<
depth;
895 double time = (aStep->GetPostStepPoint()->GetGlobalTime());
912 double beta = preStepPoint->GetBeta();
913 edm::LogVerbatim(
"HcalSim") <<
"HCalSD::getHitFibreBundle 1 hit for " << GetName() <<
" of " << primaryID
914 <<
" with " << theTrack->GetDefinition()->GetParticleName() <<
" of "
915 << preStepPoint->GetKineticEnergy() /
GeV <<
" GeV with velocity " << beta <<
" UnitID "
929 while (infile >> det >> zside >> etaR >> phi >> lay >> wt) {
931 layerWeights.insert(std::pair<uint32_t, double>(
id, wt));
934 edm::LogVerbatim(
"HcalSim") <<
"HCalSD::readWeightFromFile:Entry " << entry <<
" ID " << std::hex <<
id
935 <<
std::dec <<
" (" << det <<
"/" << zside <<
"/1/" << etaR <<
"/" << phi <<
"/"
936 << lay <<
") Weight " << wt;
941 edm::LogVerbatim(
"HcalSim") <<
"HCalSD::readWeightFromFile: reads " << entry <<
" weights from " <<
fName;
954 std::map<uint32_t, double>::const_iterator ite =
layerWeights.find(
id);
959 << tmp.
zside <<
"/1/" << tmp.
etaR <<
"/" << tmp.
phis <<
"/" << tmp.
lay <<
") Weight "
966 void HCalSD::plotProfile(
const G4Step* aStep,
const G4ThreeVector& global,
double edep,
double time,
int id) {
967 const G4VTouchable* touch = aStep->GetPreStepPoint()->GetTouchable();
968 static const unsigned int names = 10;
969 static const G4String modName[
names] = {
970 "HEModule",
"HVQF",
"HBModule",
"MBAT",
"MBBT",
"MBBTC",
"MBBT_R1P",
"MBBT_R1M",
"MBBT_R1PX",
"MBBT_R1MX"};
973 double depth = -2000;
975 for (
int n = 0;
n < touch->GetHistoryDepth(); ++
n) {
976 G4String
name(static_cast<std::string>(dd4hep::dd::noNamespace(touch->GetVolume(
n)->GetName())));
981 if (name == modName[
ii]) {
983 int dn = touch->GetHistoryDepth() -
n;
984 local = touch->GetHistory()->GetTransform(dn).TransformPoint(global);
986 depth = local.z() - 4006.5;
988 }
else if (ii == 1) {
989 depth = local.z() + 825.0;
991 }
else if (ii == 2) {
992 depth = local.x() - 1775.;
995 depth = local.y() + 15.;
1005 depth =
std::abs(global.z()) - 11500;
1007 edm::LogVerbatim(
"HcalSim") <<
"plotProfile Found " << found <<
" Global " << global <<
" Local " << local
1008 <<
" depth " << depth <<
" ID " <<
id <<
" EDEP " << edep <<
" Time " << time;
1010 if (
hit_[idx] !=
nullptr)
1011 hit_[idx]->Fill(edep);
1012 if (
time_[idx] !=
nullptr)
1013 time_[idx]->Fill(time, edep);
1014 if (
dist_[idx] !=
nullptr)
1015 dist_[idx]->Fill(depth, edep);
1016 int jd = 2 * idx +
id - 7;
1017 if (jd >= 0 && jd < 4) {
1019 if (
hit_[jd] !=
nullptr)
1020 hit_[jd]->Fill(edep);
1021 if (
time_[jd] !=
nullptr)
1022 time_[jd]->Fill(time, edep);
1023 if (
dist_[jd] !=
nullptr)
1024 dist_[jd]->Fill(depth, edep);
1031 if (
hzvem !=
nullptr)
1040 if (
id.subdet == 4) {
1041 int ieta = (
id.zside == 0) ? -
id.etaR :
id.etaR;
1043 if (
id.
depth <= 2) {
1044 if (G4UniformRand() > 0.5)
1048 }
else if ((
id.subdet == 1 ||
id.subdet == 2) &&
testNumber) {
1049 id.depth = (
depth_ == 0) ? 1 : 2;
Log< level::Info, true > LogVerbatim
std::vector< std::string > matNames
void readWeightFromFile(const std::string &)
std::vector< const G4LogicalVolume * > hfLV
void hitForFibre(const G4Step *step)
void fillLogVolumeVector(const std::string &, const std::vector< std::string > &, std::vector< const G4LogicalVolume * > &)
constexpr int ietaAbs() const
get the absolute value of the cell ieta
static bool isMuon(int pdgCode)
uint16_t *__restrict__ id
constexpr int zside() const
get the z-side of the cell (1/-1)
std::vector< std::string > fibreNames
std::unique_ptr< HFShowerParam > showerParam
std::vector< double > gpar
const HcalDDDSimConstants * hcalConstants_
std::vector< std::string > hfNames_
std::vector< std::string > hfFibreNames_
std::vector< std::string > hfNames
void plotProfile(const G4Step *step, const G4ThreeVector &pos, double edep, double time, int id)
std::vector< const G4LogicalVolume * > fibre2LV
static const unsigned int numberOfZLayers
void modifyDepth(HcalNumberingFromDDD::HcalID &id)
void update(const BeginOfJob *) override
This routine will be called when the appropriate signal arrives.
const std::vector< std::string_view > logicalNames(const std::string &readoutName) const
void setNumberingScheme(HcalNumberingScheme *)
void processHit(const G4Step *step)
std::unique_ptr< HFShowerPMT > showerPMT
const std::string names[nVars_]
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
const HcalSimulationParameters * hcalsimpar() const
bool isItConicalBundle(const G4LogicalVolume *)
HCalSD(const std::string &, const HcalDDDSimConstants *, const HcalDDDRecConstants *, const HcalSimulationConstants *, const HBHEDarkening *, const HBHEDarkening *, const SensitiveDetectorCatalog &, edm::ParameterSet const &, const SimTrackManager *)
static uint32_t packHcalIndex(int det, int z, int depth, int eta, int phi, int lay)
std::unique_ptr< HcalNumberingFromDDD > numberingFromDDD
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double > > XYZVectorD
spatial vector with cartesian internal representation
int getMaxDepth(const int &type) const
constexpr int iphi() const
get the cell iphi
std::vector< std::string > hfFibreConicalNames_
std::unique_ptr< HFDarkening > m_HFDarkening
void resetForNewPrimary(const G4Step *)
const HBHEDarkening * m_HEDarkening
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
Abs< T >::type abs(const T &t)
void plotHF(const G4ThreeVector &pos, bool emType)
std::unique_ptr< HcalTestNS > m_HcalTestNS
static void unpackHcalIndex(const uint32_t &idx, int &det, int &z, int &depth, int &eta, int &phi, int &lay)
T * make(const Args &...args) const
make new ROOT object
std::vector< int > hfLevels
void getFromParam(const G4Step *step, bool &isKilled)
void getFromHFLibrary(const G4Step *step, bool &isKilled)
uint32_t setDetUnitId(const G4Step *step) override
double getLayer0Wt(const int &det, const int &phi, const int &zside) const
bool isItStraightBundle(const G4LogicalVolume *)
bool getFromLibrary(const G4Step *) override
static bool isStableHadronIon(const G4Track *)
void setID(uint32_t unitID, double timeSlice, int trackID, uint16_t depth=0)
const std::vector< double > & getGparHF() const
std::vector< const G4LogicalVolume * > pmtLV
int PMTNumber(const G4ThreeVector &pe_effect)
static const unsigned int lowZLimit
TFileDirectory mkdir(const std::string &dir, const std::string &descr="")
create a new subdirectory
bool filterHit(CaloG4Hit *, double) override
static const unsigned int upperZLimit
void getHitFibreBundle(const G4Step *step, bool type)
std::vector< std::string > hcalMaterialNames_
T getParameter(std::string const &) const
double getEnergyDeposit(const G4Step *) override
std::unique_ptr< HFShowerFibreBundle > showerBundle
std::vector< std::string > hfPMTNames_
bool isItPMT(const G4LogicalVolume *)
bool isItinFidVolume(const G4ThreeVector &)
bool isHF(int etabin, int depth)
void getHitPMT(const G4Step *step)
double getAttenuation(const G4Step *aStep, double birk1, double birk2, double birk3) const
std::unique_ptr< HFShowerLibrary > showerLibrary
double layerWeight(int, const G4ThreeVector &, int, int)
const HcalSimulationConstants * hcalSimConstants_
virtual int setTrackID(const G4Step *)
std::map< uint32_t, double > layerWeights
bool isItHF(const G4Step *)
static bool isGammaElectronPositron(int pdgCode)
bool isItScintillator(const G4Material *)
std::vector< std::string > hfFibreStraightNames_
std::unique_ptr< HcalNumberingScheme > numberingScheme
std::unique_ptr< HFShower > hfshower
std::vector< const G4LogicalVolume * > fibreLV
uint32_t getUnitID() const
Log< level::Warning, false > LogWarning
double getResponseWt(const G4Track *)
std::vector< const G4LogicalVolume * > fibre1LV
int maxHFDepth(const int &ieta, const int &iphi) const
std::vector< const G4Material * > materials
const HBHEDarkening * m_HBDarkening
float degradation(float intlumi, int ieta, int lay) const
std::vector< int > hfLevels_
double getEnergyDeposit() const
bool isItFibre(const G4LogicalVolume *)
void setParameterized(bool val)