|
|
#include <HCalSD.h>
|
| HCalSD (const std::string &, const HcalDDDSimConstants *, const HcalDDDRecConstants *, const HcalSimulationConstants *, const HBHEDarkening *, const HBHEDarkening *, const SensitiveDetectorCatalog &, edm::ParameterSet const &, const SimTrackManager *) |
|
uint32_t | setDetUnitId (const G4Step *step) override |
|
void | setNumberingScheme (HcalNumberingScheme *) |
|
| ~HCalSD () override=default |
|
| CaloSD (const std::string &aSDname, const SensitiveDetectorCatalog &clg, edm::ParameterSet const &p, const SimTrackManager *, float timeSlice=1., bool ignoreTkID=false) |
|
void | clear () override |
|
void | clearHits () override |
|
void | DrawAll () override |
|
void | EndOfEvent (G4HCofThisEvent *eventHC) override |
|
void | fillHits (edm::PCaloHitContainer &, const std::string &) override |
|
void | Initialize (G4HCofThisEvent *HCE) override |
|
bool | isItFineCalo (const G4VTouchable *touch) |
|
void | PrintAll () override |
|
bool | ProcessHits (G4GFlashSpot *aSpot, G4TouchableHistory *) override |
|
G4bool | ProcessHits (G4Step *step, G4TouchableHistory *) override |
|
void | reset () override |
|
| ~CaloSD () override |
|
| SensitiveCaloDetector (const std::string &iname, const SensitiveDetectorCatalog &clg) |
|
void | EndOfEvent (G4HCofThisEvent *eventHC) override |
|
const std::vector< std::string > & | getNames () const |
|
void | Initialize (G4HCofThisEvent *eventHC) override |
|
bool | isCaloSD () const |
|
| SensitiveDetector (const std::string &iname, const SensitiveDetectorCatalog &, bool calo) |
|
| ~SensitiveDetector () override |
|
| Observer () |
|
void | slotForUpdate (const BeginOfRun * iT) |
|
virtual | ~Observer () |
|
| Observer () |
|
void | slotForUpdate (const BeginOfEvent * iT) |
|
virtual | ~Observer () |
|
| Observer () |
|
void | slotForUpdate (const BeginOfTrack * iT) |
|
virtual | ~Observer () |
|
| Observer () |
|
void | slotForUpdate (const EndOfTrack * iT) |
|
virtual | ~Observer () |
|
| Observer () |
|
void | slotForUpdate (const EndOfEvent * iT) |
|
virtual | ~Observer () |
|
| Observer () |
|
void | slotForUpdate (const BeginOfJob * iT) |
|
virtual | ~Observer () |
|
|
bool | filterHit (CaloG4Hit *, double) override |
|
double | getEnergyDeposit (const G4Step *) override |
|
bool | getFromLibrary (const G4Step *) override |
|
void | initRun () override |
|
void | update (const ::EndOfEvent *) override |
|
void | update (const BeginOfEvent *) override |
|
void | update (const BeginOfJob *) override |
| This routine will be called when the appropriate signal arrives. More...
|
|
void | update (const BeginOfRun *) override |
|
void | update (const BeginOfTrack *trk) override |
|
void | update (const EndOfTrack *trk) override |
|
bool | checkHit () |
|
CaloG4Hit * | createNewHit (const G4Step *, const G4Track *) |
|
virtual void | endEvent () |
|
virtual double | EnergyCorrected (const G4Step &step, const G4Track *) |
|
double | getAttenuation (const G4Step *aStep, double birk1, double birk2, double birk3) const |
|
virtual uint16_t | getDepth (const G4Step *) |
|
int | getNumberOfHits () |
|
double | getResponseWt (const G4Track *) |
|
virtual int | getTrackID (const G4Track *) |
|
void | hitBookkeepingFineCalo (const G4Step *step, const G4Track *currentTrack, CaloG4Hit *hit) |
|
bool | hitExists (const G4Step *) |
|
void | ignoreRejection () |
|
virtual void | initEvent (const BeginOfEvent *) |
|
void | printDetectorLevels (const G4VTouchable *) const |
|
void | processHit (const G4Step *step) |
|
void | resetForNewPrimary (const G4Step *) |
|
void | setNumberCheckedHits (int val) |
|
void | setParameterized (bool val) |
|
G4ThreeVector | setToGlobal (const G4ThreeVector &, const G4VTouchable *) const |
|
G4ThreeVector | setToLocal (const G4ThreeVector &, const G4VTouchable *) const |
|
virtual int | setTrackID (const G4Step *) |
|
void | setUseMap (bool val) |
|
void | update (const ::EndOfEvent *) override |
|
void | update (const BeginOfEvent *) override |
| This routine will be called when the appropriate signal arrives. More...
|
|
void | update (const BeginOfRun *) override |
| This routine will be called when the appropriate signal arrives. More...
|
|
void | update (const BeginOfTrack *trk) override |
| This routine will be called when the appropriate signal arrives. More...
|
|
void | update (const EndOfTrack *trk) override |
| This routine will be called when the appropriate signal arrives. More...
|
|
void | updateHit (CaloG4Hit *) |
|
TrackInformation * | cmsTrackInformation (const G4Track *aTrack) |
|
Local3DPoint | ConvertToLocal3DPoint (const G4ThreeVector &point) const |
|
Local3DPoint | FinalStepPosition (const G4Step *step, coordinates) const |
|
Local3DPoint | InitialStepPosition (const G4Step *step, coordinates) const |
|
Local3DPoint | LocalPostStepPosition (const G4Step *step) const |
|
Local3DPoint | LocalPreStepPosition (const G4Step *step) const |
|
void | NaNTrap (const G4Step *step) const |
|
void | setNames (const std::vector< std::string > &) |
|
virtual void | update (const EndOfEvent *)=0 |
| This routine will be called when the appropriate signal arrives. More...
|
|
|
void | fillLogVolumeVector (const std::string &, const std::vector< std::string > &, std::vector< const G4LogicalVolume * > &) |
|
void | getFromHFLibrary (const G4Step *step, bool &isKilled) |
|
void | getFromParam (const G4Step *step, bool &isKilled) |
|
void | getHitFibreBundle (const G4Step *step, bool type) |
|
void | getHitPMT (const G4Step *step) |
|
void | hitForFibre (const G4Step *step) |
|
bool | isItConicalBundle (const G4LogicalVolume *) |
|
bool | isItFibre (const G4LogicalVolume *) |
|
bool | isItFibre (const G4String &) |
|
bool | isItHF (const G4Step *) |
|
bool | isItHF (const G4String &) |
|
bool | isItinFidVolume (const G4ThreeVector &) |
|
bool | isItPMT (const G4LogicalVolume *) |
|
bool | isItScintillator (const G4Material *) |
|
bool | isItStraightBundle (const G4LogicalVolume *) |
|
double | layerWeight (int, const G4ThreeVector &, int, int) |
|
void | modifyDepth (HcalNumberingFromDDD::HcalID &id) |
|
void | plotHF (const G4ThreeVector &pos, bool emType) |
|
void | plotProfile (const G4Step *step, const G4ThreeVector &pos, double edep, double time, int id) |
|
void | readWeightFromFile (const std::string &) |
|
uint32_t | setDetUnitId (HcalNumberingFromDDD::HcalID &tmp) |
|
uint32_t | setDetUnitId (int, const G4ThreeVector &, int, int) |
|
Definition at line 38 of file HCalSD.h.
◆ HCalSD()
Definition at line 42 of file HCalSD.cc.
79 bool dd4hep =
p.getParameter<
bool>(
"g4GeometryDD4hepSource");
81 useBirk = m_HC.getParameter<
bool>(
"UseBirkLaw");
83 birk1 = m_HC.getParameter<
double>(
"BirkC1") * bunit;
84 birk2 = m_HC.getParameter<
double>(
"BirkC2");
85 birk3 = m_HC.getParameter<
double>(
"BirkC3");
87 useParam = m_HC.getParameter<
bool>(
"UseParametrize");
88 testNumber = m_HC.getParameter<
bool>(
"TestNumberingScheme");
89 neutralDensity = m_HC.getParameter<
bool>(
"doNeutralDensityFilter");
90 usePMTHit = m_HC.getParameter<
bool>(
"UsePMTHits");
91 betaThr = m_HC.getParameter<
double>(
"BetaThreshold");
92 eminHitHB = m_HC.getParameter<
double>(
"EminHitHB") *
MeV;
93 eminHitHE = m_HC.getParameter<
double>(
"EminHitHE") *
MeV;
94 eminHitHO = m_HC.getParameter<
double>(
"EminHitHO") *
MeV;
95 eminHitHF = m_HC.getParameter<
double>(
"EminHitHF") *
MeV;
98 agingFlagHB = m_HC.getParameter<
bool>(
"HBDarkening");
99 agingFlagHE = m_HC.getParameter<
bool>(
"HEDarkening");
100 bool agingFlagHF = m_HC.getParameter<
bool>(
"HFDarkening");
101 useHF = m_HC.getUntrackedParameter<
bool>(
"UseHF",
true);
102 bool forTBHC = m_HC.getUntrackedParameter<
bool>(
"ForTBHCAL",
false);
103 bool forTBH2 = m_HC.getUntrackedParameter<
bool>(
"ForTBH2",
false);
104 useLayerWt = m_HC.getUntrackedParameter<
bool>(
"UseLayerWt",
false);
106 testNS_ = m_HC.getUntrackedParameter<
bool>(
"TestNS",
false);
108 applyFidCut = m_HF.getParameter<
bool>(
"ApplyFiducialCut");
109 bool dumpGeom = m_HC.getUntrackedParameter<
bool>(
"DumpGeometry",
false);
112 edm::LogVerbatim(
"HcalSim") <<
"***************************************************"
114 <<
"* Constructing a HCalSD with name " <<
name <<
"\n"
116 <<
"***************************************************";
119 <<
"\n Use of shower parametrization set to " <<
useParam
121 <<
"\n Use PMT Hit is set to " <<
usePMTHit <<
" with beta Threshold " <<
betaThr
123 <<
"\n Use of Birks law is set to " <<
useBirk
124 <<
" with three constants kB = " <<
birk1 / bunit <<
", C1 = " <<
birk2
125 <<
", C2 = " <<
birk3;
129 <<
" ions below " <<
kmaxIon <<
" MeV\n"
133 <<
" Flag (HB) " <<
agingFlagHB <<
" Flag (HF) " << agingFlagHF <<
"\n"
139 matNames.emplace_back(
"Scintillator");
155 const G4LogicalVolumeStore* lvs = G4LogicalVolumeStore::GetInstance();
157 const G4LogicalVolume* lv;
174 std::stringstream ss0;
175 ss0 <<
"HCalSD: Names to be tested for Volume = HF has " <<
hfNames.size() <<
" elements";
177 int addlevel =
dd4hep ? 1 : 0;
178 for (
unsigned int i = 0;
i <
hfNames.size(); ++
i) {
179 G4String namv(static_cast<std::string>(dd4hep::dd::noNamespace(
hfNames[
i])));
181 for (
auto lvol : *lvs) {
182 if (dd4hep::dd::noNamespace(lvol->GetName()) == namv) {
187 hfLV.emplace_back(lv);
190 ss0 <<
"\n HF[" <<
i <<
"] = " << namv <<
" LV " << lv <<
" at level " << (
temp[
i] + addlevel);
208 const G4MaterialTable* matTab = G4Material::GetMaterialTable();
209 std::vector<G4Material*>::const_iterator matite;
211 const G4Material* mat =
nullptr;
212 for (matite = matTab->begin(); matite != matTab->end(); ++matite) {
213 if (static_cast<std::string>(dd4hep::dd::noNamespace((*matite)->GetName())) == namx) {
221 std::stringstream ss1;
222 for (
unsigned int i = 0;
i <
matNames.size(); ++
i) {
223 if (
i / 10 * 10 ==
i) {
228 edm::LogVerbatim(
"HcalSim") <<
"HCalSD: Material names for HCAL: " << ss1.str();
238 std::stringstream ss2;
239 for (
unsigned int ig = 0; ig <
gpar.size(); ig++) {
240 ss2 <<
"\n gpar[" << ig <<
"] = " <<
gpar[ig] / cm <<
" cm";
243 <<
" gpar (cm)" << ss2.str();
250 for (
int i = 0;
i < 9; ++
i) {
261 if (
tfile.isAvailable()) {
262 static const char*
const labels[] = {
"HB",
273 for (
int i = 0;
i < 9; ++
i) {
275 sprintf(
name,
"HCalSDHit%d",
i);
277 sprintf(
title,
"Energy (MeV)");
279 hit_[
i]->GetYaxis()->SetTitle(
"Hits");
281 sprintf(
name,
"HCalSDTime%d",
i);
283 sprintf(
title,
"Time (ns)");
285 time_[
i]->GetYaxis()->SetTitle(
"Hits");
286 sprintf(
title,
"Longitudinal profile in %s",
labels[
i]);
287 sprintf(
name,
"HCalSDDist%d",
i);
289 sprintf(
title,
"Distance (mm)");
291 dist_[
i]->GetYaxis()->SetTitle(
"Hits");
294 hzvem = hcDir.
make<TH1F>(
"hzvem",
"Longitudinal Profile (EM Part)", 330, 0.0, 1650.0);
295 hzvem->GetXaxis()->SetTitle(
"Longitudinal Profile (EM Part)");
296 hzvhad = hcDir.
make<TH1F>(
"hzvhad",
"Longitudinal Profile (Had Part)", 330, 0.0, 1650.0);
297 hzvhad->GetXaxis()->SetTitle(
"Longitudinal Profile (Hadronic Part)");
References agingFlagHB, agingFlagHE, applyFidCut, betaThr, birk1, birk2, birk3, deliveredLumi, dist_, eminHitHB, eminHitHE, eminHitHF, eminHitHO, fibre1LV, fibre2LV, fibreLV, fibreNames, geometryDiff::file, fillLogVolumeVector(), g, relativeConstraints::geom, HcalDDDSimConstants::getGparHF(), HcalDDDSimConstants::getMaxDepth(), gpar, hcalConstants_, HcalSimulationParameters::hcalMaterialNames_, hcalSimConstants_, HcalSimulationConstants::hcalsimpar(), HcalSimulationParameters::hfFibreConicalNames_, HcalSimulationParameters::hfFibreNames_, HcalSimulationParameters::hfFibreStraightNames_, hfLevels, HcalSimulationParameters::hfLevels_, hfLV, hfNames, HcalSimulationParameters::hfNames_, HcalSimulationParameters::hfPMTNames_, hfshower, hit_, hzvem, hzvhad, mps_fire::i, CaloSD::kmaxIon, CaloSD::kmaxNeutron, CaloSD::kmaxProton, SummaryClient_cfi::labels, SensitiveDetectorCatalog::logicalNames(), materialBudgetVolume_cfi::lvNames, m_HcalTestNS, m_HFDarkening, TFileDirectory::make(), materials, matNames, MeV, Skims_PA_cff::name, neutralDensity, numberingFromDDD, numberingScheme, AlCaHLTBitMon_ParallelJobs::p, pmtLV, readWeightFromFile(), generator_cfi::scheme, setNumberingScheme(), CaloSD::setParameterized(), showerBundle, showerLibrary, showerParam, showerPMT, AlCaHLTBitMon_QueryRunRegistry::string, CaloSD::suppressHeavy, groupFilesInBlocks::temp, testNS_, testNumber, compare::tfile, time_, runGCPTkAlMap::title, useBirk, useFibreBundle, useHF, useLayerWt, useParam, usePMTHit, useShowerLibrary, and relativeConstraints::value.
◆ ~HCalSD()
◆ fillLogVolumeVector()
void HCalSD::fillLogVolumeVector |
( |
const std::string & |
value, |
|
|
const std::vector< std::string > & |
lvnames, |
|
|
std::vector< const G4LogicalVolume * > & |
lvvec |
|
) |
| |
|
private |
Definition at line 310 of file HCalSD.cc.
313 const G4LogicalVolumeStore* lvs = G4LogicalVolumeStore::GetInstance();
314 const G4LogicalVolume* lv;
315 std::stringstream ss3;
316 ss3 <<
"HCalSD: " << lvnames.size() <<
" names to be tested for Volume <" <<
value <<
">:";
317 for (
unsigned int i = 0;
i < lvnames.size(); ++
i) {
318 G4String namv(static_cast<std::string>(dd4hep::dd::noNamespace(lvnames[
i])));
320 for (
auto lvol : *lvs) {
321 if (dd4hep::dd::noNamespace(lvol->GetName()) == namv) {
326 lvvec.emplace_back(lv);
327 if (
i / 10 * 10 ==
i) {
References mps_fire::i.
Referenced by HCalSD().
◆ filterHit()
bool HCalSD::filterHit |
( |
CaloG4Hit * |
aHit, |
|
|
double |
time |
|
) |
| |
|
overrideprotectedvirtual |
Reimplemented from CaloSD.
Definition at line 556 of file HCalSD.cc.
559 switch (theId.subdetId()) {
References eminHitHB, eminHitHE, eminHitHF, eminHitHO, CaloG4Hit::getEnergyDeposit(), CaloG4Hit::getUnitID(), HcalBarrel, HcalEndcap, HcalForward, HcalOuter, remoteMonitoring_LED_IterMethod_cfg::threshold, protons_cff::time, and CaloSD::tmaxHit.
◆ getEnergyDeposit()
double HCalSD::getEnergyDeposit |
( |
const G4Step * |
aStep | ) |
|
|
overrideprotectedvirtual |
Reimplemented from CaloSD.
Definition at line 399 of file HCalSD.cc.
401 auto const lv = aStep->GetPreStepPoint()->GetPhysicalVolume()->GetLogicalVolume();
402 auto const theTrack = aStep->GetTrack();
407 edm::LogVerbatim(
"HcalSim") <<
"HCalSD: Hit at Fibre in LV " << lv->GetName() <<
" for track "
408 << aStep->GetTrack()->GetTrackID() <<
" ("
409 << aStep->GetTrack()->GetDefinition()->GetParticleName() <<
")";
421 edm::LogVerbatim(
"HcalSim") <<
"HCalSD: Hit from PMT parametrization in LV " << lv->GetName() <<
" for Track "
422 << aStep->GetTrack()->GetTrackID() <<
" ("
423 << aStep->GetTrack()->GetDefinition()->GetParticleName() <<
")";
432 edm::LogVerbatim(
"HcalSim") <<
"HCalSD: Hit from straight FibreBundle in LV: " << lv->GetName() <<
" for track "
433 << aStep->GetTrack()->GetTrackID() <<
" ("
434 << aStep->GetTrack()->GetDefinition()->GetParticleName() <<
")";
443 edm::LogVerbatim(
"HcalSim") <<
"HCalSD: Hit from conical FibreBundle PV: " << lv->GetName() <<
" for track "
444 << aStep->GetTrack()->GetTrackID() <<
" ("
445 << aStep->GetTrack()->GetDefinition()->GetParticleName() <<
")";
451 destep = aStep->GetTotalEnergyDeposit();
453 const G4VTouchable* touch = aStep->GetPreStepPoint()->GetTouchable();
463 det = hcid.subdetId();
464 ieta = hcid.ietaAbs();
468 lay = (touch->GetReplicaNumber(0) / 10) % 100 + 1;
471 <<
" lay: " << lay - 2;
476 G4ThreeVector hitPoint = aStep->GetPreStepPoint()->GetPosition();
501 int pdg = theTrack->GetDefinition()->GetPDGEncoding();
503 double ke = theTrack->GetKineticEnergy();
504 if (
pdg / 1000000000 == 1 && (
pdg / 10000) % 100 > 0 && (
pdg / 10) % 100 > 0 &&
ke <
kmaxIon)
515 const G4Material* mat = aStep->GetPreStepPoint()->GetMaterial();
521 double wt2 = theTrack->GetWeight();
522 double edep =
weight_ * wt1 * destep;
528 <<
" weight= " <<
weight_ <<
" wt0= " << wt0 <<
" wt1= " << wt1 <<
" wt2= " << wt2;
References agingFlagHB, agingFlagHE, birk1, birk2, birk3, HBHEDarkening::degradation(), deliveredLumi, LEDCalibrationChannels::depth, depth_, CaloSD::getAttenuation(), getHitFibreBundle(), getHitPMT(), HcalDDDSimConstants::getLayer0Wt(), CaloSD::getResponseWt(), hcalConstants_, hitForFibre(), LEDCalibrationChannels::ieta, HcalDetId::ietaAbs(), HcalDetId::iphi(), isHF, isItConicalBundle(), isItFibre(), isItPMT(), isItScintillator(), isItStraightBundle(), G4TrackToParticleID::isMuon(), TrackInformation::isPrimary(), ke, CaloSD::kmaxIon, CaloSD::kmaxNeutron, CaloSD::kmaxProton, layerWeight(), m_HBDarkening, m_HEDarkening, neutralDensity, phi, setDetUnitId(), showerBundle, showerPMT, DetId::subdetId(), CaloSD::suppressHeavy, testNumber, HcalTestNumbering::unpackHcalIndex(), useBirk, useFibreBundle, useLayerWt, usePMTHit, useShowerLibrary, weight_, z, and HcalDetId::zside().
◆ getFromHFLibrary()
void HCalSD::getFromHFLibrary |
( |
const G4Step * |
step, |
|
|
bool & |
isKilled |
|
) |
| |
|
private |
Definition at line 687 of file HCalSD.cc.
689 if (!isKilled ||
hits.empty()) {
698 auto const theTrack = aStep->GetTrack();
709 edm::LogVerbatim(
"HcalSim") <<
"HCalSD::getFromLibrary " <<
hits.size() <<
" hits for " << GetName() <<
" of "
710 << primaryID <<
" with " << theTrack->GetDefinition()->GetParticleName() <<
" of "
711 << aStep->GetPreStepPoint()->GetKineticEnergy() /
GeV <<
" GeV";
713 for (
unsigned int i = 0;
i <
hits.size(); ++
i) {
714 G4ThreeVector hitPoint =
hits[
i].position;
References CaloSD::currentID, LEDCalibrationChannels::depth, CaloSD::edepositEM, CaloSD::edepositHAD, GeV, hfClusterShapes_cfi::hits, mps_fire::i, G4TrackToParticleID::isGammaElectronPositron(), isItinFidVolume(), plotHF(), plotProfile(), CaloSD::processHit(), CaloSD::resetForNewPrimary(), setDetUnitId(), CaloHitID::setID(), CaloSD::setTrackID(), showerLibrary, protons_cff::time, and weight_.
Referenced by getFromLibrary().
◆ getFromLibrary()
bool HCalSD::getFromLibrary |
( |
const G4Step * |
aStep | ) |
|
|
overrideprotectedvirtual |
Reimplemented from CaloSD.
Definition at line 335 of file HCalSD.cc.
336 auto const track = aStep->GetTrack();
337 depth_ = (aStep->GetPreStepPoint()->GetTouchable()->GetReplicaNumber(0)) % 10;
350 G4ThreeVector hitPoint = aStep->GetPreStepPoint()->GetPosition();
351 const double invcm = 1. / CLHEP::cm;
352 double r = hitPoint.perp() * invcm;
353 double z =
std::abs(hitPoint.z()) * invcm;
354 double dose_acquired = 0.;
366 edm::LogVerbatim(
"HcalSim") <<
"HCalSD::getFromLibrary: HFLumiDarkening at "
367 <<
"r= " <<
r <<
", z= " <<
z <<
" Dose= " << dose_acquired <<
" weight= " <<
weight_;
374 G4String nameVolume = aStep->GetPreStepPoint()->GetPhysicalVolume()->GetLogicalVolume()->GetName();
376 <<
" for Track " <<
track->GetTrackID() <<
" ("
377 <<
track->GetDefinition()->GetParticleName() <<
")";
382 auto nameVolume = aStep->GetPreStepPoint()->GetPhysicalVolume()->GetLogicalVolume()->GetName();
383 edm::LogVerbatim(
"HcalSim") <<
"HCalSD: Starts shower library from " << nameVolume <<
" for Track "
384 <<
track->GetTrackID() <<
" (" <<
track->GetDefinition()->GetParticleName() <<
")";
393 <<
track->GetDefinition()->GetParticleName() <<
") kill= " << kill
References funct::abs(), deliveredLumi, depth_, getFromHFLibrary(), getFromParam(), CaloSD::getNumberOfHits(), mps_fire::i, createfilelist::int, G4TrackToParticleID::isGammaElectronPositron(), isHF, isItHF(), G4TrackToParticleID::isMuon(), G4TrackToParticleID::isStableHadronIon(), HFDarkening::lowZLimit, m_HFDarkening, HFDarkening::numberOfZLayers, alignCSCRings::r, HLT_FULL_cff::track, HFDarkening::upperZLimit, useParam, useShowerLibrary, weight_, and z.
◆ getFromParam()
void HCalSD::getFromParam |
( |
const G4Step * |
step, |
|
|
bool & |
isKilled |
|
) |
| |
|
private |
Definition at line 772 of file HCalSD.cc.
774 if (!isKilled ||
hits.empty()) {
782 edm::LogVerbatim(
"HcalSim") <<
"HCalSD::getFromParam " <<
hits.size() <<
" hits for " << GetName() <<
" of "
783 << primaryID <<
" with " << aStep->GetTrack()->GetDefinition()->GetParticleName()
784 <<
" of " << aStep->GetPreStepPoint()->GetKineticEnergy() /
GeV
785 <<
" GeV in detector type " << det;
787 for (
unsigned int i = 0;
i <
hits.size(); ++
i) {
788 G4ThreeVector hitPoint =
hits[
i].position;
References CaloSD::currentID, LEDCalibrationChannels::depth, CaloSD::edepositEM, CaloSD::edepositHAD, GeV, hfClusterShapes_cfi::hits, mps_fire::i, plotProfile(), CaloSD::processHit(), setDetUnitId(), CaloHitID::setID(), CaloSD::setTrackID(), showerParam, protons_cff::time, and weight_.
Referenced by getFromLibrary().
◆ getHitFibreBundle()
void HCalSD::getHitFibreBundle |
( |
const G4Step * |
step, |
|
|
bool |
type |
|
) |
| |
|
private |
Definition at line 861 of file HCalSD.cc.
862 auto const preStepPoint = aStep->GetPreStepPoint();
863 auto const theTrack = aStep->GetTrack();
868 double etrack = preStepPoint->GetKineticEnergy();
871 primaryID = theTrack->GetTrackID();
873 primaryID = theTrack->GetParentID();
875 primaryID = theTrack->GetTrackID();
881 const G4ThreeVector& hitPoint = preStepPoint->GetPosition();
882 double rr = hitPoint.x() * hitPoint.x() + hitPoint.y() * hitPoint.y();
883 double phi =
rr == 0. ? 0. : atan2(hitPoint.y(), hitPoint.x());
890 if (hitPoint.z() < 0.)
893 edm::LogVerbatim(
"HcalSim") <<
"HCalSD::Hit for Detector " << det <<
" etaR " << etaR <<
" phi " <<
phi / deg
894 <<
" depth " <<
depth;
896 double time = (aStep->GetPostStepPoint()->GetGlobalTime());
913 double beta = preStepPoint->GetBeta();
914 edm::LogVerbatim(
"HcalSim") <<
"HCalSD::getHitFibreBundle 1 hit for " << GetName() <<
" of " << primaryID
915 <<
" with " << theTrack->GetDefinition()->GetParticleName() <<
" of "
916 << preStepPoint->GetKineticEnergy() /
GeV <<
" GeV with velocity " <<
beta <<
" UnitID "
References HLT_FULL_cff::beta, CaloSD::currentID, TauDecayModes::dec, LEDCalibrationChannels::depth, CaloSD::edepositEM, CaloSD::edepositHAD, CaloSD::energyCut, GeV, HcalForward, numberingFromDDD, phi, plotProfile(), CaloSD::processHit(), CaloSD::resetForNewPrimary(), findQualityFiles::rr, setDetUnitId(), CaloHitID::setID(), showerBundle, protons_cff::time, and createJobs::tmp.
Referenced by getEnergyDeposit().
◆ getHitPMT()
void HCalSD::getHitPMT |
( |
const G4Step * |
step | ) |
|
|
private |
Definition at line 802 of file HCalSD.cc.
803 auto const preStepPoint = aStep->GetPreStepPoint();
804 auto const theTrack = aStep->GetTrack();
809 double etrack = preStepPoint->GetKineticEnergy();
812 primaryID = theTrack->GetTrackID();
814 primaryID = theTrack->GetParentID();
816 primaryID = theTrack->GetTrackID();
822 const G4ThreeVector& hitPoint = preStepPoint->GetPosition();
823 double rr = (hitPoint.x() * hitPoint.x() + hitPoint.y() * hitPoint.y());
824 double phi = (
rr == 0. ? 0. : atan2(hitPoint.y(), hitPoint.x()));
831 if (hitPoint.z() < 0)
834 edm::LogVerbatim(
"HcalSim") <<
"HCalSD::Hit for Detector " << det <<
" etaR " << etaR <<
" phi " <<
phi / deg
835 <<
" depth " <<
depth;
837 double time = (aStep->GetPostStepPoint()->GetGlobalTime());
851 double beta = preStepPoint->GetBeta();
852 edm::LogVerbatim(
"HcalSim") <<
"HCalSD::getHitPMT 1 hit for " << GetName() <<
" of " << primaryID <<
" with "
853 << theTrack->GetDefinition()->GetParticleName() <<
" of "
854 << preStepPoint->GetKineticEnergy() /
GeV <<
" GeV with velocity " <<
beta <<
" UnitID "
References HLT_FULL_cff::beta, CaloSD::currentID, TauDecayModes::dec, LEDCalibrationChannels::depth, CaloSD::edepositEM, CaloSD::edepositHAD, CaloSD::energyCut, GeV, HcalForward, numberingFromDDD, phi, plotProfile(), CaloSD::processHit(), CaloSD::resetForNewPrimary(), findQualityFiles::rr, setDetUnitId(), CaloHitID::setID(), showerPMT, protons_cff::time, and createJobs::tmp.
Referenced by getEnergyDeposit().
◆ hitForFibre()
void HCalSD::hitForFibre |
( |
const G4Step * |
step | ) |
|
|
private |
Definition at line 730 of file HCalSD.cc.
737 auto const theTrack = aStep->GetTrack();
750 edm::LogVerbatim(
"HcalSim") <<
"HCalSD::hitForFibre " <<
hits.size() <<
" hits for " << GetName() <<
" of "
751 << primaryID <<
" with " << theTrack->GetDefinition()->GetParticleName() <<
" of "
752 << aStep->GetPreStepPoint()->GetKineticEnergy() /
GeV <<
" GeV in detector type " << det;
755 for (
unsigned int i = 0;
i <
hits.size(); ++
i) {
756 G4ThreeVector hitPoint =
hits[
i].position;
References CaloSD::currentID, LEDCalibrationChannels::depth, CaloSD::edepositEM, CaloSD::edepositHAD, GeV, hfshower, hfClusterShapes_cfi::hits, mps_fire::i, G4TrackToParticleID::isGammaElectronPositron(), isItinFidVolume(), plotHF(), plotProfile(), CaloSD::processHit(), setDetUnitId(), CaloHitID::setID(), CaloSD::setTrackID(), protons_cff::time, funct::true, and weight_.
Referenced by getEnergyDeposit().
◆ initRun()
◆ isItConicalBundle()
bool HCalSD::isItConicalBundle |
( |
const G4LogicalVolume * |
lv | ) |
|
|
private |
◆ isItFibre() [1/2]
bool HCalSD::isItFibre |
( |
const G4LogicalVolume * |
lv | ) |
|
|
private |
◆ isItFibre() [2/2]
bool HCalSD::isItFibre |
( |
const G4String & |
name | ) |
|
|
private |
◆ isItHF() [1/2]
bool HCalSD::isItHF |
( |
const G4Step * |
aStep | ) |
|
|
private |
◆ isItHF() [2/2]
bool HCalSD::isItHF |
( |
const G4String & |
name | ) |
|
|
private |
◆ isItinFidVolume()
bool HCalSD::isItinFidVolume |
( |
const G4ThreeVector & |
hitPoint | ) |
|
|
private |
◆ isItPMT()
bool HCalSD::isItPMT |
( |
const G4LogicalVolume * |
lv | ) |
|
|
private |
◆ isItScintillator()
bool HCalSD::isItScintillator |
( |
const G4Material * |
mat | ) |
|
|
private |
◆ isItStraightBundle()
bool HCalSD::isItStraightBundle |
( |
const G4LogicalVolume * |
lv | ) |
|
|
private |
◆ layerWeight()
double HCalSD::layerWeight |
( |
int |
det, |
|
|
const G4ThreeVector & |
pos, |
|
|
int |
depth, |
|
|
int |
lay |
|
) |
| |
|
private |
◆ modifyDepth()
◆ plotHF()
void HCalSD::plotHF |
( |
const G4ThreeVector & |
pos, |
|
|
bool |
emType |
|
) |
| |
|
private |
◆ plotProfile()
void HCalSD::plotProfile |
( |
const G4Step * |
step, |
|
|
const G4ThreeVector & |
pos, |
|
|
double |
edep, |
|
|
double |
time, |
|
|
int |
id |
|
) |
| |
|
private |
Definition at line 967 of file HCalSD.cc.
968 const G4VTouchable* touch = aStep->GetPreStepPoint()->GetTouchable();
969 static const unsigned int names = 10;
970 static const G4String modName[
names] = {
971 "HEModule",
"HVQF",
"HBModule",
"MBAT",
"MBBT",
"MBBTC",
"MBBT_R1P",
"MBBT_R1M",
"MBBT_R1PX",
"MBBT_R1MX"};
974 double depth = -2000;
976 for (
int n = 0;
n < touch->GetHistoryDepth(); ++
n) {
977 G4String
name(static_cast<std::string>(dd4hep::dd::noNamespace(touch->GetVolume(
n)->GetName())));
982 if (
name == modName[
ii]) {
984 int dn = touch->GetHistoryDepth() -
n;
985 local = touch->GetHistory()->GetTransform(dn).TransformPoint(global);
989 }
else if (
ii == 1) {
992 }
else if (
ii == 2) {
1009 <<
" depth " <<
depth <<
" ID " <<
id <<
" EDEP " << edep <<
" Time " <<
time;
1017 int jd = 2 *
idx +
id - 7;
1018 if (jd >= 0 && jd < 4) {
1020 if (
hit_[jd] !=
nullptr)
1021 hit_[jd]->Fill(edep);
1022 if (
time_[jd] !=
nullptr)
1024 if (
dist_[jd] !=
nullptr)
References funct::abs(), LEDCalibrationChannels::depth, dist_, newFWLiteAna::found, hit_, heavyIonCSV_trainingSettings::idx, cuy::ii, DTRecHitClients_cfi::local, dqmiodumpmetadata::n, Skims_PA_cff::name, names, protons_cff::time, and time_.
Referenced by getFromHFLibrary(), getFromParam(), getHitFibreBundle(), getHitPMT(), and hitForFibre().
◆ readWeightFromFile()
void HCalSD::readWeightFromFile |
( |
const std::string & |
fName | ) |
|
|
private |
Definition at line 923 of file HCalSD.cc.
932 layerWeights.insert(std::pair<uint32_t, double>(
id, wt));
935 edm::LogVerbatim(
"HcalSim") <<
"HCalSD::readWeightFromFile:Entry " <<
entry <<
" ID " << std::hex <<
id
936 <<
std::dec <<
" (" << det <<
"/" <<
zside <<
"/1/" << etaR <<
"/" <<
phi <<
"/"
937 << lay <<
") Weight " << wt;
References TauDecayModes::dec, mps_splice::entry, MainPageGenerator::fName, recoMuon::in, timingPdfMaker::infile, layerWeights, HcalTestNumbering::packHcalIndex(), phi, useLayerWt, and ecaldqm::zside().
Referenced by HCalSD().
◆ setDetUnitId() [1/3]
uint32_t HCalSD::setDetUnitId |
( |
const G4Step * |
step | ) |
|
|
overridevirtual |
◆ setDetUnitId() [2/3]
◆ setDetUnitId() [3/3]
uint32_t HCalSD::setDetUnitId |
( |
int |
det, |
|
|
const G4ThreeVector & |
pos, |
|
|
int |
depth, |
|
|
int |
lay = 1 |
|
) |
| |
|
private |
◆ setNumberingScheme()
◆ update() [1/6]
Definition at line 741 of file CaloSD.cc.
755 int hc_entries =
theHC->entries();
756 for (
int i = 0;
i < hc_entries; ++
i) {
761 double x = (*theHC)[
i]->getEM();
764 x = (*theHC)[
i]->getHadr();
767 tt += (*theHC)[
i]->getTimeSlice();
768 ee += (*theHC)[
i]->getIncidentEnergy();
773 double norm = (
count > 0) ? 1.0 /
count : 0.0;
788 <<
" hits not passing cuts\n EmeanEM= " << eEM <<
" ErmsEM= " << eEM2
789 <<
"\n EmeanHAD= " << eHAD <<
" ErmsHAD= " << eHAD2 <<
" TimeMean= " <<
tt
790 <<
" E0mean= " << ee <<
" Zglob= " << zglob <<
" Zloc= " << zloc <<
" ";
793 std::vector<std::unique_ptr<CaloG4Hit>>().
swap(
reusehit);
Referenced by MatrixUtil.Matrix::__setitem__(), MatrixUtil.Steps::__setitem__(), and MatrixUtil.Steps::overwrite().
◆ update() [2/6]
◆ update() [3/6]
◆ update() [4/6]
◆ update() [5/6]
◆ update() [6/6]
◆ agingFlagHB
◆ agingFlagHE
◆ applyFidCut
◆ betaThr
◆ birk1
◆ birk2
◆ birk3
◆ deliveredLumi
double HCalSD::deliveredLumi |
|
private |
◆ depth_
◆ dist_
◆ eminHitHB
◆ eminHitHE
◆ eminHitHF
◆ eminHitHO
◆ fibre1LV
std::vector<const G4LogicalVolume*> HCalSD::fibre1LV |
|
private |
◆ fibre2LV
std::vector<const G4LogicalVolume*> HCalSD::fibre2LV |
|
private |
◆ fibreLV
std::vector<const G4LogicalVolume*> HCalSD::fibreLV |
|
private |
◆ fibreNames
std::vector<std::string> HCalSD::fibreNames |
|
private |
◆ gpar
std::vector<double> HCalSD::gpar |
|
private |
◆ hcalConstants_
◆ hcalSimConstants_
◆ hfLevels
std::vector<int> HCalSD::hfLevels |
|
private |
◆ hfLV
std::vector<const G4LogicalVolume*> HCalSD::hfLV |
|
private |
◆ hfNames
std::vector<std::string> HCalSD::hfNames |
|
private |
◆ hfshower
std::unique_ptr<HFShower> HCalSD::hfshower |
|
private |
◆ hit_
◆ hzvem
◆ hzvhad
◆ isHF
◆ layerWeights
std::map<uint32_t, double> HCalSD::layerWeights |
|
private |
◆ m_HBDarkening
◆ m_HcalTestNS
◆ m_HEDarkening
◆ m_HFDarkening
◆ materials
std::vector<const G4Material*> HCalSD::materials |
|
private |
◆ matNames
std::vector<std::string> HCalSD::matNames |
|
private |
◆ neutralDensity
bool HCalSD::neutralDensity |
|
private |
◆ numberingFromDDD
◆ numberingScheme
◆ pmtLV
std::vector<const G4LogicalVolume*> HCalSD::pmtLV |
|
private |
◆ showerBundle
◆ showerLibrary
◆ showerParam
◆ showerPMT
◆ testNS_
◆ testNumber
◆ time_
◆ useBirk
◆ useFibreBundle
bool HCalSD::useFibreBundle |
|
private |
◆ useHF
◆ useLayerWt
◆ useParam
◆ usePMTHit
◆ useShowerLibrary
bool HCalSD::useShowerLibrary |
|
private |
◆ weight_
std::map< int, TrackWithHistory * > tkMap
std::vector< const G4LogicalVolume * > fibreLV
bool isItStraightBundle(const G4LogicalVolume *)
std::vector< int > hfLevels
void getFromHFLibrary(const G4Step *step, bool &isKilled)
bool saveHit(CaloG4Hit *)
std::vector< std::string > hfPMTNames_
uint32_t getUnitID() const
const HBHEDarkening * m_HBDarkening
void getFromParam(const G4Step *step, bool &isKilled)
std::vector< const G4LogicalVolume * > pmtLV
std::vector< int > hfLevels_
void swap(Association< C > &lhs, Association< C > &rhs)
void getHitFibreBundle(const G4Step *step, bool type)
double getAttenuation(const G4Step *aStep, double birk1, double birk2, double birk3) const
const std::vector< double > & getGparHF() const
std::vector< std::string > hfFibreStraightNames_
bool isItPMT(const G4LogicalVolume *)
static bool isMuon(int pdgCode)
bool isItinFidVolume(const G4ThreeVector &)
std::vector< std::string > hfFibreNames_
Log< level::Warning, false > LogWarning
int PMTNumber(const G4ThreeVector &pe_effect)
static bool isGammaElectronPositron(int pdgCode)
virtual int setTrackID(const G4Step *)
void getHitPMT(const G4Step *step)
const HcalSimulationParameters * hcalsimpar() const
double getResponseWt(const G4Track *)
double layerWeight(int, const G4ThreeVector &, int, int)
std::unique_ptr< HcalTestNS > m_HcalTestNS
std::map< uint32_t, double > layerWeights
static void unpackHcalIndex(const uint32_t &idx, int &det, int &z, int &depth, int &eta, int &phi, int &lay)
void setID(uint32_t unitID, double timeSlice, int trackID, uint16_t depth=0)
std::vector< std::string > hfNames
std::vector< const G4LogicalVolume * > fibre1LV
const std::string names[nVars_]
double getEnergyDeposit() const
static const unsigned int numberOfZLayers
void processHit(const G4Step *step)
void clearHits() override
int maxHFDepth(const int &ieta, const int &iphi) const
void modifyDepth(HcalNumberingFromDDD::HcalID &id)
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double > > XYZVectorD
spatial vector with cartesian internal representation
void readWeightFromFile(const std::string &)
std::vector< const G4LogicalVolume * > hfLV
double getLayer0Wt(const int &det, const int &phi, const int &zside) const
std::vector< std::string > hfFibreConicalNames_
static uint32_t packHcalIndex(int det, int z, int depth, int eta, int phi, int lay)
bool isItConicalBundle(const G4LogicalVolume *)
std::map< CaloHitID, CaloG4Hit * > hitMap
std::unique_ptr< HcalNumberingFromDDD > numberingFromDDD
CaloG4HitCollection * theHC
const HcalSimulationConstants * hcalSimConstants_
std::unique_ptr< HFShowerFibreBundle > showerBundle
void hitForFibre(const G4Step *step)
std::vector< std::string > hcalMaterialNames_
bool isItHF(const G4Step *)
const HcalDDDSimConstants * hcalConstants_
std::unique_ptr< CaloSlaveSD > slave
std::unique_ptr< HFShowerLibrary > showerLibrary
static const unsigned int lowZLimit
bool isItScintillator(const G4Material *)
CaloSD(const std::string &aSDname, const SensitiveDetectorCatalog &clg, edm::ParameterSet const &p, const SimTrackManager *, float timeSlice=1., bool ignoreTkID=false)
void resetForNewPrimary(const G4Step *)
std::vector< std::string > fibreNames
std::unique_ptr< HFShower > hfshower
std::vector< std::unique_ptr< CaloG4Hit > > reusehit
std::vector< double > gpar
std::unique_ptr< HFDarkening > m_HFDarkening
std::vector< const G4LogicalVolume * > fibre2LV
const SimTrackManager * m_trackManager
void setNumberingScheme(HcalNumberingScheme *)
void plotHF(const G4ThreeVector &pos, bool emType)
unsigned int trackID() const
std::vector< TrackWithHistory * > TrackContainer
TrackInformation * cmsTrackInformation(const G4Track *aTrack)
void plotProfile(const G4Step *step, const G4ThreeVector &pos, double edep, double time, int id)
std::vector< const G4Material * > materials
static bool isStableHadronIon(const G4Track *)
float degradation(float intlumi, int ieta, int lay) const
void cleanHitCollection()
Log< level::Info, true > LogVerbatim
uint32_t setDetUnitId(const G4Step *step) override
void setParameterized(bool val)
std::unique_ptr< HFShowerPMT > showerPMT
T * make(const Args &...args) const
make new ROOT object
const std::vector< std::string_view > logicalNames(const std::string &readoutName) const
bool isItFibre(const G4LogicalVolume *)
T getParameter(std::string const &) const
static const unsigned int upperZLimit
int getMaxDepth(const int &type) const
std::vector< std::string > matNames
Abs< T >::type abs(const T &t)
Int_t getEntry(TBranch *branch, EntryNumber entryNumber)
std::vector< std::string > hfNames_
virtual void initEvent(const BeginOfEvent *)
void fillLogVolumeVector(const std::string &, const std::vector< std::string > &, std::vector< const G4LogicalVolume * > &)
const HBHEDarkening * m_HEDarkening
std::unique_ptr< HFShowerParam > showerParam
const TrackContainer * trackContainer() const
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e g
std::unique_ptr< HcalNumberingScheme > numberingScheme