]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG2/FEMTOSCOPY/AliFemto/AliFemtoParticle.h
Adding Lednicky's weight generator
[u/mrichter/AliRoot.git] / PWG2 / FEMTOSCOPY / AliFemto / AliFemtoParticle.h
1 ///////////////////////////////////////////////////////////////////////////
2 //                                                                       //
3 // AliFemtoParticle: main class halding all the necessary information    //
4 // about a particle that is required during femtoscopic analysis         //
5 //                                                                       //
6 ///////////////////////////////////////////////////////////////////////////
7
8 #ifndef ALIFEMTOPARTICLE_H
9 #define ALIFEMTOPARTICLE_H
10
11 //#include "math.h"
12 #include "AliFemtoTypes.h"
13 #include "AliFemtoTrack.h"
14 #include "AliFemtoV0.h"
15 #include "AliFemtoKink.h"
16 #include "AliFemtoXi.h"
17 #include "AliFmPhysicalHelixD.h"
18 // ***
19 class AliFemtoHiddenInfo;
20 // ***
21 class AliFemtoParticle{
22 public:
23   AliFemtoParticle();
24   AliFemtoParticle(const AliFemtoParticle& aParticle);
25   AliFemtoParticle(const AliFemtoTrack* const hbtTrack, const double& mass);
26   AliFemtoParticle(const AliFemtoV0* const hbtV0, const double& mass);
27   AliFemtoParticle(const AliFemtoKink* const hbtKink, const double& mass);
28   AliFemtoParticle(const AliFemtoXi* const hbtXi, const double& mass);
29   ~AliFemtoParticle();
30
31   AliFemtoParticle& operator=(const AliFemtoParticle& aParticle);
32
33   const AliFemtoLorentzVector& FourMomentum() const;
34
35   AliFmPhysicalHelixD& Helix();
36
37   const AliFemtoThreeVector DecayVertexPosition() const;
38   unsigned long TopologyMap(const int word) const;
39   int NumberOfHits() const;
40
41   unsigned long TrackId() const;         // only for particles from tracks 
42   unsigned short   NegTrackId() const;   // only for particles from v0 
43   unsigned short   PosTrackId() const;   // only for particles from v0 
44
45   AliFemtoTrack* Track() const;
46   AliFemtoV0* V0() const;
47   AliFemtoKink* Kink() const;
48
49   const AliFemtoThreeVector& NominalTpcExitPoint() const;     // position track exits TPC assuming start at (0,0,0)
50   const AliFemtoThreeVector& NominalTpcEntrancePoint() const; // position track crosses IFC assuming start at (0,0,0)
51   const AliFemtoThreeVector& TpcV0PosExitPoint() const;  
52   const AliFemtoThreeVector& TpcV0PosEntrancePoint() const;
53   const AliFemtoThreeVector& TpcV0NegExitPoint() const;  
54   const AliFemtoThreeVector& TpcV0NegEntrancePoint() const;
55
56   // the following method is for explicit internal calculation to fill datamembers.
57   // It is invoked automatically if AliFemtoParticle constructed from AliFemtoTrack
58   //void CalculateNominalTpcExitAndEntrancePoints(); // NOTE - this requires the fHelix, so be sure this is filled
59
60
61   AliFemtoThreeVector fNominalPosSample[11];  // I make this public for convenience and speed of AliFemtoPair()
62   float fZ[45];  // Z position of cluster on padrow
63   float fU[45];  // U position of cluster on padrow
64   int fSect[45]; // Sector number of cluster on padrow
65
66   void ResetFourMomentum(const AliFemtoLorentzVector& fourMomentum);
67
68   const AliFemtoHiddenInfo*  HiddenInfo() const;
69   // Fab private
70   AliFemtoHiddenInfo*  GetHiddenInfo() const;
71   void SetHiddenInfo(AliFemtoHiddenInfo* aHiddenInfo);
72   void CalculatePurity();
73   double GetPionPurity();
74   double GetKaonPurity();
75   double GetProtonPurity();
76   void CalculateTpcExitAndEntrancePoints( AliFmPhysicalHelixD* tHelix,
77                                           AliFemtoThreeVector* PrimVert,
78                                           AliFemtoThreeVector* SecVert,
79                                           AliFemtoThreeVector* tmpTpcEntrancePoint,
80                                           AliFemtoThreeVector* tmpTpcExitPoint,
81                                           AliFemtoThreeVector* tmpPosSample,
82                                           float* tmpZ,float* tmpU,int* tmpSect);
83
84   // For V0 Neg Daugthers TpcEntrance/ExitPoints
85   AliFemtoThreeVector* fTpcV0NegPosSample; // Sample of TPC V0 neg
86   float* fV0NegZ;                          // Array of Neg Z cluster positions
87   float* fV0NegU;                          // Array of Neg U cluster positions
88   int* fV0NegSect;                         // Array of Neg cluster sectors
89  
90 private:
91   AliFemtoTrack* fTrack;  // copy of the track the particle was formed of, else Null
92   AliFemtoV0* fV0;        // copy of the v0 the particle was formed of, else Null
93   AliFemtoKink* fKink;    // copy of the v0 the particle was formed of, else Null
94   AliFemtoXi* fXi;        // copy of the Xi the particle was formed of, else Null  
95
96   AliFemtoLorentzVector fFourMomentum; // Particle momentum
97   AliFmPhysicalHelixD fHelix;          // Particle trajectory helix
98   //unsigned long  fMap[2]; 
99   //int fNhits;
100   AliFemtoThreeVector fNominalTpcExitPoint; // Point where particle exits TPC
101   AliFemtoThreeVector fNominalTpcEntrancePoint; // Point where particle enters TPC
102   AliFemtoHiddenInfo* fHiddenInfo;  // Fab private
103
104   double fPurity[6];  // Purity variables
105
106   static double fgPrimPimPar0; // purity parameterization parameter
107   static double fgPrimPimPar1; // purity parameterization parameter
108   static double fgPrimPimPar2; // purity parameterization parameter
109   static double fgPrimPipPar0; // purity parameterization parameter 
110   static double fgPrimPipPar1; // purity parameterization parameter
111   static double fgPrimPipPar2; // purity parameterization parameter
112   static double fgPrimPmPar0;  // purity parameterization parameter
113   static double fgPrimPmPar1;  // purity parameterization parameter
114   static double fgPrimPmPar2;  // purity parameterization parameter
115   static double fgPrimPpPar0;  // purity parameterization parameter
116   static double fgPrimPpPar1;  // purity parameterization parameter
117   static double fgPrimPpPar2;  // purity parameterization parameter
118
119    // For V0 Daugthers TpcEntrance/ExitPoints
120   AliFemtoThreeVector fPrimaryVertex;   // primary vertex of V0
121   AliFemtoThreeVector fSecondaryVertex; // secondary vertex of V0
122
123   AliFmPhysicalHelixD fHelixV0Pos;            // helix for positive V0 daughter            
124   AliFemtoThreeVector fTpcV0PosEntrancePoint; // positive V0 daughter entrance point to TPC
125   AliFemtoThreeVector fTpcV0PosExitPoint;     // positive V0 daughter exit point from TPC  
126
127   AliFmPhysicalHelixD fHelixV0Neg;            // helix for negative V0 daughter            
128   AliFemtoThreeVector fTpcV0NegEntrancePoint; // negative V0 daughter entrance point to TPC
129   AliFemtoThreeVector fTpcV0NegExitPoint;     // negative V0 daughter exit point from TPC  
130 };
131
132 inline AliFemtoTrack* AliFemtoParticle::Track() const { return fTrack; }
133 inline unsigned long  AliFemtoParticle::TrackId() const { return fTrack->TrackId(); }; 
134 inline const AliFemtoLorentzVector& AliFemtoParticle::FourMomentum() const {return fFourMomentum;}
135 inline AliFmPhysicalHelixD& AliFemtoParticle::Helix() {return fHelix;}
136 //inline unsigned long AliFemtoParticle::TopologyMap(const int word) const {return fMap[word];}
137 //inline int AliFemtoParticle::NumberOfHits() const {return fNhits;}
138 //by marek chojnacki to could compile 
139
140 inline unsigned long AliFemtoParticle::TopologyMap(const int word) const {return 1;}
141 inline int AliFemtoParticle::NumberOfHits() const {return 1;}
142
143 inline AliFemtoV0* AliFemtoParticle::V0() const { return fV0; }
144 inline unsigned short AliFemtoParticle::NegTrackId() const { return fV0->IdNeg(); }
145 inline unsigned short AliFemtoParticle::PosTrackId() const { return fV0->IdPos(); }
146 inline const AliFemtoThreeVector AliFemtoParticle::DecayVertexPosition() const {return fV0->DecayVertexV0(); }
147 // ***
148 inline AliFemtoHiddenInfo* AliFemtoParticle::GetHiddenInfo() const
149 {return fHiddenInfo;}
150 inline const AliFemtoHiddenInfo* AliFemtoParticle::HiddenInfo() const
151 {return fHiddenInfo;}
152 inline void AliFemtoParticle::SetHiddenInfo(AliFemtoHiddenInfo* aHiddenInfo)
153 { fHiddenInfo = aHiddenInfo->Clone();}
154 // ***
155
156 inline void AliFemtoParticle::ResetFourMomentum(const AliFemtoLorentzVector& vec){fFourMomentum = vec;}
157
158 inline AliFemtoKink* AliFemtoParticle::Kink() const { return fKink; }
159
160 #endif