]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PHOS/AliPHOSvFast.h
Updating
[u/mrichter/AliRoot.git] / PHOS / AliPHOSvFast.h
1 #ifndef ALIPHOSVFAST_H
2 #define ALIPHOSVFAST_H
3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4  * See cxx source for full Copyright notice                               */
5
6 /* $Id$ */
7
8 //_________________________________________________________________________
9 // Implementation of the PHOS manager class for fast simulations     
10 // Tracks particles until the reach a grossly designed PHOS module
11 // Modify the particles property (momentum, energy, type) according to
12 //  the PHOS response function. The result is called a virtual reconstructed
13 //  particle.                                
14 //                  
15 //*-- Author: Yves Schutz (SUBATECH)
16
17 // --- ROOT system ---
18 //#include "TClonesArray.h"
19 #include "TRandom.h"
20
21 class TVector3 ;
22 class TFile;
23
24 // --- AliRoot header files ---
25 #include "AliPHOS.h"
26 class AliPHOSGeometry ;
27 class AliPHOSFastRecParticle ;
28
29 class AliPHOSvFast : public AliPHOS {
30
31 public:
32
33   AliPHOSvFast() ;
34   AliPHOSvFast(const char *name, const char *title="") ;
35   AliPHOSvFast(AliPHOSvFast & fast) : AliPHOS(fast) {
36     fast.Copy(*this) ; 
37   }
38   virtual ~AliPHOSvFast(void) ;
39
40   virtual void Copy(AliPHOSvFast & fast) ; 
41   void           AddRecParticle(const AliPHOSFastRecParticle & rp) ; // adds primary particle to the RecParticles list
42   virtual void   BuildGeometry(void) ;                               // creates the geometry for the ROOT display
43   virtual void   CreateGeometry(void) ;                              // creates the geometry for GEANT
44   Float_t        GetBigBox(Int_t index) const;                             
45   virtual void   Init(void) ;                                        // does nothing
46   virtual Int_t  IsVersion(void) const {
47     // Gives the version number 
48     return 99 ; 
49   }
50
51   void    MakeBranch(Option_t* opt);
52   Double_t MakeEnergy(Double_t energy) ;                       // makes the detected energy    
53   TVector3 MakePosition(Double_t energy, TVector3 pos, Double_t th, Double_t ph) ; 
54                                                                      // makes the detected position
55   void MakeRecParticle(Int_t modid, TVector3 pos, AliPHOSFastRecParticle & rp) ;  // makes a reconstructes particle from primary
56   Int_t   MakeType(AliPHOSFastRecParticle & rp) ;                    // gets the detected type of particle
57   // gets TClonesArray of reconstructed particles
58   TClonesArray * FastRecParticles() const { return fFastRecParticles ; } 
59   virtual void ResetPoints() ; 
60   void         ResetFastRecParticles() ; 
61   void         SetBigBox(Int_t index, Float_t value) ;                             
62   Double_t     SigmaE(Double_t energy) ;    // calulates the energy resolution at a given Energy                           
63   Double_t     SigmaP(Double_t energy, Double_t inc) ; // calulates the position resolution at a given Energy at a given incidence                           
64   virtual void StepManager(void) ;          // does the tracking through PHOS and a preliminary digitalization
65   virtual const TString Version(void)const { 
66     // As IsVersion
67     return TString("vFast") ; 
68   }
69
70   AliPHOSvFast & operator = (const AliPHOSvFast & )  {
71     Fatal("operator =", "not implemented") ; return *this ; 
72   }
73   
74 private:
75   
76   Float_t fBigBoxX ;                         // main box containing all PHOS (EMC+PPSD)
77   Float_t fBigBoxY ;                         // main box containing all PHOS (EMC+PPSD)
78   Float_t fBigBoxZ ;                         // main box containing all PHOS (EMC+PPSD)
79   TClonesArray * fFastRecParticles ;         // list of particles modified by the response function 
80   Int_t fNRecParticles ;                     // number of detected particles
81   TRandom fRan ;                             // random number generator
82   Double_t fResPara1 ;                       // parameter for the energy resolution dependence  
83   Double_t fResPara2 ;                       // parameter for the energy resolution dependence  
84   Double_t fResPara3 ;                       // parameter for the energy resolution dependence 
85   Double_t fPosParaA0 ;                      // parameter for the position resolution
86   Double_t fPosParaA1 ;                      // parameter for the position resolution 
87   Double_t fPosParaB0 ;                      // parameter for the position resolution 
88   Double_t fPosParaB1 ;                      // parameter for the position resolution 
89   Double_t fPosParaB2 ;                      // parameter for the position resolution
90
91   ClassDef(AliPHOSvFast,1)  //  Implementation of the PHOS manager class for fast simulations  
92
93 };
94
95 #endif // AliPHOSVFAST_H