|
|
#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 *) |
|
bool | hitExists (const G4Step *) |
|
void | ignoreRejection () |
|
virtual void | initEvent (const BeginOfEvent *) |
|
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.
101 bool agingFlagHF = m_HC.
getParameter<
bool>(
"HFDarkening");
109 applyFidCut = m_HF.getParameter<
bool>(
"ApplyFiducialCut");
113 edm::LogVerbatim(
"HcalSim") <<
"***************************************************"
115 <<
"* Constructing a HCalSD with name " <<
name <<
"\n"
117 <<
"***************************************************";
120 <<
"\n Use of shower parametrization set to " <<
useParam
122 <<
"\n Use PMT Hit is set to " <<
usePMTHit <<
" with beta Threshold " <<
betaThr
124 <<
"\n Use of Birks law is set to " <<
useBirk
125 <<
" with three constants kB = " <<
birk1 / bunit <<
", C1 = " <<
birk2
126 <<
", C2 = " <<
birk3;
130 <<
" ions below " <<
kmaxIon <<
" MeV\n"
134 <<
" Flag (HB) " <<
agingFlagHB <<
" Flag (HF) " << agingFlagHF <<
"\n"
144 edm::LogError(
"HcalSim") <<
"HCalSD : Cannot find HcalDDDSimConstant";
145 throw cms::Exception(
"Unknown",
"HCalSD") <<
"Cannot find HcalDDDSimConstant\n";
149 matNames.emplace_back(
"Scintillator");
157 edm::LogError(
"HcalSim") <<
"HCalSD : Cannot find HcalDDDSimulationConstant";
158 throw cms::Exception(
"Unknown",
"HCalSD") <<
"Cannot find HcalDDDSimulationConstant\n";
173 const G4LogicalVolumeStore* lvs = G4LogicalVolumeStore::GetInstance();
175 const G4LogicalVolume* lv;
192 std::stringstream ss0;
193 ss0 <<
"HCalSD: Names to be tested for Volume = HF has " <<
hfNames.size() <<
" elements";
195 for (
unsigned int i = 0;
i <
hfNames.size(); ++
i) {
196 G4String namv(static_cast<std::string>(dd4hep::dd::noNamespace(
hfNames[
i])));
198 for (
auto lvol : *lvs) {
199 if (dd4hep::dd::noNamespace(lvol->GetName()) == namv) {
204 hfLV.emplace_back(lv);
207 ss0 <<
"\n HF[" <<
i <<
"] = " << namv <<
" LV " << lv <<
" at level " <<
temp[
i];
225 const G4MaterialTable* matTab = G4Material::GetMaterialTable();
226 std::vector<G4Material*>::const_iterator matite;
228 const G4Material* mat =
nullptr;
229 for (matite = matTab->begin(); matite != matTab->end(); ++matite) {
230 if (static_cast<std::string>(dd4hep::dd::noNamespace((*matite)->GetName())) == namx) {
238 std::stringstream ss1;
239 for (
unsigned int i = 0;
i <
matNames.size(); ++
i) {
240 if (
i / 10 * 10 ==
i) {
245 edm::LogVerbatim(
"HcalSim") <<
"HCalSD: Material names for HCAL: " << ss1.str();
255 std::stringstream ss2;
256 for (
unsigned int ig = 0; ig <
gpar.size(); ig++) {
257 ss2 <<
"\n gpar[" << ig <<
"] = " <<
gpar[ig] / cm <<
" cm";
260 <<
" gpar (cm)" << ss2.str();
278 for (
int i = 0;
i < 9; ++
i) {
289 if (
tfile.isAvailable()) {
290 static const char*
const labels[] = {
"HB",
301 for (
int i = 0;
i < 9; ++
i) {
303 sprintf(
name,
"HCalSDHit%d",
i);
305 sprintf(
title,
"Energy (MeV)");
307 hit_[
i]->GetYaxis()->SetTitle(
"Hits");
309 sprintf(
name,
"HCalSDTime%d",
i);
311 sprintf(
title,
"Time (ns)");
313 time_[
i]->GetYaxis()->SetTitle(
"Hits");
314 sprintf(
title,
"Longitudinal profile in %s",
labels[
i]);
315 sprintf(
name,
"HCalSDDist%d",
i);
317 sprintf(
title,
"Distance (mm)");
319 dist_[
i]->GetYaxis()->SetTitle(
"Hits");
322 hzvem = hcDir.
make<TH1F>(
"hzvem",
"Longitudinal Profile (EM Part)", 330, 0.0, 1650.0);
323 hzvem->GetXaxis()->SetTitle(
"Longitudinal Profile (EM Part)");
324 hzvhad = hcDir.
make<TH1F>(
"hzvhad",
"Longitudinal Profile (Had Part)", 330, 0.0, 1650.0);
325 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(), edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), 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 338 of file HCalSD.cc.
341 const G4LogicalVolumeStore* lvs = G4LogicalVolumeStore::GetInstance();
342 const G4LogicalVolume* lv;
343 std::stringstream ss3;
344 ss3 <<
"HCalSD: " << lvnames.size() <<
" names to be tested for Volume <" <<
value <<
">:";
345 for (
unsigned int i = 0;
i < lvnames.size(); ++
i) {
346 G4String namv(static_cast<std::string>(dd4hep::dd::noNamespace(lvnames[
i])));
348 for (
auto lvol : *lvs) {
349 if (dd4hep::dd::noNamespace(lvol->GetName()) == namv) {
354 lvvec.emplace_back(lv);
355 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 575 of file HCalSD.cc.
578 switch (theId.subdetId()) {
References eminHitHB, eminHitHE, eminHitHF, eminHitHO, CaloG4Hit::getEnergyDeposit(), CaloG4Hit::getUnitID(), HcalBarrel, HcalEndcap, HcalForward, HcalOuter, remoteMonitoring_LED_IterMethod_cfg::threshold, ntuplemaker::time, and CaloSD::tmaxHit.
◆ getEnergyDeposit()
double HCalSD::getEnergyDeposit |
( |
const G4Step * |
aStep | ) |
|
|
overrideprotectedvirtual |
Reimplemented from CaloSD.
Definition at line 420 of file HCalSD.cc.
422 auto const lv = aStep->GetPreStepPoint()->GetPhysicalVolume()->GetLogicalVolume();
423 auto const theTrack = aStep->GetTrack();
428 edm::LogVerbatim(
"HcalSim") <<
"HCalSD: Hit at Fibre in LV " << lv->GetName() <<
" for track "
429 << aStep->GetTrack()->GetTrackID() <<
" ("
430 << aStep->GetTrack()->GetDefinition()->GetParticleName() <<
")";
442 edm::LogVerbatim(
"HcalSim") <<
"HCalSD: Hit from PMT parametrization in LV " << lv->GetName() <<
" for Track "
443 << aStep->GetTrack()->GetTrackID() <<
" ("
444 << aStep->GetTrack()->GetDefinition()->GetParticleName() <<
")";
453 edm::LogVerbatim(
"HcalSim") <<
"HCalSD: Hit from straight FibreBundle in LV: " << lv->GetName() <<
" for track "
454 << aStep->GetTrack()->GetTrackID() <<
" ("
455 << aStep->GetTrack()->GetDefinition()->GetParticleName() <<
")";
464 edm::LogVerbatim(
"HcalSim") <<
"HCalSD: Hit from conical FibreBundle PV: " << lv->GetName() <<
" for track "
465 << aStep->GetTrack()->GetTrackID() <<
" ("
466 << aStep->GetTrack()->GetDefinition()->GetParticleName() <<
")";
472 destep = aStep->GetTotalEnergyDeposit();
474 const G4VTouchable* touch = aStep->GetPreStepPoint()->GetTouchable();
484 det = hcid.subdetId();
485 ieta = hcid.ietaAbs();
489 lay = (touch->GetReplicaNumber(0) / 10) % 100 + 1;
492 <<
" lay: " << lay - 2;
497 G4ThreeVector hitPoint = aStep->GetPreStepPoint()->GetPosition();
522 int pdg = theTrack->GetDefinition()->GetPDGEncoding();
524 double ke = theTrack->GetKineticEnergy();
525 if (
pdg / 1000000000 == 1 && (
pdg / 10000) % 100 > 0 && (
pdg / 10) % 100 > 0 &&
ke <
kmaxIon)
535 const G4Material* mat = aStep->GetPreStepPoint()->GetMaterial();
540 double wt2 = theTrack->GetWeight();
541 double edep =
weight_ * wt1 * destep;
547 <<
" 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 706 of file HCalSD.cc.
708 if (!isKilled ||
hits.empty()) {
717 auto const theTrack = aStep->GetTrack();
728 edm::LogVerbatim(
"HcalSim") <<
"HCalSD::getFromLibrary " <<
hits.size() <<
" hits for " << GetName() <<
" of "
729 << primaryID <<
" with " << theTrack->GetDefinition()->GetParticleName() <<
" of "
730 << aStep->GetPreStepPoint()->GetKineticEnergy() /
GeV <<
" GeV";
732 for (
unsigned int i = 0;
i <
hits.size(); ++
i) {
733 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, ntuplemaker::time, and weight_.
Referenced by getFromLibrary().
◆ getFromLibrary()
bool HCalSD::getFromLibrary |
( |
const G4Step * |
aStep | ) |
|
|
overrideprotectedvirtual |
Reimplemented from CaloSD.
Definition at line 363 of file HCalSD.cc.
364 auto const track = aStep->GetTrack();
365 depth_ = (aStep->GetPreStepPoint()->GetTouchable()->GetReplicaNumber(0)) % 10;
371 G4ThreeVector hitPoint = aStep->GetPreStepPoint()->GetPosition();
372 const double invcm = 1. / CLHEP::cm;
373 double r = hitPoint.perp() * invcm;
374 double z =
std::abs(hitPoint.z()) * invcm;
375 double dose_acquired = 0.;
387 edm::LogVerbatim(
"HcalSim") <<
"HCalSD::getFromLibrary: HFLumiDarkening at "
388 <<
"r= " <<
r <<
", z= " <<
z <<
" Dose= " << dose_acquired <<
" weight= " <<
weight_;
395 G4String nameVolume = aStep->GetPreStepPoint()->GetPhysicalVolume()->GetLogicalVolume()->GetName();
397 <<
" for Track " <<
track->GetTrackID() <<
" ("
398 <<
track->GetDefinition()->GetParticleName() <<
")";
403 auto nameVolume = aStep->GetPreStepPoint()->GetPhysicalVolume()->GetLogicalVolume()->GetName();
404 edm::LogVerbatim(
"HcalSim") <<
"HCalSD: Starts shower library from " << nameVolume <<
" for Track "
405 <<
track->GetTrackID() <<
" (" <<
track->GetDefinition()->GetParticleName() <<
")";
414 <<
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 791 of file HCalSD.cc.
793 if (!isKilled ||
hits.empty()) {
801 edm::LogVerbatim(
"HcalSim") <<
"HCalSD::getFromParam " <<
hits.size() <<
" hits for " << GetName() <<
" of "
802 << primaryID <<
" with " << aStep->GetTrack()->GetDefinition()->GetParticleName()
803 <<
" of " << aStep->GetPreStepPoint()->GetKineticEnergy() /
GeV
804 <<
" GeV in detector type " << det;
806 for (
unsigned int i = 0;
i <
hits.size(); ++
i) {
807 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, ntuplemaker::time, and weight_.
Referenced by getFromLibrary().
◆ getHitFibreBundle()
void HCalSD::getHitFibreBundle |
( |
const G4Step * |
step, |
|
|
bool |
type |
|
) |
| |
|
private |
Definition at line 880 of file HCalSD.cc.
881 auto const preStepPoint = aStep->GetPreStepPoint();
882 auto const theTrack = aStep->GetTrack();
887 double etrack = preStepPoint->GetKineticEnergy();
890 primaryID = theTrack->GetTrackID();
892 primaryID = theTrack->GetParentID();
894 primaryID = theTrack->GetTrackID();
900 const G4ThreeVector& hitPoint = preStepPoint->GetPosition();
901 double rr = hitPoint.x() * hitPoint.x() + hitPoint.y() * hitPoint.y();
902 double phi =
rr == 0. ? 0. : atan2(hitPoint.y(), hitPoint.x());
909 if (hitPoint.z() < 0.)
912 edm::LogVerbatim(
"HcalSim") <<
"HCalSD::Hit for Detector " << det <<
" etaR " << etaR <<
" phi " <<
phi / deg
913 <<
" depth " <<
depth;
915 double time = (aStep->GetPostStepPoint()->GetGlobalTime());
932 double beta = preStepPoint->GetBeta();
933 edm::LogVerbatim(
"HcalSim") <<
"HCalSD::getHitFibreBundle 1 hit for " << GetName() <<
" of " << primaryID
934 <<
" with " << theTrack->GetDefinition()->GetParticleName() <<
" of "
935 << preStepPoint->GetKineticEnergy() /
GeV <<
" GeV with velocity " <<
beta <<
" UnitID "
References zMuMuMuonUserData::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, ntuplemaker::time, and createJobs::tmp.
Referenced by getEnergyDeposit().
◆ getHitPMT()
void HCalSD::getHitPMT |
( |
const G4Step * |
step | ) |
|
|
private |
Definition at line 821 of file HCalSD.cc.
822 auto const preStepPoint = aStep->GetPreStepPoint();
823 auto const theTrack = aStep->GetTrack();
828 double etrack = preStepPoint->GetKineticEnergy();
831 primaryID = theTrack->GetTrackID();
833 primaryID = theTrack->GetParentID();
835 primaryID = theTrack->GetTrackID();
841 const G4ThreeVector& hitPoint = preStepPoint->GetPosition();
842 double rr = (hitPoint.x() * hitPoint.x() + hitPoint.y() * hitPoint.y());
843 double phi = (
rr == 0. ? 0. : atan2(hitPoint.y(), hitPoint.x()));
850 if (hitPoint.z() < 0)
853 edm::LogVerbatim(
"HcalSim") <<
"HCalSD::Hit for Detector " << det <<
" etaR " << etaR <<
" phi " <<
phi / deg
854 <<
" depth " <<
depth;
856 double time = (aStep->GetPostStepPoint()->GetGlobalTime());
870 double beta = preStepPoint->GetBeta();
871 edm::LogVerbatim(
"HcalSim") <<
"HCalSD::getHitPMT 1 hit for " << GetName() <<
" of " << primaryID <<
" with "
872 << theTrack->GetDefinition()->GetParticleName() <<
" of "
873 << preStepPoint->GetKineticEnergy() /
GeV <<
" GeV with velocity " <<
beta <<
" UnitID "
References zMuMuMuonUserData::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, ntuplemaker::time, and createJobs::tmp.
Referenced by getEnergyDeposit().
◆ hitForFibre()
void HCalSD::hitForFibre |
( |
const G4Step * |
step | ) |
|
|
private |
Definition at line 749 of file HCalSD.cc.
756 auto const theTrack = aStep->GetTrack();
769 edm::LogVerbatim(
"HcalSim") <<
"HCalSD::hitForFibre " <<
hits.size() <<
" hits for " << GetName() <<
" of "
770 << primaryID <<
" with " << theTrack->GetDefinition()->GetParticleName() <<
" of "
771 << aStep->GetPreStepPoint()->GetKineticEnergy() /
GeV <<
" GeV in detector type " << det;
774 for (
unsigned int i = 0;
i <
hits.size(); ++
i) {
775 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(), ntuplemaker::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 986 of file HCalSD.cc.
987 const G4VTouchable* touch = aStep->GetPreStepPoint()->GetTouchable();
988 static const G4String modName[8] = {
"HEModule",
"HVQF",
"HBModule",
"MBAT",
"MBBT",
"MBBTC",
"MBBT_R1P",
"MBBT_R1M"};
991 double depth = -2000;
993 for (
int n = 0;
n < touch->GetHistoryDepth(); ++
n) {
994 G4String
name(static_cast<std::string>(dd4hep::dd::noNamespace(touch->GetVolume(
n)->GetName())));
998 for (
unsigned int ii = 0;
ii < 8; ++
ii) {
999 if (
name == modName[
ii]) {
1001 int dn = touch->GetHistoryDepth() -
n;
1002 local = touch->GetHistory()->GetTransform(dn).TransformPoint(global);
1006 }
else if (
ii == 1) {
1009 }
else if (
ii == 2) {
1026 <<
" depth " <<
depth <<
" ID " <<
id <<
" EDEP " << edep <<
" Time " <<
time;
1034 int jd = 2 *
idx +
id - 7;
1035 if (jd >= 0 && jd < 4) {
1037 if (
hit_[jd] !=
nullptr)
1038 hit_[jd]->Fill(edep);
1039 if (
time_[jd] !=
nullptr)
1041 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, ntuplemaker::time, and time_.
Referenced by getFromHFLibrary(), getFromParam(), getHitFibreBundle(), getHitPMT(), and hitForFibre().
◆ readWeightFromFile()
void HCalSD::readWeightFromFile |
( |
const std::string & |
fName | ) |
|
|
private |
Definition at line 942 of file HCalSD.cc.
951 layerWeights.insert(std::pair<uint32_t, double>(
id, wt));
954 edm::LogVerbatim(
"HcalSim") <<
"HCalSD::readWeightFromFile:Entry " <<
entry <<
" ID " << std::hex <<
id
955 <<
std::dec <<
" (" << det <<
"/" <<
zside <<
"/1/" << etaR <<
"/" <<
phi <<
"/"
956 << 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 575 of file CaloSD.cc.
589 int hc_entries =
theHC->entries();
590 for (
int i = 0;
i < hc_entries; ++
i) {
595 double x = (*theHC)[
i]->getEM();
598 x = (*theHC)[
i]->getHadr();
601 tt += (*theHC)[
i]->getTimeSlice();
602 ee += (*theHC)[
i]->getIncidentEnergy();
607 double norm = (
count > 0) ? 1.0 /
count : 0.0;
622 <<
" hits not passing cuts\n EmeanEM= " << eEM <<
" ErmsEM= " << eEM2
623 <<
"\n EmeanHAD= " << eHAD <<
" ErmsHAD= " << eHAD2 <<
" TimeMean= " <<
tt
624 <<
" E0mean= " << ee <<
" Zglob= " << zglob <<
" Zloc= " << zloc <<
" ";
627 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 *)
T getUntrackedParameter(std::string const &, T const &) const
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
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