13 #include "G4LogicalVolumeStore.hh" 14 #include "G4LogicalVolume.hh" 17 #include "G4ParticleTable.hh" 18 #include "G4VProcess.hh" 58 nameX_ = ((
name.find(
"HFNoseHits") != std::string::npos) ?
"HGCalHFNoseSensitive" :
"HFNoseSensitive");
66 edm::LogVerbatim(
"HFNSim") <<
"**************************************************" 70 <<
"* Constructing a HFNoseSD with name " <<
name <<
"\n" 73 <<
"**************************************************";
84 double r = aStep->GetPreStepPoint()->GetPosition().perp();
85 double z =
std::abs(aStep->GetPreStepPoint()->GetPosition().z());
87 G4int parCode = aStep->GetTrack()->GetDefinition()->GetPDGEncoding();
88 G4String parName = aStep->GetTrack()->GetDefinition()->GetParticleName();
89 G4LogicalVolume* lv = aStep->GetPreStepPoint()->GetPhysicalVolume()->GetLogicalVolume();
90 edm::LogVerbatim(
"HFNSim") <<
"HFNoseSD: Hit from standard path from " << lv->GetName() <<
" for Track " 91 << aStep->GetTrack()->GetTrackID() <<
" (" << parCode <<
":" << parName <<
") R = " <<
r 92 <<
" Z = " <<
z <<
" slope = " <<
r /
z <<
":" <<
slopeMin_;
103 double wt2 = aStep->GetTrack()->GetWeight();
104 double destep =
weight_ * wt1 * (aStep->GetTotalEnergyDeposit());
109 <<
weight_ * wt1 * wt2 <<
" deStep: " << aStep->GetTotalEnergyDeposit() <<
":" << destep;
115 const G4StepPoint* preStepPoint = aStep->GetPreStepPoint();
116 const G4VTouchable* touch = preStepPoint->GetTouchable();
119 G4ThreeVector hitPoint = preStepPoint->GetPosition();
120 float globalZ = touch->GetTranslation(0).z();
121 int iz(globalZ > 0 ? 1 : -1);
123 int layer(-1), moduleLev(-1), cell(-1);
125 layer = touch->GetReplicaNumber(2);
127 }
else if ((touch->GetHistoryDepth() ==
levelT1_) || (touch->GetHistoryDepth() ==
levelT2_)) {
128 layer = touch->GetReplicaNumber(0);
130 layer = touch->GetReplicaNumber(3);
131 cell = touch->GetReplicaNumber(1);
134 int module = (moduleLev >= 0) ? touch->GetReplicaNumber(moduleLev) : -1;
136 edm::LogVerbatim(
"HFNSim") <<
"DepthsInside: " << touch->GetHistoryDepth() <<
" name " 137 << touch->GetVolume(0)->GetName() <<
" layer:module:cell " <<
layer <<
":" << moduleLev
138 <<
":" <<
module <<
":" << cell;
139 G4Material* mat = aStep->GetPreStepPoint()->GetMaterial();
140 edm::LogVerbatim(
"HFNSim") <<
"Depths: " << touch->GetHistoryDepth() <<
" name " << touch->GetVolume(0)->GetName()
141 <<
":" << touch->GetReplicaNumber(0) <<
" " << touch->GetVolume(1)->GetName() <<
":" 142 << touch->GetReplicaNumber(1) <<
" " << touch->GetVolume(2)->GetName() <<
":" 143 << touch->GetReplicaNumber(2) <<
" " << touch->GetVolume(3)->GetName() <<
":" 144 << touch->GetReplicaNumber(3) <<
" " << touch->GetVolume(4)->GetName() <<
":" 145 << touch->GetReplicaNumber(4) <<
" " 146 <<
" layer:module:cell " <<
layer <<
":" <<
module <<
":" << cell <<
" Material " 147 << mat->GetName() <<
":" << mat->GetRadlen();
150 if (aStep->GetPreStepPoint()->GetMaterial()->GetRadlen() > 100000.)
185 <<
" top Level " <<
levelT1_ <<
":" <<
levelT2_ <<
" wafer " << waferSize <<
":" 186 << mouseBite <<
" useOffset " << useOffset;
193 throw cms::Exception(
"Unknown",
"HFNoseSD") <<
"Cannot find HGCalDDDConstants for " <<
nameX_ <<
"\n";
bool maskCell(const DetId &id, int corners) const
Log< level::Info, true > LogVerbatim
std::unique_ptr< HFNoseNumberingScheme > numberingScheme_
T getParameter(std::string const &) const
void setNumberCheckedHits(int val)
const HGCalParameters * getParameter() const
uint32_t setDetUnitId(const G4Step *step) override
HGCalGeometryMode::GeometryMode geomMode() const
HGCalGeometryMode::GeometryMode geom_mode_
T getUntrackedParameter(std::string const &, T const &) const
HFNoseSD(const std::string &, const HGCalDDDConstants *, const SensitiveDetectorCatalog &, edm::ParameterSet const &, const SimTrackManager *)
std::pair< int, int > waferUV() const
bool isItinFidVolume(const G4ThreeVector &)
Tan< T >::type tan(const T &t)
Abs< T >::type abs(const T &t)
double mouseBite(bool reco) const
const HGCalDDDConstants * hgcons_
void update(const BeginOfJob *) override
This routine will be called when the appropriate signal arrives.
double getEnergyDeposit() const
double getEnergyDeposit(const G4Step *) override
std::unique_ptr< HGCMouseBite > mouseBite_
std::unique_ptr< HGCGuardRing > guardRing_
double getResponseWt(const G4Track *)
int levelTop(int ind=0) const
std::vector< double > angles_
bool filterHit(CaloG4Hit *, double) override
double waferSize(bool reco) const
double distFromEdgeHex(double x, double y, double z) const