Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

GeoSwimApplication.h

Go to the documentation of this file.
00001 
00002 //
00003 // GeoSwimApplication
00004 //
00005 // January 20, 2006  M.Ishitsuka First version for GeoSwimmer
00006 //                   ref. PTSimApplication.h by S. Kasahara 05/04
00007 //
00009 
00010 #ifndef GEOSWIMAPPLICATION_H
00011 #define GEOSWIMAPPLICATION_H
00012 
00013 #include <TLorentzVector.h>
00014 
00015 #include "MCApplication/MCAppUser.h" // base class
00016 #include "Validity/VldRange.h"
00017 #include "GeoSwimmer/GeoSwimStack.h"
00018 
00019 class TClonesArray;
00020 class GeoSwimZCondition;
00021 
00022 //----------GCTRAK
00023 #define MAXMEC 30
00024 //      PARAMETER (MAXMEC=30)
00025 //      COMMON/GCTRAK/VECT(7),GETOT,GEKIN,VOUT(7),NMEC,LMEC(MAXMEC)
00026 //     + ,NAMEC(MAXMEC),NSTEP ,MAXNST,DESTEP,DESTEL,SAFETY,SLENG
00027 //     + ,STEP  ,SNEXT ,SFIELD,TOFG  ,GEKRAT,UPWGHT,IGNEXT,INWVOL
00028 //     + ,ISTOP ,IGAUTO,IEKBIN, ILOSL, IMULL,INGOTO,NLDOWN,NLEVIN
00029 //     + ,NLVSAV,ISTORY
00030 typedef struct {
00031   Float_t  vect[7];
00032   Float_t  getot;
00033   Float_t  gekin;
00034   Float_t  vout[7];
00035   Int_t    nmec;
00036   Int_t    lmec[MAXMEC];
00037   Int_t    namec[MAXMEC];
00038   Int_t    nstep;
00039   Int_t    maxnst;
00040   Float_t  destep;
00041   Float_t  destel;
00042   Float_t  safety;
00043   Float_t  sleng;
00044   Float_t  step;
00045   Float_t  snext;
00046   Float_t  sfield;
00047   Float_t  tofg;
00048   Float_t  gekrat;
00049   Float_t  upwght;
00050   Int_t    ignext;
00051   Int_t    inwvol;
00052   Int_t    istop;
00053   Int_t    igauto;
00054   Int_t    iekbin;
00055   Int_t    ilosl;
00056   Int_t    imull;
00057   Int_t    ingoto;
00058   Int_t    nldown;
00059   Int_t    nlevin;
00060   Int_t    nlsav;
00061   Int_t    istory;
00062 } Gctrak_t;
00063 
00064 //----------GCFLAG
00065 //      COMMON/GCFLAG/IDEBUG,IDEMIN,IDEMAX,ITEST,IDRUN,IDEVT,IEORUN
00066 //     +        ,IEOTRI,IEVENT,ISWIT(10),IFINIT(20),NEVENT,NRNDM(2)
00067 typedef struct {
00068   Int_t    idebug;
00069   Int_t    idemin;
00070   Int_t    idemax;
00071   Int_t    itest;
00072   Int_t    idrun;
00073   Int_t    idevt;
00074   Int_t    ieorun;
00075   Int_t    ieotri;
00076   Int_t    ievent;
00077   Int_t    iswit[10];
00078   Int_t    ifinit[20];
00079   Int_t    nevent;
00080   Int_t    nrndm[2];
00081 } Gcflag_t;
00082 
00083 class GeoSwimApplication : public MCAppUser {
00084 
00085  public:
00086 
00087   virtual Gctrak_t* Gctrak() const {return fGctrak;}
00088   // Constructors/Destructors
00089   GeoSwimApplication(const char* name, const char* title);
00090   virtual ~GeoSwimApplication();
00091 
00092   // Must supply the following, declared pure virtual in base class
00093   virtual void GeneratePrimaries() {}
00094   virtual void BeginEvent();
00095   virtual void BeginPrimary();
00096   virtual void PreTrack();
00097   virtual void Stepping();
00098   virtual void PostTrack();
00099   virtual void FinishPrimary();
00100   virtual void FinishEvent();
00101 
00102   GeoSwimStack* GetStack() const { return fGeoSwimStack; }
00103 
00104   void SetZCondition(GeoSwimZCondition& c);
00105   void SetDirection(Int_t idir);
00106   void SetHallSize(TVector3 min, TVector3 max);
00107 
00108   bool GetSatisfied();
00109   Double_t GetS();
00110   Double_t GetRange();
00111   
00112  private:
00113   // private methods
00114   bool IsExiting();
00115 
00116   // data members
00117   GeoSwimStack*        fGeoSwimStack;
00118   VldRange             fVldRange;
00119   Double_t             fZCondition;
00120   TLorentzVector       fInitMomentum;
00121   TLorentzVector       fInitPosition;
00122   Int_t                fDir;
00123   bool                 fSatisfied;
00124   Bool_t               fExitLiner;  // flag to determine when to stop tracking
00125   Int_t                fStep;
00126   Double_t             fS;            // Path
00127   Double_t             fRange;        // Range
00128   Float_t              fPreVect[7];
00129 
00130   TVector3             fHallMin;
00131   TVector3             fHallMax;
00132 
00133   Gctrak_t *fGctrak;          
00134   Gcflag_t *fGcflag;          
00135   ClassDef(GeoSwimApplication,0) // Interface to Monte Carlo application
00136 };
00137 
00138 #endif // GEOSWIMAPPLICATION_H

Generated on Mon Feb 15 11:06:45 2010 for loon by  doxygen 1.3.9.1