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,
47 p.getParameter<
edm::
ParameterSet>(
"HCalSD").getParameter<bool>(
"IgnoreTrackID")),
48 hcalConstants(0), numberingFromDDD(0),
numberingScheme(0), showerLibrary(0),
49 hfshower(0), showerParam(0), showerPMT(0), showerBundle(0), m_HEDarkening(0),
50 m_HFDarkening(0), depth_(1) {
74 bool ageingFlagHE= m_HC.
getParameter<
bool>(
"HEDarkening");
75 bool ageingFlagHF= m_HC.
getParameter<
bool>(
"HFDarkening");
81 applyFidCut = m_HF.getParameter<
bool>(
"ApplyFiducialCut");
84 LogDebug(
"HcalSim") <<
"***************************************************" 88 <<
"* Constructing a HCalSD with name " << name <<
"\n" 91 <<
"***************************************************";
93 edm::LogInfo(
"HcalSim") <<
"HCalSD:: Use of HF code is set to " << useHF
94 <<
"\nUse of shower parametrization set to " 95 << useParam <<
"\nUse of shower library is set to " 96 << useShowerLibrary <<
"\nUse PMT Hit is set to " 97 << usePMTHit <<
" with beta Threshold "<< betaThr
98 <<
"\nUSe of FibreBundle Hit set to "<<useFibreBundle
99 <<
"\n Use of Birks law is set to " 100 << useBirk <<
" with three constants kB = " 101 << birk1 <<
", C1 = " << birk2 <<
", C2 = " <<
birk3;
105 <<
" ions below " <<
kmaxIon <<
" MeV\n" 106 <<
" Threshold for storing hits in HB: " 107 << eminHitHB <<
" HE: " << eminHitHE <<
" HO: " 108 << eminHitHO <<
" HF: " << eminHitHF <<
"\n" 109 <<
"Delivered luminosity for Darkening " 110 << deliveredLumi <<
" Flag (HE) " << ageingFlagHE
111 <<
" Flag (HF) " << ageingFlagHF <<
"\n" 112 <<
"Application of Fiducial Cut " << applyFidCut
113 <<
"Flag for test number|neutral density filter " 117 if (testNumber || forTBH2)
123 const G4LogicalVolumeStore * lvs = G4LogicalVolumeStore::GetInstance();
124 std::vector<G4LogicalVolume *>::const_iterator lvcite;
136 attribute =
"Volume";
139 DDValue ddv0(attribute, value, 0);
147 edm::LogInfo(
"HcalSim") <<
"HCalSD: Names to be tested for " << attribute
148 <<
" = " << value <<
" has " <<
hfNames.size()
150 for (
unsigned int i=0;
i <
hfNames.size(); ++
i) {
153 for(lvcite=lvs->begin(); lvcite!=lvs->end(); lvcite++)
154 if((*lvcite)->GetName()==namv) {
159 int level =
static_cast<int>(temp[
i]);
162 <<
" LV " <<
hfLV[
i] <<
" at level " 169 DDValue ddv1(attribute,value,0);
174 edm::LogInfo(
"HcalSim") <<
"HCalSD: Names to be tested for " << attribute
175 <<
" = " << value <<
":";
179 for (lvcite = lvs->begin(); lvcite != lvs->end(); ++lvcite) {
180 if ((*lvcite)->GetName() == namv) {
193 DDValue ddv3(attribute,value,0);
197 std::vector<G4String> pmtNames =
getNames(fv3);
198 edm::LogInfo(
"HcalSim") <<
"HCalSD: Names to be tested for " << attribute
199 <<
" = " << value <<
" have " << pmtNames.size()
201 for (
unsigned int i=0;
i<pmtNames.size(); ++
i) {
202 G4String namv = pmtNames[
i];
204 for (lvcite = lvs->begin(); lvcite != lvs->end(); ++lvcite)
205 if ((*lvcite)->GetName() == namv) {
210 edm::LogInfo(
"HcalSim") <<
"HCalSD: (" <<
i <<
") " << pmtNames[
i]
216 value =
"HFFibreBundleStraight";
218 DDValue ddv4(attribute,value,0);
223 edm::LogInfo(
"HcalSim") <<
"HCalSD: Names to be tested for " << attribute
224 <<
" = " << value <<
" have " << fibreNames.size()
226 for (
unsigned int i=0;
i<fibreNames.size(); ++
i) {
227 G4String namv = fibreNames[
i];
229 for (lvcite = lvs->begin(); lvcite != lvs->end(); lvcite++)
230 if ((*lvcite)->GetName() == namv) {
235 edm::LogInfo(
"HcalSim") <<
"HCalSD: (" <<
i <<
") " << fibreNames[
i]
240 value =
"HFFibreBundleConical";
242 DDValue ddv5(attribute,value,0);
247 edm::LogInfo(
"HcalSim") <<
"HCalSD: Names to be tested for " << attribute
248 <<
" = " << value <<
" have " << fibreNames.size()
250 for (
unsigned int i=0;
i<fibreNames.size(); ++
i) {
251 G4String namv = fibreNames[
i];
253 for (lvcite = lvs->begin(); lvcite != lvs->end(); ++lvcite)
254 if ((*lvcite)->GetName() == namv) {
259 edm::LogInfo(
"HcalSim") <<
"HCalSD: (" <<
i <<
") " << fibreNames[
i]
267 const G4MaterialTable * matTab = G4Material::GetMaterialTable();
268 std::vector<G4Material*>::const_iterator matite;
269 attribute =
"OnlyForHcalSimNumbering";
272 DDValue ddv2(attribute,value,0);
294 G4Material* mat =
nullptr;
295 for (matite = matTab->begin(); matite != matTab->end(); ++matite) {
296 if ((*matite)->GetName() == namx) {
307 edm::LogInfo(
"HcalSim") <<
"HCalSD: Material names for " << attribute
308 <<
" = " << name <<
":";
326 static const char *
const labels[] = {
"HB",
"HE",
"HO",
"HF Absorber",
"HF PMT",
327 "HF Absorber Long",
"HF Absorber Short",
328 "HF PMT Long",
"HF PMT Short"};
330 char name[20],
title[60];
331 for (
int i=0;
i<9; ++
i) {
332 sprintf (title,
"Hit energy in %s", labels[
i]);
333 sprintf (name,
"HCalSDHit%d", i);
335 sprintf (title,
"Energy (MeV)");
336 hit_[
i]->GetXaxis()->SetTitle(title);
337 hit_[
i]->GetYaxis()->SetTitle(
"Hits");
338 sprintf (title,
"Time of the hit in %s", labels[i]);
339 sprintf (name,
"HCalSDTime%d", i);
341 sprintf (title,
"Time (ns)");
342 time_[
i]->GetXaxis()->SetTitle(title);
343 time_[
i]->GetYaxis()->SetTitle(
"Hits");
344 sprintf (title,
"Longitudinal profile in %s", labels[i]);
345 sprintf (name,
"HCalSDDist%d", i);
347 sprintf (title,
"Distance (mm)");
348 dist_[
i]->GetXaxis()->SetTitle(title);
349 dist_[
i]->GetYaxis()->SetTitle(
"Hits");
351 if (useHF && (!useParam)) {
352 hzvem = hcDir.
make<TH1F>(
"hzvem",
"Longitudinal Profile (EM Part)",330,0.0,1650.0);
353 hzvem->GetXaxis()->SetTitle(
"Longitudinal Profile (EM Part)");
354 hzvhad = hcDir.
make<TH1F>(
"hzvhad",
"Longitudinal Profile (Had Part)",330,0.0,1650.0);
355 hzvhad->GetXaxis()->SetTitle(
"Longitudinal Profile (Hadronic Part)");
381 depth_ = (aStep->GetPreStepPoint()->GetTouchable()->GetReplicaNumber(0))%10;
382 G4LogicalVolume* lv =
383 aStep->GetPreStepPoint()->GetPhysicalVolume()->GetLogicalVolume();
384 G4String nameVolume = lv->GetName();
386 G4int parCode = aStep->GetTrack()->GetDefinition()->GetPDGEncoding();
389 G4ThreeVector hitPoint = aStep->GetPreStepPoint()->GetPosition();
390 double r = hitPoint.perp()/CLHEP::cm;
391 double z =
std::abs(hitPoint.z())/CLHEP::cm;
392 double dose_acquired = 0.;
403 LogDebug(
"HcalSim") <<
"HCalSD: HFLumiDarkening at r = " << r
404 <<
", z = " << z <<
" Dose " << dose_acquired
411 <<
" hits from parametrization in " << nameVolume
412 <<
" for Track " << aStep->GetTrack()->GetTrackID()
413 <<
" (" << aStep->GetTrack()->GetDefinition()->GetParticleName()
419 <<
" hits afterParamS*";
422 bool notaMuon =
true;
423 if (parCode ==
mupPDG || parCode ==
mumPDG ) notaMuon =
false;
426 LogDebug(
"HcalSim") <<
"HCalSD: Starts shower library from " 427 << nameVolume <<
" for Track " 428 << aStep->GetTrack()->GetTrackID() <<
" (" 429 << aStep->GetTrack()->GetDefinition()->GetParticleName() <<
")";
434 LogDebug(
"HcalSim") <<
"HCalSD: Hit at Fibre in " << nameVolume
436 << aStep->GetTrack()->GetTrackID() <<
" (" 437 << aStep->GetTrack()->GetDefinition()->GetParticleName() <<
")";
444 LogDebug(
"HcalSim") <<
"HCalSD: Hit from PMT parametrization from " 445 << nameVolume <<
" for Track " 446 << aStep->GetTrack()->GetTrackID() <<
" (" 447 << aStep->GetTrack()->GetDefinition()->GetParticleName() <<
")";
452 LogDebug(
"HcalSim") <<
"HCalSD: Hit from FibreBundle from " 453 << nameVolume <<
" for Track " 454 << aStep->GetTrack()->GetTrackID() <<
" (" 455 << aStep->GetTrack()->GetDefinition()->GetParticleName() <<
")";
461 LogDebug(
"HcalSim") <<
"HCalSD: Hit from standard path from " 462 << nameVolume <<
" for Track " 463 << aStep->GetTrack()->GetTrackID() <<
" (" 464 << aStep->GetTrack()->GetDefinition()->GetParticleName() <<
")";
469 plotProfile(aStep, aStep->GetPreStepPoint()->GetPosition(),
480 double destep = aStep->GetTotalEnergyDeposit();
482 G4Track*
theTrack = aStep->GetTrack();
484 const G4VTouchable* touch = aStep->GetPreStepPoint()->GetTouchable();
486 int det(0), ieta(0),
phi(0),
z(0), lay,
depth(-1);
497 lay = (touch->GetReplicaNumber(0)/10)%100 + 1;
499 edm::LogInfo(
"HcalSim") <<
"HCalSD: det: " << det <<
" ieta: "<< ieta
500 <<
" iphi: " <<
phi <<
" zside " <<
z <<
" lay: " 506 G4ThreeVector hitPoint = aStep->GetPreStepPoint()->GetPosition();
515 <<
" coefficient = " << dweight;
522 int pdg = theTrack->GetDefinition()->GetPDGEncoding();
524 double ke = theTrack->GetKineticEnergy()/
MeV;
525 if ( pdg/1000000000 == 1 && (pdg/10000)%100 > 0 &&
526 (pdg/10)%100 > 0 && ke <
kmaxIon ) weight = 0;
527 if ((pdg == 2212) && (ke <
kmaxProton)) weight = 0;
528 if ((pdg == 2112) && (ke <
kmaxNeutron)) weight = 0;
532 << theTrack->GetTrackID() <<
" Type " 533 << theTrack->GetDefinition()->GetParticleName()
534 <<
" Kinetic Energy " << ke <<
" MeV";
543 G4Material* mat = aStep->GetPreStepPoint()->GetMaterial();
547 double wt2 = theTrack->GetWeight();
550 <<
" weight " << weight0 <<
" " << weight <<
" " << wt1
553 double edep = weight*wt1*destep;
554 if (wt2 > 0.0) { edep *= wt2; }
561 const G4VTouchable* touch = preStepPoint->GetTouchable();
562 G4ThreeVector hitPoint = preStepPoint->GetPosition();
564 int depth = (touch->GetReplicaNumber(0))%10 + 1;
565 int lay = (touch->GetReplicaNumber(0)/10)%100 + 1;
566 int det = (touch->GetReplicaNumber(1))/1000;
573 edm::LogInfo(
"HcalSim") <<
"HCalSD: updates numbering scheme for " << GetName();
587 edm::LogError(
"HcalSim") <<
"HCalSD : Cannot find HcalDDDSimConstant";
588 throw cms::Exception(
"Unknown",
"HCalSD") <<
"Cannot find HcalDDDSimConstant" <<
"\n";
598 for (
unsigned int ig=0; ig<
gpar.size(); ig++)
599 edm::LogInfo(
"HcalSim") <<
"HCalSD: gpar[" << ig <<
"] = " 600 <<
gpar[ig]/cm <<
" cm";
604 G4ParticleTable * theParticleTable = G4ParticleTable::GetParticleTable();
606 mumPDG = theParticleTable->FindParticle(particleName=
"mu-")->GetPDGEncoding();
607 mupPDG = theParticleTable->FindParticle(particleName=
"mu+")->GetPDGEncoding();
609 LogDebug(
"HcalSim") <<
"HCalSD: Particle code for mu- = " <<
mumPDG 610 <<
" for mu+ = " <<
mupPDG;
622 switch (theId.subdetId()) {
656 LogDebug(
"HcalSim") <<
"HCalSD:getDDDArray called for " <<
str;
663 const std::vector<double> & fvec = value.
doubles();
664 int nval = fvec.size();
666 edm::LogError(
"HcalSim") <<
"HCalSD : # of " << str <<
" bins " << nval
667 <<
" < 2 ==> illegal";
668 throw cms::Exception(
"Unknown",
"HCalSD") <<
"nval < 2 for array " << str <<
"\n";
674 throw cms::Exception(
"Unknown",
"HCalSD") <<
"cannot get array " << str <<
"\n";
680 std::vector<G4String>
tmp;
686 for (
unsigned int i=0;
i<tmp.size(); ++
i) {
687 if (!strcmp(tmp[
i].c_str(), log.
name().
name().c_str())) {
692 if (ok) tmp.push_back(log.
name().
name());
699 const G4VTouchable* touch = aStep->GetPreStepPoint()->GetTouchable();
700 int levels = (touch->GetHistoryDepth()) + 1;
701 for (
unsigned int it=0; it <
hfNames.size(); ++it) {
703 G4LogicalVolume* lv = touch->GetVolume(levels-
hfLevels[it])->GetLogicalVolume();
704 if (lv ==
hfLV[it])
return true;
711 std::vector<G4String>::const_iterator it =
hfNames.begin();
712 for (; it !=
hfNames.end(); ++it)
if (name == *it)
return true;
717 std::vector<G4LogicalVolume*>::const_iterator ite =
fibreLV.begin();
718 for (; ite !=
fibreLV.end(); ++ite)
if (lv == *ite)
return true;
723 std::vector<G4String>::const_iterator it =
fibreNames.begin();
724 for (; it !=
fibreNames.end(); ++it)
if (name == *it)
return true;
729 std::vector<G4LogicalVolume*>::const_iterator ite =
pmtLV.begin();
730 for (; ite !=
pmtLV.end(); ++ite)
if (lv == *ite)
return true;
735 std::vector<G4LogicalVolume*>::const_iterator ite =
fibre1LV.begin();
736 for (; ite !=
fibre1LV.end(); ++ite)
if (lv == *ite)
return true;
741 std::vector<G4LogicalVolume*>::const_iterator ite =
fibre2LV.begin();
742 for (; ite !=
fibre2LV.end(); ++ite)
if (lv == *ite)
return true;
747 std::vector<G4Material*>::const_iterator ite =
materials.begin();
748 for (; ite !=
materials.end(); ++ite)
if (mat == *ite)
return true;
757 edm::LogInfo(
"HcalSim") <<
"HCalSD::isItinFidVolume:#PMT= " << npmt
758 <<
" for hit point " << hitPoint;
760 if (npmt <= 0) flag =
false;
763 edm::LogInfo(
"HcalSim") <<
"HCalSD::isItinFidVolume: point " << hitPoint
764 <<
" return flag " <<
flag;
784 G4int particleCode =
theTrack->GetDefinition()->GetPDGEncoding();
793 edm::LogInfo(
"HcalSim") <<
"HCalSD::getFromLibrary " <<hits.size()
794 <<
" hits for " << GetName() <<
" of " << primaryID
795 <<
" with " <<
theTrack->GetDefinition()->GetParticleName()
798 for (
unsigned int i=0;
i<hits.size(); ++
i) {
799 G4ThreeVector hitPoint = hits[
i].position;
801 int depth = hits[
i].depth;
802 double time = hits[
i].time;
803 unsigned int unitID =
setDetUnitId(det, hitPoint, depth);
824 theTrack->SetTrackStatus(fStopAndKill);
825 G4TrackVector tv = *(aStep->GetSecondary());
826 for (
unsigned int kk=0;
kk<tv.size(); ++
kk)
828 tv[
kk]->SetTrackStatus(fStopAndKill);
841 G4int particleCode =
theTrack->GetDefinition()->GetPDGEncoding();
851 edm::LogInfo(
"HcalSim") <<
"HCalSD::hitForFibre " << hits.size()
852 <<
" hits for " << GetName() <<
" of " << primaryID
853 <<
" with " <<
theTrack->GetDefinition()->GetParticleName()
855 <<
" GeV in detector type " << det;
857 if (hits.size() > 0) {
858 for (
unsigned int i=0;
i<hits.size(); ++
i) {
859 G4ThreeVector hitPoint = hits[
i].position;
861 int depth = hits[
i].depth;
862 double time = hits[
i].time;
863 unsigned int unitID =
setDetUnitId(det, hitPoint, depth);
886 int nHit =
static_cast<int>(hits.size());
894 edm::LogInfo(
"HcalSim") <<
"HCalSD::getFromParam " << nHit <<
" hits for " 895 << GetName() <<
" of " << primaryID <<
" with " 896 << aStep->GetTrack()->GetDefinition()->GetParticleName()
898 <<
" GeV in detector type " << det;
900 for (
int i = 0;
i<nHit; ++
i) {
901 G4ThreeVector hitPoint = hits[
i].position;
902 int depth = hits[
i].depth;
903 double time = hits[
i].time;
904 unsigned int unitID =
setDetUnitId(det, hitPoint, depth);
935 primaryID =
theTrack->GetParentID();
936 if (primaryID == 0) primaryID =
theTrack->GetTrackID();
945 double rr = (hitPoint.x()*hitPoint.x() + hitPoint.y()*hitPoint.y());
946 double phi = (rr == 0. ? 0. :atan2(hitPoint.y(),hitPoint.x()));
953 if (hitPoint.z() < 0) etaR =-etaR;
955 edm::LogInfo(
"HcalSim") <<
"HCalSD::Hit for Detector " << det <<
" etaR " 956 << etaR <<
" phi " << phi/deg <<
" depth " <<
depth;
958 double time = (aStep->GetPostStepPoint()->GetGlobalTime());
974 LogDebug(
"HcalSim") <<
"HCalSD::getHitPMT 1 hit for " << GetName()
975 <<
" of " << primaryID <<
" with " 976 <<
theTrack->GetDefinition()->GetParticleName()
978 <<
" GeV with velocity " << beta <<
" UnitID " 1001 primaryID =
theTrack->GetParentID();
1002 if (primaryID == 0) primaryID =
theTrack->GetTrackID();
1011 double rr = (hitPoint.x()*hitPoint.x() + hitPoint.y()*hitPoint.y());
1012 double phi = (rr == 0. ? 0. :atan2(hitPoint.y(),hitPoint.x()));
1019 if (hitPoint.z() < 0) etaR =-etaR;
1021 LogDebug(
"HcalSim") <<
"HCalSD::Hit for Detector " << det <<
" etaR " 1022 << etaR <<
" phi " << phi/deg <<
" depth " <<
depth;
1024 double time = (aStep->GetPostStepPoint()->GetGlobalTime());
1025 uint32_t unitID = 0;
1040 LogDebug(
"HcalSim") <<
"HCalSD::getHitFibreBundle 1 hit for " << GetName()
1041 <<
" of " << primaryID <<
" with " 1042 <<
theTrack->GetDefinition()->GetParticleName()
1044 <<
" GeV with velocity " << beta <<
" UnitID " 1059 if (primaryID == 0) {
1061 edm::LogInfo(
"HcalSim") <<
"HCalSD: Problem with primaryID **** set by " 1062 <<
"force to TkID **** " <<
theTrack->GetTrackID();
1064 primaryID =
theTrack->GetTrackID();
1075 std::ifstream infile;
1081 while (infile >> det >> zside >> etaR >> phi >> lay >> wt) {
1083 layerWeights.insert(std::pair<uint32_t,double>(
id,wt));
1086 edm::LogInfo(
"HcalSim") <<
"HCalSD::readWeightFromFile:Entry " << entry
1087 <<
" ID " << std::hex <<
id <<
std::dec <<
" (" 1088 << det <<
"/" << zside <<
"/1/" << etaR <<
"/" 1089 << phi <<
"/" << lay <<
") Weight " << wt;
1094 edm::LogInfo(
"HcalSim") <<
"HCalSD::readWeightFromFile: reads " << entry
1095 <<
" weights from " << fName;
1109 std::map<uint32_t,double>::const_iterator ite =
layerWeights.find(
id);
1112 edm::LogInfo(
"HcalSim") <<
"HCalSD::layerWeight: ID " << std::hex <<
id 1114 << tmp.
zside <<
"/1/" << tmp.
etaR <<
"/" 1115 << tmp.
phis <<
"/" << tmp.
lay <<
") Weight " <<wt;
1122 double time,
int id) {
1124 const G4VTouchable* touch = aStep->GetPreStepPoint()->GetTouchable();
1125 static const G4String modName[8] = {
"HEModule",
"HVQF" ,
"HBModule",
"MBAT",
1126 "MBBT" ,
"MBBTC",
"MBBT_R1P",
"MBBT_R1M"};
1127 G4ThreeVector
local;
1131 for (
int n=0;
n<touch->GetHistoryDepth(); ++
n) {
1132 G4String
name = touch->GetVolume(
n)->GetName();
1134 LogDebug(
"HcalSim") <<
"plotProfile Depth " <<
n <<
" Name " <<
name;
1136 for (
unsigned int ii=0;
ii<8; ++
ii) {
1137 if (name == modName[
ii]) {
1139 int dn = touch->GetHistoryDepth() -
n;
1140 local = touch->GetHistory()->GetTransform(dn).TransformPoint(global);
1141 if (ii == 0) {depth = local.z() - 4006.5; idx = 1;}
1142 else if (ii == 1) {depth = local.z() + 825.0; idx = 3;}
1143 else if (ii == 2) {depth = local.x() - 1775.; idx = 0;}
1144 else {depth = local.y() + 15.; idx = 2;}
1150 if (!found) depth =
std::abs(global.z()) - 11500;
1152 LogDebug(
"HcalSim") <<
"plotProfile Found " << found <<
" Global " << global
1153 <<
" Local " << local <<
" depth " << depth <<
" ID " 1154 <<
id <<
" EDEP " << edep <<
" Time " <<
time;
1159 int jd = 2*idx +
id - 7;
1160 if (jd >= 0 && jd < 4) {
1162 if (
hit_[jd] != 0)
hit_[jd]->Fill(edep);
1163 if (
time_[jd] != 0)
time_[jd]->Fill(time,edep);
1164 if (
dist_[jd] != 0)
dist_[jd]->Fill(depth,edep);
1178 if (
id.subdet == 4) {
1179 int ieta = (
id.zside == 0) ? -
id.etaR :
id.etaR;
1181 if (
id.
depth <= 2) {
1182 if (G4UniformRand() > 0.5)
id.depth += 2;
1185 }
else if ((
id.subdet == 1 ||
id.subdet ==2) &&
testNumber) {
1186 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)
void addFilter(const DDFilter &, DDLogOp op=DDLogOp::AND)
virtual void update(const BeginOfJob *)
This routine will be called when the appropriate signal arrives.
bool isItStraightBundle(G4LogicalVolume *)
double dose(unsigned int layer, double radius)
virtual bool ProcessHits(G4Step *, G4TouchableHistory *)
std::vector< double > gpar
bool isItinFidVolume(G4ThreeVector &)
int zside() const
get the z-side of the cell (1/-1)
void initRun(G4ParticleTable *, HcalDDDSimConstants *)
std::vector< Hit > getHits(G4Step *aStep, bool &ok, double weight, bool onlyLong=false)
virtual uint32_t getUnitID(const HcalNumberingFromDDD::HcalID &id)
HFShowerFibreBundle * showerBundle
std::vector< G4LogicalVolume * > fibre1LV
std::vector< G4LogicalVolume * > fibreLV
std::vector< double > getDDDArray(const std::string &, const DDsvalues_type &)
int getMaxDepth(const int type) const
double getHits(G4Step *aStep, bool type)
virtual uint32_t setDetUnitId(G4Step *step)
int setTrackID(G4Step *step)
void getFromLibrary(G4Step *step, double weight)
static const unsigned int numberOfZLayers
void modifyDepth(HcalNumberingFromDDD::HcalID &id)
void setNumberingScheme(HcalNumberingScheme *)
type of data representation of DDCompactView
bool DDfetch(const DDsvalues_type *, DDValue &)
helper for retrieving DDValues from DDsvalues_type *.
double degradation(double mrad)
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e g
static int PMTNumber(const G4ThreeVector &pe_effect)
static TrackerG4SimHitNumberingScheme & numberingScheme(const DDCompactView &cpv, const GeometricDet &det)
void initRun(G4ParticleTable *, HcalDDDSimConstants *)
double int_lumi(double intlumi)
bool isItConicalBundle(G4LogicalVolume *)
static uint32_t packHcalIndex(int det, int z, int depth, int eta, int phi, int lay)
void resetForNewPrimary(const G4ThreeVector &, double)
std::vector< G4LogicalVolume * > pmtLV
std::vector< G4LogicalVolume * > hfLV
bool isItScintillator(G4Material *)
bool next()
set current node to the next node in the filtered tree
virtual double getEnergyDeposit(G4Step *)
void plotHF(G4ThreeVector &pos, bool emType)
std::vector< std::pair< unsigned int, DDValue > > DDsvalues_type
std::maps an index to a DDValue. The index corresponds to the index assigned to the name of the std::...
std::vector< Hit > getHits(G4Step *aStep, double weight)
Abs< T >::type abs(const T &t)
static void unpackHcalIndex(const uint32_t &idx, int &det, int &z, int &depth, int &eta, int &phi, int &lay)
A DDLogicalPart aggregates information concerning material, solid and sensitveness ...
HcalNumberingScheme * numberingScheme
void getHitPMT(G4Step *step)
T * make(const Args &...args) const
make new ROOT object
HFDarkening * m_HFDarkening
double getAttenuation(G4Step *aStep, double birk1, double birk2, double birk3)
std::vector< int > hfLevels
virtual std::vector< std::string > getNames()
void plotProfile(G4Step *step, const G4ThreeVector &pos, double edep, double time, int id)
void initRun(G4ParticleTable *, HcalDDDSimConstants *)
HEDarkening * m_HEDarkening
int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
void NaNTrap(G4Step *step)
virtual G4bool getStepInfo(G4Step *aStep)
bool isItPMT(G4LogicalVolume *)
int ietaAbs() const
get the absolute value of the cell ieta
void setID(uint32_t unitID, double timeSlice, int trackID, uint16_t depth=0)
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
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.