2b9786f4 |
1 | #ifndef ALIGENHBTPROCESSOR_H |
2 | #define ALIGENHBTPROCESSOR_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 | // Implementation of the interface for THBTprocessor |
9 | // Author: Piotr Krzysztof Skowronski <Piotr.Skowronski@cern.ch> |
10 | |
11 | #include "AliGenerator.h" |
12 | #include <TFile.h> |
13 | #include <TTree.h> |
14 | #include <AliPDG.h> |
15 | #include "THBTprocessor.h" |
16 | |
17 | enum {kHBTPMaxParticleTypes = 50}; |
18 | |
19 | class AliGenHBTprocessor : public AliGenerator { |
20 | |
21 | public: |
22 | AliGenHBTprocessor(); |
23 | virtual ~AliGenHBTprocessor(); |
24 | |
25 | virtual void Init(); |
26 | virtual void Generate(); |
27 | virtual void GetParticles(TClonesArray * particles); |
28 | Int_t IdFromPDG(Int_t) const; |
29 | Int_t PDGFromId(Int_t) const; |
30 | |
31 | Int_t GetHbtPStatusCode(Int_t part) const; |
32 | void SetHbtPStatusCode(Int_t hbtstatcode, Int_t part); |
33 | static const Int_t fgkHBTPMAXPART; |
34 | /************* S E T T E R S ******************/ |
35 | |
36 | virtual void SetTrackRejectionFactor(Float_t trf = 1.0); |
37 | |
38 | virtual void SetRefControl(Int_t rc =2); |
39 | virtual void SetPIDs(Int_t pid1 = kPiPlus,Int_t pid2 = kPiMinus); //PDG Codes of particles to be processed, default \\Pi^{+} and \\Pi^{-} |
40 | virtual void SetNPIDtypes(Int_t npidt = 2); //Number ofparticle types to be processed |
41 | virtual void SetDeltap(Float_t deltp = 0.1); //maximum range for random momentum shifts in GeV/c; |
42 | //px,py,pz independent; Default = 0.1 GeV/c. |
43 | virtual void SetMaxIterations(Int_t maxiter = 50); |
44 | virtual void SetDelChi(Float_t dc = 0.1); |
45 | virtual void SetIRand(Int_t irnd = 76564) ; |
46 | |
47 | virtual void SetLambda(Float_t lam = 0.6); |
48 | virtual void SetR1d(Float_t r = 7.0) ; |
49 | virtual void SetRSide(Float_t rs = 6.0); |
50 | virtual void SetROut(Float_t ro = 7.0) ; |
51 | virtual void SetRLong(Float_t rl = 4.0) ; |
52 | virtual void SetRPerp(Float_t rp = 6.0); |
53 | virtual void SetRParallel(Float_t rprl = 4.0); |
54 | virtual void SetR0(Float_t r0 = 4.0) ; |
55 | virtual void SetQ0(Float_t q0 = 9.0) ; |
56 | virtual void SetSwitch1D(Int_t s1d = 3); |
57 | virtual void SetSwitch3D(Int_t s3d = 0) ; |
58 | virtual void SetSwitchType(Int_t st = 3); |
59 | virtual void SetSwitchCoherence(Int_t sc = 0); |
60 | virtual void SetSwitchCoulomb(Int_t scol = 2); |
61 | virtual void SetSwitchFermiBose(Int_t sfb = 1); |
62 | |
63 | virtual void SetMomentumRange(Float_t pmin=0, Float_t pmax=0); //Dummy method |
64 | virtual void SetPtRange(Float_t ptmin = 0.1, Float_t ptmax = 0.98); |
65 | virtual void SetPxRange(Float_t pxmin = -1.0, Float_t pxmax = 1.0); |
66 | virtual void SetPyRange(Float_t pymin = -1.0, Float_t pymax = 1.0); |
67 | virtual void SetPzRange(Float_t pzmin = -3.6, Float_t pzmax = 3.6); |
68 | |
69 | virtual void SetPhiRange(Float_t phimin = 0.0, Float_t phimax = 360.0);//Angle in degrees |
70 | //coherent with AliGenCocktail |
71 | //incohernet with AliGenerator |
72 | virtual void SetEtaRange(Float_t etamin = -1.5, Float_t etamax = 1.5);//Pseudorapidity |
4c90f2a0 |
73 | void SetThetaRange(Float_t thetamin = 0, Float_t thetamax = 180); //Azimuthal angle, override AliGenerator method |
74 | //which uses this, core fortran HBTProcessor uses Eta (pseudorapidity) |
75 | //so these methods has to be synchronized |
76 | |
2b9786f4 |
77 | virtual void SetNPtBins(Int_t nptbin = 50); |
78 | virtual void SetNPhiBins(Int_t nphibin = 50); |
79 | virtual void SetNEtaBins(Int_t netabin = 50); |
80 | virtual void SetNPxBins(Int_t npxbin = 20); |
81 | virtual void SetNPyBins(Int_t npybin = 20); |
82 | virtual void SetNPzBins(Int_t npzbin = 70); |
83 | |
84 | |
85 | virtual void SetNBins1DFineMesh(Int_t n = 10); |
86 | virtual void SetBinSize1DFineMesh(Float_t x=0.01); |
87 | |
88 | virtual void SetNBins1DCoarseMesh(Int_t n =2 ); |
89 | virtual void SetBinSize1DCoarseMesh(Float_t x=0.05); |
90 | |
91 | virtual void SetNBins3DFineMesh(Int_t n = 8); |
92 | virtual void SetBinSize3DFineMesh(Float_t x=0.01); |
93 | |
94 | virtual void SetNBins3DCoarseMesh(Int_t n = 2); |
95 | virtual void SetBinSize3DCoarseMesh(Float_t x=0.08); |
96 | |
97 | virtual void SetNBins3DFineProjectMesh(Int_t n =3 ); |
98 | /***********************************************************************/ |
99 | /* * * * * * * P R O T E C T E D A R E A * * * * * * * * * * * */ |
100 | /***********************************************************************/ |
101 | protected: |
102 | |
103 | THBTprocessor * fHBTprocessor; //pointer to generator (TGenerator) |
104 | Int_t **fHbtPStatCodes; //! hbtp status codes of particles |
105 | Int_t fNPDGCodes; //! Number of defined particles |
106 | Int_t fPDGCode[kHBTPMaxParticleTypes]; //! PDG codes (for conversion PDG<->Geant) |
107 | void DefineParticles(); //initiates array with PDG codes |
108 | void InitStatusCodes(); //Initiates status codes (allocates memory and sets everything to zero) |
109 | void CleanStatusCodes(); //deletes array with status codes |
110 | /********** P A R A M E T E R S OF THE GENERATOR****************/ |
111 | |
112 | Float_t fTrackRejectionFactor; //variates in range 0.0 <-> 1.0 |
113 | //Describes the factor of particles rejected from the output. |
114 | //Used only in case of low muliplicity particles e.g. lambdas. |
115 | //Processor generates addisional particles and builds the |
116 | //correletions on such a statistics. |
117 | //At the end these particels are left in the event according |
118 | //to this factor: 1==all particles are left |
119 | // 0==all are removed |
120 | Int_t fReferenceControl; //switch wether read reference histograms from file =1 |
121 | // compute from input events =2 - default |
122 | Int_t fPrintFull; // Full print out option - each event |
123 | Int_t fPrintSectorData; // Print sector overflow diagnostics |
124 | Int_t fNPidTypes; // # particle ID types to correlate |
125 | Int_t fPid[2]; // Geant particle ID #s, max of 2 types |
126 | Int_t fNevents ; // # events in input event text file |
127 | Int_t fSwitch_1d; // Include 1D correlations |
128 | Int_t fSwitch_3d; // Include 3D correlations |
129 | Int_t fSwitch_type ; // For like, unlike or both PID pairs |
130 | Int_t fSwitch_coherence; // To include incoh/coher mixed source |
131 | Int_t fSwitch_coulomb; // Coulomb correction selection options |
132 | Int_t fSwitch_fermi_bose; // For fermions or bosons |
133 | |
134 | // Numbers of particles and pairs: |
135 | |
136 | Int_t fN_part_1_trk; // Total # PID #1 in 'trk', all flags |
137 | Int_t fN_part_2_trk; // Total # PID #2 in 'trk', all flags |
138 | Int_t fN_part_tot_trk; // Total # all part. in 'trk', all flgs |
139 | Int_t fN_part_used_1_trk; // # PID#1, used (flag=0) in 'trk' |
140 | Int_t fN_part_used_2_trk; // # PID#2, used (flag=0) in 'trk' |
141 | |
142 | Int_t fN_part_1_trk2; // Total # PID #1 in 'trk2', all flags |
143 | Int_t fN_part_2_trk2; // Total # PID #2 in 'trk2', all flags |
144 | Int_t fN_part_tot_trk2; // Total # all part. in 'trk2', all flgs |
145 | Int_t fN_part_used_1_trk2; // # PID#1, used (flag=0) in 'trk2' |
146 | Int_t fN_part_used_2_trk2; // # PID#2, used (flag=0) in 'trk2' |
147 | |
148 | Int_t fN_part_used_1_ref; // # PID#1, used (flag=0) in Reference |
149 | Int_t fN_part_used_2_ref; // # PID#2, used (flag=0) in Reference |
150 | Int_t fN_part_used_1_inc; // # PID#1, used (flag=0) in Inclusive |
151 | Int_t fN_part_used_2_inc; // # PID#2, used (flag=0) in Inclusive |
152 | |
153 | Int_t fNum_pairs_like; // # like pairs used (flag=0) in fit |
154 | Int_t fNum_pairs_unlike; // # unlike pairs used (flag=0) in fit |
155 | Int_t fNum_pairs_like_ref; // # like pairs used (flag=0) in Ref. |
156 | Int_t fNum_pairs_unlike_ref; // # unlike pairs used (flag=0) in Ref. |
157 | Int_t fNum_pairs_like_inc; // # like pairs used (flag=0) in Incl. |
158 | Int_t fNum_pairs_unlike_inc; // # unlike pairs used (flag=0) in Incl. |
159 | |
160 | // Counters: |
161 | |
162 | Int_t fEvent_line_counter; // Input event text file line counter |
163 | Int_t fMaxit; // Max # iterations in track adjustment |
164 | Int_t fIrand; // Random # starting seed (Def=12345) |
165 | Int_t fFile10_line_counter; // Output, correlated event text file |
166 | // // line counter |
167 | |
168 | // Correlation Model Parameters: |
169 | |
170 | Float_t fLambda; // Chaoticity parameter |
171 | Float_t fR_1d; // Spherical source radius (fm) |
172 | Float_t fRside; // 3D Bertsch-Pratt source 'side' R (fm) |
173 | Float_t fRout; // 3D Bertsch-Pratt source 'out' R (fm) |
174 | Float_t fRlong; // 3D Bertsch-Pratt source 'long' R (fm) |
175 | Float_t fRperp; // 3D YKP source transverse radius (fm) |
176 | Float_t fRparallel; // 3D YKP source longitudinal radius(fm) |
177 | Float_t fR0; // 3D YKP source emission time durat(fm) |
178 | Float_t fQ0; // NA35 Coulomb parameter (GeV/c) or |
179 | // // Coul radius for Pratt finite src (fm) |
180 | |
181 | // Search Control Parameters: |
182 | |
183 | |
184 | Float_t fDeltap; // Max limit for x,y,z momt shifts(GeV/c) |
185 | Float_t fDelchi; // Min% change in Chi-Sq to stop iterat. |
186 | |
187 | |
188 | // Chi-Square Values: |
189 | |
190 | Float_t fChisq_wt_like_1d; // 1D, Like pairs |
191 | Float_t fChisq_wt_unlike_1d; // 1D, Unlike pairs |
192 | Float_t fChisq_wt_like_3d_fine; // 3D, Like pairs, Fine Mesh |
193 | Float_t fChisq_wt_unlike_3d_fine; // 3D, Unlike pairs, Fine Mesh |
194 | Float_t fChisq_wt_like_3d_coarse; // 3D, Like pairs, Coarse Mesh |
195 | Float_t fChisq_wt_unlike_3d_coarse; // 3D, Unlike pairs, Coarse Mesh |
196 | Float_t fChisq_wt_hist1_1; // One-body, particle ID type #1 |
197 | Float_t fChisq_wt_hist1_2; // One-body, particle ID type #2 |
198 | |
199 | // Particle Masses: |
200 | |
201 | Float_t fMass1, fMass2; // Particle ID# 1 and 2 masses (GeV) |
202 | |
203 | |
204 | /********** M E S H ****************/ |
205 | |
206 | |
207 | Int_t fN_pt_bins; // # one-body pt bins |
208 | Int_t fN_phi_bins; // # one-body phi bins |
209 | Int_t fN_eta_bins; // # one-body eta bins |
210 | |
211 | Int_t fN_1d_fine; // # bins for 1D, Fine Mesh |
212 | Int_t fN_1d_coarse; // # bins for 1D, Coarse Mesh |
213 | Int_t fN_1d_total; // Total # bins for 1D |
214 | Int_t fN_3d_fine ; // # bins for 3D, Fine Mesh |
215 | Int_t fN_3d_coarse; // # bins for 3D, Coarse Mesh |
216 | Int_t fN_3d_total; // Total # bins for 3D |
217 | Int_t fN_3d_fine_project; // # 3D fine mesh bins to sum over for |
218 | |
219 | // Momentum Space Sectors for Track Sorting: |
220 | |
221 | Int_t fN_px_bins; // # sector bins in px |
222 | Int_t fN_py_bins; // # sector bins in py |
223 | Int_t fN_pz_bins; // # sector bins in pz |
224 | Int_t fN_sectors; // Total # sectors in 3D momentum space |
225 | |
226 | // Temporary Momentum Space Sector information storage during trk adjust. |
227 | |
228 | Int_t fOld_sec_ntrk; // Old sector # tracks |
229 | Int_t fOld_sec_flag; // Old sector flag value |
230 | Int_t fOld_sec_trkid[MAX_TRK_SAVE]; // Old sector track id array |
231 | |
232 | Int_t fNew_sec_ntrk; // New sector # tracks |
233 | Int_t fNew_sec_flag; // New sector flag value |
234 | Int_t fNew_sec_trkid[MAX_TRK_SAVE];// New sector track id array |
235 | Int_t fNew_sec_save; // New sector ID value |
236 | Int_t fNld_sec_save; // Old sector ID value |
237 | |
238 | Float_t fPt_bin_size ; // One-body pt bin size in (GeV/c) |
239 | |
240 | |
241 | Float_t fPhi_bin_size; // One-body phi bin size in (degrees) |
242 | |
243 | Float_t fEta_bin_size ; // One-body eta bin size |
244 | Float_t fEta_min; // One-body eta min/max |
245 | Float_t fEta_max; |
246 | // Two-Body Histograms and Correlation Mesh for 1D and 3D distributions: |
247 | // // projections onto single axis. |
248 | |
249 | Float_t fBinsize_1d_fine; // Bin Size - 1D, Fine Mesh in (GeV/c) |
250 | Float_t fBinsize_1d_coarse; // Bin Size - 1D, Coarse Mesh in (GeV/c) |
251 | Float_t fQmid_1d; // q (GeV/c) at fine-coarse mesh boundary |
252 | Float_t fQmax_1d; // Max q (GeV/c) for 1D distributions |
253 | Float_t fBinsize_3d_fine; // Bin Size - 3D, Fine Mesh in (GeV/c) |
254 | Float_t fBinsize_3d_coarse; // Bin Size - 3D, Coarse Mesh in (GeV/c) |
255 | Float_t fQmid_3d; // q (GeV/c) at fine-coarse mesh boundary |
256 | Float_t fQmax_3d; // Max q (GeV/c) for 3D distributions |
257 | |
258 | Float_t fPx_min; // Sector range in px in GeV/c |
259 | Float_t fPx_max; //--//-- |
260 | Float_t fDelpx; // Mom. space sector cell size - px(GeV/c) |
261 | |
262 | Float_t fPy_min; // Sector range in py in GeV/c |
263 | Float_t fPy_max; // --//-- |
264 | Float_t fDelpy; // Mom. space sector cell size - py(GeV/c) |
265 | |
266 | Float_t fPz_min; // Sector range in pz in GeV/c min |
267 | Float_t fPz_max; // Sector range in pz in GeV/c max |
268 | Float_t fDelpz; // Mom. space sector cell size - pz(GeV/c) |
269 | |
4c90f2a0 |
270 | |
271 | /******* P R O T E C T E D M E T H O D S *****/ |
272 | public: |
273 | //conveerts Eta (pseudorapidity) to etha(azimuthal angle). Returns radians |
274 | static Double_t EtaToTheta(Double_t arg){return 2.*TMath::ATan(TMath::Exp(-arg));} |
275 | //converts etha(azimuthal angle) to Eta (pseudorapidity). Argument in radians |
276 | static Double_t ThetaToEta(Double_t arg); |
277 | //converts Degrees To Radians |
278 | static Double_t DegreesToRadians(Double_t arg){return arg*TMath::Pi()/180.;} |
279 | //converts Radians To Degrees |
280 | static Double_t RadiansToDegrees(Double_t arg){return arg*180./TMath::Pi();} |
281 | |
2b9786f4 |
282 | ClassDef(AliGenHBTprocessor,1) // Interface class for AliMevsim |
283 | |
284 | }; |
4c90f2a0 |
285 | #include <iostream.h> |
2b9786f4 |
286 | #endif |