|
|
#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 |
|
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 () |
|
Definition at line 22 of file HGCSD.h.
◆ HGCSD()
Definition at line 34 of file HGCSD.cc.
67 G4String myName =
name;
70 if (myName.find(
"HitsEE") != std::string::npos) {
72 nameX_ =
"HGCalEESensitive";
73 }
else if (myName.find(
"HitsHEfront") != std::string::npos) {
75 nameX_ =
"HGCalHESiliconSensitive";
76 }
else if (myName.find(
"HitsHEback") != std::string::npos) {
78 nameX_ =
"HGCalHEScintillatorSensitive";
82 edm::LogVerbatim(
"HGCSim") <<
"**************************************************"
86 <<
"* Constructing a HGCSD with name " <<
name <<
"\n"
89 <<
"**************************************************";
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 99 of file HGCSD.cc.
100 double r = aStep->GetPreStepPoint()->GetPosition().perp();
101 double z =
std::abs(aStep->GetPreStepPoint()->GetPosition().z());
104 G4int parCode = aStep->GetTrack()->GetDefinition()->GetPDGEncoding();
105 G4LogicalVolume* lv = aStep->GetPreStepPoint()->GetPhysicalVolume()->GetLogicalVolume();
106 edm::LogVerbatim(
"HGCSim") <<
"HGCSD: Hit from standard path from " << lv->GetName() <<
" for Track "
107 << aStep->GetTrack()->GetTrackID() <<
" ("
108 << aStep->GetTrack()->GetDefinition()->GetParticleName() <<
":" << parCode <<
") R = " <<
r
109 <<
" Z = " <<
z <<
" slope = " <<
r /
z <<
":" <<
slopeMin_;
118 double wt2 = aStep->GetTrack()->GetWeight();
119 double destep = wt1 * aStep->GetTotalEnergyDeposit();
124 const G4VTouchable* touch = aStep->GetPreStepPoint()->GetTouchable();
125 G4double tmptrackE = aStep->GetTrack()->GetKineticEnergy();
126 G4int parCode = aStep->GetTrack()->GetDefinition()->GetPDGEncoding();
127 G4double
angle = (aStep->GetTrack()->GetMomentumDirection().theta()) / CLHEP::deg;
128 G4int layer = ((touch->GetHistoryDepth() ==
levelT_) ? touch->GetReplicaNumber(0) : touch->GetReplicaNumber(2));
129 G4int ilayer = (layer - 1) / 3;
130 if (aStep->GetTotalEnergyDeposit() > 0) {
133 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 143 of file HGCSD.cc.
144 const G4StepPoint* preStepPoint = aStep->GetPreStepPoint();
145 const G4VTouchable* touch = preStepPoint->GetTouchable();
148 G4ThreeVector hitPoint = preStepPoint->GetPosition();
149 float globalZ = touch->GetTranslation(0).z();
150 int iz(globalZ > 0 ? 1 : -1);
153 G4ThreeVector localpos = touch->GetHistory()->GetTopTransform().TransformPoint(hitPoint);
159 if (touch->GetHistoryDepth() ==
levelT_) {
160 layer = touch->GetReplicaNumber(0);
164 edm::LogVerbatim(
"HGCSim") <<
"Depths: " << touch->GetHistoryDepth() <<
" name " << touch->GetVolume(0)->GetName()
165 <<
" layer:module:cell " << layer <<
":" <<
module <<
":" << cell;
168 layer = touch->GetReplicaNumber(2);
169 module = touch->GetReplicaNumber(1);
170 cell = touch->GetReplicaNumber(0);
173 const G4Material* mat = aStep->GetPreStepPoint()->GetMaterial();
174 edm::LogVerbatim(
"HGCSim") <<
"Depths: " << touch->GetHistoryDepth() <<
" name " << touch->GetVolume(0)->GetName()
175 <<
":" << touch->GetReplicaNumber(0) <<
" " << touch->GetVolume(1)->GetName() <<
":"
176 << touch->GetReplicaNumber(1) <<
" " << touch->GetVolume(2)->GetName() <<
":"
177 << touch->GetReplicaNumber(2) <<
" layer:module:cell " << layer <<
":" <<
module <<
":"
178 << cell <<
" Material " << mat->GetName() <<
":" << mat->GetRadlen();
184 if (aStep->GetPreStepPoint()->GetMaterial()->GetRadlen() > 100000.)
189 int det,
z, lay, wafer,
type, ic;
193 <<
":" << 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 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]
This routine will be called when the appropriate signal arrives.
Implements Observer< const BeginOfJob * >.
Definition at line 201 of file HGCSD.cc.
215 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
const SimTrackManager * m_trackManager
T getParameter(std::string const &) const
unsigned int trackID() const
std::vector< TrackWithHistory * > TrackContainer
void initEvent(const BeginOfEvent *) override
TrackInformation * cmsTrackInformation(const G4Track *aTrack)
void cleanHitCollection()
std::vector< double > t_Angle_
T angle(T x1, T y1, T z1, T x2, T y2, T z2)
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_