]> git.uio.no Git - u/mrichter/AliRoot.git/blame - THbtp/AliGenHBTprocessor.h
Temporary fix waiting for the real changes
[u/mrichter/AliRoot.git] / THbtp / AliGenHBTprocessor.h
CommitLineData
36b81802 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
36b81802 14#include "AliGenerator.h"
88cb7938 15#include "TPDGCode.h"
36b81802 16
17class THBTprocessor;
18class TClonesArray;
88cb7938 19class TParticle;
36b81802 20
21enum {kHBTPMaxParticleTypes = 50};
22
23class 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
88cb7938 79 virtual void SetPhiRange(Float_t phimin = -180.0, Float_t phimax = 180.0);//Phi angle
36b81802 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 );
88cb7938 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);
36b81802 116/***********************************************************************/
117/* * * * * * * P R O T E C T E D A R E A * * * * * * * * * * * */
118/***********************************************************************/
119 protected:
120
121 THBTprocessor * fHBTprocessor; //pointer to generator (TGenerator)
122 Int_t **fHbtPStatCodes; //! hbtp status codes of particles
123 Int_t fNPDGCodes; //! Number of defined particles
124 Int_t fPDGCode[kHBTPMaxParticleTypes]; //! PDG codes (for conversion PDG<->Geant)
125 void DefineParticles(); //initiates array with PDG codes
126 void InitStatusCodes(); //Initiates status codes (allocates memory and sets everything to zero)
127 void CleanStatusCodes(); //deletes array with status codes
128 /********** P A R A M E T E R S OF THE GENERATOR****************/
129
130 Float_t fTrackRejectionFactor; //variates in range 0.0 <-> 1.0
131 //Describes the factor of particles rejected from the output.
132 //Used only in case of low muliplicity particles e.g. lambdas.
133 //Processor generates addisional particles and builds the
134 //correletions on such a statistics.
135 //At the end these particels are left in the event according
136 //to this factor: 1==all particles are left
137 // 0==all are removed
138 Int_t fReferenceControl; //switch wether read reference histograms from file =1
139 // compute from input events =2 - default
140 Int_t fPrintFull; // Full print out option - each event
141 Int_t fPrintSectorData; // Print sector overflow diagnostics
142 Int_t fNPidTypes; // # particle ID types to correlate
143 Int_t fPid[2]; // Geant particle ID #s, max of 2 types
144 Int_t fNevents ; // # events in input event text file
145 Int_t fSwitch1d; // Include 1D correlations
146 Int_t fSwitch3d; // Include 3D correlations
147 Int_t fSwitchType ; // For like, unlike or both PID pairs
148 Int_t fSwitchCoherence; // To include incoh/coher mixed source
149 Int_t fSwitchCoulomb; // Coulomb correction selection options
150 Int_t fSwitchFermiBose; // For fermions or bosons
151
152// Counters:
153
154 Int_t fEventLineCounter; // Input event text file line counter
155 Int_t fMaxit; // Max # iterations in track adjustment
156 Int_t fIrand; // Random # starting seed (Def=12345)
157// // line counter
158
159// Correlation Model Parameters:
160
161 Float_t fLambda; // Chaoticity parameter
162 Float_t fR1d; // Spherical source radius (fm)
163 Float_t fRside; // 3D Bertsch-Pratt source 'side' R (fm)
164 Float_t fRout; // 3D Bertsch-Pratt source 'out' R (fm)
165 Float_t fRlong; // 3D Bertsch-Pratt source 'long' R (fm)
166 Float_t fRperp; // 3D YKP source transverse radius (fm)
167 Float_t fRparallel; // 3D YKP source longitudinal radius(fm)
168 Float_t fR0; // 3D YKP source emission time durat(fm)
169 Float_t fQ0; // NA35 Coulomb parameter (GeV/c) or
170// // Coul radius for Pratt finite src (fm)
171
172// Search Control Parameters:
173
174
175 Float_t fDeltap; // Max limit for x,y,z momt shifts(GeV/c)
176 Float_t fDelchi; // Min% change in Chi-Sq to stop iterat.
177
178
179// Particle Masses:
180
181
182 /********** M E S H ****************/
183
184
185 Int_t fNPtBins; // # one-body pt bins
186 Int_t fNPhiBins; // # one-body phi bins
187 Int_t fNEtaBins; // # one-body eta bins
188
189 Int_t fN1dFine; // # bins for 1D, Fine Mesh
190 Int_t fN1dCoarse; // # bins for 1D, Coarse Mesh
191 Int_t fN1dTotal; // Total # bins for 1D
192 Int_t fN3dFine ; // # bins for 3D, Fine Mesh
193 Int_t fN3dCoarse; // # bins for 3D, Coarse Mesh
194 Int_t fN3dTotal; // Total # bins for 3D
195 Int_t fN3dFineProject; // # 3D fine mesh bins to sum over for
196
197// Momentum Space Sectors for Track Sorting:
198
199 Int_t fNPxBins; // # sector bins in px
200 Int_t fNPyBins; // # sector bins in py
201 Int_t fNPzBins; // # sector bins in pz
202 Int_t fNSectors; // Total # sectors in 3D momentum space
203
204
205 Float_t fPtBinSize ; // One-body pt bin size in (GeV/c)
206
207
208 Float_t fPhiBinSize; // One-body phi bin size in (degrees)
209
210 Float_t fEtaBinSize ; // One-body eta bin size
211 Float_t fEtaMin; // One-body eta min
212 Float_t fEtaMax; // One-body eta max
213// Two-Body Histograms and Correlation Mesh for 1D and 3D distributions:
214// // projections onto single axis.
215
216 Float_t fBinsize1dFine; // Bin Size - 1D, Fine Mesh in (GeV/c)
217 Float_t fBinsize1dCoarse; // Bin Size - 1D, Coarse Mesh in (GeV/c)
218 Float_t fQmid1d; // q (GeV/c) at fine-coarse mesh boundary
219 Float_t fQmax1d; // Max q (GeV/c) for 1D distributions
220 Float_t fBinsize3dFine; // Bin Size - 3D, Fine Mesh in (GeV/c)
221 Float_t fBinsize3dCoarse; // Bin Size - 3D, Coarse Mesh in (GeV/c)
222 Float_t fQmid3d; // q (GeV/c) at fine-coarse mesh boundary
223 Float_t fQmax3d; // Max q (GeV/c) for 3D distributions
224
225 Float_t fPxMin; // Sector range in px in GeV/c
226 Float_t fPxMax; //--//--
227 Float_t fDelpx; // Mom. space sector cell size - px(GeV/c)
228
229 Float_t fPyMin; // Sector range in py in GeV/c
230 Float_t fPyMax; // --//--
231 Float_t fDelpy; // Mom. space sector cell size - py(GeV/c)
232
233 Float_t fPzMin; // Sector range in pz in GeV/c min
234 Float_t fPzMax; // Sector range in pz in GeV/c max
235 Float_t fDelpz; // Mom. space sector cell size - pz(GeV/c)
236
237
88cb7938 238 Int_t fEventMerge; //number of events that are masked as an one event
239 Int_t fActiveStack;
36b81802 240 /******* P R O T E C T E D M E T H O D S *****/
88cb7938 241 void GetTrackEventIndex(Int_t n, Int_t &evno, Int_t &index) const; //returns event(stack) number and
36b81802 242 private:
243 public:
244 //conveerts Eta (pseudorapidity) to etha(azimuthal angle). Returns radians
245 static Double_t EtaToTheta(Double_t arg){return 2.*TMath::ATan(TMath::Exp(-arg));}
246 //converts etha(azimuthal angle) to Eta (pseudorapidity). Argument in radians
247 static Double_t ThetaToEta(Double_t arg);
248 //converts Degrees To Radians
249 static Double_t DegreesToRadians(Double_t arg){return arg*TMath::Pi()/180.;}
250 //converts Radians To Degrees
251 static Double_t RadiansToDegrees(Double_t arg){return arg*180./TMath::Pi();}
88cb7938 252 static Int_t fgDebug;
36b81802 253 ClassDef(AliGenHBTprocessor,1) // Interface class for AliMevsim
254
255};
256#include <Riostream.h>
257#endif