1 #ifndef ALISPDMCTRACKDENSITY_MC
2 #define ALISPDMCTRACKDENSITY_MC
8 class AliTrackReference;
14 * A class to calculate the particle density from track references.
15 * This code is used both in AliForwardMCCorrectionsTask and
16 * AliSPDMCDensity calculator.
19 * - AliMultiplicity object - from reconstruction
24 * - AliESDSPD object - content is # of track references/strip
26 * @par Corrections used:
30 * - Incident angle vs number of track references
31 * - Incident angle vs number of strips/cluster
33 * @ingroup pwglf_forward_algo
34 * @ingroup pwglf_forward_mc
35 * @ingroup pwglf_forward_aod
37 class AliSPDMCTrackDensity : public TNamed
41 * Default constructor. Do not use - for ROOT I/O system use only
43 AliSPDMCTrackDensity();
47 * @param name Not used
49 AliSPDMCTrackDensity(const char* name);
53 * @param o Object to copy from
55 AliSPDMCTrackDensity(const AliSPDMCTrackDensity& o);
59 * @param o Object to assign from
61 * @return Reference to this
63 AliSPDMCTrackDensity& operator=(const AliSPDMCTrackDensity& o);
67 virtual ~AliSPDMCTrackDensity() {}
70 * Set whether to only consider primaries
72 * @param use If true, consider only primaries
74 void SetUseOnlyPrimary(Bool_t use) { fUseOnlyPrimary = use; }
76 * Loops over all the particles in the passed event. If @a primary
77 * is not null, then that histogram is filled with the primary
78 * particle information - irrespective of whether the particle
79 * actually hits the SPD or not. For each track (primary or
80 * secondary, unless only primary information is requested - see
81 * SetUseOnlyPrimary) loop over all track references to that
82 * particle and check if they come from the SPD. In that case,
83 * figure out which @f$(\eta,\varphi)@f$-bin to assign the track to,
84 * and fill the @a output histogram
86 * @param event MC event
87 * @param vz IP z--coordinate
88 * @param output Output of SPD hits
89 * @param primary Primary information, if available.
93 Bool_t Calculate(const AliMCEvent& event,
100 * @param list List to add outputs to
102 void DefineOutput(TList* list);
104 void Print(Option_t* option="") const;
107 * Store a particle hit in FMD<i>dr</i>[<i>s,t</i>] in @a output
110 * @param particle Particle to store
111 * @param mother Ultimate mother
112 * @param refNo Reference number
113 * @param vz Vertex z coordinate
114 * @param output Output structure
116 void StoreParticle(AliMCParticle* particle,
117 const AliMCParticle* mother,
122 * Get ultimate mother of a track
124 * @param iTr Track number
127 * @return Pointer to mother or null
129 const AliMCParticle* GetMother(Int_t iTr, const AliMCEvent& event) const;
131 * Get incident angle of this track reference
133 * @param ref Track reference
134 * @param vz Z coordinate of the IP
136 * @return incident angle (in radians)
138 Double_t GetTrackRefTheta(const AliTrackReference* ref,
140 Bool_t fUseOnlyPrimary; // Only use primaries
141 Double_t fMinR; // Min radius
142 Double_t fMaxR; // Max radius
143 Double_t fMinZ; // Min z
144 Double_t fMaxZ; // Max z
145 TH2D* fRZ; // Location in (r,z)
146 TH3D* fXYZ; // Location in (x,y,z)
147 TH1D* fNRefs; // Refs per track
148 TH2D* fBinFlow; // eta,phi bin flow
150 ClassDef(AliSPDMCTrackDensity,1); // Calculate track-ref density