7 #include "G4StepPoint.hh"
9 #include "G4ThreeVector.hh"
11 #include "CLHEP/Units/GlobalSystemOfUnits.h"
12 #include "CLHEP/Units/GlobalPhysicalConstants.h"
35 unsigned int detId = 0;
41 const G4VTouchable* touch = aStep->GetPreStepPoint()->GetTouchable();
44 level = ((touch->GetHistoryDepth()) + 1);
49 G4String sensorName = touch->GetVolume(2)->GetName();
50 G4String telName = touch->GetVolume(3)->GetName();
51 G4String volumeName = touch->GetVolume(4)->GetName();
52 if (sensorName !=
"PLTSensorPlane")
53 edm::LogVerbatim(
"PltSD") <<
" PltSD::setDetUnitId -w- Sensor name not PLTSensorPlane ";
54 if (telName !=
"Telescope")
55 edm::LogVerbatim(
"PltSD") <<
" PltSD::setDetUnitId -w- Telescope name not Telescope ";
56 if (volumeName !=
"PLT")
57 edm::LogVerbatim(
"PltSD") <<
" PltSD::setDetUnitId -w- Volume name not PLT ";
60 int columnNum = touch->GetReplicaNumber(0);
61 int rowNum = touch->GetReplicaNumber(1);
62 int sensorNum = touch->GetReplicaNumber(2);
63 int telNum = touch->GetReplicaNumber(3);
65 int temp = touch->GetReplicaNumber(5);
77 }
else if (telNum == 1) {
79 }
else if (telNum == 2) {
81 }
else if (telNum == 3) {
83 }
else if (telNum == 4) {
85 }
else if (telNum == 5) {
87 }
else if (telNum == 6) {
89 }
else if (telNum == 7) {
94 int halfCarriageNum = -1;
97 if (telNum == 0 || telNum == 1 || telNum == 2 || telNum == 3)
102 if (halfCarriageNum == 1) {
105 }
else if (telNum == 5) {
107 }
else if (telNum == 6) {
109 }
else if (telNum == 7) {
115 10000000 * pltNum + 1000000 * halfCarriageNum + 100000 * telNum + 10000 * sensorNum + 100 * rowNum + columnNum;
118 <<
"plt:" << pltNum <<
" hc:" << halfCarriageNum <<
" tel:" << telNum
119 <<
" plane:" << sensorNum;
128 static const float tolerance2 = (
float)(0.0025 * CLHEP::mm * CLHEP::mm);