13 #include "G4LogicalVolumeStore.hh" 14 #include "G4LogicalVolume.hh" 17 #include "G4ParticleTable.hh" 18 #include "G4VProcess.hh" 56 nameX_ = ((
name.find(
"HFNoseHits") != std::string::npos) ?
"HGCalHFNoseSensitive" :
"HFNoseSensitive");
64 edm::LogVerbatim(
"HFNSim") <<
"**************************************************" 68 <<
"* Constructing a HFNoseSD with name " <<
name <<
"\n" 71 <<
"**************************************************";
82 double r = aStep->GetPreStepPoint()->GetPosition().perp();
83 double z =
std::abs(aStep->GetPreStepPoint()->GetPosition().z());
85 G4int parCode = aStep->GetTrack()->GetDefinition()->GetPDGEncoding();
86 G4String parName = aStep->GetTrack()->GetDefinition()->GetParticleName();
87 G4LogicalVolume* lv = aStep->GetPreStepPoint()->GetPhysicalVolume()->GetLogicalVolume();
88 edm::LogVerbatim(
"HFNSim") <<
"HFNoseSD: Hit from standard path from " << lv->GetName() <<
" for Track " 89 << aStep->GetTrack()->GetTrackID() <<
" (" << parCode <<
":" << parName <<
") R = " <<
r 90 <<
" Z = " <<
z <<
" slope = " <<
r /
z <<
":" <<
slopeMin_;
101 double wt2 = aStep->GetTrack()->GetWeight();
102 double destep =
weight_ * wt1 * (aStep->GetTotalEnergyDeposit());
107 <<
weight_ * wt1 * wt2 <<
" deStep: " << aStep->GetTotalEnergyDeposit() <<
":" << destep;
113 const G4StepPoint* preStepPoint = aStep->GetPreStepPoint();
114 const G4VTouchable* touch = preStepPoint->GetTouchable();
117 G4ThreeVector hitPoint = preStepPoint->GetPosition();
118 float globalZ = touch->GetTranslation(0).z();
119 int iz(globalZ > 0 ? 1 : -1);
122 if ((touch->GetHistoryDepth() ==
levelT1_) || (touch->GetHistoryDepth() ==
levelT2_)) {
123 layer = touch->GetReplicaNumber(0);
128 <<
" name " << touch->GetVolume(0)->GetName() <<
" layer:module:cell " <<
layer <<
":" 132 layer = touch->GetReplicaNumber(3);
133 module = touch->GetReplicaNumber(2);
134 cell = touch->GetReplicaNumber(1);
136 edm::LogVerbatim(
"HFNSim") <<
"DepthsInside: " << touch->GetHistoryDepth() <<
" name " 137 << touch->GetVolume(0)->GetName() <<
" layer:module:cell " <<
layer <<
":" <<
module 142 G4Material* mat = aStep->GetPreStepPoint()->GetMaterial();
143 edm::LogVerbatim(
"HFNSim") <<
"Depths: " << touch->GetHistoryDepth() <<
" name " << touch->GetVolume(0)->GetName()
144 <<
":" << touch->GetReplicaNumber(0) <<
" " << touch->GetVolume(1)->GetName() <<
":" 145 << touch->GetReplicaNumber(1) <<
" " << touch->GetVolume(2)->GetName() <<
":" 146 << touch->GetReplicaNumber(2) <<
" " << touch->GetVolume(3)->GetName() <<
":" 147 << touch->GetReplicaNumber(3) <<
" " << touch->GetVolume(4)->GetName() <<
":" 148 << touch->GetReplicaNumber(4) <<
" " 149 <<
" layer:module:cell " <<
layer <<
":" <<
module <<
":" << cell <<
" Material " 150 << mat->GetName() <<
":" << mat->GetRadlen();
153 if (aStep->GetPreStepPoint()->GetMaterial()->GetRadlen() > 100000.)
162 if (
mouseBite_->exclude(hitPoint, iz, uv.first, uv.second)) {
183 <<
" top Level " <<
levelT1_ <<
":" <<
levelT2_ <<
" wafer " << waferSize <<
":" 191 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)
uint32_t setDetUnitId(const G4Step *step) override
HGCalGeometryMode::GeometryMode geomMode() const
HGCalGeometryMode::GeometryMode geom_mode_
T getUntrackedParameter(std::string const &, T const &) const
constexpr std::array< uint8_t, layerIndexSize< TrackerTraits > > layer
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_
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