EDepSimSegmentSD.hh
Go to the documentation of this file.
1 ////////////////////////////////////////////////////////////
2 // $Id: EDepSim::SegmentSD.hh,v 1.3 2007/01/01 05:36:12 mcgrew Exp $
3 //
4 
5 #ifndef EDepSim_SegmentSD_h
6 #define EDepSim_SegmentSD_h 1
7 
8 #include "G4VSensitiveDetector.hh"
9 #include "EDepSimLog.hh"
10 #include "EDepSimHitSegment.hh"
11 
12 class G4HCofThisEvent;
13 class G4Step;
14 
15 /// A sensitive detector to create EDepSim::HitSegment based hits.
16 namespace EDepSim {class SegmentSD;}
17 class EDepSim::SegmentSD : public G4VSensitiveDetector
18 {
19 
20 public:
21  SegmentSD(G4String name);
22  virtual ~SegmentSD();
23 
24  void Initialize(G4HCofThisEvent*);
25  G4bool ProcessHits(G4Step*, G4TouchableHistory*);
26  void EndOfEvent(G4HCofThisEvent*);
27 
28  /// Set the maximum sagitta for the EDepSim::HitSegment objects created by
29  /// this sensitive detector.
30  void SetMaximumHitSagitta(double sagitta) {
31  EDepSimLog("Set max segment sagitta to " << sagitta
32  << " for " << GetName());
33  fMaximumHitSagitta = sagitta;
34  }
36 
37  /// Set the maximum length for the EDepSim::HitSegment objects created by this
38  /// sensitive detector.
39  void SetMaximumHitLength(double length) {
40  EDepSimLog("Set max segment length to " << length
41  << " for " << GetName());
42  fMaximumHitLength = length;
43  }
44  double GetMaximumHitLength(void) {return fMaximumHitLength;}
45 
46 private:
47  /// The collection of hits that is being filled in the current event. It
48  /// is constructed in Initialize, filled in ProcessHits, and added the the
49  /// event in EndOfEvent.
51 
52  /// The hit collection id of fHits
53  int fHCID;
54 
55  /// The maximum allowed sagitta;
57 
58  /// The maximum allowed length;
60 
61  /// The last hit that was found.
62  int fLastHit;
63 };
64 
65 #endif
66 
static QCString name
Definition: declinfo.cpp:673
#define EDepSimLog(outStream)
Definition: EDepSimLog.hh:717
int fLastHit
The last hit that was found.
void EndOfEvent(G4HCofThisEvent *)
void SetMaximumHitLength(double length)
G4bool ProcessHits(G4Step *, G4TouchableHistory *)
double GetMaximumHitLength(void)
int fHCID
The hit collection id of fHits.
SegmentSD(G4String name)
EDepSim::HitSegment::HitSegmentCollection * fHits
Construct a module from components.
Definition: TG4HitSegment.h:10
void Initialize(G4HCofThisEvent *)
double GetMaximumHitSagitta(void)
G4THitsCollection< EDepSim::HitSegment > HitSegmentCollection
double fMaximumHitLength
The maximum allowed length;.
void SetMaximumHitSagitta(double sagitta)
double fMaximumHitSagitta
The maximum allowed sagitta;.