include/BDSSamplerHit.hh

00001 /* BDSIM code.    Version 1.0
00002    Author: Grahame A. Blair, Royal Holloway, Univ. of London.
00003    Last modified 5.11.2002
00004    Copyright (c) 2002 by G.A.Blair.  ALL RIGHTS RESERVED. 
00005 
00006    Modified 22.03.05 by J.C.Carter, Royal Holloway, Univ. of London.
00007    Changed Samplers to account for plane and cylinder types (GABs code)
00008 */
00009 
00010 #ifndef BDSSamplerHit_h
00011 #define BDSSamplerHit_h 1
00012 
00013 #include "G4VHit.hh"
00014 #include "G4THitsCollection.hh"
00015 #include "G4Allocator.hh"
00016 #include "G4ThreeVector.hh"
00017 
00018 class BDSSamplerHit :public G4VHit
00019 {
00020 public:
00021   BDSSamplerHit(G4String aName,
00022                 G4double init_mom,
00023                 G4double init_x, G4double init_xPrime, 
00024                 G4double init_y, G4double init_yPrime,
00025                 G4double init_z, G4double init_zPrime,
00026                 G4double init_t,
00027                 G4double mom,
00028                 G4double x, G4double xPrime,
00029                 G4double y, G4double yPrime,
00030                 G4double z, G4double zPrime,
00031                 G4double t,
00032                 G4double s,
00033                 G4double weight,
00034                 G4int PDGtype, G4int nEvent,
00035                 G4int ParentID, G4int TrackID);
00036 
00037   ~BDSSamplerHit();
00038   
00039   inline void* operator new(size_t) ;
00040   inline void operator delete(void *aHit);
00041   
00042 private:
00043   G4String itsName;
00044 
00045   //initial momentum of track
00046   G4double itsInit_Mom;
00047 
00048   //initial position and momentum direction of track in GLOBAL coordinates
00049   G4double itsInit_X;
00050   G4double itsInit_XPrime;
00051   G4double itsInit_Y;
00052   G4double itsInit_YPrime;
00053   G4double itsInit_Z;
00054   G4double itsInit_ZPrime;
00055 
00056   //global time at track creation
00057   G4double itsInit_T;
00058 
00059   //actual momentum
00060   G4double itsMom;
00061 
00062   //actual position and momentum direction in LOCAL coordinates, relative to
00063   //the sampler and to the ideal orbit
00064   G4double itsX;
00065   G4double itsXPrime;
00066   G4double itsY;
00067   G4double itsYPrime;
00068   G4double itsZ;
00069   G4double itsZPrime;
00070 
00071   //actual position and momentum direction in GLOBAL coordinates
00072   G4double itsGlobalX;
00073   G4double itsGlobalXPrime;
00074   G4double itsGlobalY;
00075   G4double itsGlobalYPrime;
00076   G4double itsGlobalZ;
00077   G4double itsGlobalZPrime;
00078 
00079   //actual time
00080   G4double itsT;
00081 
00082   //total current track length
00083   G4double itsS;
00084 
00085   G4double itsWeight;
00086   G4int itsPDGtype;
00087   G4int itsEventNo;
00088   G4int itsParentID;
00089   G4int itsTrackID;
00090   G4String itsSampType;
00091   
00092 public:
00093   inline void SetInitMom(G4double mom)
00094     {itsInit_Mom=mom;}
00095   inline G4double GetInitMom() const
00096     {return itsInit_Mom;}
00097 
00098   inline void SetInitX(G4double x)
00099     {itsInit_X=x;}
00100   inline G4double GetInitX() const
00101     {return itsInit_X;}
00102 
00103   inline void SetInitXPrime(G4double xPrime)
00104     {itsInit_XPrime=xPrime;}
00105   inline G4double GetInitXPrime() const
00106     {return itsInit_XPrime;}
00107 
00108   inline void SetInitY(G4double y)
00109     {itsInit_Y=y;}
00110   inline G4double GetInitY() const
00111     {return itsInit_Y;}
00112 
00113   inline void SetInitYPrime(G4double yPrime)
00114     {itsInit_YPrime=yPrime;}
00115   inline G4double GetInitYPrime() const
00116     {return itsInit_YPrime;}
00117 
00118   inline void SetInitZ(G4double z)
00119     {itsInit_Z=z;}
00120   inline G4double GetInitZ() const
00121     {return itsInit_Z;}
00122 
00123   inline void SetInitZPrime(G4double zPrime)
00124     {itsInit_ZPrime=zPrime;}
00125   inline G4double GetInitZPrime() const
00126     {return itsInit_ZPrime;}
00127 
00128   inline void SetInitT(G4double t)
00129     {itsInit_T=t;}
00130   inline G4double GetInitT() const
00131     {return itsInit_T;}
00132   
00133   inline void SetMom(G4double mom)
00134     {itsMom=mom;}
00135   inline G4double GetMom() const
00136     {return itsMom;}
00137 
00138   inline void SetX(G4double x)
00139     {itsX=x;}
00140   inline G4double GetX() const
00141     {return itsX;}
00142 
00143   inline void SetXPrime(G4double xPrime)
00144     {itsXPrime=xPrime;}
00145   inline G4double GetXPrime() const
00146     {return itsXPrime;}
00147 
00148   inline void SetY(G4double y)
00149     {itsY=y;}
00150   inline G4double GetY() const
00151     {return itsY;}
00152 
00153   inline void SetYPrime(G4double yPrime)
00154     {itsYPrime=yPrime;}
00155   inline G4double GetYPrime() const
00156     {return itsYPrime;}
00157 
00158   inline void SetZ(G4double z)
00159     {itsZ=z;}
00160   inline G4double GetZ() const
00161     {return itsZ;}
00162 
00163   inline void SetZPrime(G4double zPrime)
00164     {itsZPrime=zPrime;}
00165   inline G4double GetZPrime() const
00166     {return itsZPrime;}
00167 
00168   inline void SetGlobalX(G4double x)
00169     {itsGlobalX=x;}
00170   inline G4double GetGlobalX() const
00171     {return itsGlobalX;}
00172 
00173   inline void SetGlobalXPrime(G4double xPrime)
00174     {itsGlobalXPrime=xPrime;}
00175   inline G4double GetGlobalXPrime() const
00176     {return itsGlobalXPrime;}
00177 
00178   inline void SetGlobalY(G4double y)
00179     {itsGlobalY=y;}
00180   inline G4double GetGlobalY() const
00181     {return itsGlobalY;}
00182 
00183   inline void SetGlobalYPrime(G4double yPrime)
00184     {itsGlobalYPrime=yPrime;}
00185   inline G4double GetGlobalYPrime() const
00186     {return itsGlobalYPrime;}
00187 
00188   inline void SetGlobalZ(G4double z)
00189     {itsGlobalZ=z;}
00190   inline G4double GetGlobalZ() const
00191     {return itsGlobalZ;}
00192 
00193   inline void SetGlobalZPrime(G4double zPrime)
00194     {itsGlobalZPrime=zPrime;}
00195   inline G4double GetGlobalZPrime() const
00196     {return itsGlobalZPrime;}
00197 
00198   inline void SetT(G4double t)
00199     {itsT=t;}
00200   inline G4double GetT() const
00201     {return itsT;}
00202 
00203   inline void SetS(G4double ss)
00204     {itsS=ss;}
00205   inline G4double GetS() const
00206     {return itsS;}
00207 
00208   inline void SetWeight(G4double aWeight)
00209     {itsWeight=aWeight;}
00210   inline G4double GetWeight() const
00211     {return itsWeight;}
00212   
00213   inline void SetName(G4String aName)
00214     {itsName=aName;}
00215   inline G4String GetName() const
00216     {return itsName;}
00217 
00218   inline void SetType(G4String aSampType)
00219     {itsSampType=aSampType;}
00220   inline G4String GetType()
00221     {return itsSampType;}
00222 
00223   inline void SetEventNo(G4int nEvent)
00224     {itsEventNo=nEvent;}
00225   inline G4int GetEventNo() const
00226     {return itsEventNo;}
00227 
00228   inline G4int GetPDGtype() const
00229     {return itsPDGtype;}
00230 
00231   inline G4int GetParentID() const
00232     {return itsParentID;}
00233 
00234   inline G4int GetTrackID() const
00235     {return itsTrackID;}
00236 };
00237 
00238 typedef G4THitsCollection<BDSSamplerHit> BDSSamplerHitsCollection;
00239 extern G4Allocator<BDSSamplerHit> BDSSamplerHitAllocator;
00240 
00241 inline void* BDSSamplerHit::operator new(size_t)
00242 {
00243   void* aHit;
00244   aHit=(void*) BDSSamplerHitAllocator.MallocSingle();
00245   return aHit;
00246 }
00247 
00248 inline void BDSSamplerHit::operator delete(void *aHit)
00249 {
00250   BDSSamplerHitAllocator.FreeSingle((BDSSamplerHit*) aHit);
00251 }
00252 
00253 #endif
00254 

Generated on 27 Aug 2013 for BDSIM by  doxygen 1.4.7