]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - ITS/AliITStrackerMI.h
Another histos for lumi
[u/mrichter/AliRoot.git] / ITS / AliITStrackerMI.h
index e38b229af966cbcde46cf3066c979996e0e79bb2..1a8b6bdb986de8263b1f95d1ece70bf10a1d2202 100644 (file)
@@ -27,7 +27,8 @@ class AliPlaneEff;
 #include "AliITStrackMI.h"
 #include "AliITSRecPoint.h"
 #include "AliTracker.h"
-
+#include "AliRefArray.h"
+#include "AliITSPIDResponse.h"
 
 //-------------------------------------------------------------------------
 class AliITStrackerMI : public AliTracker {
@@ -64,14 +65,19 @@ public:
   Int_t UpdateMI(AliITStrackMI* track, const AliITSRecPoint* cl,Double_t chi2,Int_t layer) const;
   AliPlaneEff *GetPlaneEff() {return (AliPlaneEff*)fPlaneEff;}   // return the pointer to AliPlaneEff
   void SetDetTypeRec(const AliITSDetTypeRec *detTypeRec) {fkDetTypeRec = detTypeRec; ReadBadFromDetTypeRec(); }
-  TObjArray* GetTrackHypothesys() {return &fTrackHypothesys;}
-  TObjArray* GetBestHypothesys()  {return &fBestHypothesys;}
-  TObjArray* GetOriginal()        {return &fOriginal;}
-  TTreeSRedirector *GetDebugStreamer() {return fDebugStreamer;}
+  TObjArray* GetTrackHypothesys()  {return &fTrackHypothesys;}
+  TObjArray* GetBestHypothesys()   {return &fBestHypothesys;}
+  TObjArray* GetOriginal()         {return &fOriginal;}
+  TTreeSRedirector *GetDebugStreamer() const {return fDebugStreamer;}
   static Int_t CorrectForTPCtoITSDeadZoneMaterial(AliITStrackMI *t);
   void  SetForceSkippingOfLayer();
   Int_t ForceSkippingOfLayer(Int_t l) const { return fForceSkippingOfLayer[l]; }
-
+  //
+  // methods for debugging (RS) >>
+  Int_t FindClusterOfTrack(int label, int lr, int* store) const;
+  //  Int_t GetPattern(const AliITStrackMI* track, char* patt);
+  // methods for debugging (RS) <<
+  //
   class AliITSdetector { 
   public:
     AliITSdetector():fR(0),fRmisal(0),fPhi(0),fSinPhi(0),fCosPhi(0),fYmin(0),fYmax(0),fZmin(0),fZmax(0),fIsBad(kFALSE),fNChips(0),fChipIsBad(0) {}
@@ -129,8 +135,8 @@ public:
     Double_t GetRoad() const {return fRoad;}
     Double_t GetR() const {return fR;}
     Int_t FindClusterIndex(Float_t z) const;
-    AliITSRecPoint *GetCluster(Int_t i) const {return i<fN? fClusters[i]:0;} 
-    Float_t  *GetWeight(Int_t i)  {return i<fN ?&fClusterWeight[i]:0;}
+    AliITSRecPoint *GetCluster(Int_t i) const {return i<fN ? fClusters[i]:0;} 
+    Float_t  *GetWeight(Int_t i)  {return i<fN ? &fClusterWeight[i]:0;}
     AliITSdetector &GetDetector(Int_t n) const { return fDetectors[n]; }
     Int_t FindDetectorIndex(Double_t phi, Double_t z) const;
     Double_t GetThickness(Double_t y, Double_t z, Double_t &x0) const;
@@ -144,6 +150,7 @@ public:
     Int_t GetAccepted() const {return fAccepted;}    
     Int_t GetClusterTracks(Int_t i, Int_t j) const {return fClusterTracks[i][j];}
     void SetClusterTracks(Int_t i, Int_t j, Int_t c) {fClusterTracks[i][j]=c;}
+    Int_t FindClusterForLabel(Int_t label, Int_t *store) const; //RS
   protected:
     AliITSlayer(const AliITSlayer& layer);
     AliITSlayer & operator=(const AliITSlayer& layer){
@@ -156,32 +163,32 @@ public:
     Int_t fNdetectors;          // detectors/ladder
     AliITSdetector *fDetectors; // array of detectors
     Int_t fN;                   // number of clusters
-    AliITSRecPoint *fClusters[AliITSRecoParam::fgkMaxClusterPerLayer]; // pointers to clusters
-    Int_t        fClusterIndex[AliITSRecoParam::fgkMaxClusterPerLayer]; // pointers to clusters
-    Float_t fY[AliITSRecoParam::fgkMaxClusterPerLayer];                // y position of the clusters      
-    Float_t fZ[AliITSRecoParam::fgkMaxClusterPerLayer];                // z position of the clusters      
+    AliITSRecPoint *fClusters[AliITSRecoParam::kMaxClusterPerLayer]; // pointers to clusters
+    Int_t        fClusterIndex[AliITSRecoParam::kMaxClusterPerLayer]; // pointers to clusters
+    Float_t fY[AliITSRecoParam::kMaxClusterPerLayer];                // y position of the clusters      
+    Float_t fZ[AliITSRecoParam::kMaxClusterPerLayer];                // z position of the clusters      
     Float_t fYB[2];                                       // ymin and ymax
     //
-    AliITSRecPoint *fClusters5[6][AliITSRecoParam::fgkMaxClusterPerLayer5]; // pointers to clusters -     slice in y
-    Int_t        fClusterIndex5[6][AliITSRecoParam::fgkMaxClusterPerLayer5]; // pointers to clusters -     slice in y    
-    Float_t fY5[6][AliITSRecoParam::fgkMaxClusterPerLayer5];                // y position of the clusters  slice in y    
-    Float_t fZ5[6][AliITSRecoParam::fgkMaxClusterPerLayer5];                // z position of the clusters  slice in y 
+    AliITSRecPoint *fClusters5[6][AliITSRecoParam::kMaxClusterPerLayer5]; // pointers to clusters -     slice in y
+    Int_t        fClusterIndex5[6][AliITSRecoParam::kMaxClusterPerLayer5]; // pointers to clusters -     slice in y    
+    Float_t fY5[6][AliITSRecoParam::kMaxClusterPerLayer5];                // y position of the clusters  slice in y    
+    Float_t fZ5[6][AliITSRecoParam::kMaxClusterPerLayer5];                // z position of the clusters  slice in y 
     Int_t fN5[6];                                       // number of cluster in slice
     Float_t fDy5;                                       //delta y
     Float_t fBy5[6][2];                                    //slice borders
     //
-    AliITSRecPoint *fClusters10[11][AliITSRecoParam::fgkMaxClusterPerLayer10]; // pointers to clusters -     slice in y
-    Int_t        fClusterIndex10[11][AliITSRecoParam::fgkMaxClusterPerLayer10]; // pointers to clusters -     slice in y    
-    Float_t fY10[11][AliITSRecoParam::fgkMaxClusterPerLayer10];                // y position of the clusters  slice in y    
-    Float_t fZ10[11][AliITSRecoParam::fgkMaxClusterPerLayer10];                // z position of the clusters  slice in y 
+    AliITSRecPoint *fClusters10[11][AliITSRecoParam::kMaxClusterPerLayer10]; // pointers to clusters -     slice in y
+    Int_t        fClusterIndex10[11][AliITSRecoParam::kMaxClusterPerLayer10]; // pointers to clusters -     slice in y    
+    Float_t fY10[11][AliITSRecoParam::kMaxClusterPerLayer10];                // y position of the clusters  slice in y    
+    Float_t fZ10[11][AliITSRecoParam::kMaxClusterPerLayer10];                // z position of the clusters  slice in y 
     Int_t fN10[11];                                       // number of cluster in slice
     Float_t fDy10;                                        // delta y
     Float_t fBy10[11][2];                                 // slice borders
     //
-    AliITSRecPoint *fClusters20[21][AliITSRecoParam::fgkMaxClusterPerLayer20]; // pointers to clusters -     slice in y
-    Int_t        fClusterIndex20[21][AliITSRecoParam::fgkMaxClusterPerLayer20]; // pointers to clusters -     slice in y    
-    Float_t fY20[21][AliITSRecoParam::fgkMaxClusterPerLayer20];                // y position of the clusters  slice in y    
-    Float_t fZ20[21][AliITSRecoParam::fgkMaxClusterPerLayer20];                // z position of the clusters  slice in y 
+    AliITSRecPoint *fClusters20[21][AliITSRecoParam::kMaxClusterPerLayer20]; // pointers to clusters -     slice in y
+    Int_t        fClusterIndex20[21][AliITSRecoParam::kMaxClusterPerLayer20]; // pointers to clusters -     slice in y    
+    Float_t fY20[21][AliITSRecoParam::kMaxClusterPerLayer20];                // y position of the clusters  slice in y    
+    Float_t fZ20[21][AliITSRecoParam::kMaxClusterPerLayer20];                // z position of the clusters  slice in y 
     Int_t fN20[21];                                       // number of cluster in slice
     Float_t fDy20;                                        //delta y 
     Float_t fBy20[21][2];                                 //slice borders
@@ -193,8 +200,8 @@ public:
     Int_t    fNcs;                                        //number of clusters in current slice    
     Int_t fCurrentSlice;                                  //current slice
     //
-    Float_t  fClusterWeight[AliITSRecoParam::fgkMaxClusterPerLayer]; // probabilistic weight of the cluster
-    Int_t    fClusterTracks[4][AliITSRecoParam::fgkMaxClusterPerLayer]; //tracks registered to given cluster
+    Float_t  fClusterWeight[AliITSRecoParam::kMaxClusterPerLayer]; // probabilistic weight of the cluster
+    Int_t    fClusterTracks[4][AliITSRecoParam::kMaxClusterPerLayer]; //tracks registered to given cluster
     Float_t fZmin;      //    the
     Float_t fZmax;      //    edges
     Float_t fYmin;      //   of  the
@@ -213,13 +220,16 @@ public:
   Int_t GetNearestLayer(const Double_t *xr) const;  //get nearest upper layer close to the point xr
   void SetCurrentEsdTrack(Int_t i) {fCurrentEsdTrack=i;}
   void FollowProlongationTree(AliITStrackMI * otrack, Int_t esdindex, Bool_t constrain);
-
+  //
+  void   FlagFakes(const TObjArray &itsTracks);
+  //
 protected:
   Bool_t ComputeRoad(AliITStrackMI* track,Int_t ilayer,Int_t idet,Double_t &zmin,Double_t &zmax,Double_t &ymin,Double_t &ymax) const;
     
   void CookLabel(AliKalmanTrack *t,Float_t wrong) const;
   void CookLabel(AliITStrackMI *t,Float_t wrong) const;
   Double_t GetEffectiveThickness();
+  Int_t    GetEffectiveThicknessLbyL(Double_t* xMS, Double_t* x2x0MS);
   void ResetBestTrack() {
      fBestTrack.~AliITStrackMI();
      new(&fBestTrack) AliITStrackMI(fTrackToFollow);
@@ -229,6 +239,17 @@ protected:
      new(&fTrackToFollow) AliITStrackMI(t);
   }
   void CookdEdx(AliITStrackMI* track);
+
+  Int_t GetParticleId(const AliESDtrack* track) const{
+    ULong_t trStatus=track->GetStatus();  
+    Bool_t isSA=kTRUE; if(trStatus&AliESDtrack::kTPCin) isSA=kFALSE;
+    return fITSPid->GetParticleIdFromdEdxVsP(track->P(),track->GetITSsignal(),isSA);
+  }
+  Int_t GetParticleId(const AliITStrackV2* track) const{
+    if(track->GetESDtrack()) return GetParticleId(track->GetESDtrack());
+    return fITSPid->GetParticleIdFromdEdxVsP(track->P(),track->GetdEdx(),kFALSE);
+  }
+
   Double_t GetNormalizedChi2(AliITStrackMI * track, Int_t mode);
   Double_t GetTruncatedChi2(const AliITStrackMI * track, Float_t fac);
   Double_t NormalizedChi2(AliITStrackMI * track, Int_t layer);
@@ -245,7 +266,7 @@ protected:
   void UnRegisterClusterTracks(const AliITStrackMI* track, Int_t id);
   Float_t GetNumberOfSharedClusters(AliITStrackMI* track,Int_t id, Int_t list[6], AliITSRecPoint *clist[6]);
   Int_t GetOverlapTrack(const AliITStrackMI *track, Int_t trackID, Int_t &shared, Int_t clusterlist[6], Int_t overlist[6]);
-  AliITStrackMI * GetBest2Tracks(Int_t trackID1, Int_t treackID2, Float_t th0, Float_t th1);
+  AliITStrackMI * GetBest2Tracks(Int_t trackID1, Int_t treackID2, Float_t th0, Float_t th1,AliITStrackMI* original);
   Float_t  * GetErrY(Int_t trackindex) const {return &fCoefficients[trackindex*48];}
   Float_t  * GetErrZ(Int_t trackindex) const {return &fCoefficients[trackindex*48+12];}
   Float_t  * GetNy(Int_t trackindex) const {return &fCoefficients[trackindex*48+24];}
@@ -265,7 +286,7 @@ protected:
   Bool_t LocalModuleCoord(Int_t ilayer,Int_t idet,const AliITStrackMI *track,
                          Float_t &xloc,Float_t &zloc) const;
 // method to be used for Plane Efficiency evaluation
-  Bool_t IsOKForPlaneEff(const AliITStrackMI* track, const Int_t *clusters, Int_t ilayer) const; // Check if a track is usable
+  Bool_t IsOKForPlaneEff(const AliITStrackMI* track, const Int_t *clusters, Int_t ilayer); // Check if a track is usable
                                                                                            // for Plane Eff evaluation
   void UseTrackForPlaneEff(const AliITStrackMI* track, Int_t ilayer);                            // Use this track for Plane Eff
 // 
@@ -290,6 +311,9 @@ protected:
   TString fTrackingPhase;                // current tracking phase
   Int_t fUseTGeo;                        // use TGeo to get material budget
   Int_t   fNtracks;                      // number of tracks to prolong
+  Bool_t  fFlagFakes;                    // request fakes flagging
+  Bool_t  fSelectBestMIP03;              // use Chi2MIP[0]*Chi2MIP[3] in hypothesis analysis instead of Chi2MIP[0]
+  Bool_t  fUseImproveKalman;             // use Kalman version of Improve
   Float_t fxOverX0Pipe;                  // material budget
   Float_t fxTimesRhoPipe;                // material budget
   Float_t fxOverX0Shield[2];             // material budget
@@ -306,10 +330,13 @@ protected:
   AliITSChannelStatus *fITSChannelStatus;//! bitmaps with channel status for SPD and SDD
   const AliITSDetTypeRec *fkDetTypeRec;         //! ITS det type rec, from AliITSReconstructor
   AliITSPlaneEff *fPlaneEff;             //! Pointer to the ITS plane efficicency
+  Bool_t* fSPDChipIntPlaneEff;      //! Map of the SPD chips already intersected by a track (for FO studies)
+  AliITSPIDResponse *fITSPid;            //! parameters for ITS pid 
+  //
 private:
   AliITStrackerMI(const AliITStrackerMI &tracker);
   AliITStrackerMI & operator=(const AliITStrackerMI &tracker);
-  ClassDef(AliITStrackerMI,9)   //ITS tracker MI
+  ClassDef(AliITStrackerMI,11)   //ITS tracker MI
 };
 
 
@@ -332,7 +359,7 @@ inline void AliITStrackerMI::SetupFirstPass(const Int_t *flags,const Double_t *c
   //              positive means "normal constraint"                    
 
    fConstraint[0]=flags[0];
-   if (cuts==0) return;
+   if (!cuts) return;
 }
 
 inline void AliITStrackerMI::SetupSecondPass(const Int_t *flags,const Double_t *cuts) {
@@ -344,7 +371,7 @@ inline void AliITStrackerMI::SetupSecondPass(const Int_t *flags,const Double_t *
   //              positive means "normal constraint"                    
 
    fConstraint[1]=flags[0];
-   if (cuts==0) return;
+   if (!cuts) return;
 }
 
 inline void AliITStrackerMI::CookLabel(AliKalmanTrack *t,Float_t wrong) const {