21 #include "G4SDManager.hh"
22 #include "G4VProcess.hh"
23 #include "G4EventManager.hh"
25 #include "G4VProcess.hh"
31 #include "CLHEP/Units/GlobalSystemOfUnits.h"
42 m_TrackerSD.
getParameter<
double>(
"EnergyThresholdForHistoryInGeV") *
GeV;
53 const G4VTouchable* touch = aStep->GetPreStepPoint()->GetTouchable();
54 int level = (touch) ? ((touch->GetHistoryDepth()) + 1) : 0;
58 G4String sensorName = touch->GetVolume(0)->GetName();
59 G4String diamondName = touch->GetVolume(1)->GetName();
61 G4String volumeName = touch->GetVolume(3)->GetName();
63 if (sensorName !=
"BCM1FSensor") {
64 edm::LogWarning(
"ForwardSim") <<
"Bcm1fSD::setDetUnitId -w- Sensor name not BCM1FSensor ";
67 edm::LogWarning(
"ForwardSim") <<
" Bcm1fSD::setDetUnitId -w- Detector name not BCM1F ";
69 int sensorNo = touch->GetReplicaNumber(0);
70 int diamondNo = touch->GetReplicaNumber(1);
71 int volumeNo = touch->GetReplicaNumber(3);
79 detId = 1000 * volumeNo + 10 * diamondNo + sensorNo;
87 static const float tolerance2 = (
float)(0.0025 * CLHEP::mm * CLHEP::mm);