]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - ITS/UPGRADE/AliITSUSeed.cxx
Added split clusters tagging (MC info used)
[u/mrichter/AliRoot.git] / ITS / UPGRADE / AliITSUSeed.cxx
index 2017cba1d9296a8e4655d44e04b48673239407df..f6553d448eb040f465f13c1e1159de270a6eb34a 100644 (file)
@@ -10,6 +10,7 @@ ClassImp(AliITSUSeed)
 //_________________________________________________________________________
 AliITSUSeed::AliITSUSeed() 
 : fHitsPattern(0)
+  ,fNChildren(0)
   ,fClID(0)
   ,fChi2Glo(0)
   ,fChi2Cl(0)
@@ -30,6 +31,7 @@ AliITSUSeed::~AliITSUSeed()
 AliITSUSeed::AliITSUSeed(const AliITSUSeed& src) 
   :AliExternalTrackParam(src)
   ,fHitsPattern(src.fHitsPattern)
+  ,fNChildren(src.fNChildren)
   ,fClID(src.fClID)
   ,fChi2Glo(src.fChi2Glo)
   ,fChi2Cl(src.fChi2Cl)
@@ -63,8 +65,8 @@ void AliITSUSeed::Print(Option_t* opt) const
 {
   // print seed info
   int lr,cl = GetLrCluster(lr);
-  printf("%cLr%d Cl:%4d Chi2Glo:%7.2f(%7.2f) Chi2Cl:%7.2f Penalty: %7.2f",IsKilled() ? '-':' ',
-        lr,cl,GetChi2Glo(),GetChi2GloNrm(),GetChi2Cl(), GetChi2Penalty());
+  printf("%cLr%d Nchild: %3d Cl:%4d Chi2Glo:%7.2f(%7.2f) Chi2Cl:%7.2f Penalty: %7.2f",IsKilled() ? '-':' ',
+        lr,GetNChildren(),cl,GetChi2Glo(),GetChi2GloNrm(),GetChi2Cl(), GetChi2Penalty());
   printf(" |"); 
   int lrc=0;
   const AliITSUSeed *sdc = this;
@@ -92,6 +94,7 @@ void AliITSUSeed::InitFromESDTrack(const AliESDtrack* esdTr)
   ResetFMatrix();
   fHitsPattern = 0;
   fClID = 0;
+  fNChildren = 0;
   fChi2Glo = fChi2Cl = fChi2Penalty = 0;
   fParent = 0; //!!!
 }
@@ -238,6 +241,20 @@ Bool_t AliITSUSeed::PropagateToX(Double_t xk, Double_t b)
   return kTRUE;
 }
 
+//__________________________________________________________________
+Int_t AliITSUSeed::GetClusterIndex(Int_t ind) const
+{
+  // get ind-th cluster index
+  int ncl = 0;
+  const AliITSUSeed* seed = this;
+  while(seed) {
+    if ( seed->HasCluster() && (ncl++==ind) ) return seed->GetLrClusterID();//GetClusterID();
+    seed = (AliITSUSeed*)seed->GetParent();
+  }
+  return -1;
+  //
+}
+
 //______________________________________________________________________________
 Bool_t AliITSUSeed::RotateToAlpha(Double_t alpha) 
 {
@@ -613,6 +630,18 @@ Double_t* AliITSUSeed::ProdABA(const double a[15],const double b[15]) const
   return &aba[0];
 }
 
+//____________________________________________________________________
+Bool_t AliITSUSeed::ContainsFake() const
+{
+  // check if the full branch containes a fake cluster
+  const AliITSUSeed* seed = this;
+  while(seed) {
+    if ( seed->IsFake() ) return kTRUE;
+    seed = (AliITSUSeed*)seed->GetParent();
+  }  
+  return kFALSE;
+}
+
 /*
 //____________________________________________________________________
 Bool_t AliITSUSeed::Smooth(Double_t vecL[5],Double_t matL[15]) 
@@ -715,3 +744,4 @@ Bool_t AliITSUSeed::Smooth(Double_t vecL[5],Double_t matL[15])
 }
 
  */
+