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 |
73 | |
74 | virtual void SetNPtBins(Int_t nptbin = 50); |
75 | virtual void SetNPhiBins(Int_t nphibin = 50); |
76 | virtual void SetNEtaBins(Int_t netabin = 50); |
77 | virtual void SetNPxBins(Int_t npxbin = 20); |
78 | virtual void SetNPyBins(Int_t npybin = 20); |
79 | virtual void SetNPzBins(Int_t npzbin = 70); |
80 | |
81 | |
82 | virtual void SetNBins1DFineMesh(Int_t n = 10); |
83 | virtual void SetBinSize1DFineMesh(Float_t x=0.01); |
84 | |
85 | virtual void SetNBins1DCoarseMesh(Int_t n =2 ); |
86 | virtual void SetBinSize1DCoarseMesh(Float_t x=0.05); |
87 | |
88 | virtual void SetNBins3DFineMesh(Int_t n = 8); |
89 | virtual void SetBinSize3DFineMesh(Float_t x=0.01); |
90 | |
91 | virtual void SetNBins3DCoarseMesh(Int_t n = 2); |
92 | virtual void SetBinSize3DCoarseMesh(Float_t x=0.08); |
93 | |
94 | virtual void SetNBins3DFineProjectMesh(Int_t n =3 ); |
95 | /***********************************************************************/ |
96 | /* * * * * * * P R O T E C T E D A R E A * * * * * * * * * * * */ |
97 | /***********************************************************************/ |
98 | protected: |
99 | |
100 | THBTprocessor * fHBTprocessor; //pointer to generator (TGenerator) |
101 | Int_t **fHbtPStatCodes; //! hbtp status codes of particles |
102 | Int_t fNPDGCodes; //! Number of defined particles |
103 | Int_t fPDGCode[kHBTPMaxParticleTypes]; //! PDG codes (for conversion PDG<->Geant) |
104 | void DefineParticles(); //initiates array with PDG codes |
105 | void InitStatusCodes(); //Initiates status codes (allocates memory and sets everything to zero) |
106 | void CleanStatusCodes(); //deletes array with status codes |
107 | /********** P A R A M E T E R S OF THE GENERATOR****************/ |
108 | |
109 | Float_t fTrackRejectionFactor; //variates in range 0.0 <-> 1.0 |
110 | //Describes the factor of particles rejected from the output. |
111 | //Used only in case of low muliplicity particles e.g. lambdas. |
112 | //Processor generates addisional particles and builds the |
113 | //correletions on such a statistics. |
114 | //At the end these particels are left in the event according |
115 | //to this factor: 1==all particles are left |
116 | // 0==all are removed |
117 | Int_t fReferenceControl; //switch wether read reference histograms from file =1 |
118 | // compute from input events =2 - default |
119 | Int_t fPrintFull; // Full print out option - each event |
120 | Int_t fPrintSectorData; // Print sector overflow diagnostics |
121 | Int_t fNPidTypes; // # particle ID types to correlate |
122 | Int_t fPid[2]; // Geant particle ID #s, max of 2 types |
123 | Int_t fNevents ; // # events in input event text file |
124 | Int_t fSwitch_1d; // Include 1D correlations |
125 | Int_t fSwitch_3d; // Include 3D correlations |
126 | Int_t fSwitch_type ; // For like, unlike or both PID pairs |
127 | Int_t fSwitch_coherence; // To include incoh/coher mixed source |
128 | Int_t fSwitch_coulomb; // Coulomb correction selection options |
129 | Int_t fSwitch_fermi_bose; // For fermions or bosons |
130 | |
131 | // Numbers of particles and pairs: |
132 | |
133 | Int_t fN_part_1_trk; // Total # PID #1 in 'trk', all flags |
134 | Int_t fN_part_2_trk; // Total # PID #2 in 'trk', all flags |
135 | Int_t fN_part_tot_trk; // Total # all part. in 'trk', all flgs |
136 | Int_t fN_part_used_1_trk; // # PID#1, used (flag=0) in 'trk' |
137 | Int_t fN_part_used_2_trk; // # PID#2, used (flag=0) in 'trk' |
138 | |
139 | Int_t fN_part_1_trk2; // Total # PID #1 in 'trk2', all flags |
140 | Int_t fN_part_2_trk2; // Total # PID #2 in 'trk2', all flags |
141 | Int_t fN_part_tot_trk2; // Total # all part. in 'trk2', all flgs |
142 | Int_t fN_part_used_1_trk2; // # PID#1, used (flag=0) in 'trk2' |
143 | Int_t fN_part_used_2_trk2; // # PID#2, used (flag=0) in 'trk2' |
144 | |
145 | Int_t fN_part_used_1_ref; // # PID#1, used (flag=0) in Reference |
146 | Int_t fN_part_used_2_ref; // # PID#2, used (flag=0) in Reference |
147 | Int_t fN_part_used_1_inc; // # PID#1, used (flag=0) in Inclusive |
148 | Int_t fN_part_used_2_inc; // # PID#2, used (flag=0) in Inclusive |
149 | |
150 | Int_t fNum_pairs_like; // # like pairs used (flag=0) in fit |
151 | Int_t fNum_pairs_unlike; // # unlike pairs used (flag=0) in fit |
152 | Int_t fNum_pairs_like_ref; // # like pairs used (flag=0) in Ref. |
153 | Int_t fNum_pairs_unlike_ref; // # unlike pairs used (flag=0) in Ref. |
154 | Int_t fNum_pairs_like_inc; // # like pairs used (flag=0) in Incl. |
155 | Int_t fNum_pairs_unlike_inc; // # unlike pairs used (flag=0) in Incl. |
156 | |
157 | // Counters: |
158 | |
159 | Int_t fEvent_line_counter; // Input event text file line counter |
160 | Int_t fMaxit; // Max # iterations in track adjustment |
161 | Int_t fIrand; // Random # starting seed (Def=12345) |
162 | Int_t fFile10_line_counter; // Output, correlated event text file |
163 | // // line counter |
164 | |
165 | // Correlation Model Parameters: |
166 | |
167 | Float_t fLambda; // Chaoticity parameter |
168 | Float_t fR_1d; // Spherical source radius (fm) |
169 | Float_t fRside; // 3D Bertsch-Pratt source 'side' R (fm) |
170 | Float_t fRout; // 3D Bertsch-Pratt source 'out' R (fm) |
171 | Float_t fRlong; // 3D Bertsch-Pratt source 'long' R (fm) |
172 | Float_t fRperp; // 3D YKP source transverse radius (fm) |
173 | Float_t fRparallel; // 3D YKP source longitudinal radius(fm) |
174 | Float_t fR0; // 3D YKP source emission time durat(fm) |
175 | Float_t fQ0; // NA35 Coulomb parameter (GeV/c) or |
176 | // // Coul radius for Pratt finite src (fm) |
177 | |
178 | // Search Control Parameters: |
179 | |
180 | |
181 | Float_t fDeltap; // Max limit for x,y,z momt shifts(GeV/c) |
182 | Float_t fDelchi; // Min% change in Chi-Sq to stop iterat. |
183 | |
184 | |
185 | // Chi-Square Values: |
186 | |
187 | Float_t fChisq_wt_like_1d; // 1D, Like pairs |
188 | Float_t fChisq_wt_unlike_1d; // 1D, Unlike pairs |
189 | Float_t fChisq_wt_like_3d_fine; // 3D, Like pairs, Fine Mesh |
190 | Float_t fChisq_wt_unlike_3d_fine; // 3D, Unlike pairs, Fine Mesh |
191 | Float_t fChisq_wt_like_3d_coarse; // 3D, Like pairs, Coarse Mesh |
192 | Float_t fChisq_wt_unlike_3d_coarse; // 3D, Unlike pairs, Coarse Mesh |
193 | Float_t fChisq_wt_hist1_1; // One-body, particle ID type #1 |
194 | Float_t fChisq_wt_hist1_2; // One-body, particle ID type #2 |
195 | |
196 | // Particle Masses: |
197 | |
198 | Float_t fMass1, fMass2; // Particle ID# 1 and 2 masses (GeV) |
199 | |
200 | |
201 | /********** M E S H ****************/ |
202 | |
203 | |
204 | Int_t fN_pt_bins; // # one-body pt bins |
205 | Int_t fN_phi_bins; // # one-body phi bins |
206 | Int_t fN_eta_bins; // # one-body eta bins |
207 | |
208 | Int_t fN_1d_fine; // # bins for 1D, Fine Mesh |
209 | Int_t fN_1d_coarse; // # bins for 1D, Coarse Mesh |
210 | Int_t fN_1d_total; // Total # bins for 1D |
211 | Int_t fN_3d_fine ; // # bins for 3D, Fine Mesh |
212 | Int_t fN_3d_coarse; // # bins for 3D, Coarse Mesh |
213 | Int_t fN_3d_total; // Total # bins for 3D |
214 | Int_t fN_3d_fine_project; // # 3D fine mesh bins to sum over for |
215 | |
216 | // Momentum Space Sectors for Track Sorting: |
217 | |
218 | Int_t fN_px_bins; // # sector bins in px |
219 | Int_t fN_py_bins; // # sector bins in py |
220 | Int_t fN_pz_bins; // # sector bins in pz |
221 | Int_t fN_sectors; // Total # sectors in 3D momentum space |
222 | |
223 | // Temporary Momentum Space Sector information storage during trk adjust. |
224 | |
225 | Int_t fOld_sec_ntrk; // Old sector # tracks |
226 | Int_t fOld_sec_flag; // Old sector flag value |
227 | Int_t fOld_sec_trkid[MAX_TRK_SAVE]; // Old sector track id array |
228 | |
229 | Int_t fNew_sec_ntrk; // New sector # tracks |
230 | Int_t fNew_sec_flag; // New sector flag value |
231 | Int_t fNew_sec_trkid[MAX_TRK_SAVE];// New sector track id array |
232 | Int_t fNew_sec_save; // New sector ID value |
233 | Int_t fNld_sec_save; // Old sector ID value |
234 | |
235 | Float_t fPt_bin_size ; // One-body pt bin size in (GeV/c) |
236 | |
237 | |
238 | Float_t fPhi_bin_size; // One-body phi bin size in (degrees) |
239 | |
240 | Float_t fEta_bin_size ; // One-body eta bin size |
241 | Float_t fEta_min; // One-body eta min/max |
242 | Float_t fEta_max; |
243 | // Two-Body Histograms and Correlation Mesh for 1D and 3D distributions: |
244 | // // projections onto single axis. |
245 | |
246 | Float_t fBinsize_1d_fine; // Bin Size - 1D, Fine Mesh in (GeV/c) |
247 | Float_t fBinsize_1d_coarse; // Bin Size - 1D, Coarse Mesh in (GeV/c) |
248 | Float_t fQmid_1d; // q (GeV/c) at fine-coarse mesh boundary |
249 | Float_t fQmax_1d; // Max q (GeV/c) for 1D distributions |
250 | Float_t fBinsize_3d_fine; // Bin Size - 3D, Fine Mesh in (GeV/c) |
251 | Float_t fBinsize_3d_coarse; // Bin Size - 3D, Coarse Mesh in (GeV/c) |
252 | Float_t fQmid_3d; // q (GeV/c) at fine-coarse mesh boundary |
253 | Float_t fQmax_3d; // Max q (GeV/c) for 3D distributions |
254 | |
255 | Float_t fPx_min; // Sector range in px in GeV/c |
256 | Float_t fPx_max; //--//-- |
257 | Float_t fDelpx; // Mom. space sector cell size - px(GeV/c) |
258 | |
259 | Float_t fPy_min; // Sector range in py in GeV/c |
260 | Float_t fPy_max; // --//-- |
261 | Float_t fDelpy; // Mom. space sector cell size - py(GeV/c) |
262 | |
263 | Float_t fPz_min; // Sector range in pz in GeV/c min |
264 | Float_t fPz_max; // Sector range in pz in GeV/c max |
265 | Float_t fDelpz; // Mom. space sector cell size - pz(GeV/c) |
266 | |
267 | public: |
268 | ClassDef(AliGenHBTprocessor,1) // Interface class for AliMevsim |
269 | |
270 | }; |
271 | #endif |