WCSim
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
WCSimTrackInformation.hh
Go to the documentation of this file.
1 #ifndef WCSimTrackInformation_h
2 #define WCSimTrackInformation_h 1
3 
4 
5 #include "globals.hh"
6 #include "G4Track.hh"
7 #include "G4Allocator.hh"
8 #include "G4VUserTrackInformation.hh"
9 
10 // Maximilien Fechner, december 2004
11 // Information class for flagging the secondaries
12 // I'm interested in (namely gammas from pi0s and secondaries
13 // from muon decay
14 class WCSimTrackInformation : public G4VUserTrackInformation {
15 private:
16  G4bool saveit;
18 
19 public:
22  { saveit = aninfo->saveit; primaryParentID = aninfo->primaryParentID;}
24  WCSimTrackInformation(const G4Track* );
25 
26  G4bool isSaved() { return saveit;}
27  void WillBeSaved(G4bool choice) { saveit = choice;}
28 
29  void SetPrimaryParentID(G4int i) { primaryParentID = i;}
31 
32  inline void *operator new(size_t);
33  inline void operator delete(void *aTrackInfo);
34  inline int operator ==(const WCSimTrackInformation& right) const
35  {return (this==&right);}
36 
37  void Print() const;
38 
39 };
40 
41 extern G4Allocator<WCSimTrackInformation> aWCSimTrackInfoAllocator;
42 
43 inline void* WCSimTrackInformation::operator new(size_t)
44 { void* aTrackInfo;
45  aTrackInfo = (void*)aWCSimTrackInfoAllocator.MallocSingle();
46  return aTrackInfo;
47 }
48 
49 inline void WCSimTrackInformation::operator delete(void *aTrackInfo)
50 { aWCSimTrackInfoAllocator.FreeSingle((WCSimTrackInformation*)aTrackInfo);}
51 
52 
53 #endif
G4Allocator< WCSimTrackInformation > aWCSimTrackInfoAllocator
int operator==(const WCSimTrackInformation &right) const
void WillBeSaved(G4bool choice)
WCSimTrackInformation(const WCSimTrackInformation *aninfo)