|
 |
#include <HCalSD.h>
|
| HCalSD (const std::string &, const edm::EventSetup &, 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 edm::EventSetup &es, 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 edm::EventSetup &es, const SensitiveDetectorCatalog &clg, edm::ParameterSet const &p) |
|
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 edm::EventSetup &es, const SensitiveDetectorCatalog &, edm::ParameterSet const &p, 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 47 of file HCalSD.cc.
81 bool dd4hep =
p.getParameter<
bool>(
"g4GeometryDD4hepSource");
83 useBirk = m_HC.getParameter<
bool>(
"UseBirkLaw");
85 birk1 = m_HC.getParameter<
double>(
"BirkC1") * bunit;
86 birk2 = m_HC.getParameter<
double>(
"BirkC2");
87 birk3 = m_HC.getParameter<
double>(
"BirkC3");
89 useParam = m_HC.getParameter<
bool>(
"UseParametrize");
90 testNumber = m_HC.getParameter<
bool>(
"TestNumberingScheme");
91 neutralDensity = m_HC.getParameter<
bool>(
"doNeutralDensityFilter");
92 usePMTHit = m_HC.getParameter<
bool>(
"UsePMTHits");
93 betaThr = m_HC.getParameter<
double>(
"BetaThreshold");
94 eminHitHB = m_HC.getParameter<
double>(
"EminHitHB") *
MeV;
95 eminHitHE = m_HC.getParameter<
double>(
"EminHitHE") *
MeV;
96 eminHitHO = m_HC.getParameter<
double>(
"EminHitHO") *
MeV;
97 eminHitHF = m_HC.getParameter<
double>(
"EminHitHF") *
MeV;
100 agingFlagHB = m_HC.getParameter<
bool>(
"HBDarkening");
101 agingFlagHE = m_HC.getParameter<
bool>(
"HEDarkening");
102 bool agingFlagHF = m_HC.getParameter<
bool>(
"HFDarkening");
103 useHF = m_HC.getUntrackedParameter<
bool>(
"UseHF",
true);
104 bool forTBHC = m_HC.getUntrackedParameter<
bool>(
"ForTBHCAL",
false);
105 bool forTBH2 = m_HC.getUntrackedParameter<
bool>(
"ForTBH2",
false);
106 useLayerWt = m_HC.getUntrackedParameter<
bool>(
"UseLayerWt",
false);
108 testNS_ = m_HC.getUntrackedParameter<
bool>(
"TestNS",
false);
110 applyFidCut = m_HF.getParameter<
bool>(
"ApplyFiducialCut");
111 bool dumpGeom = m_HC.getUntrackedParameter<
bool>(
"DumpGeometry",
false);
114 edm::LogVerbatim(
"HcalSim") <<
"***************************************************"
116 <<
"* Constructing a HCalSD with name " <<
name <<
"\n"
118 <<
"***************************************************";
121 <<
"\n Use of shower parametrization set to " <<
useParam
123 <<
"\n Use PMT Hit is set to " <<
usePMTHit <<
" with beta Threshold " <<
betaThr
125 <<
"\n Use of Birks law is set to " <<
useBirk
126 <<
" with three constants kB = " <<
birk1 / bunit <<
", C1 = " <<
birk2
127 <<
", C2 = " <<
birk3;
131 <<
" ions below " <<
kmaxIon <<
" MeV\n"
135 <<
" Flag (HB) " <<
agingFlagHB <<
" Flag (HF) " << agingFlagHF <<
"\n"
145 edm::LogError(
"HcalSim") <<
"HCalSD : Cannot find HcalDDDSimConstant";
146 throw cms::Exception(
"Unknown",
"HCalSD") <<
"Cannot find HcalDDDSimConstant\n";
150 matNames.emplace_back(
"Scintillator");
158 edm::LogError(
"HcalSim") <<
"HCalSD : Cannot find HcalDDDSimulationConstant";
159 throw cms::Exception(
"Unknown",
"HCalSD") <<
"Cannot find HcalDDDSimulationConstant\n";
174 const G4LogicalVolumeStore* lvs = G4LogicalVolumeStore::GetInstance();
176 const G4LogicalVolume* lv;
193 std::stringstream ss0;
194 ss0 <<
"HCalSD: Names to be tested for Volume = HF has " <<
hfNames.size() <<
" elements";
196 int addlevel =
dd4hep ? 1 : 0;
197 for (
unsigned int i = 0;
i <
hfNames.size(); ++
i) {
198 G4String namv(static_cast<std::string>(dd4hep::dd::noNamespace(
hfNames[
i])));
200 for (
auto lvol : *lvs) {
201 if (dd4hep::dd::noNamespace(lvol->GetName()) == namv) {
206 hfLV.emplace_back(lv);
209 ss0 <<
"\n HF[" <<
i <<
"] = " << namv <<
" LV " << lv <<
" at level " << (
temp[
i] + addlevel);
227 const G4MaterialTable* matTab = G4Material::GetMaterialTable();
228 std::vector<G4Material*>::const_iterator matite;
230 const G4Material* mat =
nullptr;
231 for (matite = matTab->begin(); matite != matTab->end(); ++matite) {
232 if (static_cast<std::string>(dd4hep::dd::noNamespace((*matite)->GetName())) == namx) {
240 std::stringstream ss1;
241 for (
unsigned int i = 0;
i <
matNames.size(); ++
i) {
242 if (
i / 10 * 10 ==
i) {
247 edm::LogVerbatim(
"HcalSim") <<
"HCalSD: Material names for HCAL: " << ss1.str();
257 std::stringstream ss2;
258 for (
unsigned int ig = 0; ig <
gpar.size(); ig++) {
259 ss2 <<
"\n gpar[" << ig <<
"] = " <<
gpar[ig] / cm <<
" cm";
262 <<
" gpar (cm)" << ss2.str();
280 for (
int i = 0;
i < 9; ++
i) {
291 if (
tfile.isAvailable()) {
292 static const char*
const labels[] = {
"HB",
303 for (
int i = 0;
i < 9; ++
i) {
305 sprintf(
name,
"HCalSDHit%d",
i);
307 sprintf(
title,
"Energy (MeV)");
309 hit_[
i]->GetYaxis()->SetTitle(
"Hits");
311 sprintf(
name,
"HCalSDTime%d",
i);
313 sprintf(
title,
"Time (ns)");
315 time_[
i]->GetYaxis()->SetTitle(
"Hits");
316 sprintf(
title,
"Longitudinal profile in %s",
labels[
i]);
317 sprintf(
name,
"HCalSDDist%d",
i);
319 sprintf(
title,
"Distance (mm)");
321 dist_[
i]->GetYaxis()->SetTitle(
"Hits");
324 hzvem = hcDir.
make<TH1F>(
"hzvem",
"Longitudinal Profile (EM Part)", 330, 0.0, 1650.0);
325 hzvem->GetXaxis()->SetTitle(
"Longitudinal Profile (EM Part)");
326 hzvhad = hcDir.
make<TH1F>(
"hzvhad",
"Longitudinal Profile (Had Part)", 330, 0.0, 1650.0);
327 hzvhad->GetXaxis()->SetTitle(
"Longitudinal Profile (Hadronic Part)");
References agingFlagHB, agingFlagHE, applyFidCut, betaThr, birk1, birk2, birk3, deliveredLumi, dist_, eminHitHB, eminHitHE, eminHitHF, eminHitHO, Exception, fibre1LV, fibre2LV, fibreLV, fibreNames, FrontierConditions_GlobalTag_cff::file, fillLogVolumeVector(), g, relativeConstraints::geom, edm::EventSetup::get(), get, 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, edm::ESHandleBase::isValid(), CaloSD::kmaxIon, CaloSD::kmaxNeutron, CaloSD::kmaxProton, SummaryClient_cfi::labels, SensitiveDetectorCatalog::logicalNames(), m_HBDarkening, m_HcalTestNS, m_HEDarkening, m_HFDarkening, TFileDirectory::make(), materials, matNames, MeV, Skims_PA_cff::name, neutralDensity, numberingFromDDD, numberingScheme, AlCaHLTBitMon_ParallelJobs::p, pmtLV, edm::ESHandle< T >::product(), 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 340 of file HCalSD.cc.
343 const G4LogicalVolumeStore* lvs = G4LogicalVolumeStore::GetInstance();
344 const G4LogicalVolume* lv;
345 std::stringstream ss3;
346 ss3 <<
"HCalSD: " << lvnames.size() <<
" names to be tested for Volume <" <<
value <<
">:";
347 for (
unsigned int i = 0;
i < lvnames.size(); ++
i) {
348 G4String namv(static_cast<std::string>(dd4hep::dd::noNamespace(lvnames[
i])));
350 for (
auto lvol : *lvs) {
351 if (dd4hep::dd::noNamespace(lvol->GetName()) == namv) {
356 lvvec.emplace_back(lv);
357 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 584 of file HCalSD.cc.
587 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 429 of file HCalSD.cc.
431 auto const lv = aStep->GetPreStepPoint()->GetPhysicalVolume()->GetLogicalVolume();
432 auto const theTrack = aStep->GetTrack();
437 edm::LogVerbatim(
"HcalSim") <<
"HCalSD: Hit at Fibre in LV " << lv->GetName() <<
" for track "
438 << aStep->GetTrack()->GetTrackID() <<
" ("
439 << aStep->GetTrack()->GetDefinition()->GetParticleName() <<
")";
451 edm::LogVerbatim(
"HcalSim") <<
"HCalSD: Hit from PMT parametrization in LV " << lv->GetName() <<
" for Track "
452 << aStep->GetTrack()->GetTrackID() <<
" ("
453 << aStep->GetTrack()->GetDefinition()->GetParticleName() <<
")";
462 edm::LogVerbatim(
"HcalSim") <<
"HCalSD: Hit from straight FibreBundle in LV: " << lv->GetName() <<
" for track "
463 << aStep->GetTrack()->GetTrackID() <<
" ("
464 << aStep->GetTrack()->GetDefinition()->GetParticleName() <<
")";
473 edm::LogVerbatim(
"HcalSim") <<
"HCalSD: Hit from conical FibreBundle PV: " << lv->GetName() <<
" for track "
474 << aStep->GetTrack()->GetTrackID() <<
" ("
475 << aStep->GetTrack()->GetDefinition()->GetParticleName() <<
")";
481 destep = aStep->GetTotalEnergyDeposit();
483 const G4VTouchable* touch = aStep->GetPreStepPoint()->GetTouchable();
493 det = hcid.subdetId();
494 ieta = hcid.ietaAbs();
498 lay = (touch->GetReplicaNumber(0) / 10) % 100 + 1;
501 <<
" lay: " << lay - 2;
506 G4ThreeVector hitPoint = aStep->GetPreStepPoint()->GetPosition();
531 int pdg = theTrack->GetDefinition()->GetPDGEncoding();
533 double ke = theTrack->GetKineticEnergy();
534 if (
pdg / 1000000000 == 1 && (
pdg / 10000) % 100 > 0 && (
pdg / 10) % 100 > 0 &&
ke <
kmaxIon)
544 const G4Material* mat = aStep->GetPreStepPoint()->GetMaterial();
549 double wt2 = theTrack->GetWeight();
550 double edep =
weight_ * wt1 * destep;
556 <<
" weight= " <<
weight_ <<
" wt1= " << wt1 <<
" wt2= " << wt2;
References 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 715 of file HCalSD.cc.
717 if (!isKilled ||
hits.empty()) {
726 auto const theTrack = aStep->GetTrack();
737 edm::LogVerbatim(
"HcalSim") <<
"HCalSD::getFromLibrary " <<
hits.size() <<
" hits for " << GetName() <<
" of "
738 << primaryID <<
" with " << theTrack->GetDefinition()->GetParticleName() <<
" of "
739 << aStep->GetPreStepPoint()->GetKineticEnergy() /
GeV <<
" GeV";
741 for (
unsigned int i = 0;
i <
hits.size(); ++
i) {
742 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 365 of file HCalSD.cc.
366 auto const track = aStep->GetTrack();
367 depth_ = (aStep->GetPreStepPoint()->GetTouchable()->GetReplicaNumber(0)) % 10;
380 G4ThreeVector hitPoint = aStep->GetPreStepPoint()->GetPosition();
381 const double invcm = 1. / CLHEP::cm;
382 double r = hitPoint.perp() * invcm;
383 double z =
std::abs(hitPoint.z()) * invcm;
384 double dose_acquired = 0.;
396 edm::LogVerbatim(
"HcalSim") <<
"HCalSD::getFromLibrary: HFLumiDarkening at "
397 <<
"r= " <<
r <<
", z= " <<
z <<
" Dose= " << dose_acquired <<
" weight= " <<
weight_;
404 G4String nameVolume = aStep->GetPreStepPoint()->GetPhysicalVolume()->GetLogicalVolume()->GetName();
406 <<
" for Track " <<
track->GetTrackID() <<
" ("
407 <<
track->GetDefinition()->GetParticleName() <<
")";
412 auto nameVolume = aStep->GetPreStepPoint()->GetPhysicalVolume()->GetLogicalVolume()->GetName();
413 edm::LogVerbatim(
"HcalSim") <<
"HCalSD: Starts shower library from " << nameVolume <<
" for Track "
414 <<
track->GetTrackID() <<
" (" <<
track->GetDefinition()->GetParticleName() <<
")";
423 <<
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 800 of file HCalSD.cc.
802 if (!isKilled ||
hits.empty()) {
810 edm::LogVerbatim(
"HcalSim") <<
"HCalSD::getFromParam " <<
hits.size() <<
" hits for " << GetName() <<
" of "
811 << primaryID <<
" with " << aStep->GetTrack()->GetDefinition()->GetParticleName()
812 <<
" of " << aStep->GetPreStepPoint()->GetKineticEnergy() /
GeV
813 <<
" GeV in detector type " << det;
815 for (
unsigned int i = 0;
i <
hits.size(); ++
i) {
816 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 889 of file HCalSD.cc.
890 auto const preStepPoint = aStep->GetPreStepPoint();
891 auto const theTrack = aStep->GetTrack();
896 double etrack = preStepPoint->GetKineticEnergy();
899 primaryID = theTrack->GetTrackID();
901 primaryID = theTrack->GetParentID();
903 primaryID = theTrack->GetTrackID();
909 const G4ThreeVector& hitPoint = preStepPoint->GetPosition();
910 double rr = hitPoint.x() * hitPoint.x() + hitPoint.y() * hitPoint.y();
911 double phi =
rr == 0. ? 0. : atan2(hitPoint.y(), hitPoint.x());
918 if (hitPoint.z() < 0.)
921 edm::LogVerbatim(
"HcalSim") <<
"HCalSD::Hit for Detector " << det <<
" etaR " << etaR <<
" phi " <<
phi / deg
922 <<
" depth " <<
depth;
924 double time = (aStep->GetPostStepPoint()->GetGlobalTime());
941 double beta = preStepPoint->GetBeta();
942 edm::LogVerbatim(
"HcalSim") <<
"HCalSD::getHitFibreBundle 1 hit for " << GetName() <<
" of " << primaryID
943 <<
" with " << theTrack->GetDefinition()->GetParticleName() <<
" of "
944 << 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 830 of file HCalSD.cc.
831 auto const preStepPoint = aStep->GetPreStepPoint();
832 auto const theTrack = aStep->GetTrack();
837 double etrack = preStepPoint->GetKineticEnergy();
840 primaryID = theTrack->GetTrackID();
842 primaryID = theTrack->GetParentID();
844 primaryID = theTrack->GetTrackID();
850 const G4ThreeVector& hitPoint = preStepPoint->GetPosition();
851 double rr = (hitPoint.x() * hitPoint.x() + hitPoint.y() * hitPoint.y());
852 double phi = (
rr == 0. ? 0. : atan2(hitPoint.y(), hitPoint.x()));
859 if (hitPoint.z() < 0)
862 edm::LogVerbatim(
"HcalSim") <<
"HCalSD::Hit for Detector " << det <<
" etaR " << etaR <<
" phi " <<
phi / deg
863 <<
" depth " <<
depth;
865 double time = (aStep->GetPostStepPoint()->GetGlobalTime());
879 double beta = preStepPoint->GetBeta();
880 edm::LogVerbatim(
"HcalSim") <<
"HCalSD::getHitPMT 1 hit for " << GetName() <<
" of " << primaryID <<
" with "
881 << theTrack->GetDefinition()->GetParticleName() <<
" of "
882 << 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 758 of file HCalSD.cc.
765 auto const theTrack = aStep->GetTrack();
778 edm::LogVerbatim(
"HcalSim") <<
"HCalSD::hitForFibre " <<
hits.size() <<
" hits for " << GetName() <<
" of "
779 << primaryID <<
" with " << theTrack->GetDefinition()->GetParticleName() <<
" of "
780 << aStep->GetPreStepPoint()->GetKineticEnergy() /
GeV <<
" GeV in detector type " << det;
783 for (
unsigned int i = 0;
i <
hits.size(); ++
i) {
784 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 995 of file HCalSD.cc.
996 const G4VTouchable* touch = aStep->GetPreStepPoint()->GetTouchable();
997 static const unsigned int names = 10;
998 static const G4String modName[
names] = {
999 "HEModule",
"HVQF",
"HBModule",
"MBAT",
"MBBT",
"MBBTC",
"MBBT_R1P",
"MBBT_R1M",
"MBBT_R1PX",
"MBBT_R1MX"};
1000 G4ThreeVector
local;
1002 double depth = -2000;
1004 for (
int n = 0;
n < touch->GetHistoryDepth(); ++
n) {
1005 G4String
name(static_cast<std::string>(dd4hep::dd::noNamespace(touch->GetVolume(
n)->GetName())));
1010 if (
name == modName[
ii]) {
1012 int dn = touch->GetHistoryDepth() -
n;
1013 local = touch->GetHistory()->GetTransform(dn).TransformPoint(global);
1017 }
else if (
ii == 1) {
1020 }
else if (
ii == 2) {
1037 <<
" depth " <<
depth <<
" ID " <<
id <<
" EDEP " << edep <<
" Time " <<
time;
1045 int jd = 2 *
idx +
id - 7;
1046 if (jd >= 0 && jd < 4) {
1048 if (
hit_[jd] !=
nullptr)
1049 hit_[jd]->Fill(edep);
1050 if (
time_[jd] !=
nullptr)
1052 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 951 of file HCalSD.cc.
960 layerWeights.insert(std::pair<uint32_t, double>(
id, wt));
963 edm::LogVerbatim(
"HcalSim") <<
"HCalSD::readWeightFromFile:Entry " <<
entry <<
" ID " << std::hex <<
id
964 <<
std::dec <<
" (" << det <<
"/" <<
zside <<
"/1/" << etaR <<
"/" <<
phi <<
"/"
965 << 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 743 of file CaloSD.cc.
757 int hc_entries =
theHC->entries();
758 for (
int i = 0;
i < hc_entries; ++
i) {
763 double x = (*theHC)[
i]->getEM();
766 x = (*theHC)[
i]->getHadr();
769 tt += (*theHC)[
i]->getTimeSlice();
770 ee += (*theHC)[
i]->getIncidentEnergy();
775 double norm = (
count > 0) ? 1.0 /
count : 0.0;
790 <<
" hits not passing cuts\n EmeanEM= " << eEM <<
" ErmsEM= " << eEM2
791 <<
"\n EmeanHAD= " << eHAD <<
" ErmsHAD= " << eHAD2 <<
" TimeMean= " <<
tt
792 <<
" E0mean= " << ee <<
" Zglob= " << zglob <<
" Zloc= " << zloc <<
" ";
795 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
T const * product() const
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
T * make(const Args &... args) const
make new ROOT object
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 edm::EventSetup &es, 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
Log< level::Error, false > LogError
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
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