]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Adding AddCovariance method
authormarian <marian@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sun, 1 Jun 2008 13:44:28 +0000 (13:44 +0000)
committermarian <marian@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sun, 1 Jun 2008 13:44:28 +0000 (13:44 +0000)
// Adding systematic errors to the covariance:
//
// The systematic errors due to the misalignment and miscalibration are added to the covariance matrix
// of the tracks (not to the clusters as they are dependent):
// The parameters form AliTPCRecoParam are used AliTPCRecoParam::GetSystematicError
// The systematic errors are expressed there in RMS - position (cm), angle (rad), curvature (1/cm)
// The default values are 0.
//
// The sytematic errors are added to the covariance matrix in following places:
//
// 1. During fisrt itteration - AliTPCtrackerMI::FillESD
// 2. Second iteration -
//      2.a ITS->TPC   - AliTPCtrackerMI::ReadSeeds
//      2.b TPC->TRD   - AliTPCtrackerMI::PropagateBack
// 3. Third iteration  -
//      3.a TRD->TPC   - AliTPCtrackerMI::ReadSeeds
//      3.b TPC->ITS   - AliTPCtrackerMI::RefitInward

TPC/AliTPCtrackerMI.cxx
TPC/AliTPCtrackerMI.h

index a0f1c44f9ef321f1c6a2af6f01854c46595465f1..91545affb09dbb7e1b46340678922f15164dabac 100644 (file)
 // The debug level -  different procedure produce tree for numerical debugging
 //                    To enable them set AliTPCReconstructor::SetStreamLevel(n); where nis bigger 1
 //
+
+//
+// Adding systematic errors to the covariance:
+// 
+// The systematic errors due to the misalignment and miscalibration are added to the covariance matrix
+// of the tracks (not to the clusters as they are dependent):
+// The parameters form AliTPCRecoParam are used AliTPCRecoParam::GetSystematicError
+// The systematic errors are expressed there in RMS - position (cm), angle (rad), curvature (1/cm)
+// The default values are 0. 
+//
+// The sytematic errors are added to the covariance matrix in following places:
+//
+// 1. During fisrt itteration - AliTPCtrackerMI::FillESD
+// 2. Second iteration - 
+//      2.a ITS->TPC   - AliTPCtrackerMI::ReadSeeds 
+//      2.b TPC->TRD   - AliTPCtrackerMI::PropagateBack
+// 3. Third iteration  -
+//      3.a TRD->TPC   - AliTPCtrackerMI::ReadSeeds
+//      3.b TPC->ITS   - AliTPCtrackerMI::RefitInward
+//
 // There are several places in the code which can be numerically debuged
 // This code is keeped in order to enable code development and to check the calibration implementtion
 //
@@ -448,6 +468,7 @@ void AliTPCtrackerMI::FillESD(TObjArray* arr)
       AliTPCseed *pt=(AliTPCseed*)arr->UncheckedAt(i);    
       if (!pt) continue; 
       pt->UpdatePoints();
+      AddCovariance(pt);
       //      pt->PropagateTo(fParam->GetInnerRadiusLow());
       if (pt->GetKinkIndex(0)<=0){  //don't propagate daughter tracks 
        pt->PropagateTo(fParam->GetInnerRadiusLow());
@@ -2556,6 +2577,7 @@ Int_t AliTPCtrackerMI::RefitInward(AliESDEvent *event)
 
     seed->PropagateTo(fParam->GetInnerRadiusLow());
     seed->UpdatePoints();
+    AddCovariance(seed);
     MakeBitmaps(seed);
     AliESDtrack *esd=event->GetTrack(i);
     seed->CookdEdx(0.02,0.6);
@@ -2621,6 +2643,7 @@ Int_t AliTPCtrackerMI::PropagateBack(AliESDEvent *event)
     if (!seed) continue;
     if (seed->GetKinkIndex(0)<0)  UpdateKinkQualityM(seed);  // update quality informations for kinks
     seed->UpdatePoints();
+    AddCovariance(seed);
     AliESDtrack *esd=event->GetTrack(i);
     seed->CookdEdx(0.02,0.6);
     CookLabel(seed,0.1); //For comparison only
@@ -2691,6 +2714,7 @@ void AliTPCtrackerMI::ReadSeeds(AliESDEvent *event, Int_t direction)
     //    AliTPCseed *seed = new AliTPCseed(t,t.GetAlpha());
     AliTPCseed *seed = new AliTPCseed(t/*,t.GetAlpha()*/);
     seed->SetUniqueID(esd->GetID());
+    AddCovariance(seed);   //add systematic ucertainty
     for (Int_t ikink=0;ikink<3;ikink++) {
       Int_t index = esd->GetKinkIndex(ikink);
       seed->GetKinkIndexes()[ikink] = index;
@@ -6910,3 +6934,27 @@ void AliTPCtrackerMI::MakeBitmaps(AliTPCseed *t)
     }
   }
 }
+
+
+
+void AliTPCtrackerMI::AddCovariance(AliTPCseed * seed){
+  //
+  // Adding systematic error
+  // !!!! the systematic error for element 4 is in 1/cm not in pt 
+
+  const Double_t *param = AliTPCReconstructor::GetRecoParam()->GetSystematicError();
+  Double_t covar[15];
+  for (Int_t i=0;i<15;i++) covar[i]=0;
+  // 0
+  // 1    2
+  // 3    4    5
+  // 6    7    8    9 
+  // 10   11   12   13   14
+  covar[0] = param[0]*param[0];
+  covar[2] = param[1]*param[1];
+  covar[5] = param[2]*param[2];
+  covar[9] = param[3]*param[3];
+  Double_t facC =  AliTracker::GetBz()*kB2C;
+  covar[14]= param[4]*param[4]*facC*facC;
+  seed->AddCovariance(covar);
+}
index 50bb45277432a2d19f319a4ba9a939377bd244a8..23316d11322b643cd0428aafd7b9ba7a4b96d7d1 100644 (file)
@@ -73,7 +73,6 @@ public:
    virtual Int_t   CookLabel(AliTPCseed *t,Float_t wrong, Int_t first,Int_t last ) const; 
    
    void RotateToLocal(AliTPCseed *seed);
-  
    
    Int_t FollowProlongation(AliTPCseed& t, Int_t rf=0, Int_t step=1);
    Int_t FollowProlongationFast(AliTPCseed& t, Int_t rf=0, Int_t step=1);
@@ -122,6 +121,8 @@ public:
 private:
   AliTPCtrackerMI(const AliTPCtrackerMI& r);           //dummy copy constructor
   AliTPCtrackerMI &operator=(const AliTPCtrackerMI& r);//dummy assignment operator
+  void AddCovariance(AliTPCseed * seed);               // add covariance
+
    inline AliTPCtrackerRow &GetRow(Int_t sec, Int_t row);
    inline Bool_t     IsActive(Int_t sec, Int_t row);
    inline Double_t  GetXrow(Int_t row) const;