Adaption to new fluka common blocks (E. Futo)
[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
14#include <TPDGCode.h>
15
16#include "AliGenerator.h"
17
18class THBTprocessor;
19class TClonesArray;
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
79 virtual void SetPhiRange(Float_t phimin = 0.0, Float_t phimax = 360.0);//Angle in degrees
80 //coherent with AliGenCocktail
81 //incohernet with AliGenerator
82 virtual void SetEtaRange(Float_t etamin = -1.5, Float_t etamax = 1.5);//Pseudorapidity
83 void SetThetaRange(Float_t thetamin = 0, Float_t thetamax = 180); //Azimuthal angle, override AliGenerator method
84 //which uses this, core fortran HBTProcessor uses Eta (pseudorapidity)
85 //so these methods has to be synchronized
86
87 virtual void SetNPtBins(Int_t nptbin = 50);
88 virtual void SetNPhiBins(Int_t nphibin = 50);
89 virtual void SetNEtaBins(Int_t netabin = 50);
90 virtual void SetNPxBins(Int_t npxbin = 20);
91 virtual void SetNPyBins(Int_t npybin = 20);
92 virtual void SetNPzBins(Int_t npzbin = 70);
93
94
95 virtual void SetNBins1DFineMesh(Int_t n = 10);
96 virtual void SetBinSize1DFineMesh(Float_t x=0.01);
97
98 virtual void SetNBins1DCoarseMesh(Int_t n =2 );
99 virtual void SetBinSize1DCoarseMesh(Float_t x=0.05);
100
101 virtual void SetNBins3DFineMesh(Int_t n = 8);
102 virtual void SetBinSize3DFineMesh(Float_t x=0.01);
103
104 virtual void SetNBins3DCoarseMesh(Int_t n = 2);
105 virtual void SetBinSize3DCoarseMesh(Float_t x=0.08);
106
107 virtual void SetNBins3DFineProjectMesh(Int_t n =3 );
108/***********************************************************************/
109/* * * * * * * P R O T E C T E D A R E A * * * * * * * * * * * */
110/***********************************************************************/
111 protected:
112
113 THBTprocessor * fHBTprocessor; //pointer to generator (TGenerator)
114 Int_t **fHbtPStatCodes; //! hbtp status codes of particles
115 Int_t fNPDGCodes; //! Number of defined particles
116 Int_t fPDGCode[kHBTPMaxParticleTypes]; //! PDG codes (for conversion PDG<->Geant)
117 void DefineParticles(); //initiates array with PDG codes
118 void InitStatusCodes(); //Initiates status codes (allocates memory and sets everything to zero)
119 void CleanStatusCodes(); //deletes array with status codes
120 /********** P A R A M E T E R S OF THE GENERATOR****************/
121
122 Float_t fTrackRejectionFactor; //variates in range 0.0 <-> 1.0
123 //Describes the factor of particles rejected from the output.
124 //Used only in case of low muliplicity particles e.g. lambdas.
125 //Processor generates addisional particles and builds the
126 //correletions on such a statistics.
127 //At the end these particels are left in the event according
128 //to this factor: 1==all particles are left
129 // 0==all are removed
130 Int_t fReferenceControl; //switch wether read reference histograms from file =1
131 // compute from input events =2 - default
132 Int_t fPrintFull; // Full print out option - each event
133 Int_t fPrintSectorData; // Print sector overflow diagnostics
134 Int_t fNPidTypes; // # particle ID types to correlate
135 Int_t fPid[2]; // Geant particle ID #s, max of 2 types
136 Int_t fNevents ; // # events in input event text file
137 Int_t fSwitch1d; // Include 1D correlations
138 Int_t fSwitch3d; // Include 3D correlations
139 Int_t fSwitchType ; // For like, unlike or both PID pairs
140 Int_t fSwitchCoherence; // To include incoh/coher mixed source
141 Int_t fSwitchCoulomb; // Coulomb correction selection options
142 Int_t fSwitchFermiBose; // For fermions or bosons
143
144// Counters:
145
146 Int_t fEventLineCounter; // Input event text file line counter
147 Int_t fMaxit; // Max # iterations in track adjustment
148 Int_t fIrand; // Random # starting seed (Def=12345)
149// // line counter
150
151// Correlation Model Parameters:
152
153 Float_t fLambda; // Chaoticity parameter
154 Float_t fR1d; // Spherical source radius (fm)
155 Float_t fRside; // 3D Bertsch-Pratt source 'side' R (fm)
156 Float_t fRout; // 3D Bertsch-Pratt source 'out' R (fm)
157 Float_t fRlong; // 3D Bertsch-Pratt source 'long' R (fm)
158 Float_t fRperp; // 3D YKP source transverse radius (fm)
159 Float_t fRparallel; // 3D YKP source longitudinal radius(fm)
160 Float_t fR0; // 3D YKP source emission time durat(fm)
161 Float_t fQ0; // NA35 Coulomb parameter (GeV/c) or
162// // Coul radius for Pratt finite src (fm)
163
164// Search Control Parameters:
165
166
167 Float_t fDeltap; // Max limit for x,y,z momt shifts(GeV/c)
168 Float_t fDelchi; // Min% change in Chi-Sq to stop iterat.
169
170
171// Particle Masses:
172
173
174 /********** M E S H ****************/
175
176
177 Int_t fNPtBins; // # one-body pt bins
178 Int_t fNPhiBins; // # one-body phi bins
179 Int_t fNEtaBins; // # one-body eta bins
180
181 Int_t fN1dFine; // # bins for 1D, Fine Mesh
182 Int_t fN1dCoarse; // # bins for 1D, Coarse Mesh
183 Int_t fN1dTotal; // Total # bins for 1D
184 Int_t fN3dFine ; // # bins for 3D, Fine Mesh
185 Int_t fN3dCoarse; // # bins for 3D, Coarse Mesh
186 Int_t fN3dTotal; // Total # bins for 3D
187 Int_t fN3dFineProject; // # 3D fine mesh bins to sum over for
188
189// Momentum Space Sectors for Track Sorting:
190
191 Int_t fNPxBins; // # sector bins in px
192 Int_t fNPyBins; // # sector bins in py
193 Int_t fNPzBins; // # sector bins in pz
194 Int_t fNSectors; // Total # sectors in 3D momentum space
195
196
197 Float_t fPtBinSize ; // One-body pt bin size in (GeV/c)
198
199
200 Float_t fPhiBinSize; // One-body phi bin size in (degrees)
201
202 Float_t fEtaBinSize ; // One-body eta bin size
203 Float_t fEtaMin; // One-body eta min
204 Float_t fEtaMax; // One-body eta max
205// Two-Body Histograms and Correlation Mesh for 1D and 3D distributions:
206// // projections onto single axis.
207
208 Float_t fBinsize1dFine; // Bin Size - 1D, Fine Mesh in (GeV/c)
209 Float_t fBinsize1dCoarse; // Bin Size - 1D, Coarse Mesh in (GeV/c)
210 Float_t fQmid1d; // q (GeV/c) at fine-coarse mesh boundary
211 Float_t fQmax1d; // Max q (GeV/c) for 1D distributions
212 Float_t fBinsize3dFine; // Bin Size - 3D, Fine Mesh in (GeV/c)
213 Float_t fBinsize3dCoarse; // Bin Size - 3D, Coarse Mesh in (GeV/c)
214 Float_t fQmid3d; // q (GeV/c) at fine-coarse mesh boundary
215 Float_t fQmax3d; // Max q (GeV/c) for 3D distributions
216
217 Float_t fPxMin; // Sector range in px in GeV/c
218 Float_t fPxMax; //--//--
219 Float_t fDelpx; // Mom. space sector cell size - px(GeV/c)
220
221 Float_t fPyMin; // Sector range in py in GeV/c
222 Float_t fPyMax; // --//--
223 Float_t fDelpy; // Mom. space sector cell size - py(GeV/c)
224
225 Float_t fPzMin; // Sector range in pz in GeV/c min
226 Float_t fPzMax; // Sector range in pz in GeV/c max
227 Float_t fDelpz; // Mom. space sector cell size - pz(GeV/c)
228
229
230 /******* P R O T E C T E D M E T H O D S *****/
231 private:
232 public:
233 //conveerts Eta (pseudorapidity) to etha(azimuthal angle). Returns radians
234 static Double_t EtaToTheta(Double_t arg){return 2.*TMath::ATan(TMath::Exp(-arg));}
235 //converts etha(azimuthal angle) to Eta (pseudorapidity). Argument in radians
236 static Double_t ThetaToEta(Double_t arg);
237 //converts Degrees To Radians
238 static Double_t DegreesToRadians(Double_t arg){return arg*TMath::Pi()/180.;}
239 //converts Radians To Degrees
240 static Double_t RadiansToDegrees(Double_t arg){return arg*180./TMath::Pi();}
241
242 ClassDef(AliGenHBTprocessor,1) // Interface class for AliMevsim
243
244};
245#include <Riostream.h>
246#endif