]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Made chi2-cut, road definitions AliITSUTrackCond and layer dependent
authorshahoian <shahoian@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 22 Apr 2013 17:27:05 +0000 (17:27 +0000)
committershahoian <shahoian@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 22 Apr 2013 17:27:05 +0000 (17:27 +0000)
By default the roadwidth will be calculated from the track-cluster chi2

ITS/UPGRADE/AliITSURecoParam.cxx
ITS/UPGRADE/AliITSURecoParam.h
ITS/UPGRADE/AliITSUTrackCond.cxx
ITS/UPGRADE/AliITSUTrackCond.h
ITS/UPGRADE/AliITSUTrackerGlo.cxx
ITS/UPGRADE/testITSU/MakeITSRecoParam.C
ITS/UPGRADE/testITSU/itsupcdb.tar.gz

index 99c76f55265eda206c305b45b0973b147147d3af..8f8dd57eb3590b560aa81431fedeff57a30e5822 100644 (file)
@@ -30,13 +30,9 @@ const Double_t AliITSURecoParam::fgkMaxDforV0dghtrForProlongation = 30;
 const Double_t AliITSURecoParam::fgkMaxDForProlongation           = 40; 
 const Double_t AliITSURecoParam::fgkMaxDZForProlongation          = 60;      
 const Double_t AliITSURecoParam::fgkMinPtForProlongation          = 0.0; 
-const Double_t AliITSURecoParam::fgkNSigmaRoadY                   = 5.;
-const Double_t AliITSURecoParam::fgkNSigmaRoadZ                   = 5.; 
-const Double_t AliITSURecoParam::fgkSigmaRoadY                    = 100e-4;//1000e-4;
-const Double_t AliITSURecoParam::fgkSigmaRoadZ                    = 100e-4;//1000e-4;
-const Double_t AliITSURecoParam::fgkMaxTr2ClChi2                  = 15.;
+const Double_t AliITSURecoParam::fgkSigmaRoadY                    = 20.E-4;//1000e-4;
+const Double_t AliITSURecoParam::fgkSigmaRoadZ                    = 20.E-4;//1000e-4;
 const Double_t AliITSURecoParam::fgkTanLorentzAngle               = 0;
-const Double_t AliITSURecoParam::fgkMissPenalty                   = 2.0;
 const Bool_t   AliITSURecoParam::fgkAllowDiagonalClusterization   = kFALSE;
 //
 // hardwired params for TPC-ITS border layer
@@ -54,8 +50,6 @@ AliITSURecoParam::AliITSURecoParam()
   ,fMaxDForProlongation(fgkMaxDForProlongation)
   ,fMaxDZForProlongation(fgkMaxDZForProlongation)
   ,fMinPtForProlongation(fgkMinPtForProlongation)
-  ,fNSigmaRoadY(fgkNSigmaRoadY)
-  ,fNSigmaRoadZ(fgkNSigmaRoadZ)
      //
   ,fTPCITSWallRMin(fgkTPCITSWallRMin)
   ,fTPCITSWallRMax(fgkTPCITSWallRMax)
@@ -66,8 +60,6 @@ AliITSURecoParam::AliITSURecoParam()
   ,fTanLorentzAngle(0)
   ,fSigmaY2(0)
   ,fSigmaZ2(0)
-  ,fMaxTr2ClChi2(0)
-  ,fMissPenalty(0)
   ,fTrackingConditions(0)
 {
   // def c-tor
@@ -82,8 +74,6 @@ AliITSURecoParam::AliITSURecoParam(Int_t nLr)
   ,fMaxDForProlongation(fgkMaxDForProlongation)
   ,fMaxDZForProlongation(fgkMaxDZForProlongation)
   ,fMinPtForProlongation(fgkMinPtForProlongation)
-  ,fNSigmaRoadY(fgkNSigmaRoadY)
-  ,fNSigmaRoadZ(fgkNSigmaRoadZ)
      //
   ,fTPCITSWallRMin(fgkTPCITSWallRMin)
   ,fTPCITSWallRMax(fgkTPCITSWallRMax)
@@ -94,8 +84,6 @@ AliITSURecoParam::AliITSURecoParam(Int_t nLr)
   ,fTanLorentzAngle(0)
   ,fSigmaY2(0)
   ,fSigmaZ2(0)
-  ,fMaxTr2ClChi2(0)
-  ,fMissPenalty(0)
   ,fTrackingConditions(0)
 {
   // def c-tor
@@ -111,8 +99,6 @@ AliITSURecoParam::~AliITSURecoParam()
   delete[] fTanLorentzAngle;
   delete[] fSigmaY2;
   delete[] fSigmaZ2;
-  delete[] fMaxTr2ClChi2;
-  delete[] fMissPenalty;
   delete[] fAllowDiagonalClusterization;
   fTrackingConditions.Delete();
 }
@@ -155,8 +141,6 @@ void  AliITSURecoParam::SetNLayers(Int_t n)
   fTanLorentzAngle = new Double_t[n];
   fSigmaY2 = new Double_t[n];
   fSigmaZ2 = new Double_t[n];
-  fMaxTr2ClChi2 = new Double_t[n];
-  fMissPenalty  = new Double_t[n];
   fAllowDiagonalClusterization = new Bool_t[n];
   //
   for (int i=n;i--;) {
@@ -164,8 +148,6 @@ void  AliITSURecoParam::SetNLayers(Int_t n)
     fTanLorentzAngle[i] = fgkTanLorentzAngle;
     fSigmaY2[i] = fgkSigmaRoadY*fgkSigmaRoadY;
     fSigmaZ2[i] = fgkSigmaRoadZ*fgkSigmaRoadZ;
-    fMaxTr2ClChi2[i] = fgkMaxTr2ClChi2;
-    fMissPenalty[i]  = fgkMissPenalty;
   }
   //
 }
