]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - ITS/UPGRADE/AliITSUTrackerGlo.h
An example Config.C for ITSU pileup studies in pp
[u/mrichter/AliRoot.git] / ITS / UPGRADE / AliITSUTrackerGlo.h
index f7e0dd49612bc6015d5c08ed53e2ff83809404d8..1e73ae23b54166fc9ba3df13091eddb6521ee36e 100644 (file)
@@ -12,6 +12,7 @@
 #include "AliITSUTrackCond.h"
 #include "AliITSUTrackHyp.h"
 #include "AliITSUAux.h"
+#include "AliITSUMatLUT.h"
 #include <TArrayI.h>
 
 class AliITSUReconstructor;
@@ -21,7 +22,6 @@ class AliESDtrack;
 class AliITSURecoLayer;
 class TTree;
 
-
 //-------------------------------------------------------------------------
 class AliITSUTrackerGlo : public AliTracker {
 
@@ -50,8 +50,6 @@ class AliITSUTrackerGlo : public AliTracker {
   virtual Int_t          LoadClusters(TTree * treeRP=0);
   virtual void           UnloadClusters();
   virtual AliCluster*    GetCluster(Int_t index) const;
-  void                   FlagSplitClusters();
-  Bool_t                 ContainsSplitCluster(const AliITSUSeed* seed, Int_t maxSize=99999);
   void                   PrintSeedClusters(const AliITSUSeed* seed, Option_t* option="");
   //
   Int_t                  GetCountPronlongationTrials() const {return fCountProlongationTrials;}
@@ -63,7 +61,7 @@ class AliITSUTrackerGlo : public AliTracker {
   AliITSURecoDet*        GetITSInterface()       const {return fITS;}
   //
   //------------------------------------
-  Bool_t                 NeedToProlong(AliESDtrack* estTr);
+  Bool_t                 NeedToProlong(AliESDtrack* estTr, Int_t esdID);
   void                   Init(AliITSUReconstructor* rec);
   void                   FindTrack(AliESDtrack* esdTr, Int_t esdID);
   void                   CreateDefaultTrackCond();
@@ -77,8 +75,10 @@ class AliITSUTrackerGlo : public AliTracker {
   Bool_t                 GoToEntranceToLayer(AliExternalTrackParam* seed, AliITSURecoLayer* lr, Int_t dir, Bool_t check=kFALSE);
   Bool_t                 PropagateSeed(AliITSUSeed *seed, Double_t xToGo, Double_t mass, Double_t maxStep=1.0, Bool_t matCorr=kTRUE);
   Bool_t                 PropagateSeed(AliExternalTrackParam *seed, Double_t xToGo, Double_t mass, Double_t maxStep=1.0, Bool_t matCorr=kTRUE);
-  Double_t               RefitTrack(AliExternalTrackParam* trc, Double_t r, Int_t stopCond=0);
-  Int_t                  GetTrackingPhase()                 const {return fTrackPhase;}
+  Double_t               RefitTrack(AliITSUTrackHyp* trc, Double_t r, Int_t& nclFit, Int_t stopCond=0);
+  Double_t               GetMaterialBudget(const double* pnt0, const double* pnt1, double& x2x0, double& rhol) const;
+
+  Int_t                  GetTrackingPhase()                 const {return fTrackPhaseID;}
 
   //
   void                   KillSeed(AliITSUSeed* seed, Bool_t branch=kFALSE);
@@ -101,12 +101,18 @@ class AliITSUTrackerGlo : public AliTracker {
   void                   DeleteLastSeedFromPool()                   {fSeedsPool.RemoveLast();}
   void                   CheckClusterSharingConflicts(AliITSUTrackHyp* hyp);
   void                   SaveReducedHypothesesTree(AliITSUTrackHyp* dest);
+  void                   CleanHypothesis(AliITSUTrackHyp* hyp);
   void                   FinalizeHypotheses();
   Bool_t                 FinalizeHypothesis(AliITSUTrackHyp* hyp);
   void                   UpdateESDTrack(AliITSUTrackHyp* hyp,Int_t flag);
   void                   CookMCLabel(AliITSUTrackHyp* hyp);
-  void                   SetTrackingPhase(Int_t p)        {fTrackPhase = p;}
- //
+  void                   SetTrackingPhase(Int_t p)        {fTrackPhaseID = p;}
+  //
+  // monitoring stuff
+  void                   FlagSplitClusters();
+  Bool_t                 ContainsSplitCluster(const AliITSUSeed* seed, Int_t maxSize=99999);
+  void                   CheckClusterUsage();
+  //
  protected:
   TObject*&              NextFreeSeed();
   //
@@ -118,6 +124,7 @@ class AliITSUTrackerGlo : public AliTracker {
  protected:
   AliITSUReconstructor*           fReconstructor;  // ITS global reconstructor 
   AliITSURecoDet*                 fITS;            // interface to ITS, borrowed from reconstructor
+  AliITSUMatLUT*                  fMatLUT;         // material lookup table
   AliESDtrack*                    fCurrESDtrack;   // current esd track in processing
   Int_t                           fCurrESDtrMClb;  // its eventual mc label
   Double_t                        fCurrMass;       // current track mass
@@ -127,6 +134,7 @@ class AliITSUTrackerGlo : public AliTracker {
   Int_t                           fCountITSin;     // number of successful ITSin 
   Int_t                           fCountITSout;    // number of successful ITSout
   Int_t                           fCountITSrefit;  // number of successful ITSrefit 
+  Int_t                           fNTracksESD;     // number of esd tracks
   //
   // the seeds management to be optimized
   TObjArray                       fHypStore;       // storage for tracks hypotheses
@@ -147,18 +155,21 @@ class AliITSUTrackerGlo : public AliTracker {
   AliITSUTrackCond*               fCurrTrackCond;  //! current tracking condition
   Int_t                           fCurrActLrID;    //! current active layer ID being processed (set only when needed, not guaranteed)
   AliITSURecoLayer*               fCurrLayer;      //! current layer being processed  (set only when needed, not guaranteed)
-  Int_t                           fTrackPhase;     //! tracking phase
+  Int_t                           fTrackPhaseID;   //! tracking phase (clusters2tracks, backward, inward)
+  Int_t                           fCurrPassID;     //! tracking pass (different tracking conditions)
+  Bool_t                          fUseMatLUT;      //! use material lookup table rather than TGeo
   //
   static const Double_t           fgkToler;        // tracking tolerance
   //
 #ifdef  _ITSU_TUNING_MODE_
   // this code is only for special histos needed to extract some control parameters
-  void BookControlHistos(const char* pref);
-  TObjArray* fCHistoArrCorr;
-  TObjArray* fCHistoArrFake;
-  enum {kHResY=0,kHResYP=10,kHResZ=20,kHResZP=30,kHChi2Cl=40,kHChi2Nrm=50,kHBestInBranch=60,kHBestInCand=70};
+  Int_t GetHistoID(Int_t lr, Int_t hid, Int_t pass=0, Int_t phase=0);
+  TObjArray* BookControlHistos(const char* pref);
+  TObjArray* fCHistoArrCorr; // set of histos for each tracking pass/phase: correct
+  TObjArray* fCHistoArrFake; // set of histos for each tracking pass/phase: fakse
+  enum {kHResY,kHResYP,kHResZ,kHResZP,kHChi2Cl,kHChi2Nrm,kHBestInBranch,kHBestInCand,kMaxHID=10};
   enum {kHChiMatch,kHChiITSSA}; // custom histos 
-  enum {kHistosPhase=100};
+  enum {kHistosPhase=kMaxHID*(AliITSUAux::kMaxLayers+1),kHistosPass=kNTrackingPhases*kHistosPhase};
   //
 #endif
   //
@@ -204,5 +215,23 @@ inline void AliITSUTrackerGlo::AddProlongationHypothesis(AliITSUSeed* seed, Int_
   fCurrHyp->AddSeed(seed,lr);  
 }
 
+//_________________________________________________________________________
+inline Double_t AliITSUTrackerGlo::GetMaterialBudget(const double* pnt0,const double* pnt1, double& x2x0, double& rhol) const
+{
+  double par[7];
+  if (fUseMatLUT && fMatLUT) {
+    double d = fMatLUT->GetMatBudget(pnt0,pnt1,par);
+    x2x0 = par[AliITSUMatLUT::kParX2X0];
+    rhol = par[AliITSUMatLUT::kParRhoL];    
+    return d;
+  }
+  else {
+    MeanMaterialBudget(pnt0,pnt1,par);
+    x2x0 = par[1];
+    rhol = par[0]*par[4];    
+    return par[4];
+  }
+}
+
 #endif