]>
Commit | Line | Data |
---|---|---|
f68d9069 | 1 | #ifndef ALIFMDMCTRACKDENSITY_MC |
2 | #define ALIFMDMCTRACKDENSITY_MC | |
3 | #include "AliForwardUtil.h" | |
4 | #include <TNamed.h> | |
5 | class TList; | |
6 | class TH1D; | |
7 | class TH2D; | |
8 | class AliMCEvent; | |
9 | class AliESDFMD; | |
10 | class AliMCParticle; | |
11 | class AliTrackReference; | |
12 | class AliStack; | |
13 | ||
14 | /** | |
15 | * A class to calculate the particle density from track references. | |
16 | * This code is used both in AliForwardMCCorrectionsTask and | |
17 | * AliFMDMCDensity calculator. | |
18 | * | |
19 | * @par Input: | |
20 | * - AliESDFMD object - from reconstruction | |
21 | * - Kinematics | |
22 | * - Track-References | |
23 | * | |
24 | * @par Output: | |
25 | * - AliESDFMD object - content is # of track references/strip | |
26 | * | |
27 | * @par Corrections used: | |
28 | * - None | |
29 | * | |
30 | * @par Histograms: | |
31 | * - Incident angle vs number of track references | |
32 | * - Incident angle vs number of strips/cluster | |
33 | * | |
bd6f5206 | 34 | * @ingroup pwglf_forward_algo |
35 | * @ingroup pwglf_forward_mc | |
36 | * @ingroup pwglf_forward_aod | |
f68d9069 | 37 | */ |
38 | class AliFMDMCTrackDensity : public TNamed | |
39 | { | |
40 | public: | |
41 | /** | |
42 | * Default constructor. Do not use - for ROOT I/O system use only | |
43 | */ | |
44 | AliFMDMCTrackDensity(); | |
45 | /** | |
46 | * Normal constructor | |
47 | * | |
48 | * @param name Not used | |
49 | */ | |
50 | AliFMDMCTrackDensity(const char* name); | |
51 | /** | |
52 | * Copy constructor | |
53 | * | |
54 | * @param o Object to copy from | |
55 | */ | |
56 | AliFMDMCTrackDensity(const AliFMDMCTrackDensity& o); | |
57 | /** | |
58 | * Assignment operator | |
59 | * | |
60 | * @param o Object to assign from | |
61 | * | |
62 | * @return Reference to this | |
63 | */ | |
64 | AliFMDMCTrackDensity& operator=(const AliFMDMCTrackDensity& o); | |
65 | /** | |
66 | * Destructor. | |
67 | */ | |
68 | virtual ~AliFMDMCTrackDensity() {} | |
69 | ||
70 | /** | |
71 | * Set maximum number of strips per 'cluster' | |
72 | * | |
73 | * @param n Maximum number of strips per 'cluster' | |
74 | */ | |
75 | void SetMaxConsequtiveStrips(UShort_t n) { fMaxConsequtiveStrips = n; } | |
76 | /** | |
77 | * Set whether to only consider primaries | |
78 | * | |
79 | * @param use If true, consider only primaries | |
80 | */ | |
81 | void SetUseOnlyPrimary(Bool_t use) { fUseOnlyPrimary = use; } | |
82 | ||
83 | /** | |
84 | * Set whether to print debug messages. Please note this will | |
85 | * produce a lot of output. | |
86 | * | |
87 | * @param debug Whether to enable debug messages or not | |
88 | */ | |
89 | void SetDebug(Bool_t debug=true) { fDebug = debug; } | |
90 | /** | |
91 | * Loops over all the particles in the passed event. If @a primary | |
92 | * is not null, then that histogram is filled with the primary | |
93 | * particle information - irrespective of whether the particle | |
94 | * actually hits the FMD or not. For each track (primary or | |
95 | * secondary, unless only primary information is requested - see | |
96 | * SetUseOnlyPrimary) loop over all track references to that | |
97 | * particle and check if they come from the FMD. In that case, | |
98 | * figure out which strip(s) to assign the track to, and fill the @a | |
99 | * hits structure. | |
100 | * | |
101 | * @param esd FMD ESD structure | |
102 | * @param event MC event | |
103 | * @param vz IP z-coordinate | |
104 | * @param output Output of FMD hits | |
105 | * @param primary Primary information, if available. | |
106 | * | |
107 | * @return true | |
108 | */ | |
109 | Bool_t Calculate(const AliESDFMD& esd, | |
110 | const AliMCEvent& event, | |
111 | Double_t vz, | |
112 | AliESDFMD& output, | |
113 | TH2D* primary); | |
114 | /** | |
115 | * Define ouputs | |
116 | * | |
117 | * @param list List to add outputs to | |
118 | */ | |
119 | void DefineOutput(TList* list); | |
120 | ||
121 | void Print(Option_t* option="") const; | |
122 | protected: | |
123 | /** | |
124 | * Store a particle hit in FMD<i>dr</i>[<i>s,t</i>] in @a output | |
125 | * | |
126 | * | |
127 | * @param particle Particle to store | |
128 | * @param mother Ultimate mother of particle | |
129 | * @param longest Longest track reference | |
130 | * @param vz Z coordinate of IP | |
131 | * @param nC Total number of track-references in this sector | |
132 | * @param nT Number of distint strips hit in this sector | |
133 | * @param output Output structure | |
134 | */ | |
135 | void StoreParticle(AliMCParticle* particle, | |
136 | const AliMCParticle* mother, | |
137 | Int_t longest, | |
138 | Double_t vz, | |
139 | UShort_t nC, | |
140 | UShort_t nT, | |
2b556440 | 141 | AliESDFMD& output, |
142 | Double_t w) const; | |
f68d9069 | 143 | /** |
144 | * Get incident angle of this track reference | |
145 | * | |
146 | * @param ref Track reference | |
147 | * @param vz Z coordinate of the IP | |
148 | * | |
149 | * @return incident angle (in radians) | |
150 | */ | |
151 | Double_t GetTrackRefTheta(const AliTrackReference* ref, | |
152 | Double_t vz) const; | |
153 | /** | |
154 | * Get ultimate mother of a track | |
155 | * | |
156 | * @param iTr Track number | |
c6115ede | 157 | * @param event Event |
f68d9069 | 158 | * |
159 | * @return Pointer to mother or null | |
160 | */ | |
161 | const AliMCParticle* GetMother(Int_t iTr, const AliMCEvent& event) const; | |
2b556440 | 162 | /** |
163 | * Calculate flow weight | |
164 | * | |
165 | * @param eta Pseudo rapidity | |
166 | * @param pt Transverse momemtum | |
167 | * @param b Impact parameter | |
168 | * @param phi Azimuthal angle | |
169 | * @param rp Reaction plance angle | |
170 | * @param id Particle PDG code | |
171 | * | |
172 | * @return Flow weight for the particle | |
173 | */ | |
174 | Double_t CalculateWeight(Double_t eta, Double_t pt, Double_t b, | |
175 | Double_t phi, Double_t rp, Int_t id) const; | |
176 | ||
f68d9069 | 177 | Bool_t fUseOnlyPrimary; // Only use primaries |
178 | UShort_t fMaxConsequtiveStrips; // Max 'cluster' size | |
179 | TH1D* fNr; // Number of track-refs per cluster | |
180 | TH1D* fNt; // Size of cluster in strips | |
181 | TH2D* fBinFlow; // eta,phi bin flow | |
182 | TH2D* fEtaBinFlow; // dEta vs eta of strip | |
183 | TH2D* fPhiBinFlow; // dPhi vs phi of strip | |
184 | Bool_t fDebug; // Debug flag | |
185 | ||
186 | ClassDef(AliFMDMCTrackDensity,1); // Calculate track-ref density | |
187 | }; | |
188 | ||
189 | #endif | |
190 | // Local Variables: | |
191 | // mode: C++ | |
192 | // End: |