@@ -194,22 +176,6 @@ void  AliITSURecoParam::SetSigmaZ2(Int_t lr, Double_t v)
   fSigmaZ2[lr] = v;
 }
 
-//_____________________________________________________________________________
-void  AliITSURecoParam::SetMaxTr2ClChi2(Int_t lr, Double_t v)
-{
-  // set Lorentz angle value
-  if (lr>=fNLayers) AliFatal(Form("Number of defined layers is %d",fNLayers));
-  fMaxTr2ClChi2[lr] = v;
-}
-
-//_____________________________________________________________________________
-void  AliITSURecoParam::SetMissPenalty(Int_t lr, Double_t v)
-{
-  // set Lorentz angle value
-  if (lr>=fNLayers) AliFatal(Form("Number of defined layers is %d",fNLayers));
-  fMissPenalty[lr] = v;
-}
-
 //_____________________________________________________________________________
 void  AliITSURecoParam::SetAllowDiagonalClusterization(Int_t lr, Bool_t v)
 {
@@ -228,8 +194,6 @@ void AliITSURecoParam::Print(Option_t *) const
   printf("%-30s\t%f\n","fMaxDForProlongation",fMaxDForProlongation); 
   printf("%-30s\t%f\n","fMaxDZForProlongation",fMaxDZForProlongation);
   printf("%-30s\t%f\n","fMinPtForProlongation",fMinPtForProlongation);
-  printf("%-30s\t%f\n","fNSigmaRoadY",fNSigmaRoadY);
-  printf("%-30s\t%f\n","fNSigmaRoadZ",fNSigmaRoadZ);
   //
   printf("TPC-ITS wall: %.3f<R<%.3f DZ/2=%.3f MaxStep=%.3f\n",
         fTPCITSWallRMin,fTPCITSWallRMax,fTPCITSWallZSpanH,fTPCITSWallMaxStep);
@@ -240,8 +204,6 @@ void AliITSURecoParam::Print(Option_t *) const
     printf("%-30s\t:","fTanLorentzAngle");  for (int i=0;i<fNLayers;i++) printf(" %+.2e",fTanLorentzAngle[i]); printf("\n");
     printf("%-30s\t:","fSigmaY2");          for (int i=0;i<fNLayers;i++) printf(" %+.2e",fSigmaY2[i]); printf("\n");
     printf("%-30s\t:","fSigmaZ2");          for (int i=0;i<fNLayers;i++) printf(" %+.2e",fSigmaZ2[i]); printf("\n");
-    printf("%-30s\t:","fMaxTr2ClChi2");     for (int i=0;i<fNLayers;i++) printf(" %+.2e",fMaxTr2ClChi2[i]); printf("\n");
-    printf("%-30s\t:","fMissPenalty");      for (int i=0;i<fNLayers;i++) printf(" %+.2e",fMissPenalty[i]); printf("\n");
   }
   //
   int nTrCond = GetNTrackingConditions();
index 2b424bbdbdc777335d6421cc83395a2eeb153ef9..507052754f2b429a8715ae54b382ce35c1b46903 100644 (file)
@@ -34,13 +34,8 @@ class AliITSURecoParam : public AliDetectorRecoParam
   Double_t    GetTanLorentzAngle(Int_t lr)       const;
   Double_t    GetSigmaY2(Int_t lr)               const;
   Double_t    GetSigmaZ2(Int_t lr)               const;
-  Double_t    GetMaxTr2ClChi2(Int_t lr)          const;
-  Double_t    GetMissPenalty(Int_t lr)           const;
   Bool_t      GetAllowDiagonalClusterization(Int_t lr) const;
   //
