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),
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"
115 if (testNumber || forTBH2)
121 const G4LogicalVolumeStore * lvs = G4LogicalVolumeStore::GetInstance();
122 std::vector<G4LogicalVolume *>::const_iterator lvcite;
134 attribute =
"Volume";
137 DDValue ddv0(attribute, value, 0);
145 edm::LogInfo(
"HcalSim") <<
"HCalSD: Names to be tested for " << attribute
146 <<
" = " << value <<
" has " <<
hfNames.size()
148 for (
unsigned int i=0;
i <
hfNames.size(); ++
i) {
151 for(lvcite=lvs->begin(); lvcite!=lvs->end(); lvcite++)
152 if((*lvcite)->GetName()==namv) {
157 int level =
static_cast<int>(temp[
i]);
160 <<
" LV " <<
hfLV[
i] <<
" at level "
167 DDValue ddv1(attribute,value,0);
172 edm::LogInfo(
"HcalSim") <<
"HCalSD: Names to be tested for " << attribute
173 <<
" = " << value <<
":";
177 for (lvcite = lvs->begin(); lvcite != lvs->end(); ++lvcite) {
178 if ((*lvcite)->GetName() == namv) {
191 DDValue ddv3(attribute,value,0);
195 std::vector<G4String> pmtNames =
getNames(fv3);
196 edm::LogInfo(
"HcalSim") <<
"HCalSD: Names to be tested for " << attribute
197 <<
" = " << value <<
" have " << pmtNames.size()
199 for (
unsigned int i=0;
i<pmtNames.size(); ++
i) {
200 G4String namv = pmtNames[
i];
202 for (lvcite = lvs->begin(); lvcite != lvs->end(); ++lvcite)
203 if ((*lvcite)->GetName() == namv) {
208 edm::LogInfo(
"HcalSim") <<
"HCalSD: (" <<
i <<
") " << pmtNames[
i]
214 value =
"HFFibreBundleStraight";
216 DDValue ddv4(attribute,value,0);
221 edm::LogInfo(
"HcalSim") <<
"HCalSD: Names to be tested for " << attribute
222 <<
" = " << value <<
" have " << fibreNames.size()
224 for (
unsigned int i=0;
i<fibreNames.size(); ++
i) {
225 G4String namv = fibreNames[
i];
227 for (lvcite = lvs->begin(); lvcite != lvs->end(); lvcite++)
228 if ((*lvcite)->GetName() == namv) {
233 edm::LogInfo(
"HcalSim") <<
"HCalSD: (" <<
i <<
") " << fibreNames[
i]
238 value =
"HFFibreBundleConical";
240 DDValue ddv5(attribute,value,0);
245 edm::LogInfo(
"HcalSim") <<
"HCalSD: Names to be tested for " << attribute
246 <<
" = " << value <<
" have " << fibreNames.size()
248 for (
unsigned int i=0;
i<fibreNames.size(); ++
i) {
249 G4String namv = fibreNames[
i];
251 for (lvcite = lvs->begin(); lvcite != lvs->end(); ++lvcite)
252 if ((*lvcite)->GetName() == namv) {
257 edm::LogInfo(
"HcalSim") <<
"HCalSD: (" <<
i <<
") " << fibreNames[
i]
265 const G4MaterialTable * matTab = G4Material::GetMaterialTable();
266 std::vector<G4Material*>::const_iterator matite;
267 attribute =
"OnlyForHcalSimNumbering";
270 DDValue ddv2(attribute,value,0);
292 G4Material* mat =
nullptr;
293 for (matite = matTab->begin(); matite != matTab->end(); ++matite) {
294 if ((*matite)->GetName() == namx) {
305 edm::LogInfo(
"HcalSim") <<
"HCalSD: Material names for " << attribute
306 <<
" = " << name <<
":";
324 static const char *
const labels[] = {
"HB",
"HE",
"HO",
"HF Absorber",
"HF PMT",
325 "HF Absorber Long",
"HF Absorber Short",
326 "HF PMT Long",
"HF PMT Short"};
328 char name[20],
title[60];
329 for (
int i=0;
i<9; ++
i) {
330 sprintf (title,
"Hit energy in %s", labels[
i]);
331 sprintf (name,
"HCalSDHit%d", i);
333 sprintf (title,
"Energy (MeV)");
334 hit_[
i]->GetXaxis()->SetTitle(title);
335 hit_[
i]->GetYaxis()->SetTitle(
"Hits");
336 sprintf (title,
"Time of the hit in %s", labels[i]);
337 sprintf (name,
"HCalSDTime%d", i);
339 sprintf (title,
"Time (ns)");
340 time_[
i]->GetXaxis()->SetTitle(title);
341 time_[
i]->GetYaxis()->SetTitle(
"Hits");
342 sprintf (title,
"Longitudinal profile in %s", labels[i]);
343 sprintf (name,
"HCalSDDist%d", i);
345 sprintf (title,
"Distance (mm)");
346 dist_[
i]->GetXaxis()->SetTitle(title);
347 dist_[
i]->GetYaxis()->SetTitle(
"Hits");
349 if (useHF && (!useParam)) {
350 hzvem = hcDir.
make<TH1F>(
"hzvem",
"Longitudinal Profile (EM Part)",330,0.0,1650.0);
351 hzvem->GetXaxis()->SetTitle(
"Longitudinal Profile (EM Part)");
352 hzvhad = hcDir.
make<TH1F>(
"hzvhad",
"Longitudinal Profile (Had Part)",330,0.0,1650.0);
353 hzvhad->GetXaxis()->SetTitle(
"Longitudinal Profile (Hadronic Part)");
379 G4LogicalVolume* lv =
380 aStep->GetPreStepPoint()->GetPhysicalVolume()->GetLogicalVolume();
381 G4String nameVolume = lv->GetName();
383 G4int parCode = aStep->GetTrack()->GetDefinition()->GetPDGEncoding();
386 G4ThreeVector hitPoint = aStep->GetPreStepPoint()->GetPosition();
387 double r = hitPoint.perp()/CLHEP::cm;
388 double z =
std::abs(hitPoint.z())/CLHEP::cm;
389 float dose_acquired = 0.;
390 if (z>=1100 && z <= 1300) {
391 int hfZLayer = (int)((z - 1100)/20);
392 if (hfZLayer > 9) hfZLayer = 9;
394 for (
int i = hfZLayer;
i <= 9; ++
i) {
400 LogDebug(
"HcalSim") <<
"HCalSD: HFLumiDarkening at r = " << r
401 <<
", z = " << z <<
" Dose " << dose_acquired
408 <<
" hits from parametrization in " << nameVolume
409 <<
" for Track " << aStep->GetTrack()->GetTrackID()
410 <<
" (" << aStep->GetTrack()->GetDefinition()->GetParticleName()
416 <<
" hits afterParamS*";
419 bool notaMuon =
true;
420 if (parCode ==
mupPDG || parCode ==
mumPDG ) notaMuon =
false;
423 LogDebug(
"HcalSim") <<
"HCalSD: Starts shower library from "
424 << nameVolume <<
" for Track "
425 << aStep->GetTrack()->GetTrackID() <<
" ("
426 << aStep->GetTrack()->GetDefinition()->GetParticleName() <<
")";
431 LogDebug(
"HcalSim") <<
"HCalSD: Hit at Fibre in " << nameVolume
433 << aStep->GetTrack()->GetTrackID() <<
" ("
434 << aStep->GetTrack()->GetDefinition()->GetParticleName() <<
")";
441 LogDebug(
"HcalSim") <<
"HCalSD: Hit from PMT parametrization from "
442 << nameVolume <<
" for Track "
443 << aStep->GetTrack()->GetTrackID() <<
" ("
444 << aStep->GetTrack()->GetDefinition()->GetParticleName() <<
")";
449 LogDebug(
"HcalSim") <<
"HCalSD: Hit from FibreBundle from "
450 << nameVolume <<
" for Track "
451 << aStep->GetTrack()->GetTrackID() <<
" ("
452 << aStep->GetTrack()->GetDefinition()->GetParticleName() <<
")";
458 LogDebug(
"HcalSim") <<
"HCalSD: Hit from standard path from "
459 << nameVolume <<
" for Track "
460 << aStep->GetTrack()->GetTrackID() <<
" ("
461 << aStep->GetTrack()->GetDefinition()->GetParticleName() <<
")";
466 plotProfile(aStep, aStep->GetPreStepPoint()->GetPosition(),
477 double destep = aStep->GetTotalEnergyDeposit();
479 G4Track*
theTrack = aStep->GetTrack();
481 const G4VTouchable* touch = aStep->GetPreStepPoint()->GetTouchable();
482 int depth = (touch->GetReplicaNumber(0))%10;
483 int det = ((touch->GetReplicaNumber(1))/1000)-3;
484 if (depth==0 && (det==0 || det==1)) weight =
layer0wt[det];
486 int lay = (touch->GetReplicaNumber(0)/10)%100 + 1;
487 G4ThreeVector hitPoint = aStep->GetPreStepPoint()->GetPosition();
492 int lay = (touch->GetReplicaNumber(0)/10)%100 + 1;
502 edm::LogInfo(
"HcalSim") <<
"HCalSD:HE_Darkening >>> ieta: "<< ieta
503 <<
" lay: " << lay-2;
509 <<
" coefficient = " << dweight;
516 int pdg = theTrack->GetDefinition()->GetPDGEncoding();
518 double ke = theTrack->GetKineticEnergy()/
MeV;
519 if ( pdg/1000000000 == 1 && (pdg/10000)%100 > 0 &&
520 (pdg/10)%100 > 0 && ke <
kmaxIon ) weight = 0;
521 if ((pdg == 2212) && (ke <
kmaxProton)) weight = 0;
522 if ((pdg == 2112) && (ke <
kmaxNeutron)) weight = 0;
526 << theTrack->GetTrackID() <<
" Type "
527 << theTrack->GetDefinition()->GetParticleName()
528 <<
" Kinetic Energy " << ke <<
" MeV";
537 G4Material* mat = aStep->GetPreStepPoint()->GetMaterial();
541 double wt2 = theTrack->GetWeight();
563 edm::LogInfo(
"HcalSim") <<
"HCalSD: Detector " << det+3 <<
" Depth " << depth
564 <<
" weight " << weight0 <<
" " << weight <<
" " << wt1
567 double edep = weight*wt1*destep;
568 if(wt2 > 0.0) { edep *= wt2; }
575 const G4VTouchable* touch = preStepPoint->GetTouchable();
576 G4ThreeVector hitPoint = preStepPoint->GetPosition();
578 int depth = (touch->GetReplicaNumber(0))%10 + 1;
579 int lay = (touch->GetReplicaNumber(0)/10)%100 + 1;
580 int det = (touch->GetReplicaNumber(1))/1000;
587 edm::LogInfo(
"HcalSim") <<
"HCalSD: updates numbering scheme for " << GetName();
601 edm::LogError(
"HcalSim") <<
"HCalSD : Cannot find HcalDDDSimConstant";
602 throw cms::Exception(
"Unknown",
"HCalSD") <<
"Cannot find HcalDDDSimConstant" <<
"\n";
612 for (
unsigned int ig=0; ig<
gpar.size(); ig++)
613 edm::LogInfo(
"HcalSim") <<
"HCalSD: gpar[" << ig <<
"] = "
614 <<
gpar[ig]/cm <<
" cm";
619 for (
unsigned int it=0; it<
layer0wt.size(); ++it)
625 G4ParticleTable * theParticleTable = G4ParticleTable::GetParticleTable();
626 G4String particleName;
627 mumPDG = theParticleTable->FindParticle(particleName=
"mu-")->GetPDGEncoding();
628 mupPDG = theParticleTable->FindParticle(particleName=
"mu+")->GetPDGEncoding();
630 LogDebug(
"HcalSim") <<
"HCalSD: Particle code for mu- = " <<
mumPDG
631 <<
" for mu+ = " <<
mupPDG;
643 switch (theId.subdetId()) {
674 LogDebug(
"HcalSim") <<
"HCalSD:getDDDArray called for " << str;
681 const std::vector<double> & fvec = value.
doubles();
682 int nval = fvec.size();
684 edm::LogError(
"HcalSim") <<
"HCalSD : # of " << str <<
" bins " << nval
685 <<
" < 2 ==> illegal";
686 throw cms::Exception(
"Unknown",
"HCalSD") <<
"nval < 2 for array " << str <<
"\n";
691 edm::LogError(
"HcalSim") <<
"HCalSD : cannot get array " << str;
692 throw cms::Exception(
"Unknown",
"HCalSD") <<
"cannot get array " << str <<
"\n";
698 std::vector<G4String>
tmp;
704 for (
unsigned int i=0;
i<tmp.size(); ++
i) {
705 if (!strcmp(tmp[
i].c_str(), log.
name().
name().c_str())) {
710 if (ok) tmp.push_back(log.
name().
name());
717 const G4VTouchable* touch = aStep->GetPreStepPoint()->GetTouchable();
718 int levels = (touch->GetHistoryDepth()) + 1;
719 for (
unsigned int it=0; it <
hfNames.size(); ++it) {
721 G4LogicalVolume* lv = touch->GetVolume(levels-
hfLevels[it])->GetLogicalVolume();
722 if (lv ==
hfLV[it])
return true;
729 std::vector<G4String>::const_iterator it =
hfNames.begin();
730 for (; it !=
hfNames.end(); ++it)
if (name == *it)
return true;
735 std::vector<G4LogicalVolume*>::const_iterator ite =
fibreLV.begin();
736 for (; ite !=
fibreLV.end(); ++ite)
if (lv == *ite)
return true;
741 std::vector<G4String>::const_iterator it =
fibreNames.begin();
742 for (; it !=
fibreNames.end(); ++it)
if (name == *it)
return true;
747 std::vector<G4LogicalVolume*>::const_iterator ite =
pmtLV.begin();
748 for (; ite !=
pmtLV.end(); ++ite)
if (lv == *ite)
return true;
753 std::vector<G4LogicalVolume*>::const_iterator ite =
fibre1LV.begin();
754 for (; ite !=
fibre1LV.end(); ++ite)
if (lv == *ite)
return true;
759 std::vector<G4LogicalVolume*>::const_iterator ite =
fibre2LV.begin();
760 for (; ite !=
fibre2LV.end(); ++ite)
if (lv == *ite)
return true;
765 std::vector<G4Material*>::const_iterator ite =
materials.begin();
766 for (; ite !=
materials.end(); ++ite)
if (mat == *ite)
return true;
775 edm::LogInfo(
"HcalSim") <<
"HCalSD::isItinFidVolume:#PMT= " << npmt
776 <<
" for hit point " << hitPoint;
778 if (npmt <= 0) flag =
false;
781 edm::LogInfo(
"HcalSim") <<
"HCalSD::isItinFidVolume: point " << hitPoint
782 <<
" return flag " << flag;
802 G4int particleCode =
theTrack->GetDefinition()->GetPDGEncoding();
811 edm::LogInfo(
"HcalSim") <<
"HCalSD::getFromLibrary " <<hits.size()
812 <<
" hits for " << GetName() <<
" of " << primaryID
813 <<
" with " <<
theTrack->GetDefinition()->GetParticleName()
816 for (
unsigned int i=0;
i<hits.size(); ++
i) {
817 G4ThreeVector hitPoint = hits[
i].position;
819 int depth = hits[
i].depth;
820 double time = hits[
i].time;
821 unsigned int unitID =
setDetUnitId(det, hitPoint, depth);
842 theTrack->SetTrackStatus(fStopAndKill);
843 G4TrackVector tv = *(aStep->GetSecondary());
844 for (
unsigned int kk=0;
kk<tv.size(); ++
kk)
846 tv[
kk]->SetTrackStatus(fStopAndKill);
859 G4int particleCode =
theTrack->GetDefinition()->GetPDGEncoding();
869 edm::LogInfo(
"HcalSim") <<
"HCalSD::hitForFibre " << hits.size()
870 <<
" hits for " << GetName() <<
" of " << primaryID
871 <<
" with " <<
theTrack->GetDefinition()->GetParticleName()
873 <<
" GeV in detector type " << det;
875 if (hits.size() > 0) {
876 for (
unsigned int i=0;
i<hits.size(); ++
i) {
877 G4ThreeVector hitPoint = hits[
i].position;
879 int depth = hits[
i].depth;
880 double time = hits[
i].time;
881 unsigned int unitID =
setDetUnitId(det, hitPoint, depth);
904 int nHit =
static_cast<int>(hits.size());
912 edm::LogInfo(
"HcalSim") <<
"HCalSD::getFromParam " << nHit <<
" hits for "
913 << GetName() <<
" of " << primaryID <<
" with "
914 << aStep->GetTrack()->GetDefinition()->GetParticleName()
916 <<
" GeV in detector type " << det;
918 for (
int i = 0;
i<nHit; ++
i) {
919 G4ThreeVector hitPoint = hits[
i].position;
920 int depth = hits[
i].depth;
921 double time = hits[
i].time;
922 unsigned int unitID =
setDetUnitId(det, hitPoint, depth);
953 primaryID =
theTrack->GetParentID();
954 if (primaryID == 0) primaryID =
theTrack->GetTrackID();
963 double rr = (hitPoint.x()*hitPoint.x() + hitPoint.y()*hitPoint.y());
964 double phi = (rr == 0. ? 0. :atan2(hitPoint.y(),hitPoint.x()));
971 if (hitPoint.z() < 0) etaR =-etaR;
973 edm::LogInfo(
"HcalSim") <<
"HCalSD::Hit for Detector " << det <<
" etaR "
974 << etaR <<
" phi " << phi/deg <<
" depth " <<
depth;
976 double time = (aStep->GetPostStepPoint()->GetGlobalTime());
993 LogDebug(
"HcalSim") <<
"HCalSD::getHitPMT 1 hit for " << GetName()
994 <<
" of " << primaryID <<
" with "
995 <<
theTrack->GetDefinition()->GetParticleName()
997 <<
" GeV with velocity " << beta <<
" UnitID "
1018 primaryID =
theTrack->GetTrackID();
1020 primaryID =
theTrack->GetParentID();
1021 if (primaryID == 0) primaryID =
theTrack->GetTrackID();
1030 double rr = (hitPoint.x()*hitPoint.x() + hitPoint.y()*hitPoint.y());
1031 double phi = (rr == 0. ? 0. :atan2(hitPoint.y(),hitPoint.x()));
1038 if (hitPoint.z() < 0) etaR =-etaR;
1040 LogDebug(
"HcalSim") <<
"HCalSD::Hit for Detector " << det <<
" etaR "
1041 << etaR <<
" phi " << phi/deg <<
" depth " <<
depth;
1043 double time = (aStep->GetPostStepPoint()->GetGlobalTime());
1044 uint32_t unitID = 0;
1060 LogDebug(
"HcalSim") <<
"HCalSD::getHitFibreBundle 1 hit for " << GetName()
1061 <<
" of " << primaryID <<
" with "
1062 <<
theTrack->GetDefinition()->GetParticleName()
1064 <<
" GeV with velocity " << beta <<
" UnitID "
1079 if (primaryID == 0) {
1081 edm::LogInfo(
"HcalSim") <<
"HCalSD: Problem with primaryID **** set by "
1082 <<
"force to TkID **** " <<
theTrack->GetTrackID();
1084 primaryID =
theTrack->GetTrackID();
1101 while (infile >> det >> zside >> etaR >> phi >> lay >> wt) {
1103 layerWeights.insert(std::pair<uint32_t,double>(
id,wt));
1106 edm::LogInfo(
"HcalSim") <<
"HCalSD::readWeightFromFile:Entry " << entry
1107 <<
" ID " << std::hex <<
id <<
std::dec <<
" ("
1108 << det <<
"/" << zside <<
"/1/" << etaR <<
"/"
1109 << phi <<
"/" << lay <<
") Weight " << wt;
1114 edm::LogInfo(
"HcalSim") <<
"HCalSD::readWeightFromFile: reads " << entry
1115 <<
" weights from " <<
fName;
1129 std::map<uint32_t,double>::const_iterator ite =
layerWeights.find(
id);
1132 edm::LogInfo(
"HcalSim") <<
"HCalSD::layerWeight: ID " << std::hex <<
id
1134 << tmp.
zside <<
"/1/" << tmp.
etaR <<
"/"
1135 << tmp.
phis <<
"/" << tmp.
lay <<
") Weight " <<wt;
1142 double time,
int id) {
1144 const G4VTouchable* touch = aStep->GetPreStepPoint()->GetTouchable();
1145 static G4String modName[8] = {
"HEModule",
"HVQF" ,
"HBModule",
"MBAT",
1146 "MBBT" ,
"MBBTC",
"MBBT_R1P",
"MBBT_R1M"};
1147 G4ThreeVector local;
1151 for (
int n=0;
n<touch->GetHistoryDepth(); ++
n) {
1152 G4String
name = touch->GetVolume(
n)->GetName();
1154 LogDebug(
"HcalSim") <<
"plotProfile Depth " <<
n <<
" Name " <<
name;
1156 for (
unsigned int ii=0;
ii<8; ++
ii) {
1157 if (name == modName[
ii]) {
1159 int dn = touch->GetHistoryDepth() -
n;
1160 local = touch->GetHistory()->GetTransform(dn).TransformPoint(global);
1161 if (ii == 0) {depth = local.z() - 4006.5; idx = 1;}
1162 else if (ii == 1) {depth = local.z() + 825.0; idx = 3;}
1163 else if (ii == 2) {depth = local.x() - 1775.; idx = 0;}
1164 else {depth = local.y() + 15.; idx = 2;}
1170 if (!found) depth =
std::abs(global.z()) - 11500;
1172 LogDebug(
"HcalSim") <<
"plotProfile Found " << found <<
" Global " << global
1173 <<
" Local " << local <<
" depth " << depth <<
" ID "
1174 <<
id <<
" EDEP " << edep <<
" Time " << time;
1179 int jd = 2*idx +
id - 7;
1180 if (jd >= 0 && jd < 4) {
1182 if (
hit_[jd] != 0)
hit_[jd]->Fill(edep);
1183 if (
time_[jd] != 0)
time_[jd]->Fill(time,edep);
1184 if (
dist_[jd] != 0)
dist_[jd]->Fill(depth,edep);
1198 if (
id.subdet == 4) {
1199 int ieta = (
id.zside == 0) ? -
id.etaR :
id.etaR;
1201 if (
id.
depth <= 2) {
1202 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
float int_lumi(float intlumi)
const DDLogicalPart & logicalPart() const
The logical-part of the current node in the filtered-view.
const std::vector< double > & doubles() const
a reference to the double-valued values stored in the given instance of DDValue
void 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 *)
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)
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 *.
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)
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::...
float degradation(float mrad)
std::vector< Hit > getHits(G4Step *aStep, double weight)
Abs< T >::type abs(const T &t)
static void unpackHcalIndex(const uint32_t &idx, int &det, int &z, int &depth, int &eta, int &phi, int &lay)
A DDLogicalPart aggregates information concerning material, solid and sensitveness ...
HcalNumberingScheme * numberingScheme
void getHitPMT(G4Step *step)
T * make(const Args &...args) const
make new ROOT object
HFDarkening * m_HFDarkening
double getAttenuation(G4Step *aStep, double birk1, double birk2, double birk3)
std::vector< int > hfLevels
virtual std::vector< std::string > getNames()
void plotProfile(G4Step *step, const G4ThreeVector &pos, double edep, double time, int id)
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 G4LogicalVolume * GetVolume(const std::string &name)
TFileDirectory mkdir(const std::string &dir, const std::string &descr="")
create a new subdirectory
std::vector< Hit > getHits(G4Step *aStep, double weight)
void readWeightFromFile(std::string)
tuple idx
DEBUGGING if hasattr(process,"trackMonIterativeTracking2012"): print "trackMonIterativeTracking2012 D...
void 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
float dose(int layer, float radius)
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.