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 <<
":";
325 static const char *
const labels[] = {
"HB",
"HE",
"HO",
"HF Absorber",
"HF PMT",
326 "HF Absorber Long",
"HF Absorber Short",
327 "HF PMT Long",
"HF PMT Short"};
329 char name[20],
title[60];
330 for (
int i=0;
i<9; ++
i) {
331 sprintf (title,
"Hit energy in %s", labels[
i]);
332 sprintf (name,
"HCalSDHit%d", i);
334 sprintf (title,
"Energy (MeV)");
335 hit_[
i]->GetXaxis()->SetTitle(title);
336 hit_[
i]->GetYaxis()->SetTitle(
"Hits");
337 sprintf (title,
"Time of the hit in %s", labels[i]);
338 sprintf (name,
"HCalSDTime%d", i);
340 sprintf (title,
"Time (ns)");
341 time_[
i]->GetXaxis()->SetTitle(title);
342 time_[
i]->GetYaxis()->SetTitle(
"Hits");
343 sprintf (title,
"Longitudinal profile in %s", labels[i]);
344 sprintf (name,
"HCalSDDist%d", i);
346 sprintf (title,
"Distance (mm)");
347 dist_[
i]->GetXaxis()->SetTitle(title);
348 dist_[
i]->GetYaxis()->SetTitle(
"Hits");
350 if (useHF && (!useParam)) {
351 hzvem = hcDir.
make<TH1F>(
"hzvem",
"Longitudinal Profile (EM Part)",330,0.0,1650.0);
352 hzvem->GetXaxis()->SetTitle(
"Longitudinal Profile (EM Part)");
353 hzvhad = hcDir.
make<TH1F>(
"hzvhad",
"Longitudinal Profile (Had Part)",330,0.0,1650.0);
354 hzvhad->GetXaxis()->SetTitle(
"Longitudinal Profile (Hadronic Part)");
380 G4LogicalVolume* lv =
381 aStep->GetPreStepPoint()->GetPhysicalVolume()->GetLogicalVolume();
382 G4String nameVolume = lv->GetName();
384 G4int parCode = aStep->GetTrack()->GetDefinition()->GetPDGEncoding();
387 G4ThreeVector hitPoint = aStep->GetPreStepPoint()->GetPosition();
388 double r = hitPoint.perp()/CLHEP::cm;
389 double z =
std::abs(hitPoint.z())/CLHEP::cm;
390 float dose_acquired = 0.;
391 if (z>=1100 && z <= 1300) {
392 int hfZLayer = (int)((z - 1100)/20);
393 if (hfZLayer > 9) hfZLayer = 9;
395 for (
int i = hfZLayer;
i <= 9; ++
i) {
401 LogDebug(
"HcalSim") <<
"HCalSD: HFLumiDarkening at r = " << r
402 <<
", z = " << z <<
" Dose " << dose_acquired
409 <<
" hits from parametrization in " << nameVolume
410 <<
" for Track " << aStep->GetTrack()->GetTrackID()
411 <<
" (" << aStep->GetTrack()->GetDefinition()->GetParticleName()
417 <<
" hits afterParamS*";
420 bool notaMuon =
true;
421 if (parCode ==
mupPDG || parCode ==
mumPDG ) notaMuon =
false;
424 LogDebug(
"HcalSim") <<
"HCalSD: Starts shower library from "
425 << nameVolume <<
" for Track "
426 << aStep->GetTrack()->GetTrackID() <<
" ("
427 << aStep->GetTrack()->GetDefinition()->GetParticleName() <<
")";
432 LogDebug(
"HcalSim") <<
"HCalSD: Hit at Fibre in " << nameVolume
434 << aStep->GetTrack()->GetTrackID() <<
" ("
435 << aStep->GetTrack()->GetDefinition()->GetParticleName() <<
")";
442 LogDebug(
"HcalSim") <<
"HCalSD: Hit from PMT parametrization from "
443 << nameVolume <<
" for Track "
444 << aStep->GetTrack()->GetTrackID() <<
" ("
445 << aStep->GetTrack()->GetDefinition()->GetParticleName() <<
")";
450 LogDebug(
"HcalSim") <<
"HCalSD: Hit from FibreBundle from "
451 << nameVolume <<
" for Track "
452 << aStep->GetTrack()->GetTrackID() <<
" ("
453 << aStep->GetTrack()->GetDefinition()->GetParticleName() <<
")";
459 LogDebug(
"HcalSim") <<
"HCalSD: Hit from standard path from "
460 << nameVolume <<
" for Track "
461 << aStep->GetTrack()->GetTrackID() <<
" ("
462 << aStep->GetTrack()->GetDefinition()->GetParticleName() <<
")";
467 plotProfile(aStep, aStep->GetPreStepPoint()->GetPosition(),
478 double destep = aStep->GetTotalEnergyDeposit();
480 G4Track*
theTrack = aStep->GetTrack();
482 const G4VTouchable* touch = aStep->GetPreStepPoint()->GetTouchable();
483 int depth = (touch->GetReplicaNumber(0))%10;
484 int det = ((touch->GetReplicaNumber(1))/1000)-3;
485 if (depth==0 && (det==0 || det==1)) weight =
layer0wt[det];
487 int lay = (touch->GetReplicaNumber(0)/10)%100 + 1;
488 G4ThreeVector hitPoint = aStep->GetPreStepPoint()->GetPosition();
493 int lay = (touch->GetReplicaNumber(0)/10)%100 + 1;
503 edm::LogInfo(
"HcalSim") <<
"HCalSD:HE_Darkening >>> ieta: "<< ieta
504 <<
" lay: " << lay-2;
510 <<
" coefficient = " << dweight;
517 int pdg = theTrack->GetDefinition()->GetPDGEncoding();
519 double ke = theTrack->GetKineticEnergy()/
MeV;
520 if ( pdg/1000000000 == 1 && (pdg/10000)%100 > 0 &&
521 (pdg/10)%100 > 0 && ke <
kmaxIon ) weight = 0;
522 if ((pdg == 2212) && (ke <
kmaxProton)) weight = 0;
523 if ((pdg == 2112) && (ke <
kmaxNeutron)) weight = 0;
527 << theTrack->GetTrackID() <<
" Type "
528 << theTrack->GetDefinition()->GetParticleName()
529 <<
" Kinetic Energy " << ke <<
" MeV";
538 G4Material* mat = aStep->GetPreStepPoint()->GetMaterial();
542 double wt2 = theTrack->GetWeight();
564 edm::LogInfo(
"HcalSim") <<
"HCalSD: Detector " << det+3 <<
" Depth " << depth
565 <<
" weight " << weight0 <<
" " << weight <<
" " << wt1
568 double edep = weight*wt1*destep;
569 if(wt2 > 0.0) { edep *= wt2; }
576 const G4VTouchable* touch = preStepPoint->GetTouchable();
577 G4ThreeVector hitPoint = preStepPoint->GetPosition();
579 int depth = (touch->GetReplicaNumber(0))%10 + 1;
580 int lay = (touch->GetReplicaNumber(0)/10)%100 + 1;
581 int det = (touch->GetReplicaNumber(1))/1000;
588 edm::LogInfo(
"HcalSim") <<
"HCalSD: updates numbering scheme for " << GetName();
602 edm::LogError(
"HcalSim") <<
"HCalSD : Cannot find HcalDDDSimConstant";
603 throw cms::Exception(
"Unknown",
"HCalSD") <<
"Cannot find HcalDDDSimConstant" <<
"\n";
614 for (
unsigned int ig=0; ig<
gpar.size(); ig++)
615 edm::LogInfo(
"HcalSim") <<
"HCalSD: gpar[" << ig <<
"] = "
616 <<
gpar[ig]/cm <<
" cm";
621 for (
unsigned int it=0; it<
layer0wt.size(); ++it)
627 G4ParticleTable * theParticleTable = G4ParticleTable::GetParticleTable();
628 G4String particleName;
629 mumPDG = theParticleTable->FindParticle(particleName=
"mu-")->GetPDGEncoding();
630 mupPDG = theParticleTable->FindParticle(particleName=
"mu+")->GetPDGEncoding();
632 LogDebug(
"HcalSim") <<
"HCalSD: Particle code for mu- = " <<
mumPDG
633 <<
" for mu+ = " <<
mupPDG;
645 switch (theId.subdetId()) {
676 LogDebug(
"HcalSim") <<
"HCalSD:getDDDArray called for " << str;
683 const std::vector<double> & fvec = value.
doubles();
684 int nval = fvec.size();
686 edm::LogError(
"HcalSim") <<
"HCalSD : # of " << str <<
" bins " << nval
687 <<
" < 2 ==> illegal";
688 throw cms::Exception(
"Unknown",
"HCalSD") <<
"nval < 2 for array " << str <<
"\n";
693 edm::LogError(
"HcalSim") <<
"HCalSD : cannot get array " << str;
694 throw cms::Exception(
"Unknown",
"HCalSD") <<
"cannot get array " << str <<
"\n";
700 std::vector<G4String>
tmp;
706 for (
unsigned int i=0;
i<tmp.size(); ++
i) {
707 if (!strcmp(tmp[
i].c_str(), log.
name().
name().c_str())) {
712 if (ok) tmp.push_back(log.
name().
name());
719 const G4VTouchable* touch = aStep->GetPreStepPoint()->GetTouchable();
720 int levels = (touch->GetHistoryDepth()) + 1;
721 for (
unsigned int it=0; it <
hfNames.size(); ++it) {
723 G4LogicalVolume* lv = touch->GetVolume(levels-
hfLevels[it])->GetLogicalVolume();
724 if (lv ==
hfLV[it])
return true;
731 std::vector<G4String>::const_iterator it =
hfNames.begin();
732 for (; it !=
hfNames.end(); ++it)
if (name == *it)
return true;
737 std::vector<G4LogicalVolume*>::const_iterator ite =
fibreLV.begin();
738 for (; ite !=
fibreLV.end(); ++ite)
if (lv == *ite)
return true;
743 std::vector<G4String>::const_iterator it =
fibreNames.begin();
744 for (; it !=
fibreNames.end(); ++it)
if (name == *it)
return true;
749 std::vector<G4LogicalVolume*>::const_iterator ite =
pmtLV.begin();
750 for (; ite !=
pmtLV.end(); ++ite)
if (lv == *ite)
return true;
755 std::vector<G4LogicalVolume*>::const_iterator ite =
fibre1LV.begin();
756 for (; ite !=
fibre1LV.end(); ++ite)
if (lv == *ite)
return true;
761 std::vector<G4LogicalVolume*>::const_iterator ite =
fibre2LV.begin();
762 for (; ite !=
fibre2LV.end(); ++ite)
if (lv == *ite)
return true;
767 std::vector<G4Material*>::const_iterator ite =
materials.begin();
768 for (; ite !=
materials.end(); ++ite)
if (mat == *ite)
return true;
777 edm::LogInfo(
"HcalSim") <<
"HCalSD::isItinFidVolume:#PMT= " << npmt
778 <<
" for hit point " << hitPoint;
780 if (npmt <= 0) flag =
false;
783 edm::LogInfo(
"HcalSim") <<
"HCalSD::isItinFidVolume: point " << hitPoint
784 <<
" return flag " << flag;
804 G4int particleCode =
theTrack->GetDefinition()->GetPDGEncoding();
813 edm::LogInfo(
"HcalSim") <<
"HCalSD::getFromLibrary " <<hits.size()
814 <<
" hits for " << GetName() <<
" of " << primaryID
815 <<
" with " <<
theTrack->GetDefinition()->GetParticleName()
818 for (
unsigned int i=0;
i<hits.size(); ++
i) {
819 G4ThreeVector hitPoint = hits[
i].position;
821 int depth = hits[
i].depth;
822 double time = hits[
i].time;
823 unsigned int unitID =
setDetUnitId(det, hitPoint, depth);
844 theTrack->SetTrackStatus(fStopAndKill);
845 G4TrackVector tv = *(aStep->GetSecondary());
846 for (
unsigned int kk=0;
kk<tv.size(); ++
kk)
848 tv[
kk]->SetTrackStatus(fStopAndKill);
861 G4int particleCode =
theTrack->GetDefinition()->GetPDGEncoding();
871 edm::LogInfo(
"HcalSim") <<
"HCalSD::hitForFibre " << hits.size()
872 <<
" hits for " << GetName() <<
" of " << primaryID
873 <<
" with " <<
theTrack->GetDefinition()->GetParticleName()
875 <<
" GeV in detector type " << det;
877 if (hits.size() > 0) {
878 for (
unsigned int i=0;
i<hits.size(); ++
i) {
879 G4ThreeVector hitPoint = hits[
i].position;
881 int depth = hits[
i].depth;
882 double time = hits[
i].time;
883 unsigned int unitID =
setDetUnitId(det, hitPoint, depth);
906 int nHit =
static_cast<int>(hits.size());
914 edm::LogInfo(
"HcalSim") <<
"HCalSD::getFromParam " << nHit <<
" hits for "
915 << GetName() <<
" of " << primaryID <<
" with "
916 << aStep->GetTrack()->GetDefinition()->GetParticleName()
918 <<
" GeV in detector type " << det;
920 for (
int i = 0;
i<nHit; ++
i) {
921 G4ThreeVector hitPoint = hits[
i].position;
922 int depth = hits[
i].depth;
923 double time = hits[
i].time;
924 unsigned int unitID =
setDetUnitId(det, hitPoint, depth);
955 primaryID =
theTrack->GetParentID();
956 if (primaryID == 0) primaryID =
theTrack->GetTrackID();
965 double rr = (hitPoint.x()*hitPoint.x() + hitPoint.y()*hitPoint.y());
966 double phi = (rr == 0. ? 0. :atan2(hitPoint.y(),hitPoint.x()));
973 if (hitPoint.z() < 0) etaR =-etaR;
975 edm::LogInfo(
"HcalSim") <<
"HCalSD::Hit for Detector " << det <<
" etaR "
976 << etaR <<
" phi " << phi/deg <<
" depth " <<
depth;
978 double time = (aStep->GetPostStepPoint()->GetGlobalTime());
995 LogDebug(
"HcalSim") <<
"HCalSD::getHitPMT 1 hit for " << GetName()
996 <<
" of " << primaryID <<
" with "
997 <<
theTrack->GetDefinition()->GetParticleName()
999 <<
" GeV with velocity " << beta <<
" UnitID "
1020 primaryID =
theTrack->GetTrackID();
1022 primaryID =
theTrack->GetParentID();
1023 if (primaryID == 0) primaryID =
theTrack->GetTrackID();
1032 double rr = (hitPoint.x()*hitPoint.x() + hitPoint.y()*hitPoint.y());
1033 double phi = (rr == 0. ? 0. :atan2(hitPoint.y(),hitPoint.x()));
1040 if (hitPoint.z() < 0) etaR =-etaR;
1042 LogDebug(
"HcalSim") <<
"HCalSD::Hit for Detector " << det <<
" etaR "
1043 << etaR <<
" phi " << phi/deg <<
" depth " <<
depth;
1045 double time = (aStep->GetPostStepPoint()->GetGlobalTime());
1046 uint32_t unitID = 0;
1062 LogDebug(
"HcalSim") <<
"HCalSD::getHitFibreBundle 1 hit for " << GetName()
1063 <<
" of " << primaryID <<
" with "
1064 <<
theTrack->GetDefinition()->GetParticleName()
1066 <<
" GeV with velocity " << beta <<
" UnitID "
1081 if (primaryID == 0) {
1083 edm::LogInfo(
"HcalSim") <<
"HCalSD: Problem with primaryID **** set by "
1084 <<
"force to TkID **** " <<
theTrack->GetTrackID();
1086 primaryID =
theTrack->GetTrackID();
1103 while (infile >> det >> zside >> etaR >> phi >> lay >> wt) {
1105 layerWeights.insert(std::pair<uint32_t,double>(
id,wt));
1108 edm::LogInfo(
"HcalSim") <<
"HCalSD::readWeightFromFile:Entry " << entry
1109 <<
" ID " << std::hex <<
id <<
std::dec <<
" ("
1110 << det <<
"/" << zside <<
"/1/" << etaR <<
"/"
1111 << phi <<
"/" << lay <<
") Weight " << wt;
1116 edm::LogInfo(
"HcalSim") <<
"HCalSD::readWeightFromFile: reads " << entry
1117 <<
" weights from " <<
fName;
1131 std::map<uint32_t,double>::const_iterator ite =
layerWeights.find(
id);
1134 edm::LogInfo(
"HcalSim") <<
"HCalSD::layerWeight: ID " << std::hex <<
id
1136 << tmp.
zside <<
"/1/" << tmp.
etaR <<
"/"
1137 << tmp.
phis <<
"/" << tmp.
lay <<
") Weight " <<wt;
1144 double time,
int id) {
1146 const G4VTouchable* touch = aStep->GetPreStepPoint()->GetTouchable();
1147 static G4String modName[8] = {
"HEModule",
"HVQF" ,
"HBModule",
"MBAT",
1148 "MBBT" ,
"MBBTC",
"MBBT_R1P",
"MBBT_R1M"};
1149 G4ThreeVector local;
1153 for (
int n=0;
n<touch->GetHistoryDepth(); ++
n) {
1154 G4String
name = touch->GetVolume(
n)->GetName();
1156 LogDebug(
"HcalSim") <<
"plotProfile Depth " <<
n <<
" Name " <<
name;
1158 for (
unsigned int ii=0;
ii<8; ++
ii) {
1159 if (name == modName[
ii]) {
1161 int dn = touch->GetHistoryDepth() -
n;
1162 local = touch->GetHistory()->GetTransform(dn).TransformPoint(global);
1163 if (ii == 0) {depth = local.z() - 4006.5; idx = 1;}
1164 else if (ii == 1) {depth = local.z() + 825.0; idx = 3;}
1165 else if (ii == 2) {depth = local.x() - 1775.; idx = 0;}
1166 else {depth = local.y() + 15.; idx = 2;}
1172 if (!found) depth =
std::abs(global.z()) - 11500;
1174 LogDebug(
"HcalSim") <<
"plotProfile Found " << found <<
" Global " << global
1175 <<
" Local " << local <<
" depth " << depth <<
" ID "
1176 <<
id <<
" EDEP " << edep <<
" Time " <<
time;
1181 int jd = 2*idx +
id - 7;
1182 if (jd >= 0 && jd < 4) {
1184 if (
hit_[jd] != 0)
hit_[jd]->Fill(edep);
1185 if (
time_[jd] != 0)
time_[jd]->Fill(time,edep);
1186 if (
dist_[jd] != 0)
dist_[jd]->Fill(depth,edep);
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
HcalDDDSimConstants * hcalConstants
The DDGenericFilter is a runtime-parametrized Filter looking on DDSpecifcs.