|
|
#include <HGCSD.h>
|
| HGCSD (const std::string &, const edm::EventSetup &, const SensitiveDetectorCatalog &, edm::ParameterSet const &, const SimTrackManager *) |
|
uint32_t | setDetUnitId (const G4Step *step) override |
|
| ~HGCSD () 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 () |
|
|
void | endEvent () override |
|
bool | filterHit (CaloG4Hit *, double) override |
|
double | getEnergyDeposit (const G4Step *) override |
|
void | initEvent (const BeginOfEvent *) 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 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 *) |
|
virtual bool | getFromLibrary (const G4Step *step) |
|
int | getNumberOfHits () |
|
double | getResponseWt (const G4Track *) |
|
virtual int | getTrackID (const G4Track *) |
|
bool | hitExists (const G4Step *) |
|
void | ignoreRejection () |
|
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...
|
|
Definition at line 22 of file HGCSD.h.
◆ HGCSD()
Definition at line 35 of file HGCSD.cc.
68 G4String myName =
name;
71 if (myName.find(
"HitsEE") != std::string::npos) {
73 nameX_ =
"HGCalEESensitive";
74 }
else if (myName.find(
"HitsHEfront") != std::string::npos) {
76 nameX_ =
"HGCalHESiliconSensitive";
77 }
else if (myName.find(
"HitsHEback") != std::string::npos) {
79 nameX_ =
"HGCalHEScintillatorSensitive";
83 edm::LogVerbatim(
"HGCSim") <<
"**************************************************"
87 <<
"* Constructing a HGCSD with name " <<
name <<
"\n"
90 <<
"**************************************************";
References angles_, CaloSD::eminHit, eminHit_, ForwardEmpty, edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), HGCEE, HGCHEB, HGCHEF, MeV, mouseBite_, mouseBiteCut_, myFwdSubdet_, Skims_PA_cff::name, nameX_, numberingScheme_, AlCaHLTBitMon_ParallelJobs::p, rejectMB_, CaloSD::setNumberCheckedHits(), CaloSD::setUseMap(), storeAllG4Hits_, funct::tan(), and waferRot_.
◆ ~HGCSD()
◆ endEvent()
◆ filterHit()
bool HGCSD::filterHit |
( |
CaloG4Hit * |
aHit, |
|
|
double |
time |
|
) |
| |
|
overrideprotectedvirtual |
◆ getEnergyDeposit()
double HGCSD::getEnergyDeposit |
( |
const G4Step * |
aStep | ) |
|
|
overrideprotectedvirtual |
Reimplemented from CaloSD.
Definition at line 100 of file HGCSD.cc.
101 double r = aStep->GetPreStepPoint()->GetPosition().perp();
102 double z =
std::abs(aStep->GetPreStepPoint()->GetPosition().z());
105 G4int parCode = aStep->GetTrack()->GetDefinition()->GetPDGEncoding();
106 G4LogicalVolume* lv = aStep->GetPreStepPoint()->GetPhysicalVolume()->GetLogicalVolume();
107 edm::LogVerbatim(
"HGCSim") <<
"HGCSD: Hit from standard path from " << lv->GetName() <<
" for Track "
108 << aStep->GetTrack()->GetTrackID() <<
" ("
109 << aStep->GetTrack()->GetDefinition()->GetParticleName() <<
":" << parCode <<
") R = " <<
r
110 <<
" Z = " <<
z <<
" slope = " <<
r /
z <<
":" <<
slopeMin_;
119 double wt2 = aStep->GetTrack()->GetWeight();
120 double destep = wt1 * aStep->GetTotalEnergyDeposit();
125 const G4VTouchable* touch = aStep->GetPreStepPoint()->GetTouchable();
126 G4double tmptrackE = aStep->GetTrack()->GetKineticEnergy();
127 G4int parCode = aStep->GetTrack()->GetDefinition()->GetPDGEncoding();
128 G4double
angle = (aStep->GetTrack()->GetMomentumDirection().theta()) / CLHEP::deg;
129 G4int layer = ((touch->GetHistoryDepth() ==
levelT_) ? touch->GetReplicaNumber(0) : touch->GetReplicaNumber(2));
130 G4int ilayer = (layer - 1) / 3;
131 if (aStep->GetTotalEnergyDeposit() > 0) {
134 t_dEStep1_.emplace_back(aStep->GetTotalEnergyDeposit());
References funct::abs(), angle(), CaloSD::getResponseWt(), levelT_, alignCSCRings::r, slopeMin_, t_Angle_, t_dEStep1_, t_dEStep2_, t_Layer_, t_Parcode_, t_TrackE_, and z.
◆ initEvent()
◆ initRun()
◆ isItinFidVolume()
bool HGCSD::isItinFidVolume |
( |
const G4ThreeVector & |
| ) |
|
|
inlineprivate |
◆ setDetUnitId() [1/2]
uint32_t HGCSD::setDetUnitId |
( |
const G4Step * |
step | ) |
|
|
overridevirtual |
Implements CaloSD.
Definition at line 144 of file HGCSD.cc.
145 const G4StepPoint* preStepPoint = aStep->GetPreStepPoint();
146 const G4VTouchable* touch = preStepPoint->GetTouchable();
149 G4ThreeVector hitPoint = preStepPoint->GetPosition();
150 float globalZ = touch->GetTranslation(0).z();
151 int iz(globalZ > 0 ? 1 : -1);
154 G4ThreeVector localpos = touch->GetHistory()->GetTopTransform().TransformPoint(hitPoint);
159 int layer, module, cell;
160 if (touch->GetHistoryDepth() ==
levelT_) {
161 layer = touch->GetReplicaNumber(0);
165 edm::LogVerbatim(
"HGCSim") <<
"Depths: " << touch->GetHistoryDepth() <<
" name " << touch->GetVolume(0)->GetName()
166 <<
" layer:module:cell " << layer <<
":" << module <<
":" << cell;
169 layer = touch->GetReplicaNumber(2);
170 module = touch->GetReplicaNumber(1);
171 cell = touch->GetReplicaNumber(0);
174 const G4Material* mat = aStep->GetPreStepPoint()->GetMaterial();
175 edm::LogVerbatim(
"HGCSim") <<
"Depths: " << touch->GetHistoryDepth() <<
" name " << touch->GetVolume(0)->GetName()
176 <<
":" << touch->GetReplicaNumber(0) <<
" " << touch->GetVolume(1)->GetName() <<
":"
177 << touch->GetReplicaNumber(1) <<
" " << touch->GetVolume(2)->GetName() <<
":"
178 << touch->GetReplicaNumber(2) <<
" layer:module:cell " << layer <<
":" << module <<
":"
179 << cell <<
" Material " << mat->GetName() <<
":" << mat->GetRadlen();
185 if (aStep->GetPreStepPoint()->GetMaterial()->GetRadlen() > 100000.)
188 uint32_t
id =
setDetUnitId(subdet, layer, module, cell, iz, localpos);
190 int det,
z, lay, wafer,
type, ic;
194 <<
":" << wafer <<
":" <<
type <<
":" << ic;
References TauDecayModes::dec, triggerObjects_cff::id, levelT_, mouseBite_, myFwdSubdet_, rejectMB_, HGCalTestNumbering::unpackHexagonIndex(), and z.
◆ setDetUnitId() [2/2]
uint32_t HGCSD::setDetUnitId |
( |
ForwardSubdetector & |
subdet, |
|
|
int |
layer, |
|
|
int |
module, |
|
|
int |
cell, |
|
|
int |
iz, |
|
|
G4ThreeVector & |
pos |
|
) |
| |
|
private |
◆ 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]
This routine will be called when the appropriate signal arrives.
Implements Observer< const BeginOfJob * >.
Definition at line 202 of file HGCSD.cc.
216 throw cms::Exception(
"Unknown",
"HGCSD") <<
"Cannot find HGCalDDDConstants for " <<
nameX_ <<
"\n";
References angles_, Exception, geom_mode_, HGCalDDDConstants::geomMode(), edm::EventSetup::get(), get, levelT_, HGCalDDDConstants::levelTop(), HGCalDDDConstants::minSlope(), mouseBite_, mouseBiteCut_, nameX_, numberingScheme_, rejectMB_, slopeMin_, and waferRot_.
Referenced by progressbar.ProgressBar::__next__(), MatrixUtil.Matrix::__setitem__(), MatrixUtil.Steps::__setitem__(), progressbar.ProgressBar::finish(), and MatrixUtil.Steps::overwrite().
◆ update() [4/6]
◆ update() [5/6]
◆ update() [6/6]
◆ angles_
std::vector<double> HGCSD::angles_ |
|
private |
◆ eminHit_
◆ geom_mode_
◆ levelT_
◆ mouseBite_
◆ mouseBiteCut_
double HGCSD::mouseBiteCut_ |
|
private |
◆ myFwdSubdet_
◆ nameX_
std::string HGCSD::nameX_ |
|
private |
◆ numberingScheme_
◆ rejectMB_
◆ slopeMin_
◆ storeAllG4Hits_
bool HGCSD::storeAllG4Hits_ |
|
private |
◆ t_Angle_
std::vector<double> HGCSD::t_Angle_ |
|
private |
◆ t_dEStep1_
std::vector<double> HGCSD::t_dEStep1_ |
|
private |
◆ t_dEStep2_
std::vector<double> HGCSD::t_dEStep2_ |
|
private |
◆ t_EventID_
uint32_t HGCSD::t_EventID_ |
|
private |
◆ t_Layer_
std::vector<int> HGCSD::t_Layer_ |
|
private |
◆ t_Parcode_
std::vector<int> HGCSD::t_Parcode_ |
|
private |
◆ t_TrackE_
std::vector<double> HGCSD::t_TrackE_ |
|
private |
◆ tree_
◆ waferRot_
std::map< int, TrackWithHistory * > tkMap
std::vector< double > t_dEStep2_
bool saveHit(CaloG4Hit *)
HGCalGeometryMode::GeometryMode geomMode() const
void swap(Association< C > &lhs, Association< C > &rhs)
static void unpackHexagonIndex(const uint32_t &idx, int &subdet, int &z, int &lay, int &wafer, int &celltyp, int &cell)
std::vector< double > angles_
T getUntrackedParameter(std::string const &, T const &) const
double getResponseWt(const G4Track *)
double getEnergyDeposit() const
void clearHits() override
std::vector< int > t_Parcode_
HGCalGeometryMode::GeometryMode geom_mode_
std::map< CaloHitID, CaloG4Hit * > hitMap
CaloG4HitCollection * theHC
std::unique_ptr< HGCMouseBite > mouseBite_
std::unique_ptr< CaloSlaveSD > slave
Tan< T >::type tan(const T &t)
CaloSD(const std::string &aSDname, const edm::EventSetup &es, const SensitiveDetectorCatalog &clg, edm::ParameterSet const &p, const SimTrackManager *, float timeSlice=1., bool ignoreTkID=false)
std::unique_ptr< HGCNumberingScheme > numberingScheme_
void setNumberCheckedHits(int val)
uint32_t setDetUnitId(const G4Step *step) override
std::vector< std::unique_ptr< CaloG4Hit > > reusehit
Log< level::Error, false > LogError
const SimTrackManager * m_trackManager
unsigned int trackID() const
std::vector< TrackWithHistory * > TrackContainer
void initEvent(const BeginOfEvent *) override
TrackInformation * cmsTrackInformation(const G4Track *aTrack)
void cleanHitCollection()
Log< level::Info, true > LogVerbatim
std::vector< double > t_Angle_
T angle(T x1, T y1, T z1, T x2, T y2, T z2)
T getParameter(std::string const &) const
std::vector< double > t_TrackE_
int levelTop(int ind=0) const
ForwardSubdetector myFwdSubdet_
Abs< T >::type abs(const T &t)
Int_t getEntry(TBranch *branch, EntryNumber entryNumber)
std::vector< double > t_dEStep1_
const TrackContainer * trackContainer() const
std::vector< int > t_Layer_