3 #ifndef EDepSim_PersistencyManager_h 4 #define EDepSim_PersistencyManager_h 1 8 #include <G4VPersistencyManager.hh> 9 #include <G4StepStatus.hh> 16 class G4PrimaryVertex;
17 class G4VPhysicalVolume;
19 class G4TrajectoryContainer;
20 class G4VHitsCollection;
24 namespace EDepSim {
class PersistencyMessenger;}
43 namespace EDepSim {
class PersistencyManager;}
54 virtual G4bool
Store(
const G4Event* anEvent);
55 virtual G4bool
Store(
const G4Run* aRun);
56 virtual G4bool
Store(
const G4VPhysicalVolume* aWorld);
59 virtual G4bool
Retrieve(G4Event *&
e) {e=NULL;
return false;}
60 virtual G4bool
Retrieve(G4Run* &
r) {r=NULL;
return false;}
61 virtual G4bool
Retrieve(G4VPhysicalVolume* &
w) {w=NULL;
return false;}
78 const std::vector<TG4PrimaryVertex>&
GetPrimaries()
const;
95 virtual G4bool
Close(
void);
213 const G4PrimaryVertex* event);
217 const G4Event* event);
224 const G4Event* event);
228 G4VHitsCollection* hits);
235 const std::vector<int>& src);
241 G4VTrajectory* g4Traj);
246 int point1,
int point2);
255 G4VTrajectory* g4Traj);
263 G4String currentVolume,
264 G4String prevVolume);
void SummarizeTrajectories(std::vector< TG4Trajectory > &trajectories, const G4Event *event)
Fill the trajectory container.
void SetDetectorPartition(int partition)
Set the detector mask.
double fTrajectoryPointDeposit
virtual ~PersistencyManager()
G4double fNeutronThreshold
The threshold momentum below which a neutron will be rejected.
virtual G4String GetFilename(void) const
Return the output file name.
void CopyTrajectoryPoints(TG4Trajectory &traj, G4VTrajectory *g4Traj)
int SplitTrajectory(G4VTrajectory *traj, int point1, int point2)
G4String fFilename
The filename of the output file.
bool SaveTrajectoryBoundary(G4VTrajectory *g4Traj, G4StepStatus status, G4String currentVolume, G4String prevVolume)
virtual void AddTrajectoryBoundary(const G4String &boundary)
int fDetectorPartition
The detector partition.
virtual void SetTrajectoryPointAccuracy(double acc)
std::map< std::string, TG4HitSegmentContainer > TG4HitSegmentDetectors
virtual bool GetSaveAllPrimaryTrajectories(void) const
double fTrajectoryPointAccuracy
void CopyHitContributors(std::vector< int > &dest, const std::vector< int > &src)
virtual G4double GetNeutronThreshold() const
const std::vector< TG4Trajectory > & GetTrajectories() const
const TG4HitSegmentDetectors & GetSegmentDetectors() const
void SummarizeHitSegments(std::vector< TG4HitSegment > &segments, G4VHitsCollection *hits)
Fill a container of hit segments.
virtual double GetTrajectoryPointAccuracy(void) const
virtual void SetNeutronThreshold(G4double thresh)
virtual double GetTrajectoryPointDeposit(void) const
double FindTrajectoryAccuracy(G4VTrajectory *traj, int point1, int point2)
Construct a module from components.
void SummarizeSegmentDetectors(TG4HitSegmentDetectors &segmentDetectors, const G4Event *event)
sensitive detector.
bool fSaveAllPrimaryTrajectories
int GetDetectorPartition() const
Get the detector partition.
void SelectTrajectoryPoints(std::vector< int > &selected, G4VTrajectory *g4Traj)
TG4Event fEventSummary
A summary of the primary vertices in the event.
virtual G4double GetGammaThreshold() const
void SetFilename(G4String file)
std::map< int, int > TrackIdMap
virtual G4bool Retrieve(G4VPhysicalVolume *&w)
virtual G4bool Open(G4String filename)
virtual void ClearTrajectoryBoundaries()
void SummarizePrimaries(std::vector< TG4PrimaryVertex > &primaries, const G4PrimaryVertex *event)
virtual void SetLengthThreshold(G4double thresh)
virtual void SetGammaThreshold(G4double thresh)
virtual void SetSaveAllPrimaryTrajectories(bool val)
virtual void SetTrajectoryPointDeposit(double dep)
const std::vector< TG4PrimaryVertex > & GetPrimaries() const
virtual G4bool Retrieve(G4Event *&e)
Retrieve information from a file. These are not implemented.
void MarkTrajectories(const G4Event *event)
Mark the G4 Trajectories that should be saved.
virtual G4bool Retrieve(G4Run *&r)
const TG4Event & GetEventSummary()
virtual G4bool Close(void)
Make sure the output file is closed.
virtual G4bool Store(const G4Event *anEvent)
stores anEvent and the associated objects into database.
G4double fLengthThreshold
EDepSim::PersistencyMessenger * fPersistencyMessenger
std::vector< TPRegexp * > fTrajectoryBoundaries
Event finding and building.
virtual G4double GetLengthThreshold() const
Get the threshold for length in a sensitive detector.
void UpdateSummaries(const G4Event *event)
Update the event summary fields.