21 #include "G4LogicalVolumeStore.hh"
22 #include "G4LogicalVolume.hh"
25 #include "G4ParticleTable.hh"
26 #include "G4VProcess.hh"
38 CaloSD(name, cpv, clg, p, manager,
39 p.getParameter<edm::
ParameterSet>(
"HCalSD").getParameter<int>(
"TimeSliceUnit"),
40 p.getParameter<edm::
ParameterSet>(
"HCalSD").getParameter<bool>(
"IgnoreTrackID")),
42 showerParam(0), showerPMT(0), showerBundle(0), m_HEDarkening(0),
67 bool ageingFlagHE= m_HC.
getParameter<
bool>(
"HEDarkening");
68 bool ageingFlagHF= m_HC.
getParameter<
bool>(
"HFDarkening");
74 applyFidCut = m_HF.getParameter<
bool>(
"ApplyFiducialCut");
77 LogDebug(
"HcalSim") <<
"***************************************************"
81 <<
"* Constructing a HCalSD with name " << name <<
"\n"
84 <<
"***************************************************";
86 edm::LogInfo(
"HcalSim") <<
"HCalSD:: Use of HF code is set to " << useHF
87 <<
"\nUse of shower parametrization set to "
88 << useParam <<
"\nUse of shower library is set to "
89 << useShowerLibrary <<
"\nUse PMT Hit is set to "
90 << usePMTHit <<
" with beta Threshold "<< betaThr
91 <<
"\nUSe of FibreBundle Hit set to "<<useFibreBundle
92 <<
"\n Use of Birks law is set to "
93 << useBirk <<
" with three constants kB = "
94 << birk1 <<
", C1 = " << birk2 <<
", C2 = " <<
birk3;
98 <<
" ions below " <<
kmaxIon <<
" MeV\n"
99 <<
" Threshold for storing hits in HB: "
100 << eminHitHB <<
" HE: " << eminHitHE <<
" HO: "
101 << eminHitHO <<
" HF: " << eminHitHF <<
"\n"
102 <<
"Delivered luminosity for Darkening "
103 << deliveredLumi <<
" Flag (HE) " << ageingFlagHE
104 <<
" Flag (HF) " << ageingFlagHF <<
"\n"
109 if (testNumber || forTBH2)
115 const G4LogicalVolumeStore * lvs = G4LogicalVolumeStore::GetInstance();
116 std::vector<G4LogicalVolume *>::const_iterator lvcite;
128 attribute =
"Volume";
131 DDValue ddv0(attribute, value, 0);
139 edm::LogInfo(
"HcalSim") <<
"HCalSD: Names to be tested for " << attribute
140 <<
" = " << value <<
" has " <<
hfNames.size()
142 for (
unsigned int i=0;
i <
hfNames.size(); ++
i) {
145 for(lvcite=lvs->begin(); lvcite!=lvs->end(); lvcite++)
146 if((*lvcite)->GetName()==namv) {
151 int level =
static_cast<int>(temp[
i]);
154 <<
" LV " <<
hfLV[
i] <<
" at level "
161 DDValue ddv1(attribute,value,0);
166 edm::LogInfo(
"HcalSim") <<
"HCalSD: Names to be tested for " << attribute
167 <<
" = " << value <<
":";
171 for (lvcite = lvs->begin(); lvcite != lvs->end(); ++lvcite) {
172 if ((*lvcite)->GetName() == namv) {
185 DDValue ddv3(attribute,value,0);
189 std::vector<G4String> pmtNames =
getNames(fv3);
190 edm::LogInfo(
"HcalSim") <<
"HCalSD: Names to be tested for " << attribute
191 <<
" = " << value <<
" have " << pmtNames.size()
193 for (
unsigned int i=0;
i<pmtNames.size(); ++
i) {
194 G4String namv = pmtNames[
i];
196 for (lvcite = lvs->begin(); lvcite != lvs->end(); ++lvcite)
197 if ((*lvcite)->GetName() == namv) {
202 edm::LogInfo(
"HcalSim") <<
"HCalSD: (" <<
i <<
") " << pmtNames[
i]
208 value =
"HFFibreBundleStraight";
210 DDValue ddv4(attribute,value,0);
215 edm::LogInfo(
"HcalSim") <<
"HCalSD: Names to be tested for " << attribute
216 <<
" = " << value <<
" have " << fibreNames.size()
218 for (
unsigned int i=0;
i<fibreNames.size(); ++
i) {
219 G4String namv = fibreNames[
i];
221 for (lvcite = lvs->begin(); lvcite != lvs->end(); lvcite++)
222 if ((*lvcite)->GetName() == namv) {
227 edm::LogInfo(
"HcalSim") <<
"HCalSD: (" <<
i <<
") " << fibreNames[
i]
232 value =
"HFFibreBundleConical";
234 DDValue ddv5(attribute,value,0);
239 edm::LogInfo(
"HcalSim") <<
"HCalSD: Names to be tested for " << attribute
240 <<
" = " << value <<
" have " << fibreNames.size()
242 for (
unsigned int i=0;
i<fibreNames.size(); ++
i) {
243 G4String namv = fibreNames[
i];
245 for (lvcite = lvs->begin(); lvcite != lvs->end(); ++lvcite)
246 if ((*lvcite)->GetName() == namv) {
251 edm::LogInfo(
"HcalSim") <<
"HCalSD: (" <<
i <<
") " << fibreNames[
i]
257 attribute =
"ReadOutName";
260 DDValue ddv6(attribute,value,0);
268 edm::LogInfo(
"HFShower") <<
"HFShowerParam: " << gpar.size()
270 for (
unsigned int ig=0; ig<gpar.size(); ig++)
271 edm::LogInfo(
"HFShower") <<
"HFShowerParam: gpar[" << ig <<
"] = "
272 << gpar[ig]/cm <<
" cm";
275 <<
" view for " << attribute <<
" matching "
281 attribute =
"ReadOutName";
283 DDValue ddv2(attribute,name,0);
292 edm::LogInfo(
"HcalSim") <<
"HCalSD: " << layer0wt.size() <<
" Layer0Wt";
293 for (
unsigned int it=0; it<layer0wt.size(); ++it)
294 edm::LogInfo(
"HcalSim") <<
"HCalSD: [" << it <<
"] " << layer0wt[it];
296 const G4MaterialTable * matTab = G4Material::GetMaterialTable();
297 std::vector<G4Material*>::const_iterator matite;
313 for (matite = matTab->begin(); matite != matTab->end(); ++matite) {
314 if ((*matite)->GetName() == namx) {
325 edm::LogInfo(
"HcalSim") <<
"HCalSD: Material names for " << attribute
326 <<
" = " << name <<
":";
345 "HF Absorber Long",
"HF Absorber Short",
346 "HF PMT Long",
"HF PMT Short"};
348 char name[20],
title[60];
349 for (
int i=0;
i<9; ++
i) {
350 sprintf (title,
"Hit energy in %s", labels[
i].c_str());
351 sprintf (name,
"HCalSDHit%d",
i);
353 sprintf (title,
"Energy (MeV)");
354 hit_[
i]->GetXaxis()->SetTitle(title);
355 hit_[
i]->GetYaxis()->SetTitle(
"Hits");
356 sprintf (title,
"Time of the hit in %s", labels[
i].c_str());
357 sprintf (name,
"HCalSDTime%d",
i);
359 sprintf (title,
"Time (ns)");
360 time_[
i]->GetXaxis()->SetTitle(title);
361 time_[
i]->GetYaxis()->SetTitle(
"Hits");
362 sprintf (title,
"Longitudinal profile in %s", labels[
i].c_str());
363 sprintf (name,
"HCalSDDist%d",
i);
365 sprintf (title,
"Distance (mm)");
366 dist_[
i]->GetXaxis()->SetTitle(title);
367 dist_[
i]->GetYaxis()->SetTitle(
"Hits");
369 if (useHF && (!useParam)) {
370 hzvem = hcDir.
make<TH1F>(
"hzvem",
"Longitudinal Profile (EM Part)",330,0.0,1650.0);
371 hzvem->GetXaxis()->SetTitle(
"Longitudinal Profile (EM Part)");
372 hzvhad = hcDir.
make<TH1F>(
"hzvhad",
"Longitudinal Profile (Had Part)",330,0.0,1650.0);
373 hzvhad->GetXaxis()->SetTitle(
"Longitudinal Profile (Hadronic Part)");
399 G4LogicalVolume* lv =
400 aStep->GetPreStepPoint()->GetPhysicalVolume()->GetLogicalVolume();
401 G4String nameVolume = lv->GetName();
403 G4int parCode = aStep->GetTrack()->GetDefinition()->GetPDGEncoding();
406 G4ThreeVector hitPoint = aStep->GetPreStepPoint()->GetPosition();
407 double r = hitPoint.perp()/CLHEP::cm;
408 double z =
std::abs(hitPoint.z())/CLHEP::cm;
409 float dose_acquired = 0.;
410 if (z>=1100 && z <= 1300) {
411 int hfZLayer = (int)((z - 1100)/20);
412 if (hfZLayer > 9) hfZLayer = 9;
414 for (
int i = hfZLayer;
i <= 9; ++
i) {
420 LogDebug(
"HcalSim") <<
"HCalSD: HFLumiDarkening at r = " << r
421 <<
", z = " << z <<
" Dose " << dose_acquired
428 <<
" hits from parametrization in " << nameVolume
429 <<
" for Track " << aStep->GetTrack()->GetTrackID()
430 <<
" (" << aStep->GetTrack()->GetDefinition()->GetParticleName()
436 <<
" hits afterParamS*";
439 bool notaMuon =
true;
440 if (parCode ==
mupPDG || parCode ==
mumPDG ) notaMuon =
false;
443 LogDebug(
"HcalSim") <<
"HCalSD: Starts shower library from "
444 << nameVolume <<
" for Track "
445 << aStep->GetTrack()->GetTrackID() <<
" ("
446 << aStep->GetTrack()->GetDefinition()->GetParticleName() <<
")";
451 LogDebug(
"HcalSim") <<
"HCalSD: Hit at Fibre in " << nameVolume
453 << aStep->GetTrack()->GetTrackID() <<
" ("
454 << aStep->GetTrack()->GetDefinition()->GetParticleName() <<
")";
461 LogDebug(
"HcalSim") <<
"HCalSD: Hit from PMT parametrization from "
462 << nameVolume <<
" for Track "
463 << aStep->GetTrack()->GetTrackID() <<
" ("
464 << aStep->GetTrack()->GetDefinition()->GetParticleName() <<
")";
469 LogDebug(
"HcalSim") <<
"HCalSD: Hit from FibreBundle from "
470 << nameVolume <<
" for Track "
471 << aStep->GetTrack()->GetTrackID() <<
" ("
472 << aStep->GetTrack()->GetDefinition()->GetParticleName() <<
")";
478 LogDebug(
"HcalSim") <<
"HCalSD: Hit from standard path from "
479 << nameVolume <<
" for Track "
480 << aStep->GetTrack()->GetTrackID() <<
" ("
481 << aStep->GetTrack()->GetDefinition()->GetParticleName() <<
")";
486 plotProfile(aStep, aStep->GetPreStepPoint()->GetPosition(),
497 double destep = aStep->GetTotalEnergyDeposit();
499 G4Track*
theTrack = aStep->GetTrack();
501 const G4VTouchable* touch = aStep->GetPreStepPoint()->GetTouchable();
502 int depth = (touch->GetReplicaNumber(0))%10;
503 int det = ((touch->GetReplicaNumber(1))/1000)-3;
504 if (depth==0 && (det==0 || det==1)) weight =
layer0wt[det];
506 int lay = (touch->GetReplicaNumber(0)/10)%100 + 1;
507 G4ThreeVector hitPoint = aStep->GetPreStepPoint()->GetPosition();
512 int lay = (touch->GetReplicaNumber(0)/10)%100 + 1;
516 int det,
z, depth,
eta,
phi, lay;
522 edm::LogInfo(
"HcalSimDark") <<
"HCalSD:HE_Darkening >>> ieta: "<< ieta
523 <<
" lay: " << lay-2;
529 <<
" coefficient = " << dweight;
536 int pdg = theTrack->GetDefinition()->GetPDGEncoding();
538 double ke = theTrack->GetKineticEnergy()/MeV;
539 if ( pdg/1000000000 == 1 && (pdg/10000)%100 > 0 &&
540 (pdg/10)%100 > 0 && ke <
kmaxIon ) weight = 0;
541 if ((pdg == 2212) && (ke <
kmaxProton)) weight = 0;
542 if ((pdg == 2112) && (ke <
kmaxNeutron)) weight = 0;
546 << theTrack->GetTrackID() <<
" Type "
547 << theTrack->GetDefinition()->GetParticleName()
548 <<
" Kinetic Energy " << ke <<
" MeV";
557 G4Material* mat = aStep->GetPreStepPoint()->GetMaterial();
561 double wt2 = theTrack->GetWeight();
577 edm::LogInfo(
"HcalSim") <<
"HCalSD: Detector " << det+3 <<
" Depth " << depth
578 <<
" weight " << weight0 <<
" " << weight <<
" " << wt1
581 double edep = weight*wt1*destep;
582 if(wt2 > 0.0) { edep *= wt2; }
589 const G4VTouchable* touch = preStepPoint->GetTouchable();
590 G4ThreeVector hitPoint = preStepPoint->GetPosition();
592 int depth = (touch->GetReplicaNumber(0))%10 + 1;
593 int lay = (touch->GetReplicaNumber(0)/10)%100 + 1;
594 int det = (touch->GetReplicaNumber(1))/1000;
601 edm::LogInfo(
"HcalSim") <<
"HCalSD: updates numbering scheme for " << GetName();
608 G4ParticleTable * theParticleTable = G4ParticleTable::GetParticleTable();
609 G4String particleName;
610 mumPDG = theParticleTable->FindParticle(particleName=
"mu-")->GetPDGEncoding();
611 mupPDG = theParticleTable->FindParticle(particleName=
"mu+")->GetPDGEncoding();
613 LogDebug(
"HcalSim") <<
"HCalSD: Particle code for mu- = " <<
mumPDG
614 <<
" for mu+ = " <<
mupPDG;
624 switch (theId.subdetId()) {
654 LogDebug(
"HcalSim") <<
"HCalSD:getDDDArray called for " << str;
661 const std::vector<double> & fvec = value.
doubles();
662 int nval = fvec.size();
664 edm::LogError(
"HcalSim") <<
"HCalSD : # of " << str <<
" bins " << nval
665 <<
" < 2 ==> illegal";
666 throw cms::Exception(
"Unknown",
"HCalSD") <<
"nval < 2 for array " << str <<
"\n";
671 edm::LogError(
"HcalSim") <<
"HCalSD : cannot get array " << str;
672 throw cms::Exception(
"Unknown",
"HCalSD") <<
"cannot get array " << str <<
"\n";
678 std::vector<G4String>
tmp;
684 for (
unsigned int i=0;
i<tmp.size(); ++
i) {
685 if (!strcmp(tmp[
i].c_str(), log.
name().
name().c_str())) {
690 if (ok) tmp.push_back(log.
name().
name());
697 const G4VTouchable* touch = aStep->GetPreStepPoint()->GetTouchable();
698 int levels = (touch->GetHistoryDepth()) + 1;
699 for (
unsigned int it=0; it <
hfNames.size(); ++it) {
701 G4LogicalVolume* lv = touch->GetVolume(levels-
hfLevels[it])->GetLogicalVolume();
702 if (lv ==
hfLV[it])
return true;
709 std::vector<G4String>::const_iterator it =
hfNames.begin();
710 for (; it !=
hfNames.end(); ++it)
if (name == *it)
return true;
715 std::vector<G4LogicalVolume*>::const_iterator ite =
fibreLV.begin();
716 for (; ite !=
fibreLV.end(); ++ite)
if (lv == *ite)
return true;
721 std::vector<G4String>::const_iterator it =
fibreNames.begin();
722 for (; it !=
fibreNames.end(); ++it)
if (name == *it)
return true;
727 std::vector<G4LogicalVolume*>::const_iterator ite =
pmtLV.begin();
728 for (; ite !=
pmtLV.end(); ++ite)
if (lv == *ite)
return true;
733 std::vector<G4LogicalVolume*>::const_iterator ite =
fibre1LV.begin();
734 for (; ite !=
fibre1LV.end(); ++ite)
if (lv == *ite)
return true;
739 std::vector<G4LogicalVolume*>::const_iterator ite =
fibre2LV.begin();
740 for (; ite !=
fibre2LV.end(); ++ite)
if (lv == *ite)
return true;
745 std::vector<G4Material*>::const_iterator ite =
materials.begin();
746 for (; ite !=
materials.end(); ++ite)
if (mat == *ite)
return true;
755 edm::LogInfo(
"HcalSim") <<
"HCalSD::isItinFidVolume:#PMT= " << npmt
756 <<
" for hit point " << hitPoint;
758 if (npmt <= 0) flag =
false;
761 edm::LogInfo(
"HcalSim") <<
"HCalSD::isItinFidVolume: point " << hitPoint
762 <<
" return flag " <<
flag;
782 G4int particleCode =
theTrack->GetDefinition()->GetPDGEncoding();
791 edm::LogInfo(
"HcalSim") <<
"HCalSD::getFromLibrary " <<hits.size()
792 <<
" hits for " << GetName() <<
" of " << primaryID
793 <<
" with " <<
theTrack->GetDefinition()->GetParticleName()
794 <<
" of " <<
preStepPoint->GetKineticEnergy()/GeV <<
" GeV";
796 for (
unsigned int i=0;
i<hits.size(); ++
i) {
797 G4ThreeVector hitPoint = hits[
i].position;
799 int depth = hits[
i].depth;
800 double time = hits[
i].time;
801 unsigned int unitID =
setDetUnitId(det, hitPoint, depth);
804 plotProfile(aStep, hitPoint, 1.0*GeV, time, depth);
822 theTrack->SetTrackStatus(fStopAndKill);
823 G4TrackVector tv = *(aStep->GetSecondary());
824 for (
unsigned int kk=0; kk<tv.size(); ++kk)
826 tv[kk]->SetTrackStatus(fStopAndKill);
839 G4int particleCode =
theTrack->GetDefinition()->GetPDGEncoding();
849 edm::LogInfo(
"HcalSim") <<
"HCalSD::hitForFibre " << hits.size()
850 <<
" hits for " << GetName() <<
" of " << primaryID
851 <<
" with " <<
theTrack->GetDefinition()->GetParticleName()
853 <<
" GeV in detector type " << det;
855 if (hits.size() > 0) {
856 for (
unsigned int i=0;
i<hits.size(); ++
i) {
857 G4ThreeVector hitPoint = hits[
i].position;
859 int depth = hits[
i].depth;
860 double time = hits[
i].time;
861 unsigned int unitID =
setDetUnitId(det, hitPoint, depth);
884 int nHit =
static_cast<int>(hits.size());
892 edm::LogInfo(
"HcalSim") <<
"HCalSD::getFromParam " << nHit <<
" hits for "
893 << GetName() <<
" of " << primaryID <<
" with "
894 << aStep->GetTrack()->GetDefinition()->GetParticleName()
896 <<
" GeV in detector type " << det;
898 for (
int i = 0;
i<nHit; ++
i) {
899 G4ThreeVector hitPoint = hits[
i].position;
900 int depth = hits[
i].depth;
901 double time = hits[
i].time;
902 unsigned int unitID =
setDetUnitId(det, hitPoint, depth);
933 primaryID =
theTrack->GetParentID();
934 if (primaryID == 0) primaryID =
theTrack->GetTrackID();
943 double rr = (hitPoint.x()*hitPoint.x() + hitPoint.y()*hitPoint.y());
944 double phi = (rr == 0. ? 0. :atan2(hitPoint.y(),hitPoint.x()));
951 if (hitPoint.z() < 0) etaR =-etaR;
953 edm::LogInfo(
"HcalSim") <<
"HCalSD::Hit for Detector " << det <<
" etaR "
954 << etaR <<
" phi " << phi/deg <<
" depth " <<depth;
956 double time = (aStep->GetPostStepPoint()->GetGlobalTime());
968 plotProfile(aStep, hitPoint, edep*GeV, time, depth);
972 LogDebug(
"HcalSim") <<
"HCalSD::getHitPMT 1 hit for " << GetName()
973 <<
" of " << primaryID <<
" with "
974 <<
theTrack->GetDefinition()->GetParticleName()
976 <<
" GeV with velocity " << beta <<
" UnitID "
977 << std::hex << unitID << std::dec;
999 primaryID =
theTrack->GetParentID();
1000 if (primaryID == 0) primaryID =
theTrack->GetTrackID();
1009 double rr = (hitPoint.x()*hitPoint.x() + hitPoint.y()*hitPoint.y());
1010 double phi = (rr == 0. ? 0. :atan2(hitPoint.y(),hitPoint.x()));
1017 if (hitPoint.z() < 0) etaR =-etaR;
1019 LogDebug(
"HcalSim") <<
"HCalSD::Hit for Detector " << det <<
" etaR "
1020 << etaR <<
" phi " << phi/deg <<
" depth " <<depth;
1022 double time = (aStep->GetPostStepPoint()->GetGlobalTime());
1023 uint32_t unitID = 0;
1034 plotProfile(aStep, hitPoint, edep*GeV, time, depth);
1038 LogDebug(
"HcalSim") <<
"HCalSD::getHitFibreBundle 1 hit for " << GetName()
1039 <<
" of " << primaryID <<
" with "
1040 <<
theTrack->GetDefinition()->GetParticleName()
1042 <<
" GeV with velocity " << beta <<
" UnitID "
1043 << std::hex << unitID << std::dec;
1057 if (primaryID == 0) {
1059 edm::LogInfo(
"HcalSim") <<
"HCalSD: Problem with primaryID **** set by "
1060 <<
"force to TkID **** " <<
theTrack->GetTrackID();
1062 primaryID =
theTrack->GetTrackID();
1077 int det, zside, etaR,
phi, lay;
1079 while (infile >> det >> zside >> etaR >> phi >> lay >> wt) {
1081 layerWeights.insert(std::pair<uint32_t,double>(
id,wt));
1084 edm::LogInfo(
"HcalSim") <<
"HCalSD::readWeightFromFile:Entry " << entry
1085 <<
" ID " << std::hex <<
id << std::dec <<
" ("
1086 << det <<
"/" << zside <<
"/1/" << etaR <<
"/"
1087 << phi <<
"/" << lay <<
") Weight " << wt;
1092 edm::LogInfo(
"HcalSim") <<
"HCalSD::readWeightFromFile: reads " << entry
1093 <<
" weights from " << fName;
1106 std::map<uint32_t,double>::const_iterator ite =
layerWeights.find(
id);
1109 edm::LogInfo(
"HcalSim") <<
"HCalSD::layerWeight: ID " << std::hex <<
id
1110 << std::dec <<
" (" << tmp.
subdet <<
"/"
1111 << tmp.
zside <<
"/1/" << tmp.
etaR <<
"/"
1112 << tmp.
phis <<
"/" << tmp.
lay <<
") Weight " <<wt;
1119 double time,
int id) {
1121 const G4VTouchable* touch = aStep->GetPreStepPoint()->GetTouchable();
1122 static G4String modName[8] = {
"HEModule",
"HVQF" ,
"HBModule",
"MBAT",
1123 "MBBT" ,
"MBBTC",
"MBBT_R1P",
"MBBT_R1M"};
1124 G4ThreeVector local;
1128 for (
int n=0;
n<touch->GetHistoryDepth(); ++
n) {
1129 G4String
name = touch->GetVolume(
n)->GetName();
1131 LogDebug(
"HcalSim") <<
"plotProfile Depth " <<
n <<
" Name " <<
name;
1133 for (
unsigned int ii=0;
ii<8; ++
ii) {
1134 if (name == modName[
ii]) {
1136 int dn = touch->GetHistoryDepth() -
n;
1137 local = touch->GetHistory()->GetTransform(dn).TransformPoint(global);
1138 if (ii == 0) {depth = local.z() - 4006.5; idx = 1;}
1139 else if (ii == 1) {depth = local.z() + 825.0; idx = 3;}
1140 else if (ii == 2) {depth = local.x() - 1775.; idx = 0;}
1141 else {depth = local.y() + 15.; idx = 2;}
1147 if (!found) depth =
std::abs(global.z()) - 11500;
1149 LogDebug(
"HcalSim") <<
"plotProfile Found " << found <<
" Global " << global
1150 <<
" Local " << local <<
" depth " << depth <<
" ID "
1151 <<
id <<
" EDEP " << edep <<
" Time " <<
time;
1156 int jd = 2*idx +
id - 7;
1157 if (jd >= 0 && jd < 4) {
1159 if (
hit_[jd] != 0)
hit_[jd]->Fill(edep);
1160 if (
time_[jd] != 0)
time_[jd]->Fill(time,edep);
1161 if (
dist_[jd] != 0)
dist_[jd]->Fill(depth,edep);
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
virtual uint32_t getUnitID(const HcalNumberingFromDDD::HcalID id)
void addFilter(const DDFilter &, log_op op=AND)
void updateHit(CaloG4Hit *)
void hitForFibre(G4Step *step, double weight)
void getFromParam(G4Step *step, double weight)
static int PMTNumber(G4ThreeVector pe_effect)
void initRun(G4ParticleTable *)
bool isItStraightBundle(G4LogicalVolume *)
virtual bool ProcessHits(G4Step *, G4TouchableHistory *)
std::vector< double > gpar
bool isItinFidVolume(G4ThreeVector &)
std::vector< Hit > getHits(G4Step *aStep, bool &ok, double weight, bool onlyLong=false)
HFShowerFibreBundle * showerBundle
std::vector< G4LogicalVolume * > fibre1LV
std::vector< G4LogicalVolume * > fibreLV
std::vector< double > getDDDArray(const std::string &, const DDsvalues_type &)
double getHits(G4Step *aStep, bool type)
virtual uint32_t setDetUnitId(G4Step *step)
int setTrackID(G4Step *step)
void getFromLibrary(G4Step *step, double weight)
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 TrackerG4SimHitNumberingScheme & numberingScheme(const DDCompactView &cpv, const GeometricDet &det)
bool isItConicalBundle(G4LogicalVolume *)
static uint32_t packHcalIndex(int det, int z, int depth, int eta, int phi, int lay)
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 *)
std::pair< std::string, MonitorElement * > entry
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)
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)
HFDarkening * m_HFDarkening
double getAttenuation(G4Step *aStep, double birk1, double birk2, double birk3)
std::vector< int > hfLevels
virtual std::vector< std::string > getNames()
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
static const G4LogicalVolume * GetVolume(const std::string &name)
std::vector< Hit > getHits(G4Step *aStep, double weight)
void readWeightFromFile(std::string)
TFileDirectory mkdir(const std::string &dir, const std::string &descr="")
create a new subdirectory
tuple idx
DEBUGGING if hasattr(process,"trackMonIterativeTracking2012"): print "trackMonIterativeTracking2012 D...
void plotProfile(G4Step *step, G4ThreeVector pos, double edep, double time, int id)
void getHitFibreBundle(G4Step *step, bool type)
DDsvalues_type mergedSpecifics() const
double getHits(G4Step *aStep)
void initRun(G4ParticleTable *theParticleTable)
HcalNumberingFromDDD * numberingFromDDD
std::vector< std::vector< double > > tmp
float dose(int layer, float radius)
double getResponseWt(G4Track *)
void initRun(G4ParticleTable *)
std::vector< G4String > fibreNames
bool firstChild()
set the current node to the first child ...
std::vector< G4Material * > materials
virtual bool filterHit(CaloG4Hit *, double)
T * make() const
make new ROOT object
void setCriteria(const DDValue &nameVal, comp_op, log_op l=AND, bool asString=true, bool merged=true)
double layerWeight(int, G4ThreeVector, int, int)
std::vector< G4String > hfNames
void resetForNewPrimary(G4ThreeVector, double)
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)
HCalSD(G4String, const DDCompactView &, SensitiveDetectorCatalog &, edm::ParameterSet const &, const SimTrackManager *)
HFShowerLibrary * showerLibrary
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.
CaloG4Hit * createNewHit()
std::vector< G4String > matNames
bool isItFibre(G4LogicalVolume *)
double getEnergyDeposit() const
The DDGenericFilter is a runtime-parametrized Filter looking on DDSpecifcs.