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

Generated on Wed Mar 5 17:25:22 2008 for BDSIM by  doxygen 1.5.3