-  Double_t    GetNSigmaRoadY()                   const {return fNSigmaRoadY;}
-  Double_t    GetNSigmaRoadZ()                   const {return fNSigmaRoadZ;}
-  //
   Double_t    GetTPCITSWallRMin()                const {return fTPCITSWallRMin;}
   Double_t    GetTPCITSWallRMax()                const {return fTPCITSWallRMax;}
   Double_t    GetTPCITSWallZSpanH()              const {return fTPCITSWallZSpanH;}
@@ -53,16 +48,12 @@ class AliITSURecoParam : public AliDetectorRecoParam
   void        SetTanLorentzAngle(Int_t lr, Double_t v);
   void        SetSigmaY2(Int_t lr, Double_t v);
   void        SetSigmaZ2(Int_t lr, Double_t v);
-  void        SetMaxTr2ClChi2(Int_t lr, Double_t v);
-  void        SetMissPenalty(Int_t lr, Double_t v);
   void        SetAllowDiagonalClusterization(Int_t lr, Bool_t v);
   //
   void        SetMaxDforV0dghtrForProlongation(Double_t v)            {fMaxDforV0dghtrForProlongation = v;}
   void        SetMaxDForProlongation(Double_t v)                      {fMaxDForProlongation = v;}
   void        SetMaxDZForProlongation(Double_t v)                     {fMaxDZForProlongation = v;}
   void        SetMinPtForProlongation(Double_t v)                     {fMinPtForProlongation = v;}
-  void        SetNSigmaRoadY(Double_t v)                              {fNSigmaRoadY=v;}
-  void        SetNSigmaRoadZ(Double_t v)                              {fNSigmaRoadZ=v;}
   //
   void        SetTPCITSWallRMin(double v)                             {fTPCITSWallRMin = v;}
   void        SetTPCITSWallRMax(double v)                             {fTPCITSWallRMax = v;}
@@ -79,8 +70,6 @@ class AliITSURecoParam : public AliDetectorRecoParam
   Double_t       fMaxDForProlongation; // max. rphi imp. par. cut
   Double_t       fMaxDZForProlongation; // max. 3D imp. par. cut
   Double_t       fMinPtForProlongation; // min. pt cut
-  Double_t       fNSigmaRoadY;          // N sigmas for road in Y
-  Double_t       fNSigmaRoadZ;          // N sigmas for road in Z
   //
   Double_t       fTPCITSWallRMin;       // minR
   Double_t       fTPCITSWallRMax;       // maxR
@@ -91,8 +80,6 @@ class AliITSURecoParam : public AliDetectorRecoParam
   Double_t*      fTanLorentzAngle;  //[fNLayers] Optional Lorentz angle for each layer
   Double_t*      fSigmaY2;          //[fNLayers] addition to road width^2
   Double_t*      fSigmaZ2;          //[fNLayers] addition to road width^2
-  Double_t*      fMaxTr2ClChi2;     //[fNLayers] max track-to-cluster chi2
-  Double_t*      fMissPenalty;      //[fNLayers] chi2 penalty for missing hit on the layer
   //
   TObjArray      fTrackingConditions; // array of tracking conditions for different iterations
   //
@@ -100,29 +87,23 @@ class AliITSURecoParam : public AliDetectorRecoParam
   static const Double_t fgkMaxDForProlongation;                // default
   static const Double_t fgkMaxDZForProlongation;               // default
   static const Double_t fgkMinPtForProlongation;               // default
-  static const Double_t fgkNSigmaRoadY;                        // default
-  static const Double_t fgkNSigmaRoadZ;                        // default
-  // for arrays
+  static const Double_t fgkTanLorentzAngle;                    // default
   static const Double_t fgkSigmaRoadY;                         // default
   static const Double_t fgkSigmaRoadZ;                         // default
-  static const Double_t fgkMaxTr2ClChi2;                       // default
-  static const Double_t fgkTanLorentzAngle;                    // default
-  static const Double_t fgkMissPenalty;                        // default
   //
   // hardwired params for TPC-ITS border layer
-  static const Double_t fgkTPCITSWallRMin;                     // minR
-  static const Double_t fgkTPCITSWallRMax;                     // maxR
+  static const Double_t fgkTPCITSWallRMin;                     // fiducial R min   
+  static const Double_t fgkTPCITSWallRMax;                     // fiducial R max
   static const Double_t fgkTPCITSWallZSpanH;                   // half Z span
   static const Double_t fgkTPCITSWallMaxStep;                  // max tracking step
   //
-  // clusterization options
   static const Bool_t   fgkAllowDiagonalClusterization;        // clusters of pixels with common corners
   //
  private:
   AliITSURecoParam(const AliITSURecoParam & param);
   AliITSURecoParam & operator=(const AliITSURecoParam &param);
 
