16 #include "G4ChargedGeantino.hh"
17 #include "G4Geantino.hh"
18 #include "G4SDManager.hh"
20 #include "G4VisExtent.hh"
21 #include "G4VSolid.hh"
24 #include <GeoModelKernel/GeoFullPhysVol.h>
25 #include <GeoModelRead/ReadGeoModel.h>
30 #include "CLHEP/Geometry/Transform3D.h"
31 #include "CLHEP/Units/SystemOfUnits.h"
36 : G4VSensitiveDetector(
name ),
37 m_HitColl( hitCollectionName ),
38 m_sqlreader( sqlreader )
51 if (verboseLevel>5) G4cout <<
"Process Hit" << G4endl;
53 G4double edep = aStep->GetTotalEnergyDeposit();
57 if (aStep->GetTrack()->GetDefinition() != G4Geantino::GeantinoDefinition() &&
58 aStep->GetTrack()->GetDefinition() != G4ChargedGeantino::ChargedGeantinoDefinition())
65 const G4TouchableHistory* myTouch =
dynamic_cast<const G4TouchableHistory*
>(aStep->GetPreStepPoint()->GetTouchable());
68 for (
int i=0;
i<myTouch->GetHistoryDepth();
i++){
69 std::string detname = myTouch->GetVolume(
i)->GetLogicalVolume()->GetName();
70 int copyno = myTouch->GetVolume(
i)->GetCopyNo();
71 G4cout <<
"Volume " << detname <<
" Copy Nr. " << copyno << G4endl;
78 G4ThreeVector startCoord = aStep->GetPreStepPoint()->GetPosition();
79 G4ThreeVector endCoord = aStep->GetPostStepPoint()->GetPosition();
83 const G4AffineTransform transformation = myTouch->GetHistory()->GetTopTransform();
85 G4ThreeVector localPosition1 = transformation.TransformPoint(startCoord);
86 G4ThreeVector localPosition2 = transformation.TransformPoint(endCoord);
88 HepGeom::Point3D<double> lP1,lP2;
103 std::string physVolName = myTouch->GetVolume()->GetName();
110 aStep->GetPreStepPoint()->GetGlobalTime(),
122 const int id = myTouch->GetVolume()->GetCopyNo();
127 aStep->GetPreStepPoint()->GetGlobalTime(),