|
|
#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 |
|
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 () |
|
|
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 44 of file HCalSD.cc.
97 bool agingFlagHF = m_HC.
getParameter<
bool>(
"HFDarkening");
105 applyFidCut = m_HF.getParameter<
bool>(
"ApplyFiducialCut");
108 edm::LogVerbatim(
"HcalSim") <<
"***************************************************"
110 <<
"* Constructing a HCalSD with name " <<
name <<
"\n"
112 <<
"***************************************************";
115 <<
"\nUse of shower parametrization set to " <<
useParam
116 <<
"\nUse of shower library is set to " <<
useShowerLibrary <<
"\nUse PMT Hit is set to "
117 <<
usePMTHit <<
" with beta Threshold " <<
betaThr <<
"\nUSe of FibreBundle Hit set to "
119 <<
" with three constants kB = " <<
birk1 <<
", C1 = " <<
birk2 <<
", C2 = " <<
birk3;
123 <<
" ions below " <<
kmaxIon <<
" MeV\n"
127 <<
" Flag (HB) " <<
agingFlagHB <<
" Flag (HF) " << agingFlagHF <<
"\n"
137 edm::LogError(
"HcalSim") <<
"HCalSD : Cannot find HcalDDDSimConstant";
138 throw cms::Exception(
"Unknown",
"HCalSD") <<
"Cannot find HcalDDDSimConstant\n";
142 matNames.emplace_back(
"Scintillator");
150 edm::LogError(
"HcalSim") <<
"HCalSD : Cannot find HcalDDDSimulationConstant";
151 throw cms::Exception(
"Unknown",
"HCalSD") <<
"Cannot find HcalDDDSimulationConstant\n";
166 const G4LogicalVolumeStore* lvs = G4LogicalVolumeStore::GetInstance();
168 const G4LogicalVolume* lv;
185 std::stringstream ss0;
186 ss0 <<
"HCalSD: Names to be tested for Volume = HF has " <<
hfNames.size() <<
" elements";
188 for (
unsigned int i = 0;
i <
hfNames.size(); ++
i) {
189 G4String namv = static_cast<G4String>(
hfNames[
i]);
191 for (
auto lvol : *lvs) {
192 if (lvol->GetName() == namv) {
197 hfLV.emplace_back(lv);
200 ss0 <<
"\n HF[" <<
i <<
"] = " << namv <<
" LV " << lv <<
" at level " <<
temp[
i];
218 const G4MaterialTable* matTab = G4Material::GetMaterialTable();
219 std::vector<G4Material*>::const_iterator matite;
221 const G4Material* mat =
nullptr;
222 for (matite = matTab->begin(); matite != matTab->end(); ++matite) {
223 if ((*matite)->GetName() == static_cast<G4String>(namx)) {
231 std::stringstream ss1;
232 for (
unsigned int i = 0;
i <
matNames.size(); ++
i) {
233 if (
i / 10 * 10 ==
i) {
238 edm::LogVerbatim(
"HcalSim") <<
"HCalSD: Material names for HCAL: " << ss1.str();
248 std::stringstream ss2;
249 for (
unsigned int ig = 0; ig <
gpar.size(); ig++) {
250 ss2 <<
"\n gpar[" << ig <<
"] = " <<
gpar[ig] / cm <<
" cm";
253 <<
" gpar (cm)" << ss2.str();
271 for (
int i = 0;
i < 9; ++
i) {
282 if (
tfile.isAvailable()) {
283 static const char*
const labels[] = {
"HB",
294 for (
int i = 0;
i < 9; ++
i) {
296 sprintf(
name,
"HCalSDHit%d",
i);
298 sprintf(
title,
"Energy (MeV)");
300 hit_[
i]->GetYaxis()->SetTitle(
"Hits");
302 sprintf(
name,
"HCalSDTime%d",
i);
304 sprintf(
title,
"Time (ns)");
306 time_[
i]->GetYaxis()->SetTitle(
"Hits");
307 sprintf(
title,
"Longitudinal profile in %s",
labels[
i]);
308 sprintf(
name,
"HCalSDDist%d",
i);
310 sprintf(
title,
"Distance (mm)");
312 dist_[
i]->GetYaxis()->SetTitle(
"Hits");
315 hzvem = hcDir.
make<TH1F>(
"hzvem",
"Longitudinal Profile (EM Part)", 330, 0.0, 1650.0);
316 hzvem->GetXaxis()->SetTitle(
"Longitudinal Profile (EM Part)");
317 hzvhad = hcDir.
make<TH1F>(
"hzvhad",
"Longitudinal Profile (Had Part)", 330, 0.0, 1650.0);
318 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, edm::EventSetup::get(), get, HcalDDDSimConstants::getGparHF(), HcalDDDSimConstants::getMaxDepth(), edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), gpar, hcalConstants_, HcalSimulationParameters::hcalMaterialNames_, hcalSimConstants_, HcalDDDSimulationConstants::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, 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_, overlapproblemtsosanalyzer_cfi::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 324 of file HCalSD.cc.
327 const G4LogicalVolumeStore* lvs = G4LogicalVolumeStore::GetInstance();
328 const G4LogicalVolume* lv;
329 std::stringstream ss3;
330 ss3 <<
"HCalSD: " << lvnames.size() <<
" names to be tested for Volume <" <<
value <<
">:";
331 for (
unsigned int i = 0;
i < lvnames.size(); ++
i) {
332 G4String namv = static_cast<G4String>(lvnames[
i]);
334 for (
auto lvol : *lvs) {
335 if (lvol->GetName() == namv) {
340 lvvec.emplace_back(lv);
341 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 561 of file HCalSD.cc.
564 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 406 of file HCalSD.cc.
408 auto const lv = aStep->GetPreStepPoint()->GetPhysicalVolume()->GetLogicalVolume();
409 auto const theTrack = aStep->GetTrack();
414 edm::LogVerbatim(
"HcalSim") <<
"HCalSD: Hit at Fibre in LV " << lv->GetName() <<
" for track "
415 << aStep->GetTrack()->GetTrackID() <<
" ("
416 << aStep->GetTrack()->GetDefinition()->GetParticleName() <<
")";
428 edm::LogVerbatim(
"HcalSim") <<
"HCalSD: Hit from PMT parametrization in LV " << lv->GetName() <<
" for Track "
429 << aStep->GetTrack()->GetTrackID() <<
" ("
430 << aStep->GetTrack()->GetDefinition()->GetParticleName() <<
")";
439 edm::LogVerbatim(
"HcalSim") <<
"HCalSD: Hit from straight FibreBundle in LV: " << lv->GetName() <<
" for track "
440 << aStep->GetTrack()->GetTrackID() <<
" ("
441 << aStep->GetTrack()->GetDefinition()->GetParticleName() <<
")";
450 edm::LogVerbatim(
"HcalSim") <<
"HCalSD: Hit from conical FibreBundle PV: " << lv->GetName() <<
" for track "
451 << aStep->GetTrack()->GetTrackID() <<
" ("
452 << aStep->GetTrack()->GetDefinition()->GetParticleName() <<
")";
458 destep = aStep->GetTotalEnergyDeposit();
460 const G4VTouchable* touch = aStep->GetPreStepPoint()->GetTouchable();
470 det = hcid.subdetId();
471 ieta = hcid.ietaAbs();
475 lay = (touch->GetReplicaNumber(0) / 10) % 100 + 1;
478 <<
" lay: " << lay - 2;
483 G4ThreeVector hitPoint = aStep->GetPreStepPoint()->GetPosition();
508 int pdg = theTrack->GetDefinition()->GetPDGEncoding();
510 double ke = theTrack->GetKineticEnergy();
511 if (
pdg / 1000000000 == 1 && (
pdg / 10000) % 100 > 0 && (
pdg / 10) % 100 > 0 &&
ke <
kmaxIon)
521 const G4Material* mat = aStep->GetPreStepPoint()->GetMaterial();
526 double wt2 = theTrack->GetWeight();
527 double edep =
weight_ * wt1 * destep;
533 <<
" 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 692 of file HCalSD.cc.
694 if (!isKilled ||
hits.empty()) {
703 auto const theTrack = aStep->GetTrack();
714 edm::LogVerbatim(
"HcalSim") <<
"HCalSD::getFromLibrary " <<
hits.size() <<
" hits for " << GetName() <<
" of "
715 << primaryID <<
" with " << theTrack->GetDefinition()->GetParticleName() <<
" of "
716 << aStep->GetPreStepPoint()->GetKineticEnergy() /
GeV <<
" GeV";
718 for (
unsigned int i = 0;
i <
hits.size(); ++
i) {
719 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 349 of file HCalSD.cc.
350 auto const track = aStep->GetTrack();
351 depth_ = (aStep->GetPreStepPoint()->GetTouchable()->GetReplicaNumber(0)) % 10;
357 G4ThreeVector hitPoint = aStep->GetPreStepPoint()->GetPosition();
358 const double invcm = 1. / CLHEP::cm;
359 double r = hitPoint.perp() * invcm;
360 double z =
std::abs(hitPoint.z()) * invcm;
361 double dose_acquired = 0.;
373 edm::LogVerbatim(
"HcalSim") <<
"HCalSD::getFromLibrary: HFLumiDarkening at "
374 <<
"r= " <<
r <<
", z= " <<
z <<
" Dose= " << dose_acquired <<
" weight= " <<
weight_;
381 G4String nameVolume = aStep->GetPreStepPoint()->GetPhysicalVolume()->GetLogicalVolume()->GetName();
383 <<
" for Track " <<
track->GetTrackID() <<
" ("
384 <<
track->GetDefinition()->GetParticleName() <<
")";
389 auto nameVolume = aStep->GetPreStepPoint()->GetPhysicalVolume()->GetLogicalVolume()->GetName();
390 edm::LogVerbatim(
"HcalSim") <<
"HCalSD: Starts shower library from " << nameVolume <<
" for Track "
391 <<
track->GetTrackID() <<
" (" <<
track->GetDefinition()->GetParticleName() <<
")";
400 <<
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_2018_cff::track, HFDarkening::upperZLimit, useParam, useShowerLibrary, weight_, and z.
◆ getFromParam()
void HCalSD::getFromParam |
( |
const G4Step * |
step, |
|
|
bool & |
isKilled |
|
) |
| |
|
private |
Definition at line 777 of file HCalSD.cc.
779 if (!isKilled ||
hits.empty()) {
787 edm::LogVerbatim(
"HcalSim") <<
"HCalSD::getFromParam " <<
hits.size() <<
" hits for " << GetName() <<
" of "
788 << primaryID <<
" with " << aStep->GetTrack()->GetDefinition()->GetParticleName()
789 <<
" of " << aStep->GetPreStepPoint()->GetKineticEnergy() /
GeV
790 <<
" GeV in detector type " << det;
792 for (
unsigned int i = 0;
i <
hits.size(); ++
i) {
793 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 866 of file HCalSD.cc.
867 auto const preStepPoint = aStep->GetPreStepPoint();
868 auto const theTrack = aStep->GetTrack();
873 double etrack = preStepPoint->GetKineticEnergy();
876 primaryID = theTrack->GetTrackID();
878 primaryID = theTrack->GetParentID();
880 primaryID = theTrack->GetTrackID();
886 const G4ThreeVector& hitPoint = preStepPoint->GetPosition();
887 double rr = hitPoint.x() * hitPoint.x() + hitPoint.y() * hitPoint.y();
888 double phi =
rr == 0. ? 0. : atan2(hitPoint.y(), hitPoint.x());
895 if (hitPoint.z() < 0.)
898 edm::LogVerbatim(
"HcalSim") <<
"HCalSD::Hit for Detector " << det <<
" etaR " << etaR <<
" phi " <<
phi / deg
899 <<
" depth " <<
depth;
901 double time = (aStep->GetPostStepPoint()->GetGlobalTime());
918 double beta = preStepPoint->GetBeta();
919 edm::LogVerbatim(
"HcalSim") <<
"HCalSD::getHitFibreBundle 1 hit for " << GetName() <<
" of " << primaryID
920 <<
" with " << theTrack->GetDefinition()->GetParticleName() <<
" of "
921 << 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 807 of file HCalSD.cc.
808 auto const preStepPoint = aStep->GetPreStepPoint();
809 auto const theTrack = aStep->GetTrack();
814 double etrack = preStepPoint->GetKineticEnergy();
817 primaryID = theTrack->GetTrackID();
819 primaryID = theTrack->GetParentID();
821 primaryID = theTrack->GetTrackID();
827 const G4ThreeVector& hitPoint = preStepPoint->GetPosition();
828 double rr = (hitPoint.x() * hitPoint.x() + hitPoint.y() * hitPoint.y());
829 double phi = (
rr == 0. ? 0. : atan2(hitPoint.y(), hitPoint.x()));
836 if (hitPoint.z() < 0)
839 edm::LogVerbatim(
"HcalSim") <<
"HCalSD::Hit for Detector " << det <<
" etaR " << etaR <<
" phi " <<
phi / deg
840 <<
" depth " <<
depth;
842 double time = (aStep->GetPostStepPoint()->GetGlobalTime());
856 double beta = preStepPoint->GetBeta();
857 edm::LogVerbatim(
"HcalSim") <<
"HCalSD::getHitPMT 1 hit for " << GetName() <<
" of " << primaryID <<
" with "
858 << theTrack->GetDefinition()->GetParticleName() <<
" of "
859 << 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 735 of file HCalSD.cc.
742 auto const theTrack = aStep->GetTrack();
755 edm::LogVerbatim(
"HcalSim") <<
"HCalSD::hitForFibre " <<
hits.size() <<
" hits for " << GetName() <<
" of "
756 << primaryID <<
" with " << theTrack->GetDefinition()->GetParticleName() <<
" of "
757 << aStep->GetPreStepPoint()->GetKineticEnergy() /
GeV <<
" GeV in detector type " << det;
760 for (
unsigned int i = 0;
i <
hits.size(); ++
i) {
761 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 972 of file HCalSD.cc.
973 const G4VTouchable* touch = aStep->GetPreStepPoint()->GetTouchable();
974 static const G4String modName[8] = {
"HEModule",
"HVQF",
"HBModule",
"MBAT",
"MBBT",
"MBBTC",
"MBBT_R1P",
"MBBT_R1M"};
977 double depth = -2000;
979 for (
int n = 0;
n < touch->GetHistoryDepth(); ++
n) {
980 G4String
name = touch->GetVolume(
n)->GetName();
984 for (
unsigned int ii = 0;
ii < 8; ++
ii) {
985 if (
name == modName[
ii]) {
987 int dn = touch->GetHistoryDepth() -
n;
988 local = touch->GetHistory()->GetTransform(dn).TransformPoint(global);
992 }
else if (
ii == 1) {
995 }
else if (
ii == 2) {
1012 <<
" depth " <<
depth <<
" ID " <<
id <<
" EDEP " << edep <<
" Time " <<
time;
1020 int jd = 2 *
idx +
id - 7;
1021 if (jd >= 0 && jd < 4) {
1023 if (
hit_[jd] !=
nullptr)
1024 hit_[jd]->Fill(edep);
1025 if (
time_[jd] !=
nullptr)
1027 if (
dist_[jd] !=
nullptr)
References funct::abs(), LEDCalibrationChannels::depth, dist_, newFWLiteAna::found, hit_, training_settings::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 928 of file HCalSD.cc.
937 layerWeights.insert(std::pair<uint32_t, double>(
id, wt));
940 edm::LogVerbatim(
"HcalSim") <<
"HCalSD::readWeightFromFile:Entry " <<
entry <<
" ID " << std::hex <<
id
941 <<
std::dec <<
" (" << det <<
"/" <<
zside <<
"/1/" << etaR <<
"/" <<
phi <<
"/"
942 << 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 493 of file CaloSD.cc.
507 int hc_entries =
theHC->entries();
508 for (
int i = 0;
i < hc_entries; ++
i) {
513 double x = (*theHC)[
i]->getEM();
516 x = (*theHC)[
i]->getHadr();
519 tt += (*theHC)[
i]->getTimeSlice();
520 ee += (*theHC)[
i]->getIncidentEnergy();
525 double norm = (
count > 0) ? 1.0 /
count : 0.0;
540 <<
" hits not passing cuts\n EmeanEM= " << eEM <<
" ErmsEM= " << eEM2
541 <<
"\n EmeanHAD= " << eHAD <<
" ErmsHAD= " << eHAD2 <<
" TimeMean= " <<
tt
542 <<
" E0mean= " << ee <<
" Zglob= " << zglob <<
" Zloc= " << zloc <<
" ";
545 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 *)
const HcalSimulationParameters * hcalsimpar() const
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_
int PMTNumber(const G4ThreeVector &pe_effect)
static bool isGammaElectronPositron(int pdgCode)
virtual int setTrackID(const G4Step *)
void getHitPMT(const G4Step *step)
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
const HcalDDDSimulationConstants * hcalSimConstants_
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
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
std::unique_ptr< HFDarkening > m_HFDarkening
std::vector< const G4LogicalVolume * > fibre2LV
const SimTrackManager * m_trackManager
void setNumberingScheme(HcalNumberingScheme *)
T getParameter(std::string const &) const
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()
uint32_t setDetUnitId(const G4Step *step) override
void setParameterized(bool val)
std::unique_ptr< HFShowerPMT > showerPMT
bool isItFibre(const G4LogicalVolume *)
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