27 #include "G4LogicalVolumeStore.hh" 28 #include "G4LogicalVolume.hh" 31 #include "G4ParticleTable.hh" 32 #include "G4VProcess.hh" 34 #include "G4SystemOfUnits.hh" 35 #include "G4PhysicalConstants.hh" 47 CaloSD(name, cpv, clg, p, manager,
49 p.getParameter<
edm::
ParameterSet>(
"HCalSD").getParameter<bool>(
"IgnoreTrackID")),
50 hcalConstants(0), numberingFromDDD(0),
numberingScheme(0), showerLibrary(0),
51 hfshower(0), showerParam(0), showerPMT(0), showerBundle(0), m_HBDarkening(
nullptr), m_HEDarkening(
nullptr),
52 m_HFDarkening(
nullptr), hcalTestNS_(0), depth_(1) {
78 bool agingFlagHF = m_HC.
getParameter<
bool>(
"HFDarkening");
85 applyFidCut = m_HF.getParameter<
bool>(
"ApplyFiducialCut");
88 LogDebug(
"HcalSim") <<
"***************************************************" 92 <<
"* Constructing a HCalSD with name " << name <<
"\n" 95 <<
"***************************************************";
97 edm::LogInfo(
"HcalSim") <<
"HCalSD:: Use of HF code is set to " << useHF
98 <<
"\nUse of shower parametrization set to " 99 << useParam <<
"\nUse of shower library is set to " 100 << useShowerLibrary <<
"\nUse PMT Hit is set to " 101 << usePMTHit <<
" with beta Threshold "<< betaThr
102 <<
"\nUSe of FibreBundle Hit set to "<<useFibreBundle
103 <<
"\n Use of Birks law is set to " 104 << useBirk <<
" with three constants kB = " 105 << birk1 <<
", C1 = " << birk2 <<
", C2 = " <<
birk3;
109 <<
" ions below " <<
kmaxIon <<
" MeV\n" 110 <<
" Threshold for storing hits in HB: " 111 << eminHitHB <<
" HE: " << eminHitHE <<
" HO: " 112 << eminHitHO <<
" HF: " << eminHitHF <<
"\n" 113 <<
"Delivered luminosity for Darkening " 114 << deliveredLumi <<
" Flag (HE) " << agingFlagHE
115 <<
" Flag (HB) " << agingFlagHB
116 <<
" Flag (HF) " << agingFlagHF <<
"\n" 117 <<
"Application of Fiducial Cut " << applyFidCut
118 <<
"Flag for test number|neutral density filter " 122 if (testNumber || forTBH2)
128 const G4LogicalVolumeStore * lvs = G4LogicalVolumeStore::GetInstance();
129 std::vector<G4LogicalVolume *>::const_iterator lvcite;
141 attribute =
"Volume";
149 edm::LogInfo(
"HcalSim") <<
"HCalSD: Names to be tested for " << attribute
150 <<
" = " << value <<
" has " <<
hfNames.size()
152 for (
unsigned int i=0;
i <
hfNames.size(); ++
i) {
155 for(lvcite=lvs->begin(); lvcite!=lvs->end(); lvcite++)
156 if((*lvcite)->GetName()==namv) {
161 int level =
static_cast<int>(temp[
i]);
164 <<
" LV " <<
hfLV[
i] <<
" at level " 173 edm::LogInfo(
"HcalSim") <<
"HCalSD: Names to be tested for " << attribute
174 <<
" = " << value <<
":";
178 for (lvcite = lvs->begin(); lvcite != lvs->end(); ++lvcite) {
179 if ((*lvcite)->GetName() == namv) {
193 std::vector<G4String> pmtNames =
getNames(fv3);
194 edm::LogInfo(
"HcalSim") <<
"HCalSD: Names to be tested for " << attribute
195 <<
" = " << value <<
" have " << pmtNames.size()
197 for (
unsigned int i=0;
i<pmtNames.size(); ++
i) {
198 G4String namv = pmtNames[
i];
200 for (lvcite = lvs->begin(); lvcite != lvs->end(); ++lvcite)
201 if ((*lvcite)->GetName() == namv) {
206 edm::LogInfo(
"HcalSim") <<
"HCalSD: (" <<
i <<
") " << pmtNames[
i]
212 value =
"HFFibreBundleStraight";
216 edm::LogInfo(
"HcalSim") <<
"HCalSD: Names to be tested for " << attribute
217 <<
" = " << value <<
" have " << fibreNames.size()
219 for (
unsigned int i=0;
i<fibreNames.size(); ++
i) {
220 G4String namv = fibreNames[
i];
222 for (lvcite = lvs->begin(); lvcite != lvs->end(); lvcite++)
223 if ((*lvcite)->GetName() == namv) {
228 edm::LogInfo(
"HcalSim") <<
"HCalSD: (" <<
i <<
") " << fibreNames[
i]
233 value =
"HFFibreBundleConical";
237 edm::LogInfo(
"HcalSim") <<
"HCalSD: Names to be tested for " << attribute
238 <<
" = " << value <<
" have " << fibreNames.size()
240 for (
unsigned int i=0;
i<fibreNames.size(); ++
i) {
241 G4String namv = fibreNames[
i];
243 for (lvcite = lvs->begin(); lvcite != lvs->end(); ++lvcite)
244 if ((*lvcite)->GetName() == namv) {
249 edm::LogInfo(
"HcalSim") <<
"HCalSD: (" <<
i <<
") " << fibreNames[
i]
257 const G4MaterialTable * matTab = G4Material::GetMaterialTable();
258 std::vector<G4Material*>::const_iterator matite;
259 attribute =
"OnlyForHcalSimNumbering";
279 G4Material* mat =
nullptr;
280 for (matite = matTab->begin(); matite != matTab->end(); ++matite) {
281 if ((*matite)->GetName() == namx) {
292 edm::LogInfo(
"HcalSim") <<
"HCalSD: Material names for " << attribute
293 <<
" = " << name <<
":";
310 static const char *
const labels[] = {
"HB",
"HE",
"HO",
"HF Absorber",
"HF PMT",
311 "HF Absorber Long",
"HF Absorber Short",
312 "HF PMT Long",
"HF PMT Short"};
314 char name[20],
title[60];
315 for (
int i=0;
i<9; ++
i) {
316 sprintf (title,
"Hit energy in %s", labels[
i]);
317 sprintf (name,
"HCalSDHit%d", i);
319 sprintf (title,
"Energy (MeV)");
320 hit_[
i]->GetXaxis()->SetTitle(title);
321 hit_[
i]->GetYaxis()->SetTitle(
"Hits");
322 sprintf (title,
"Time of the hit in %s", labels[i]);
323 sprintf (name,
"HCalSDTime%d", i);
325 sprintf (title,
"Time (ns)");
326 time_[
i]->GetXaxis()->SetTitle(title);
327 time_[
i]->GetYaxis()->SetTitle(
"Hits");
328 sprintf (title,
"Longitudinal profile in %s", labels[i]);
329 sprintf (name,
"HCalSDDist%d", i);
331 sprintf (title,
"Distance (mm)");
332 dist_[
i]->GetXaxis()->SetTitle(title);
333 dist_[
i]->GetYaxis()->SetTitle(
"Hits");
335 if (useHF && (!useParam)) {
336 hzvem = hcDir.
make<TH1F>(
"hzvem",
"Longitudinal Profile (EM Part)",330,0.0,1650.0);
337 hzvem->GetXaxis()->SetTitle(
"Longitudinal Profile (EM Part)");
338 hzvhad = hcDir.
make<TH1F>(
"hzvhad",
"Longitudinal Profile (Had Part)",330,0.0,1650.0);
339 hzvhad->GetXaxis()->SetTitle(
"Longitudinal Profile (Hadronic Part)");
364 depth_ = (aStep->GetPreStepPoint()->GetTouchable()->GetReplicaNumber(0))%10;
365 G4LogicalVolume* lv =
366 aStep->GetPreStepPoint()->GetPhysicalVolume()->GetLogicalVolume();
367 G4String nameVolume = lv->GetName();
369 G4int parCode = aStep->GetTrack()->GetDefinition()->GetPDGEncoding();
372 G4ThreeVector hitPoint = aStep->GetPreStepPoint()->GetPosition();
373 double r = hitPoint.perp()/CLHEP::cm;
374 double z =
std::abs(hitPoint.z())/CLHEP::cm;
375 double dose_acquired = 0.;
382 weight *=
m_HFDarkening->degradation(normalized_lumi*dose_acquired);
386 LogDebug(
"HcalSim") <<
"HCalSD: HFLumiDarkening at r = " << r
387 <<
", z = " << z <<
" Dose " << dose_acquired
394 <<
" hits from parametrization in " << nameVolume
395 <<
" for Track " << aStep->GetTrack()->GetTrackID()
396 <<
" (" << aStep->GetTrack()->GetDefinition()->GetParticleName()
402 <<
" hits afterParamS*";
405 bool notaMuon =
true;
406 if (parCode ==
mupPDG || parCode ==
mumPDG ) notaMuon =
false;
409 LogDebug(
"HcalSim") <<
"HCalSD: Starts shower library from " 410 << nameVolume <<
" for Track " 411 << aStep->GetTrack()->GetTrackID() <<
" (" 412 << aStep->GetTrack()->GetDefinition()->GetParticleName() <<
")";
417 LogDebug(
"HcalSim") <<
"HCalSD: Hit at Fibre in " << nameVolume
419 << aStep->GetTrack()->GetTrackID() <<
" (" 420 << aStep->GetTrack()->GetDefinition()->GetParticleName() <<
")";
427 LogDebug(
"HcalSim") <<
"HCalSD: Hit from PMT parametrization from " 428 << nameVolume <<
" for Track " 429 << aStep->GetTrack()->GetTrackID() <<
" (" 430 << aStep->GetTrack()->GetDefinition()->GetParticleName() <<
")";
435 LogDebug(
"HcalSim") <<
"HCalSD: Hit from FibreBundle from " 436 << nameVolume <<
" for Track " 437 << aStep->GetTrack()->GetTrackID() <<
" (" 438 << aStep->GetTrack()->GetDefinition()->GetParticleName() <<
")";
444 LogDebug(
"HcalSim") <<
"HCalSD: Hit from standard path from " 445 << nameVolume <<
" for Track " 446 << aStep->GetTrack()->GetTrackID() <<
" (" 447 << aStep->GetTrack()->GetDefinition()->GetParticleName() <<
")";
452 plotProfile(aStep, aStep->GetPreStepPoint()->GetPosition(),
463 double destep = aStep->GetTotalEnergyDeposit();
465 G4Track*
theTrack = aStep->GetTrack();
467 const G4VTouchable* touch = aStep->GetPreStepPoint()->GetTouchable();
469 int det(0), ieta(0),
phi(0),
z(0), lay,
depth(-1);
480 lay = (touch->GetReplicaNumber(0)/10)%100 + 1;
482 edm::LogInfo(
"HcalSim") <<
"HCalSD: det: " << det <<
" ieta: "<< ieta
483 <<
" iphi: " <<
phi <<
" zside " <<
z <<
" lay: " 489 G4ThreeVector hitPoint = aStep->GetPreStepPoint()->GetPosition();
498 <<
" coefficient = " << dweight;
507 <<
" coefficient = " << dweight;
514 int pdg = theTrack->GetDefinition()->GetPDGEncoding();
516 double ke = theTrack->GetKineticEnergy()/
MeV;
517 if ( pdg/1000000000 == 1 && (pdg/10000)%100 > 0 &&
518 (pdg/10)%100 > 0 && ke <
kmaxIon ) weight = 0;
519 if ((pdg == 2212) && (ke <
kmaxProton)) weight = 0;
520 if ((pdg == 2112) && (ke <
kmaxNeutron)) weight = 0;
524 << theTrack->GetTrackID() <<
" Type " 525 << theTrack->GetDefinition()->GetParticleName()
526 <<
" Kinetic Energy " << ke <<
" MeV";
535 G4Material* mat = aStep->GetPreStepPoint()->GetMaterial();
539 double wt2 = theTrack->GetWeight();
542 <<
" weight " << weight0 <<
" " << weight <<
" " << wt1
545 double edep = weight*wt1*destep;
546 if (wt2 > 0.0) { edep *= wt2; }
553 const G4VTouchable* touch = preStepPoint->GetTouchable();
554 G4ThreeVector hitPoint = preStepPoint->GetPosition();
556 int depth = (touch->GetReplicaNumber(0))%10 + 1;
557 int lay = (touch->GetReplicaNumber(0)/10)%100 + 1;
558 int det = (touch->GetReplicaNumber(1))/1000;
565 edm::LogInfo(
"HcalSim") <<
"HCalSD: updates numbering scheme for " << GetName();
579 edm::LogError(
"HcalSim") <<
"HCalSD : Cannot find HcalDDDSimConstant";
580 throw cms::Exception(
"Unknown",
"HCalSD") <<
"Cannot find HcalDDDSimConstant" <<
"\n";
590 for (
unsigned int ig=0; ig<
gpar.size(); ig++)
591 edm::LogInfo(
"HcalSim") <<
"HCalSD: gpar[" << ig <<
"] = " 592 <<
gpar[ig]/cm <<
" cm";
609 G4ParticleTable * theParticleTable = G4ParticleTable::GetParticleTable();
611 mumPDG = theParticleTable->FindParticle(particleName=
"mu-")->GetPDGEncoding();
612 mupPDG = theParticleTable->FindParticle(particleName=
"mu+")->GetPDGEncoding();
614 LogDebug(
"HcalSim") <<
"HCalSD: Particle code for mu- = " <<
mumPDG 615 <<
" for mu+ = " <<
mupPDG;
627 switch (theId.subdetId()) {
659 <<
" " << std::hex <<
id <<
std::dec 660 <<
" does not match one from relabller for " 662 << tmp.
phi <<
":" << tmp.
phis <<
":" 663 << tmp.
depth <<
":" << tmp.
lay << std::endl;
671 LogDebug(
"HcalSim") <<
"HCalSD:getDDDArray called for " <<
str;
678 const std::vector<double> & fvec = value.
doubles();
679 int nval = fvec.size();
681 edm::LogError(
"HcalSim") <<
"HCalSD : # of " << str <<
" bins " << nval
682 <<
" < 2 ==> illegal";
683 throw cms::Exception(
"Unknown",
"HCalSD") <<
"nval < 2 for array " << str <<
"\n";
689 throw cms::Exception(
"Unknown",
"HCalSD") <<
"cannot get array " << str <<
"\n";
695 std::vector<G4String>
tmp;
701 for (
unsigned int i=0;
i<tmp.size(); ++
i) {
702 if (!strcmp(tmp[
i].c_str(), log.
name().
name().c_str())) {
707 if (ok) tmp.push_back(log.
name().
name());
714 const G4VTouchable* touch = aStep->GetPreStepPoint()->GetTouchable();
715 int levels = (touch->GetHistoryDepth()) + 1;
716 for (
unsigned int it=0; it <
hfNames.size(); ++it) {
718 G4LogicalVolume* lv = touch->GetVolume(levels-
hfLevels[it])->GetLogicalVolume();
719 if (lv ==
hfLV[it])
return true;
726 std::vector<G4String>::const_iterator it =
hfNames.begin();
727 for (; it !=
hfNames.end(); ++it)
if (name == *it)
return true;
732 std::vector<G4LogicalVolume*>::const_iterator ite =
fibreLV.begin();
733 for (; ite !=
fibreLV.end(); ++ite)
if (lv == *ite)
return true;
738 std::vector<G4String>::const_iterator it =
fibreNames.begin();
739 for (; it !=
fibreNames.end(); ++it)
if (name == *it)
return true;
744 std::vector<G4LogicalVolume*>::const_iterator ite =
pmtLV.begin();
745 for (; ite !=
pmtLV.end(); ++ite)
if (lv == *ite)
return true;
750 std::vector<G4LogicalVolume*>::const_iterator ite =
fibre1LV.begin();
751 for (; ite !=
fibre1LV.end(); ++ite)
if (lv == *ite)
return true;
756 std::vector<G4LogicalVolume*>::const_iterator ite =
fibre2LV.begin();
757 for (; ite !=
fibre2LV.end(); ++ite)
if (lv == *ite)
return true;
762 std::vector<G4Material*>::const_iterator ite =
materials.begin();
763 for (; ite !=
materials.end(); ++ite)
if (mat == *ite)
return true;
772 edm::LogInfo(
"HcalSim") <<
"HCalSD::isItinFidVolume:#PMT= " << npmt
773 <<
" for hit point " << hitPoint;
775 if (npmt <= 0) flag =
false;
778 edm::LogInfo(
"HcalSim") <<
"HCalSD::isItinFidVolume: point " << hitPoint
779 <<
" return flag " <<
flag;
799 G4int particleCode =
theTrack->GetDefinition()->GetPDGEncoding();
808 edm::LogInfo(
"HcalSim") <<
"HCalSD::getFromLibrary " <<hits.size()
809 <<
" hits for " << GetName() <<
" of " << primaryID
810 <<
" with " <<
theTrack->GetDefinition()->GetParticleName()
813 for (
unsigned int i=0;
i<hits.size(); ++
i) {
814 G4ThreeVector hitPoint = hits[
i].position;
816 int depth = hits[
i].depth;
817 double time = hits[
i].time;
818 unsigned int unitID =
setDetUnitId(det, hitPoint, depth);
839 theTrack->SetTrackStatus(fStopAndKill);
840 G4TrackVector tv = *(aStep->GetSecondary());
841 for (
unsigned int kk=0;
kk<tv.size(); ++
kk)
843 tv[
kk]->SetTrackStatus(fStopAndKill);
856 G4int particleCode =
theTrack->GetDefinition()->GetPDGEncoding();
866 edm::LogInfo(
"HcalSim") <<
"HCalSD::hitForFibre " << hits.size()
867 <<
" hits for " << GetName() <<
" of " << primaryID
868 <<
" with " <<
theTrack->GetDefinition()->GetParticleName()
870 <<
" GeV in detector type " << det;
872 if (hits.size() > 0) {
873 for (
unsigned int i=0;
i<hits.size(); ++
i) {
874 G4ThreeVector hitPoint = hits[
i].position;
876 int depth = hits[
i].depth;
877 double time = hits[
i].time;
878 unsigned int unitID =
setDetUnitId(det, hitPoint, depth);
901 int nHit =
static_cast<int>(hits.size());
909 edm::LogInfo(
"HcalSim") <<
"HCalSD::getFromParam " << nHit <<
" hits for " 910 << GetName() <<
" of " << primaryID <<
" with " 911 << aStep->GetTrack()->GetDefinition()->GetParticleName()
913 <<
" GeV in detector type " << det;
915 for (
int i = 0;
i<nHit; ++
i) {
916 G4ThreeVector hitPoint = hits[
i].position;
917 int depth = hits[
i].depth;
918 double time = hits[
i].time;
919 unsigned int unitID =
setDetUnitId(det, hitPoint, depth);
950 primaryID =
theTrack->GetParentID();
951 if (primaryID == 0) primaryID =
theTrack->GetTrackID();
960 double rr = (hitPoint.x()*hitPoint.x() + hitPoint.y()*hitPoint.y());
961 double phi = (rr == 0. ? 0. :atan2(hitPoint.y(),hitPoint.x()));
968 if (hitPoint.z() < 0) etaR =-etaR;
970 edm::LogInfo(
"HcalSim") <<
"HCalSD::Hit for Detector " << det <<
" etaR " 971 << etaR <<
" phi " << phi/deg <<
" depth " <<
depth;
973 double time = (aStep->GetPostStepPoint()->GetGlobalTime());
989 LogDebug(
"HcalSim") <<
"HCalSD::getHitPMT 1 hit for " << GetName()
990 <<
" of " << primaryID <<
" with " 991 <<
theTrack->GetDefinition()->GetParticleName()
993 <<
" GeV with velocity " << beta <<
" UnitID " 1014 primaryID =
theTrack->GetTrackID();
1016 primaryID =
theTrack->GetParentID();
1017 if (primaryID == 0) primaryID =
theTrack->GetTrackID();
1026 double rr = (hitPoint.x()*hitPoint.x() + hitPoint.y()*hitPoint.y());
1027 double phi = (rr == 0. ? 0. :atan2(hitPoint.y(),hitPoint.x()));
1034 if (hitPoint.z() < 0) etaR =-etaR;
1036 LogDebug(
"HcalSim") <<
"HCalSD::Hit for Detector " << det <<
" etaR " 1037 << etaR <<
" phi " << phi/deg <<
" depth " <<
depth;
1039 double time = (aStep->GetPostStepPoint()->GetGlobalTime());
1040 uint32_t unitID = 0;
1055 LogDebug(
"HcalSim") <<
"HCalSD::getHitFibreBundle 1 hit for " << GetName()
1056 <<
" of " << primaryID <<
" with " 1057 <<
theTrack->GetDefinition()->GetParticleName()
1059 <<
" GeV with velocity " << beta <<
" UnitID " 1074 if (primaryID == 0) {
1076 edm::LogInfo(
"HcalSim") <<
"HCalSD: Problem with primaryID **** set by " 1077 <<
"force to TkID **** " <<
theTrack->GetTrackID();
1079 primaryID =
theTrack->GetTrackID();
1090 std::ifstream infile;
1096 while (infile >> det >> zside >> etaR >> phi >> lay >> wt) {
1098 layerWeights.insert(std::pair<uint32_t,double>(
id,wt));
1101 edm::LogInfo(
"HcalSim") <<
"HCalSD::readWeightFromFile:Entry " << entry
1102 <<
" ID " << std::hex <<
id <<
std::dec <<
" (" 1103 << det <<
"/" << zside <<
"/1/" << etaR <<
"/" 1104 << phi <<
"/" << lay <<
") Weight " << wt;
1109 edm::LogInfo(
"HcalSim") <<
"HCalSD::readWeightFromFile: reads " << entry
1110 <<
" weights from " << fName;
1124 std::map<uint32_t,double>::const_iterator ite =
layerWeights.find(
id);
1127 edm::LogInfo(
"HcalSim") <<
"HCalSD::layerWeight: ID " << std::hex <<
id 1129 << tmp.
zside <<
"/1/" << tmp.
etaR <<
"/" 1130 << tmp.
phis <<
"/" << tmp.
lay <<
") Weight " <<wt;
1137 double time,
int id) {
1139 const G4VTouchable* touch = aStep->GetPreStepPoint()->GetTouchable();
1140 static const G4String modName[8] = {
"HEModule",
"HVQF" ,
"HBModule",
"MBAT",
1141 "MBBT" ,
"MBBTC",
"MBBT_R1P",
"MBBT_R1M"};
1142 G4ThreeVector
local;
1146 for (
int n=0;
n<touch->GetHistoryDepth(); ++
n) {
1147 G4String
name = touch->GetVolume(
n)->GetName();
1149 LogDebug(
"HcalSim") <<
"plotProfile Depth " <<
n <<
" Name " <<
name;
1151 for (
unsigned int ii=0;
ii<8; ++
ii) {
1152 if (name == modName[
ii]) {
1154 int dn = touch->GetHistoryDepth() -
n;
1155 local = touch->GetHistory()->GetTransform(dn).TransformPoint(global);
1156 if (ii == 0) {depth = local.z() - 4006.5; idx = 1;}
1157 else if (ii == 1) {depth = local.z() + 825.0; idx = 3;}
1158 else if (ii == 2) {depth = local.x() - 1775.; idx = 0;}
1159 else {depth = local.y() + 15.; idx = 2;}
1165 if (!found) depth =
std::abs(global.z()) - 11500;
1167 LogDebug(
"HcalSim") <<
"plotProfile Found " << found <<
" Global " << global
1168 <<
" Local " << local <<
" depth " << depth <<
" ID " 1169 <<
id <<
" EDEP " << edep <<
" Time " <<
time;
1174 int jd = 2*idx +
id - 7;
1175 if (jd >= 0 && jd < 4) {
1177 if (
hit_[jd] != 0)
hit_[jd]->Fill(edep);
1178 if (
time_[jd] != 0)
time_[jd]->Fill(time,edep);
1179 if (
dist_[jd] != 0)
dist_[jd]->Fill(depth,edep);
1193 if (
id.subdet == 4) {
1194 int ieta = (
id.zside == 0) ? -
id.etaR :
id.etaR;
1196 if (
id.
depth <= 2) {
1197 if (G4UniformRand() > 0.5)
id.depth += 2;
1200 }
else if ((
id.subdet == 1 ||
id.subdet ==2) &&
testNumber) {
1201 if (
depth_ == 0)
id.depth = 1;
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
int maxHFDepth(const int ieta, const int iphi) const
void updateHit(CaloG4Hit *)
void hitForFibre(G4Step *step, double weight)
void getFromParam(G4Step *step, double weight)
virtual void update(const BeginOfJob *)
This routine will be called when the appropriate signal arrives.
bool isItStraightBundle(G4LogicalVolume *)
virtual bool ProcessHits(G4Step *, G4TouchableHistory *)
std::vector< double > gpar
bool isItinFidVolume(G4ThreeVector &)
int zside() const
get the z-side of the cell (1/-1)
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 *.
bool compare(HcalNumberingFromDDD::HcalID const &, uint32_t const &)
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 *)
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
std::unique_ptr< HFDarkening > m_HFDarkening
virtual double getEnergyDeposit(G4Step *)
const HBHEDarkening * m_HEDarkening
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
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 *)
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)
double getLayer0Wt(const int det, const int phi, const int zside) const
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
HFShowerLibrary * showerLibrary
void initRun(G4ParticleTable *, HcalDDDSimConstants *)
std::vector< G4LogicalVolume * > fibre2LV
const HBHEDarkening * m_HBDarkening
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
float degradation(float intlumi, int ieta, int lay) const
bool isItFibre(G4LogicalVolume *)
double getEnergyDeposit() const
HcalDDDSimConstants * hcalConstants