//////////////////////////////////////////////////////////////////////////////// // Description: // This is a primitive scorer class for scoring energy deposit. // // Created: 2005-11-14 Tsukasa ASO, Akinori Kimura. // 2010-07-22 Introduce Unit specification. // /////////////////////////////////////////////////////////////////////////////// /** * @file SolidPSTrackLength.cc * @author: (modified by) Ibrahin Pinera * @date 2016 SoLid - University of Antwerp */ #include "SolidPSTrackLength.hh" // G4PSTrackLength #include "G4PSTrackLength.hh" #include "G4UnitsTable.hh" SolidPSTrackLength::SolidPSTrackLength(G4String name, G4int depth): G4PSTrackLength(name,depth) {} SolidPSTrackLength::SolidPSTrackLength(G4String name, const G4String& unit, G4int depth):G4PSTrackLength(name, unit, depth) {} SolidPSTrackLength::~SolidPSTrackLength() {} G4int SolidPSTrackLength::GetIndex(G4Step* aStep) { G4StepPoint* preStep = aStep->GetPreStepPoint(); G4TouchableHistory* th = (G4TouchableHistory*)(preStep->GetTouchable()); // G4int index= th->GetReplicaNumber(indexDepth) + (th->GetReplicaNumber(indexDepth+1))*10000; G4int index= th->GetReplicaNumber(indexDepth) + (th->GetReplicaNumber(indexDepth+1) + 10*th->GetReplicaNumber(indexDepth+2))*10000; // G4cout << "The id is: " << index <GetTrack()->GetTrackID(); }