19 #include "G4SDManager.hh"
20 #include "G4VProcess.hh"
21 #include "G4EventManager.hh"
23 #include "G4VProcess.hh"
29 #include "CLHEP/Units/GlobalSystemOfUnits.h"
39 m_TrackerSD.
getParameter<
double>(
"EnergyThresholdForHistoryInGeV") *
GeV;
50 const G4VTouchable* touch = aStep->GetPreStepPoint()->GetTouchable();
51 int level = (touch) ? ((touch->GetHistoryDepth()) + 1) : 0;
55 G4String sensorName = touch->GetVolume(0)->GetName();
56 G4String diamondName = touch->GetVolume(1)->GetName();
58 G4String volumeName = touch->GetVolume(3)->GetName();
60 if (sensorName !=
"BCM1FSensor") {
61 edm::LogWarning(
"ForwardSim") <<
"Bcm1fSD::setDetUnitId -w- Sensor name not BCM1FSensor ";
64 edm::LogWarning(
"ForwardSim") <<
" Bcm1fSD::setDetUnitId -w- Detector name not BCM1F ";
66 int sensorNo = touch->GetReplicaNumber(0);
67 int diamondNo = touch->GetReplicaNumber(1);
68 int volumeNo = touch->GetReplicaNumber(3);
76 detId = 1000 * volumeNo + 10 * diamondNo + sensorNo;
84 static const float tolerance2 = (
float)(0.0025 * CLHEP::mm * CLHEP::mm);