]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Made reco interface to belong to AliITSUReconstruct, can be borrowed by
authorshahoian <shahoian@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 15 Feb 2013 13:48:16 +0000 (13:48 +0000)
committershahoian <shahoian@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 15 Feb 2013 13:48:16 +0000 (13:48 +0000)
trackers/vertexers

ITS/UPGRADE/AliITSUReconstructor.cxx
ITS/UPGRADE/AliITSUReconstructor.h
ITS/UPGRADE/AliITSUTrackerGlo.cxx
ITS/UPGRADE/AliITSUTrackerGlo.h

index 04ca9db58e26d1da5b1e9348c58417e9d40accd8..a673449306555e363614c2eba87c103614e4071a 100644 (file)
@@ -23,6 +23,7 @@
 
 #include "Riostream.h"
 #include "AliITSUReconstructor.h"
+#include "AliITSURecoDet.h"
 #include "AliRun.h"
 #include "AliRawReader.h"
 #include "AliESDEvent.h"
@@ -43,6 +44,7 @@ ClassImp(AliITSUReconstructor)
 AliITSUReconstructor::AliITSUReconstructor() 
 :  AliReconstructor()
   ,fGeom(0)
+  ,fITS(0)
   ,fClusterFinders(0)
   ,fClusters(0)
 {
@@ -69,13 +71,17 @@ AliITSUReconstructor::~AliITSUReconstructor()
   }
   delete[] fClusters;
   //
+  delete fITS;
   delete fGeom;
 } 
 
 //______________________________________________________________________
 void AliITSUReconstructor::Init() 
 {
-  // Initalize this constructor 
+  // Initalize this reconstructor 
+  // Note: fITS cannot be initialized here since it requires RecoParams (not available ar
+  // the moment of reconstructors initialization)
+  //
   AliInfo("Initializing");
   if (fGeom) AliFatal("was already done, something is wrong...");
   //
@@ -103,7 +109,6 @@ void AliITSUReconstructor::Init()
   }
   //
   return;
-
 }
 
 //_____________________________________________________________________________
@@ -226,3 +231,15 @@ Int_t AliITSUReconstructor::LoadClusters(TTree* treeRP)
   treeRP->GetEntry(0); // we are still in 1 ev/tree mode...
   return 1;
 }
+
+//_____________________________________________________________________________
+AliITSURecoDet* AliITSUReconstructor::GetITSInterface()
+{
+  // Create reco oriented interface to geometry
+  if (fITS) return fITS;
+  //
+  fITS = new AliITSURecoDet(fGeom,"ITSURecoInterface");
+  int nLr = fITS->GetNLayersActive();
+  for (int ilr=nLr;ilr--;) fITS->GetLayerActive(ilr)->SetClusters(GetClusters(ilr));
+  return fITS;
+}
index 1dafcef2327426ac9247f07ccaa38821b53b9f6b..d03b97e8bcc9e0457c4be90b058c0269d79c9b59 100644 (file)
@@ -16,6 +16,7 @@
 class AliTracker;
 class AliTrackleter;
 class AliITSUGeomTGeo;
+class AliITSURecoDet;
 
 class AliITSUReconstructor: public AliReconstructor {
 public:
@@ -34,6 +35,7 @@ public:
   //
   TClonesArray*          GetClusters(Int_t lrID)            const {return fClusters ? fClusters[lrID] : 0;}
   AliITSUGeomTGeo*       GetGeom()                          const {return (AliITSUGeomTGeo*)fGeom;}
+  AliITSURecoDet*        GetITSInterface();
   //
   Int_t                  LoadClusters(TTree* treeRP);
   //
@@ -45,6 +47,7 @@ private:
   AliITSUReconstructor(const AliITSUReconstructor &); //Not implemented
   AliITSUReconstructor& operator=(const AliITSUReconstructor &); //Not implemented
   AliITSUGeomTGeo* fGeom;          // geometry wrapper
+  AliITSURecoDet*  fITS;           // interface to ITS (reconstruction oriented)
   TObjArray        fClusterFinders; // array of clusterfinders per layer
   TClonesArray**   fClusters;      // container for recpoints TClonesArrays
   //
index 63a92d5c57a24b434bcd4f9daa754d0a8fe29cbb..29cd91b661b9d31905d3a2d3768cf1672501897c 100644 (file)
@@ -74,7 +74,6 @@ AliITSUTrackerGlo::~AliITSUTrackerGlo()
 {
  // Default destructor
  //  
-  delete fITS;
   delete[] fClInfo;
   //
 }
@@ -84,36 +83,13 @@ void AliITSUTrackerGlo::Init(AliITSUReconstructor* rec)
 {
   // init with external reconstructor
   //
-  fITS = new AliITSURecoDet(rec->GetGeom(),"ITSURecoInterface");
+  fITS = rec->GetITSInterface();
   int nLr = fITS->GetNLayersActive();
   fClInfo = new Int_t[nLr<<1];
-  for (int ilr=nLr;ilr--;) {
-    fITS->GetLayerActive(ilr)->SetClusters(rec->GetClusters(ilr));
-  }
   //
   fSeedsPool.ExpandCreateFast(1000); // RS TOCHECK
   fFreeSeedsID.Set(1000);
   //
-  /*
-  fTrCond.SetNLayers(fITS->GetNLayersActive());
-  fTrCond.AddNewCondition(5);
-  fTrCond.AddGroupPattern( (0x1<<0)|(0x1<<1) );
-  fTrCond.AddGroupPattern( (0x1<<3)|(0x1<<4) );
-  fTrCond.AddGroupPattern( (0x1<<5)|(0x1<<6) );
-  //
-  fTrCond.AddNewCondition(5);
-  fTrCond.AddGroupPattern( (0x1<<0)|(0x1<<2) );
-  fTrCond.AddGroupPattern( (0x1<<3)|(0x1<<4) );
-  fTrCond.AddGroupPattern( (0x1<<5)|(0x1<<6) );
-  //
-  fTrCond.AddNewCondition(5);
-  fTrCond.AddGroupPattern( (0x1<<1)|(0x1<<2) );
-  fTrCond.AddGroupPattern( (0x1<<3)|(0x1<<4) );
-  fTrCond.AddGroupPattern( (0x1<<5)|(0x1<<6) );
-  //
-  printf("Tracking Conditions: ");
-  fTrCond.Print();
-  */
 }
 
 //_________________________________________________________________________
index a0a2cf8c2713e532fb2fe7827b922b7be7f89eef..da7fb27e1b6d0897cdc0a14996f495f394847f86 100644 (file)
@@ -98,7 +98,7 @@ class AliITSUTrackerGlo : public AliTracker {
   //
  protected:
   AliITSUReconstructor*           fReconstructor;  // ITS global reconstructor 
-  AliITSURecoDet*                 fITS;            // interface to ITS
+  AliITSURecoDet*                 fITS;            // interface to ITS, borrowed from reconstructor
   AliESDtrack*                    fCurrESDtrack;   // current esd track in processing
   Double_t                        fCurrMass;       // current track mass
   Double_t                        fTrImpData[kNTrImpData];  // data on track impact on the layer