]> git.uio.no Git - u/mrichter/AliRoot.git/blob - THbtp/AliGenHBTprocessor.h
Front absorber geometry as built.
[u/mrichter/AliRoot.git] / THbtp / AliGenHBTprocessor.h
1 // Implementation of the interface for THBTprocessor
2 // which is a wrapper itself to Fortran 
3 // program "HBT processor" written by Lanny Ray
4 // Author: Piotr Krzysztof Skowronski <Piotr.Skowronski@cern.ch>
5 // 
6 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
7  * See cxx source for full Copyright notice                               */
8
9 /* $Id$ */
10
11 #ifndef ALIGENHBTPROCESSOR_H
12 #define ALIGENHBTPROCESSOR_H
13
14 #include "AliGenerator.h"
15 #include "TPDGCode.h"
16
17 class THBTprocessor;
18 class TClonesArray;
19 class TParticle;
20
21 enum {kHBTPMaxParticleTypes = 50};
22
23 class AliGenHBTprocessor : public AliGenerator 
24
25 //Wrapper class for THBTProcessor 
26 //which is a wrapper itself to Fortran 
27 //program "HBT processor" written by Lanny Ray
28 //
29 //Piotr.Skowronski@cern.ch
30
31   public:
32     AliGenHBTprocessor();
33     AliGenHBTprocessor(const AliGenHBTprocessor& in);
34     virtual ~AliGenHBTprocessor();
35
36     virtual void Init();
37     virtual void Generate();
38     virtual void GetParticles(TClonesArray * particles) const;
39     Int_t        IdFromPDG(Int_t pdg) const;
40     Int_t        PDGFromId(Int_t id) const;
41
42     Int_t        GetHbtPStatusCode(Int_t part) const; 
43     void         SetHbtPStatusCode(Int_t hbtstatcode, Int_t part);
44 /************* S E T T E R S ******************/  
45
46     virtual void SetTrackRejectionFactor(Float_t trf = 1.0);
47
48     virtual void SetRefControl(Int_t rc =2);
49     virtual void SetPIDs(Int_t pid1 = kPiPlus,Int_t pid2 = kPiMinus); //PDG Codes of particles to be processed, default \\Pi^{+} and \\Pi^{-}
50     virtual void SetNPIDtypes(Int_t npidt = 2); //Number ofparticle types to be processed
51     virtual void SetDeltap(Float_t deltp = 0.1); //maximum range for random momentum shifts in GeV/c;
52                                                  //px,py,pz independent; Default = 0.1 GeV/c.
53     virtual void SetMaxIterations(Int_t maxiter = 50);//
54     virtual void SetDelChi(Float_t dc = 0.1);
55     virtual void SetIRand(Int_t irnd = 76564) ;
56      
57     virtual void SetLambda(Float_t lam = 0.6);
58     virtual void SetR1d(Float_t r = 7.0) ;
59     virtual void SetRSide(Float_t rs = 6.0);
60     virtual void SetROut(Float_t ro = 7.0) ;
61     virtual void SetRLong(Float_t rl = 4.0) ;
62     virtual void SetRPerp(Float_t rp = 6.0);
63     virtual void SetRParallel(Float_t rprl = 4.0);
64     virtual void SetR0(Float_t r0 = 4.0) ;
65     virtual void SetQ0(Float_t q0 = 9.0) ;
66     virtual void SetSwitch1D(Int_t s1d = 3);
67     virtual void SetSwitch3D(Int_t s3d = 0) ;
68     virtual void SetSwitchType(Int_t st = 3);
69     virtual void SetSwitchCoherence(Int_t sc = 0);
70     virtual void SetSwitchCoulomb(Int_t scol = 2);
71     virtual void SetSwitchFermiBose(Int_t sfb = 1);
72     
73     virtual void SetMomentumRange(Float_t pmin=0, Float_t pmax=0); //Dummy method
74     virtual void SetPtRange(Float_t ptmin = 0.1, Float_t ptmax = 0.98);
75     virtual void SetPxRange(Float_t pxmin = -1.0, Float_t pxmax = 1.0);
76     virtual void SetPyRange(Float_t pymin = -1.0, Float_t pymax = 1.0);  
77     virtual void SetPzRange(Float_t pzmin = -3.6, Float_t pzmax = 3.6);
78     
79     virtual void SetPhiRange(Float_t phimin = -180.0, Float_t phimax = 180.0);//Phi angle
80     virtual void SetEtaRange(Float_t etamin = -1.5, Float_t etamax = 1.5);//Pseudorapidity
81     void SetThetaRange(Float_t thetamin = 0, Float_t thetamax = 180); //Azimuthal angle, override AliGenerator method
82                                                                       //which uses this, core fortran HBTProcessor uses Eta (pseudorapidity)
83                                                                       //so these methods has to be synchronized         
84
85     virtual void SetNPtBins(Int_t nptbin = 50);
86     virtual void SetNPhiBins(Int_t nphibin = 50);
87     virtual void SetNEtaBins(Int_t netabin = 50);
88     virtual void SetNPxBins(Int_t npxbin = 20);
89     virtual void SetNPyBins(Int_t npybin = 20);
90     virtual void SetNPzBins(Int_t npzbin = 70);
91    
92     
93     virtual void SetNBins1DFineMesh(Int_t n = 10);
94     virtual void SetBinSize1DFineMesh(Float_t x=0.01);
95       
96     virtual void SetNBins1DCoarseMesh(Int_t n =2 );
97     virtual void SetBinSize1DCoarseMesh(Float_t x=0.05);
98       
99     virtual void SetNBins3DFineMesh(Int_t n = 8);
100     virtual void SetBinSize3DFineMesh(Float_t x=0.01);
101       
102     virtual void SetNBins3DCoarseMesh(Int_t n = 2);
103     virtual void SetBinSize3DCoarseMesh(Float_t x=0.08);
104       
105     virtual void SetNBins3DFineProjectMesh(Int_t n =3 );
106
107     virtual void SetPrintFull(Int_t flag = 1);
108     
109 /************* E V E N T   M E R G E ******************/  
110     
111     Int_t        GetNumberOfEvents();
112     Int_t        GetNumberOfTracks();
113     void         SetActiveEventNumber(Int_t n);
114     TParticle*   GetTrack(Int_t n);
115     void         SetNEventsToMerge(Int_t nev);
116     
117     
118     //conveerts Eta (pseudorapidity) to etha(azimuthal angle). Returns radians 
119     static Double_t EtaToTheta(Double_t arg){return 2.*TMath::ATan(TMath::Exp(-arg));}
120     //converts tetha(azimuthal angle) to Eta (pseudorapidity). Argument in radians
121     static Double_t ThetaToEta(Double_t arg);
122     //converts Degrees To Radians
123     static Double_t DegreesToRadians(Double_t arg){return arg*TMath::Pi()/180.;}
124     //converts Radians To Degrees 
125     static Double_t RadiansToDegrees(Double_t arg){return arg*180./TMath::Pi();}
126     
127     static Int_t  GetDebug() {return fgDebug;}
128 //    static Int_t  GetDebug() {return fgDebug;}
129     
130 /***********************************************************************/
131 /* * * * * * *    P R O T E C T E D   A R E A    * * * * * * * * * * * */ 
132 /***********************************************************************/
133   protected:
134     
135     THBTprocessor * fHBTprocessor;       //pointer to generator (TGenerator)
136     Int_t         **fHbtPStatCodes;      //! hbtp status codes of particles
137     Int_t           fNPDGCodes;          //! Number of defined particles   
138     Int_t           fPDGCode[kHBTPMaxParticleTypes]; //! PDG codes (for conversion PDG<->Geant)
139     void            DefineParticles();   //initiates array with PDG codes
140     void            InitStatusCodes();   //Initiates status codes (allocates memory and sets everything to zero) 
141     void            CleanStatusCodes();   //deletes array with status codes
142     /**********   P A R A M E T E R S  OF THE GENERATOR****************/
143            
144     Float_t fTrackRejectionFactor; //variates in range 0.0 <-> 1.0
145                                    //Describes the factor of particles rejected from the output.
146                                    //Used only in case of low muliplicity particles e.g. lambdas.
147                                    //Processor generates addisional particles and builds the 
148                                    //correletions on such a statistics.
149                                    //At the end these particels are left in the event according 
150                                    //to this factor: 1==all particles are left
151                                    //                0==all are removed
152       Int_t fReferenceControl;     //switch wether read reference histograms from file =1
153                                    //              compute from input events =2 - default
154       Int_t fPrintFull;             // Full print out option - each event
155       Int_t fPrintSectorData;       // Print sector overflow diagnostics
156       Int_t fNPidTypes;             // # particle ID types to correlate
157       Int_t fPid[2];                // Geant particle ID #s, max of 2 types
158       Int_t fNevents ;              // # events in input event text file
159       Int_t fSwitch1d;              // Include 1D correlations
160       Int_t fSwitch3d;              // Include 3D correlations
161       Int_t fSwitchType ;           // For like, unlike or both PID pairs
162       Int_t fSwitchCoherence;       // To include incoh/coher mixed source
163       Int_t fSwitchCoulomb;         // Coulomb correction selection options
164       Int_t fSwitchFermiBose;      // For fermions or bosons
165
166 //   Counters:
167
168       Int_t fEventLineCounter;     // Input event text file line counter
169       Int_t fMaxit;                  // Max # iterations in track adjustment
170       Int_t fIrand;                  // Random # starting seed (Def=12345)      
171 //                                    //    line counter
172
173 //   Correlation Model Parameters:
174
175       Float_t    fLambda;               // Chaoticity parameter
176       Float_t    fR1d;                   // Spherical source radius (fm)
177       Float_t    fRside;                  // 3D Bertsch-Pratt source 'side' R (fm)
178       Float_t    fRout;                   // 3D Bertsch-Pratt source 'out'  R (fm)
179       Float_t    fRlong;                  // 3D Bertsch-Pratt source 'long' R (fm)
180       Float_t    fRperp;                  // 3D YKP source transverse radius  (fm)
181       Float_t    fRparallel;              // 3D YKP source longitudinal radius(fm)
182       Float_t    fR0;                     // 3D YKP source emission time durat(fm)
183       Float_t    fQ0;                     // NA35 Coulomb parameter (GeV/c) or
184 //                                    // Coul radius for Pratt finite src (fm)
185
186 //   Search Control Parameters:
187
188
189       Float_t    fDeltap;                 // Max limit for x,y,z momt shifts(GeV/c)
190       Float_t    fDelchi;                 // Min% change in Chi-Sq to stop iterat.
191
192
193 //   Particle Masses:
194
195
196   /**********   M E S H  ****************/      
197
198
199       Int_t fNPtBins;                  // # one-body pt bins
200       Int_t fNPhiBins;                 // # one-body phi bins
201       Int_t fNEtaBins;                 // # one-body eta bins
202      
203       Int_t fN1dFine;                  // # bins for 1D, Fine Mesh
204       Int_t fN1dCoarse;                // # bins for 1D, Coarse Mesh
205       Int_t fN1dTotal;                 // Total # bins for 1D
206       Int_t fN3dFine ;                 // # bins for 3D, Fine Mesh
207       Int_t fN3dCoarse;                // # bins for 3D, Coarse Mesh
208       Int_t fN3dTotal;                 // Total # bins for 3D
209       Int_t fN3dFineProject;          // # 3D fine mesh bins to sum over for
210
211 //   Momentum Space Sectors for Track Sorting:
212
213       Int_t fNPxBins;                  // # sector bins in px
214       Int_t fNPyBins;                  // # sector bins in py
215       Int_t fNPzBins;                  // # sector bins in pz
216       Int_t fNSectors;                  // Total # sectors in 3D momentum space
217
218      
219       Float_t    fPtBinSize ;          // One-body pt bin size in (GeV/c)
220
221       
222       Float_t    fPhiBinSize;          // One-body phi bin size in (degrees)
223       
224       Float_t    fEtaBinSize ;         // One-body eta bin size
225       Float_t    fEtaMin;              // One-body eta min
226       Float_t    fEtaMax;              // One-body eta max
227 //   Two-Body Histograms and Correlation Mesh for 1D and 3D distributions:
228 //                                       // projections onto single axis.
229
230       Float_t    fBinsize1dFine;       // Bin Size - 1D, Fine Mesh in (GeV/c)
231       Float_t    fBinsize1dCoarse;     // Bin Size - 1D, Coarse Mesh in (GeV/c)
232       Float_t    fQmid1d;               // q (GeV/c) at fine-coarse mesh boundary
233       Float_t    fQmax1d;               // Max q (GeV/c) for 1D distributions
234       Float_t    fBinsize3dFine;       // Bin Size - 3D, Fine Mesh in (GeV/c)
235       Float_t    fBinsize3dCoarse;     // Bin Size - 3D, Coarse Mesh in (GeV/c)
236       Float_t    fQmid3d;               // q (GeV/c) at fine-coarse mesh boundary
237       Float_t    fQmax3d;               // Max q (GeV/c) for 3D distributions
238
239       Float_t    fPxMin;                // Sector range in px in GeV/c
240       Float_t    fPxMax;                //--//--
241       Float_t    fDelpx;                 // Mom. space sector cell size - px(GeV/c)     
242       
243       Float_t    fPyMin;                // Sector range in py in GeV/c 
244       Float_t    fPyMax;                // --//--
245       Float_t    fDelpy;                 // Mom. space sector cell size - py(GeV/c)     
246
247       Float_t    fPzMin;                // Sector range in pz in GeV/c min
248       Float_t    fPzMax;                // Sector range in pz in GeV/c max
249       Float_t    fDelpz;                 // Mom. space sector cell size - pz(GeV/c)
250
251
252       Int_t fEventMerge;                //number of events that are masked as an one event
253       Int_t fActiveStack;               //current active stack
254
255       static Int_t    fgDebug;          //debug level
256
257       /******* P R O T E C T E D   M E T H O D S  *****/
258       void GetTrackEventIndex(Int_t n, Int_t &evno, Int_t &index) const; //returns event(stack) number and 
259
260     ClassDef(AliGenHBTprocessor,1) // Interface class for AliMevsim
261     
262 };
263 #endif