ROOT logo
#ifndef ALIPHOSVFAST_H
#define ALIPHOSVFAST_H
/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
 * See cxx source for full Copyright notice                               */

/* $Id$ */

/* History of cvs commits:
 *
 * $Log$
 * Revision 1.26  2006/09/13 07:31:01  kharlov
 * Effective C++ corrections (T.Pocheptsov)
 *
 * Revision 1.25  2005/05/28 14:19:05  schutz
 * Compilation warnings fixed by T.P.
 *
 */

//_________________________________________________________________________
// Implementation of the PHOS manager class for fast simulations     
// Tracks particles until the reach a grossly designed PHOS module
// Modify the particles property (momentum, energy, type) according to
//  the PHOS response function. The result is called a virtual reconstructed
//  particle.                                
//                  
//*-- Author: Yves Schutz (SUBATECH)

// --- ROOT system ---
//#include "TClonesArray.h"
#include "TRandom.h"

class TVector3 ;
class TFile;

// --- AliRoot header files ---
#include "AliPHOS.h"
class AliPHOSGeometry ;
class AliPHOSFastRecParticle ;

class AliPHOSvFast : public AliPHOS {

public:

  AliPHOSvFast() ;
  AliPHOSvFast(const char *name, const char *title="") ;
  
  virtual ~AliPHOSvFast(void) ;

  void           AddRecParticle(const AliPHOSFastRecParticle & rp) ; // adds primary particle to the RecParticles list
  virtual void   CreateGeometry(void) ;                              // creates the geometry for GEANT
  Float_t        GetBigBox(Int_t index) const;                             
  virtual void   Init(void) ;                                        // does nothing
  virtual Int_t  IsVersion(void) const {
    // Gives the version number 
    return 99 ; 
  }

  void    MakeBranch(Option_t* opt);
  Double_t MakeEnergy(Double_t energy) ;                       // makes the detected energy    
  TVector3 MakePosition(Double_t energy, TVector3 pos, Double_t th, Double_t ph) ; 
                                                                     // makes the detected position
  void MakeRecParticle(Int_t modid, TVector3 pos, AliPHOSFastRecParticle & rp) ;  // makes a reconstructes particle from primary
  Int_t   MakeType(AliPHOSFastRecParticle & rp) ;                    // gets the detected type of particle
  // gets TClonesArray of reconstructed particles
  TClonesArray * FastRecParticles() const { return fFastRecParticles ; } 
  virtual void ResetPoints() ; 
  void         ResetFastRecParticles() ; 
  void         SetBigBox(Int_t index, Float_t value) ;                             
  Double_t     SigmaE(Double_t energy) ;    // calulates the energy resolution at a given Energy                           
  Double_t     SigmaP(Double_t energy, Double_t inc) ; // calulates the position resolution at a given Energy at a given incidence                           
  virtual void StepManager(void) ;          // does the tracking through PHOS and a preliminary digitalization
  virtual const TString Version(void)const { 
    // As IsVersion
    return TString("vFast") ; 
  }

private:
  AliPHOSvFast(AliPHOSvFast & fast);
  AliPHOSvFast & operator = (const AliPHOSvFast & );
  
  Float_t fBigBoxX ;                         // main box containing all PHOS (EMC+PPSD)
  Float_t fBigBoxY ;                         // main box containing all PHOS (EMC+PPSD)
  Float_t fBigBoxZ ;                         // main box containing all PHOS (EMC+PPSD)
  TClonesArray * fFastRecParticles ;         // list of particles modified by the response function 
  Int_t fNRecParticles ;                     // number of detected particles
  TRandom fRan ;                             // random number generator
  Double_t fResPara1 ;                       // parameter for the energy resolution dependence  
  Double_t fResPara2 ;                       // parameter for the energy resolution dependence  
  Double_t fResPara3 ;                       // parameter for the energy resolution dependence 
  Double_t fPosParaA0 ;                      // parameter for the position resolution
  Double_t fPosParaA1 ;                      // parameter for the position resolution 
  Double_t fPosParaB0 ;                      // parameter for the position resolution 
  Double_t fPosParaB1 ;                      // parameter for the position resolution 
  Double_t fPosParaB2 ;                      // parameter for the position resolution