-  ClassDef(AliITSURecoParam,2) // ITS reco parameters
+  ClassDef(AliITSURecoParam,4) // ITS reco parameters
 };
 
 //_____________________________________________________________________________
@@ -146,20 +127,6 @@ inline Double_t AliITSURecoParam::GetSigmaZ2(Int_t lr) const
   return (lr<fNLayers)&&fSigmaZ2 ? fSigmaZ2[lr]:fgkSigmaRoadZ*fgkSigmaRoadZ;//0;
 }
 
-//_____________________________________________________________________________
-inline Double_t AliITSURecoParam::GetMaxTr2ClChi2(Int_t lr) const
-{
-  // get tg of Lorentz Angle for the layer
-  return (lr<fNLayers)&&fMaxTr2ClChi2 ? fMaxTr2ClChi2[lr]:fgkMaxTr2ClChi2; //0;
-}
-
-//_____________________________________________________________________________
-inline Double_t AliITSURecoParam::GetMissPenalty(Int_t lr) const
-{
-  // get penalty for missing hit
-  return (lr<fNLayers)&&fMissPenalty ? fMissPenalty[lr]:fgkMissPenalty; //0;
-}
-
 //_____________________________________________________________________________
 inline Bool_t AliITSURecoParam::GetAllowDiagonalClusterization(Int_t lr) const
 {
index 1d5a253d8d5101e8ad34c138386e3d89ee749748..31926b6c5c93e9428c9a40e2130c684e991c0eaf 100644 (file)
@@ -1,14 +1,26 @@
 #include "AliITSUTrackCond.h"
 #include "AliITSUAux.h"
 #include "AliLog.h"
+#include <TMath.h>
 
 using namespace AliITSUAux;
+using namespace TMath;
+
+Int_t     AliITSUTrackCond::fgkMaxBranches = 50;
+Int_t     AliITSUTrackCond::fgkMaxCandidates = 500;
+Float_t   AliITSUTrackCond::fgkMaxTr2ClChi2  = 50.;
+Float_t   AliITSUTrackCond::fgkMissPenalty  = 2.;
 
 //______________________________________________________________
 AliITSUTrackCond::AliITSUTrackCond(int nLayers)
-  :fNLayers(0)
+  :fInitDone(kFALSE)
+  ,fNLayers(0)
   ,fMaxBranches(0)
   ,fMaxCandidates(0)
+  ,fMaxTr2ClChi2(0)
+  ,fMissPenalty(0)
+  ,fNSigmaRoadY(0)
+  ,fNSigmaRoadZ(0)
   ,fNConditions(0)
   ,fConditions(0)
   ,fAuxData(0)
@@ -19,22 +31,28 @@ AliITSUTrackCond::AliITSUTrackCond(int nLayers)
 
 //______________________________________________________________
 AliITSUTrackCond::AliITSUTrackCond(const AliITSUTrackCond& src)
-  :TObject(src),
-   fNLayers(src.fNLayers)
+  :TObject(src)
+  ,fInitDone(src.fInitDone)
+  ,fNLayers(0)
   ,fMaxBranches(0)
   ,fMaxCandidates(0)
+  ,fMaxTr2ClChi2(0)
+  ,fMissPenalty(0)
+  ,fNSigmaRoadY(0)
+  ,fNSigmaRoadZ(0)
   ,fNConditions(src.fNConditions)
   ,fConditions(src.fConditions)
   ,fAuxData(src.fAuxData)
 {
   // copy c-tor
-  if (fNLayers>0) {
-    fMaxBranches = new Short_t[fNLayers];
-    fMaxCandidates = new Short_t[fNLayers];
-    for (int i=fNLayers;i--;) {
-      SetMaxBranches(i,src.GetMaxBranches(i));
-      SetMaxCandidates(i,src.GetMaxCandidates(i));
-    }
+  SetNLayers(src.fNLayers);
+  for (int i=fNLayers;i--;) {
+    SetMaxBranches(i,src.GetMaxBranches(i));
+    SetMaxCandidates(i,src.GetMaxCandidates(i));
+    SetMaxTr2ClChi2(i,src.GetMaxTr2ClChi2(i));
+    SetMissPenalty(i,src.GetMissPenalty(i));
+    SetNSigmaRoadY(i,src.GetNSigmaRoadY(i));
+    SetNSigmaRoadZ(i,src.GetNSigmaRoadZ(i));
   }
 }
 
@@ -43,18 +61,19 @@ AliITSUTrackCond& AliITSUTrackCond::operator=(const AliITSUTrackCond& src)
 {
   // copy op.
   if (this!=&src) {
-    fNLayers = src.fNLayers;
+    fInitDone = src.fInitDone;
     fNConditions = src.fNConditions;
     fConditions  = src.fConditions;
-    if (fNLayers) {
-      delete fMaxBranches;
-      delete fMaxCandidates;
-      fMaxBranches = new Short_t[fNLayers];
-      fMaxCandidates = new Short_t[fNLayers];
-      for (int i=fNLayers;i--;) {
-       SetMaxBranches(i,src.GetMaxBranches(i));
-       SetMaxCandidates(i,src.GetMaxCandidates(i));
-      }
+    //
+    SetNLayers(src.fNLayers);
+    //
+    for (int i=fNLayers;i--;) {
+      SetMaxBranches(i,src.GetMaxBranches(i));
+      SetMaxCandidates(i,src.GetMaxCandidates(i));
+      SetMaxTr2ClChi2(i,src.GetMaxTr2ClChi2(i));
+      SetMissPenalty(i,src.GetMissPenalty(i));
+      SetNSigmaRoadY(i,src.GetNSigmaRoadY(i));
+      SetNSigmaRoadZ(i,src.GetNSigmaRoadZ(i));
     }
     fAuxData = src.fAuxData;
   }
@@ -65,15 +84,42 @@ AliITSUTrackCond& AliITSUTrackCond::operator=(const AliITSUTrackCond& src)
 void AliITSUTrackCond::SetNLayers(int nLayers)
 {
   // set number of layers
+  fInitDone = kFALSE;
+  if (fNLayers) {
+    delete fMaxBranches;
+    delete fMaxCandidates;
+    delete fMaxTr2ClChi2;
+    delete fMissPenalty;
+    delete fNSigmaRoadY;
+    delete fNSigmaRoadZ;
+  }
   fNLayers = nLayers;
+  //
   if (fNLayers>0) {
     fMaxBranches = new Short_t[fNLayers];
     fMaxCandidates = new Short_t[fNLayers];
+    fMaxTr2ClChi2  = new Float_t[fNLayers];
+    fMissPenalty   = new Float_t[fNLayers];
+    fNSigmaRoadY   = new Float_t[fNLayers];
+    fNSigmaRoadZ   = new Float_t[fNLayers];
     for (int i=fNLayers;i--;) {
-      SetMaxBranches(i,kMaxBranches);
-      SetMaxCandidates(i,kMaxCandidates);
+      SetMaxBranches(i,fgkMaxBranches);
+      SetMaxCandidates(i,fgkMaxCandidates);
+      SetMaxTr2ClChi2(i,fgkMaxTr2ClChi2);
+      SetMissPenalty(i,fgkMissPenalty);
+      SetNSigmaRoadY(i,-1); // force recalculation
+      SetNSigmaRoadZ(i,-1); // force recalculation
     }
   }
+  else {
+    fMaxBranches   = 0;
+    fMaxCandidates = 0;
+    fMaxTr2ClChi2  = 0;
+    fMissPenalty   = 0;
+    fNSigmaRoadY   = 0;
+    fNSigmaRoadZ   = 0;
+  }
+  //
 }
 
 //______________________________________________________________
@@ -139,6 +185,27 @@ void AliITSUTrackCond::Print(Option_t*) const
     printf("\n");
     cntCond += kNAuxSz;
   }
-  printf("Max allowed branches/candidates per seed: ");
-  for (int i=0;i<fNLayers;i++) printf("L%d: %d/%d ",i,fMaxBranches[i],fMaxCandidates[i]); printf("\n");
+  printf("Cuts:\t%8s\t%8s\t%8s\t%8s\t%8s\t%8s\n", "MaxBrn","MaxCand","Chi2Cl","Mis.Pen.","NSig.Y","NSig.Z");
+  for (int i=0;i<fNLayers;i++) {
+    printf("Lr%2d:\t%8d\t%8d\t%8.1f\t%8.2f\t%8.2f\t%8.2f\n",i,
+          fMaxBranches[i],fMaxCandidates[i],fMaxTr2ClChi2[i],fMissPenalty[i],fNSigmaRoadY[i],fNSigmaRoadZ[i]);
+  }
+  //
+}
+
+//______________________________________________________________
+void AliITSUTrackCond::Init()
+{
+  // finalize and check consistency
+  if (fInitDone) return;
+  //
+  for (int ilr=0;ilr<fNLayers;ilr++) {
+    if (IsLayerExcluded(ilr)) continue;
+    float nsig = Sqrt(GetMaxTr2ClChi2(ilr));
+    if (GetNSigmaRoadY(ilr)<0) SetNSigmaRoadY(ilr,nsig);
+    if (GetNSigmaRoadZ(ilr)<0) SetNSigmaRoadZ(ilr,nsig);
+    //
+  }
+  //
+  fInitDone = kTRUE;
 }
index 8d14942a9ffd94cc3d70d73646b75e9cfac41d31..d5fbd428517a5cca38408b29c477844f878971f6 100644 (file)
@@ -49,16 +49,41 @@ class AliITSUTrackCond : public TObject
   //
   virtual void  Print(Option_t* option = "")           const;
 
- protected:
+  void        SetMaxTr2ClChi2(Int_t lr, Float_t v)           {fMaxTr2ClChi2[lr] = v;}
+  void        SetMissPenalty(Int_t lr,  Float_t v)           {fMissPenalty[lr] = v;}
+  void        SetNSigmaRoadY(Int_t lr,  Float_t v)           {fNSigmaRoadY[lr] = v;}
+  void        SetNSigmaRoadZ(Int_t lr,  Float_t v)           {fNSigmaRoadZ[lr] = v;}
   //
+  Float_t     GetMissPenalty(Int_t lr)                 const {return fMissPenalty[lr];}
+  Float_t     GetMaxTr2ClChi2(Int_t lr)                const {return fMaxTr2ClChi2[lr];}
+  Float_t     GetNSigmaRoadY(Int_t lr)                 const {return fNSigmaRoadY[lr];}
+  Float_t     GetNSigmaRoadZ(Int_t lr)                 const {return fNSigmaRoadZ[lr];}
+  Bool_t      IsLayerExcluded(Int_t lr)                const {return GetMaxTr2ClChi2(lr)<=0;}
+  //
+  void        Init();
+  Bool_t      IsInitDone()                             const {return fInitDone;}
+  //
+ protected: 
+  //
+  Bool_t      fInitDone;                 // initialization flag
   Int_t       fNLayers;                  // total number of layers
   Short_t*    fMaxBranches;              // [fNLayers] max allowed branches per seed on each layer
   Short_t*    fMaxCandidates;            // [fNLayers] max allowed candidates per TPC seed on each layer
+  Float_t*    fMaxTr2ClChi2;             // [fNLayers] max track-to-cluster chi2
+  Float_t*    fMissPenalty;              // [fNLayers] chi2 penalty for missing hit on the layer
+  Float_t*    fNSigmaRoadY;              // [fNLayers] number of sigmas in Y
+  Float_t*    fNSigmaRoadZ;              // [fNLayers] number of sigmas in Z
+  //
   Short_t     fNConditions;              // number of conditions defined
   TArrayS     fConditions;               // fNConditions  set of conditions
   TArrayS     fAuxData;                  // condition beginning (1st group), n groups, min clus
   //
-  ClassDef(AliITSUTrackCond,2)           // set of requirements on track hits pattern
+  static Int_t   fgkMaxBranches;          // def max number of branches per seed on current layer 
+  static Int_t   fgkMaxCandidates;        // def max number of total candidates on current layer 
+  static Float_t fgkMaxTr2ClChi2;         // def track-to-cluster chi2 cut
+  static Float_t fgkMissPenalty;          // penalty for missing cluster
+  //
+  ClassDef(AliITSUTrackCond,3)           // set of requirements on track hits pattern
 };
 
 
index 0b6217de230e9f84a9578484ccc08d138a35b719..9142c21e9cc7777b7e256e78f5e280f016b04ba6 100644 (file)
@@ -128,6 +128,7 @@ void AliITSUTrackerGlo::CreateDefaultTrackCond()
   cond->SetNLayers(fITS->GetNLayersActive());
   cond->AddNewCondition(nLr);
   cond->AddGroupPattern( 0xffff ); // require all layers hit
+  cond->Init();
   //
   fDefTrackConds.AddLast(cond);
   //
@@ -182,6 +183,7 @@ Int_t AliITSUTrackerGlo::Clusters2Tracks(AliESDEvent *esdEv)
   //
   for (int icnd=0;icnd<nTrackCond;icnd++) {
     fCurrTrackCond = (AliITSUTrackCond*)trackConds->UncheckedAt(icnd);
+    if (!fCurrTrackCond->IsInitDone()) fCurrTrackCond->Init();
     // select ESD tracks to propagate
     for (int itr=0;itr<nTrESD;itr++) {
       fCurrESDtrack = esdEv->GetTrack(itr);
@@ -486,7 +488,7 @@ void AliITSUTrackerGlo::FindTrack(AliESDtrack* esdTr, Int_t esdID)
       // cluster search is done. Do we need to have a version of this seed skipping current layer
       if (!NeedToKill(&seedUC,kMissingCluster)) {
        AliITSUSeed* seedSkp = NewSeedFromPool(&seedUC);
-       double penalty = -AliITSUReconstructor::GetRecoParam()->GetMissPenalty(ila);
+       double penalty = -fCurrTrackCond->GetMissPenalty(ila);
        // to do: make penalty to account for probability to miss the cluster for good reason
        seedSkp->SetChi2Cl(penalty);
        AddProlongationHypothesis(seedSkp,ila);      
@@ -775,8 +777,8 @@ Bool_t AliITSUTrackerGlo::GetRoadWidth(AliITSUSeed* seed, int ilrA)
   fTrImpData[kTrPhiOut] = ATan2(fTrImpData[kTrYOut],fTrImpData[kTrXOut]);
   double sgy = sc.GetSigmaY2() + dr*dr*sc.GetSigmaSnp2() + AliITSUReconstructor::GetRecoParam()->GetSigmaY2(ilrA);
   double sgz = sc.GetSigmaZ2() + dr*dr*sc.GetSigmaTgl2() + AliITSUReconstructor::GetRecoParam()->GetSigmaZ2(ilrA);
-  sgy = Sqrt(sgy)*AliITSUReconstructor::GetRecoParam()->GetNSigmaRoadY();
-  sgz = Sqrt(sgz)*AliITSUReconstructor::GetRecoParam()->GetNSigmaRoadZ();
+  sgy = Sqrt(sgy)*fCurrTrackCond->GetNSigmaRoadY(ilrA);
+  sgz = Sqrt(sgz)*fCurrTrackCond->GetNSigmaRoadZ(ilrA);
   double dphi0 = 0.5*Abs(fTrImpData[kTrPhiOut]-fTrImpData[kTrPhiIn]);
   double phi0  = 0.5*(fTrImpData[kTrPhiOut]+fTrImpData[kTrPhiIn]);
   if ( dphi0>(0.5*Pi()) ) {
@@ -867,7 +869,7 @@ Int_t AliITSUTrackerGlo::CheckCluster(AliITSUSeed* track, Int_t lr, Int_t clID)
   //
   double dy2 = dy*dy;
   double tol2 = (track->GetSigmaY2() + AliITSUReconstructor::GetRecoParam()->GetSigmaY2(lr))*
-    AliITSUReconstructor::GetRecoParam()->GetNSigmaRoadY()*AliITSUReconstructor::GetRecoParam()->GetNSigmaRoadY(); // RS TOOPTIMIZE
+    fCurrTrackCond->GetNSigmaRoadY(lr)*fCurrTrackCond->GetNSigmaRoadY(lr); // RS TOOPTIMIZE
   if (dy2>tol2) {                          // the clusters are sorted in Z(col) then in Y(row). 
     if (goodCl&&goodSeed && AliDebugLevelClass()>2) {    
       AliDebug(2,Form("Lost good cl: dy2=%e > tol2=%e |ESDtrack#%d (MClb:%d)",dy2,tol2,fCurrESDtrack->GetID(),fCurrESDtrMClb)); 
@@ -882,7 +884,7 @@ Int_t AliITSUTrackerGlo::CheckCluster(AliITSUSeed* track, Int_t lr, Int_t clID)
   }
   double dz2 = dz*dz;
   tol2 = (track->GetSigmaZ2() + AliITSUReconstructor::GetRecoParam()->GetSigmaZ2(lr))*
-    AliITSUReconstructor::GetRecoParam()->GetNSigmaRoadZ()*AliITSUReconstructor::GetRecoParam()->GetNSigmaRoadZ(); // RS TOOPTIMIZE
+    fCurrTrackCond->GetNSigmaRoadZ(lr)*fCurrTrackCond->GetNSigmaRoadZ(lr); // RS TOOPTIMIZE
   if (dz2>tol2) {
     if (goodCl&&goodSeed && AliDebugLevelClass()>2) {
       AliDebug(2,Form("Lost good cl on L:%d : dz2=%e > tol2=%e |ESDtrack#%d (MClb:%d)",lr,dz2,tol2,fCurrESDtrack->GetID(),fCurrESDtrMClb)); 
@@ -904,10 +906,10 @@ Int_t AliITSUTrackerGlo::CheckCluster(AliITSUSeed* track, Int_t lr, Int_t clID)
   }
 #endif
   //
-  if (chi2>AliITSUReconstructor::GetRecoParam()->GetMaxTr2ClChi2(lr)) {
+  if (chi2>fCurrTrackCond->GetMaxTr2ClChi2(lr)) {
     if (goodCl&&goodSeed && AliDebugLevelClass()>2) {
       AliDebug(2,Form("Lost good cl on L:%d : Chi2=%e > Chi2Max=%e |dy: %+.3e dz: %+.3e |ESDtrack#%d (MClb:%d)\n",
-                     lr,chi2,AliITSUReconstructor::GetRecoParam()->GetMaxTr2ClChi2(lr),dy,dz,fCurrESDtrack->GetID(),fCurrESDtrMClb)); 
+                     lr,chi2,fCurrTrackCond->GetMaxTr2ClChi2(lr),dy,dz,fCurrESDtrack->GetID(),fCurrESDtrMClb)); 
       track->Print("etp");
       cl->Print("");
       PrintSeedClusters(track);
index e4fbc43a94a37fb309a7a194b87ed65370c364fd..62174577978848294766df97da80f9a4b6355cc0 100644 (file)
@@ -36,6 +36,7 @@ void MakeITSRecoParam(AliRecoParam::EventSpecie_t default=AliRecoParam::kLowMult
   //
   int nBranch[7] = {3,3,3,3,3,3,3}; // max branching for the seed on layer
   int nCands[7]  = {250,200,150,100,60,40,20}; // max branching for the TPC seed
+  float tr2clChi2[7] = {50,50,50,50,50,50,50}; // cut on cluster to track chi2 
   //
   {
     AliITSURecoParam * itsRecoParam = AliITSURecoParam::GetLowFluxParam();
@@ -52,10 +53,13 @@ void MakeITSRecoParam(AliRecoParam::EventSpecie_t default=AliRecoParam::kLowMult
     // Add tracking conditions >>>
     trCond = new AliITSUTrackCond();
     trCond->SetNLayers(nLr); 
-    // each seed propagated to given layer can produce max nBranch branches
-    for (int i=0;i<nLr;i++) trCond->SetMaxBranches(i,nBranch[i]);
-    // each tpc track may have at most nCands prolongations
-    for (int i=0;i<nLr;i++) trCond->SetMaxCandidates(i,nCands[i]);
+    //
+    for (int i=0;i<nLr;i++) {
+      trCond->SetMaxBranches(i,nBranch[i]);    // each seed propagated to given layer can produce max nBranch branches
+      trCond->SetMaxCandidates(i,nCands[i]);   // each tpc track may have at most nCands prolongations
+      trCond->SetMaxTr2ClChi2(i,tr2clChi2[i]);   // cut on cluster to track chi2
+      //
+    }
     //
     trCond->AddNewCondition(5); // min hits
     trCond->AddGroupPattern( kBit0|kBit1 );
@@ -71,7 +75,9 @@ void MakeITSRecoParam(AliRecoParam::EventSpecie_t default=AliRecoParam::kLowMult
     trCond->AddGroupPattern( kBit1|kBit2 );
     trCond->AddGroupPattern( kBit3|kBit4 );
     trCond->AddGroupPattern( kBit5|kBit6 );
-    //    
+    //
+    trCond->Init();
+    //
     itsRecoParam->AddTrackingCondition(trCond);
     // Add tracking conditions <<<
   }
@@ -85,13 +91,19 @@ void MakeITSRecoParam(AliRecoParam::EventSpecie_t default=AliRecoParam::kLowMult
     itsRecoParam->SetTitle("HighMult");
     recoParamArray->AddLast(itsRecoParam);
     //******************************************************************
-    for (int i=0;i<nLr;i++) itsRecoParam->SetAllowDiagonalClusterization(i,kTRUE);
-    //
+     for (int i=0;i<nLr;i++) itsRecoParam->SetAllowDiagonalClusterization(i,kTRUE);
+    //  
     // Add tracking conditions >>>
     trCond = new AliITSUTrackCond();
     trCond->SetNLayers(nLr); 
-    for (int i=0;i<nLr;i++) trCond->SetMaxBranches(i,nBranch[i]);
-    for (int i=0;i<nLr;i++) trCond->SetMaxCandidates(i,nCands[i]);
+    //
+    for (int i=0;i<nLr;i++) {
+      trCond->SetMaxBranches(i,nBranch[i]);    // each seed propagated to given layer can produce max nBranch branches
+      trCond->SetMaxCandidates(i,nCands[i]);   // each tpc track may have at most nCands prolongations
+      trCond->SetMaxTr2ClChi2(i,tr2clChi2[i]);   // cut on cluster to track chi2
+      //
+    }
+    //
     trCond->AddNewCondition(5); // min hits
     trCond->AddGroupPattern( kBit0|kBit1 );
     trCond->AddGroupPattern( kBit3|kBit4 );
@@ -106,7 +118,9 @@ void MakeITSRecoParam(AliRecoParam::EventSpecie_t default=AliRecoParam::kLowMult
     trCond->AddGroupPattern( kBit1|kBit2 );
     trCond->AddGroupPattern( kBit3|kBit4 );
     trCond->AddGroupPattern( kBit5|kBit6 );
-    //    
+    //
+    trCond->Init();
+    //
     itsRecoParam->AddTrackingCondition(trCond);
     // Add tracking conditions <<<
     //
index fd27dd6890626976d57b36413b45dd24d7139016..027d80cc1d721e5a12450ad5896edac3526e9c3d 100644 (file)
Binary files a/ITS/UPGRADE/testITSU/itsupcdb.tar.gz and b/ITS/UPGRADE/testITSU/itsupcdb.tar.gz differ