50 G4double edep = aStep->GetTotalEnergyDeposit();
52 if(aStep->GetTrack()->GetDefinition()!=G4Geantino::GeantinoDefinition() &&
53 aStep->GetTrack()->GetDefinition()!=G4ChargedGeantino::ChargedGeantinoDefinition())
61 const G4TouchableHistory* myTouch =
dynamic_cast<const G4TouchableHistory*
>(aStep->GetPreStepPoint()->GetTouchable());
63 G4cout <<
"SctSensor_CTB::ProcessHits bad dynamic_cast" << G4endl;
69 G4ThreeVector coord1 = aStep->GetPreStepPoint()->GetPosition();
70 G4ThreeVector coord2 = aStep->GetPostStepPoint()->GetPosition();
76 const G4AffineTransform transformation = myTouch->GetHistory()->GetTopTransform();
77 G4ThreeVector localPosition1 = transformation.TransformPoint(coord1);
78 G4ThreeVector localPosition2 = transformation.TransformPoint(coord2);
80 HepGeom::Point3D<double> lP1,lP2;
110 int BEcopyNo = myTouch->GetVolume()->GetCopyNo();
112 #ifdef SCTSD_CTB_DEBUG
113 for (
int i=0;
i<myTouch->GetHistoryDepth();
i++){
114 std::string detname=myTouch->GetVolume(
i)->GetLogicalVolume()->GetName();
115 int copyno=myTouch->GetVolume(
i)->GetCopyNo();
116 if (verboseLevel>1) G4cout <<
"Volume "<<detname <<
" Copy Nr. "<<copyno << G4endl;
122 int BEcopyNoTest = BEcopyNo/100;
123 if(BEcopyNoTest == 5 || BEcopyNoTest == 6 || BEcopyNo == 1000 || BEcopyNo == 2000) {
127 if(BEcopyNoTest == 5 || BEcopyNoTest == 6 ) {
128 side = myTouch->GetVolume(0)->GetCopyNo()%2;
129 phiMod=myTouch->GetVolume(1)->GetCopyNo()%2;
130 LayerDisk = myTouch->GetVolume(1)->GetCopyNo()/2;
131 }
else if ( BEcopyNo == 1000) {
132 side = myTouch->GetVolume(1)->GetCopyNo();
133 phiMod=myTouch->GetVolume(2)->GetCopyNo()%2;
134 LayerDisk = myTouch->GetVolume(2)->GetCopyNo()/2;
137 #ifdef SCTSD_CTB_DEBUG
138 if (verboseLevel>1) G4cout <<
"In the SCT TestBeam" << G4endl;
139 if (verboseLevel>1) G4cout <<
" * Module Number: " <<
LayerDisk <<
"," << phiMod <<
" Side: " <<
side << G4endl;
140 if (verboseLevel>5) G4cout <<
" Identifier will be [2.2."
145 <<
side <<
"]" << G4endl;
149 description <<
"ProcessHits: Unexpected copy number for sensor";
150 G4Exception(
"SctSensor_CTB",
"UnexpectedCopyNumberForSctSensor", FatalException,
description);
157 aStep->GetPreStepPoint()->GetGlobalTime(),
158 trHelp.GenerateParticleLink(),