16 #include "G4LogicalVolumeStore.hh"
17 #include "G4LogicalVolume.hh"
20 #include "G4ParticleTable.hh"
21 #include "G4VProcess.hh"
60 nameX_ = ((
name.find(
"HFNoseHits") != std::string::npos) ?
"HGCalHFNoseSensitive" :
"HFNoseSensitive");
68 edm::LogVerbatim(
"HFNSim") <<
"**************************************************"
72 <<
"* Constructing a HFNoseSD with name " <<
name <<
"\n"
75 <<
"**************************************************";
86 double r = aStep->GetPreStepPoint()->GetPosition().perp();
87 double z =
std::abs(aStep->GetPreStepPoint()->GetPosition().z());
89 G4int parCode = aStep->GetTrack()->GetDefinition()->GetPDGEncoding();
90 G4String parName = aStep->GetTrack()->GetDefinition()->GetParticleName();
91 G4LogicalVolume* lv = aStep->GetPreStepPoint()->GetPhysicalVolume()->GetLogicalVolume();
92 edm::LogVerbatim(
"HFNSim") <<
"HFNoseSD: Hit from standard path from " << lv->GetName() <<
" for Track "
93 << aStep->GetTrack()->GetTrackID() <<
" (" << parCode <<
":" << parName <<
") R = " <<
r
94 <<
" Z = " <<
z <<
" slope = " <<
r /
z <<
":" <<
slopeMin_;
105 double wt2 = aStep->GetTrack()->GetWeight();
106 double destep =
weight_ * wt1 * (aStep->GetTotalEnergyDeposit());
111 <<
weight_ * wt1 * wt2 <<
" deStep: " << aStep->GetTotalEnergyDeposit() <<
":" << destep;
117 const G4StepPoint* preStepPoint = aStep->GetPreStepPoint();
118 const G4VTouchable* touch = preStepPoint->GetTouchable();
121 G4ThreeVector hitPoint = preStepPoint->GetPosition();
122 float globalZ = touch->GetTranslation(0).z();
123 int iz(globalZ > 0 ? 1 : -1);
126 if ((touch->GetHistoryDepth() ==
levelT1_) || (touch->GetHistoryDepth() ==
levelT2_)) {
127 layer = touch->GetReplicaNumber(0);
132 <<
" name " << touch->GetVolume(0)->GetName() <<
" layer:module:cell " << layer <<
":"
136 layer = touch->GetReplicaNumber(3);
137 module = touch->GetReplicaNumber(2);
138 cell = touch->GetReplicaNumber(1);
140 edm::LogVerbatim(
"HFNSim") <<
"DepthsInside: " << touch->GetHistoryDepth() <<
" name "
141 << touch->GetVolume(0)->GetName() <<
" layer:module:cell " << layer <<
":" <<
module
146 G4Material* mat = aStep->GetPreStepPoint()->GetMaterial();
147 edm::LogVerbatim(
"HFNSim") <<
"Depths: " << touch->GetHistoryDepth() <<
" name " << touch->GetVolume(0)->GetName()
148 <<
":" << touch->GetReplicaNumber(0) <<
" " << touch->GetVolume(1)->GetName() <<
":"
149 << touch->GetReplicaNumber(1) <<
" " << touch->GetVolume(2)->GetName() <<
":"
150 << touch->GetReplicaNumber(2) <<
" " << touch->GetVolume(3)->GetName() <<
":"
151 << touch->GetReplicaNumber(3) <<
" " << touch->GetVolume(4)->GetName() <<
":"
152 << touch->GetReplicaNumber(4) <<
" "
153 <<
" layer:module:cell " << layer <<
":" <<
module <<
":" << cell <<
" Material "
154 << mat->GetName() <<
":" << mat->GetRadlen();
157 if (aStep->GetPreStepPoint()->GetMaterial()->GetRadlen() > 100000.)
166 if (
mouseBite_->exclude(hitPoint, iz, uv.first, uv.second)) {
191 <<
" top Level " <<
levelT1_ <<
":" <<
levelT2_ <<
" wafer " << waferSize <<
":"
199 throw cms::Exception(
"Unknown",
"HFNoseSD") <<
"Cannot find HGCalDDDConstants for " <<
nameX_ <<
"\n";