  ClassDef(AliPHOSvFast,1)  //  Implementation of the PHOS manager class for fast simulations  

};

#endif // AliPHOSVFAST_H
 AliPHOSvFast.h:1
 AliPHOSvFast.h:2
 AliPHOSvFast.h:3
 AliPHOSvFast.h:4
 AliPHOSvFast.h:5
 AliPHOSvFast.h:6
 AliPHOSvFast.h:7
 AliPHOSvFast.h:8
 AliPHOSvFast.h:9
 AliPHOSvFast.h:10
 AliPHOSvFast.h:11
 AliPHOSvFast.h:12
 AliPHOSvFast.h:13
 AliPHOSvFast.h:14
 AliPHOSvFast.h:15
 AliPHOSvFast.h:16
 AliPHOSvFast.h:17
 AliPHOSvFast.h:18
 AliPHOSvFast.h:19
 AliPHOSvFast.h:20
 AliPHOSvFast.h:21
 AliPHOSvFast.h:22
 AliPHOSvFast.h:23
 AliPHOSvFast.h:24
 AliPHOSvFast.h:25
 AliPHOSvFast.h:26
 AliPHOSvFast.h:27
 AliPHOSvFast.h:28
 AliPHOSvFast.h:29
 AliPHOSvFast.h:30
 AliPHOSvFast.h:31
 AliPHOSvFast.h:32
 AliPHOSvFast.h:33
 AliPHOSvFast.h:34
 AliPHOSvFast.h:35
 AliPHOSvFast.h:36
 AliPHOSvFast.h:37
 AliPHOSvFast.h:38
 AliPHOSvFast.h:39
 AliPHOSvFast.h:40
 AliPHOSvFast.h:41
 AliPHOSvFast.h:42
 AliPHOSvFast.h:43
 AliPHOSvFast.h:44
 AliPHOSvFast.h:45
 AliPHOSvFast.h:46
 AliPHOSvFast.h:47
 AliPHOSvFast.h:48
 AliPHOSvFast.h:49
 AliPHOSvFast.h:50
 AliPHOSvFast.h:51
 AliPHOSvFast.h:52
 AliPHOSvFast.h:53
 AliPHOSvFast.h:54
 AliPHOSvFast.h:55
 AliPHOSvFast.h:56
 AliPHOSvFast.h:57
 AliPHOSvFast.h:58
 AliPHOSvFast.h:59
 AliPHOSvFast.h:60
 AliPHOSvFast.h:61
 AliPHOSvFast.h:62
 AliPHOSvFast.h:63
 AliPHOSvFast.h:64
 AliPHOSvFast.h:65
 AliPHOSvFast.h:66
 AliPHOSvFast.h:67
 AliPHOSvFast.h:68
 AliPHOSvFast.h:69
 AliPHOSvFast.h:70
 AliPHOSvFast.h:71
 AliPHOSvFast.h:72
 AliPHOSvFast.h:73
 AliPHOSvFast.h:74
 AliPHOSvFast.h:75
 AliPHOSvFast.h:76
 AliPHOSvFast.h:77
 AliPHOSvFast.h:78
 AliPHOSvFast.h:79
 AliPHOSvFast.h:80
 AliPHOSvFast.h:81
 AliPHOSvFast.h:82
 AliPHOSvFast.h:83
 AliPHOSvFast.h:84
 AliPHOSvFast.h:85
 AliPHOSvFast.h:86
 AliPHOSvFast.h:87
 AliPHOSvFast.h:88
 AliPHOSvFast.h:89
 AliPHOSvFast.h:90
 AliPHOSvFast.h:91
 AliPHOSvFast.h:92
 AliPHOSvFast.h:93
 AliPHOSvFast.h:94
 AliPHOSvFast.h:95
 AliPHOSvFast.h:96
 AliPHOSvFast.h:97
 AliPHOSvFast.h:98
 AliPHOSvFast.h:99
 AliPHOSvFast.h:100