]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PHOS/AliPHOSv4.h
Fix for multiple events per file: inhibit decrease of size of fParticleFileMap.
[u/mrichter/AliRoot.git] / PHOS / AliPHOSv4.h
1 #ifndef ALIPHOSV4_H
2 #define ALIPHOSV4_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 TFile;
22
23 // --- AliRoot header files ---
24 #include "AliPHOS.h"
25 #include "AliPHOSGeometry.h"
26 #include "AliPHOSPID.h"
27 #include "AliPHOSFastRecParticle.h"
28
29 class AliPHOSv4 : public AliPHOS {
30
31 public:
32
33   AliPHOSv4() {
34     //ctor
35     fGeom=0;
36   }
37   AliPHOSv4(const char *name, const char *title="") ;
38   AliPHOSv4(const AliPHOSv4 & fast) {
39     // cpy ctor: no implementation yet
40     // requested by the Coding Convention
41     assert(0==1) ; 
42   }
43   virtual ~AliPHOSv4(void) ;
44
45   virtual void   AddHit( Int_t shunt, Int_t primary, Int_t track, Int_t id, Float_t *hits ) {
46     // useless since there are no hits
47     assert(0==1) ; 
48   }
49   void           AddRecParticle(const AliPHOSFastRecParticle & rp) ; // adds primary particle to the RecParticles list
50   virtual void   BuildGeometry(void) ;                               // creates the geometry for the ROOT display
51   virtual void   CreateGeometry(void) ;                              // creates the geometry for GEANT
52   Float_t        GetBigBox(Int_t index) ;                             
53   virtual AliPHOSGeometry * GetGeometry() {
54     // gets the pointer to the AliPHOSGeometry unique instance  
55     return fGeom ; 
56   }  
57   virtual void   Init(void) ;                                        // does nothing
58   virtual Int_t  IsVersion(void) const {
59     // Gives the version number 
60     return 4 ; 
61   }
62
63   void    MakeBranch(Option_t* opt, char *file=0) ;
64   Double_t MakeEnergy(const Double_t energy) ;                       // makes the detected energy    
65   TVector3 MakePosition(const Double_t energy, const TVector3 pos, const Double_t th, const Double_t ph) ; 
66                                                                      // makes the detected position
67   void MakeRecParticle(const Int_t modid, const TVector3 pos, AliPHOSFastRecParticle & rp) ;  // makes a reconstructes particle from primary
68   Int_t   MakeType(AliPHOSFastRecParticle & rp) ;                    // gets the detected type of particle
69   // gets TClonesArray of reconstructed particles
70   AliPHOSFastRecParticle::FastRecParticlesList * FastRecParticles() { return fFastRecParticles ; } 
71   virtual void ResetPoints() ; 
72   void         ResetFastRecParticles() ; 
73   void         SetBigBox(Int_t index, Float_t value) ;                             
74   Double_t     SigmaE(Double_t energy) ;    // calulates the energy resolution at a given Energy                           
75   Double_t     SigmaP(Double_t energy, Int_t inc) ; // calulates the position resolution at a given Energy at a given incidence                           
76   virtual void StepManager(void) ;          // does the tracking through PHOS and a preliminary digitalization
77   virtual TString Version(void){ 
78     // As IsVersion
79     return TString("v4") ; 
80   }
81
82   AliPHOSv4 & operator = (const AliPHOSv4 & )  {
83     // assignement operator requested by coding convention
84     // but not needed
85     assert(0==1) ;
86     return *this ; 
87   }
88   
89 private:
90   
91   Float_t fBigBoxX ;                         // main box containing all PHOS (EMC+PPSD)
92   Float_t fBigBoxY ;                         // main box containing all PHOS (EMC+PPSD)
93   Float_t fBigBoxZ ;                         // main box containing all PHOS (EMC+PPSD)
94   AliPHOSFastRecParticle::FastRecParticlesList * fFastRecParticles ; // list of particles modified by the response function 
95   AliPHOSGeometry * fGeom ;                  // geometry definition
96   Int_t fNRecParticles ;                     // number of detected particles
97   TRandom fRan ;                             // random number generator
98   Double_t fResPara1 ;                       // parameter for the energy resolution dependence  
99   Double_t fResPara2 ;                       // parameter for the energy resolution dependence  
100   Double_t fResPara3 ;                       // parameter for the energy resolution dependence 
101   Double_t fPosParaA0 ;                      // parameter for the position resolution
102   Double_t fPosParaA1 ;                      // parameter for the position resolution 
103   Double_t fPosParaB0 ;                      // parameter for the position resolution 
104   Double_t fPosParaB1 ;                      // parameter for the position resolution 
105   Double_t fPosParaB2 ;                      // parameter for the position resolution
106
107   ClassDef(AliPHOSv4,1)  //  Implementation of the PHOS manager class for fast simulations  
108
109 };
110
111 #endif // AliPHOSV4_H