]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
New method to reconstruct ITS RecPoints without TTree, to be used by HLT (Gaute)
authorprino <prino@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 16 Sep 2009 14:22:58 +0000 (14:22 +0000)
committerprino <prino@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 16 Sep 2009 14:22:58 +0000 (14:22 +0000)
ITS/AliITSDetTypeRec.cxx
ITS/AliITSDetTypeRec.h

index e6dcf0ddb6a0d565fed3a15de00eac5149c14145..32527514bdce9e20e62fcee00a5236169632fa6a 100644 (file)
@@ -913,10 +913,6 @@ void AliITSDetTypeRec::DigitsToRecPoints(AliRawReader* rawReader,TTree *treeR,Op
   const char *det[3] = {strstr(opt,"SPD"),strstr(opt,"SDD"),
                         strstr(opt,"SSD")};
   
-  // Reset Fast-OR fired map
-  ResetFastOrFiredMap();
-  
-  AliITSClusterFinder *rec     = 0;
   Int_t id=0;
 
   TClonesArray *array=new TClonesArray("AliITSRecPoint",1000);
@@ -927,14 +923,9 @@ void AliITSDetTypeRec::DigitsToRecPoints(AliRawReader* rawReader,TTree *treeR,Op
   for (Int_t iModule = 0; iModule < GetITSgeom()->GetIndexMax(); iModule++) {
     clusters[iModule] = NULL;
   }
-  for(id=0;id<3;id++){
-    if (!all && !det[id]) continue;
-    rec = (AliITSClusterFinder*)GetReconstructionModel(id);
-    if (!rec)
-      AliFatal("The reconstruction class was not instantiated");
-    rec->SetDetTypeRec(this);
-    rec->RawdataToClusters(rawReader,clusters);    
-  } 
+
+  DigitsToRecPoints(rawReader,clusters,opt);
+
   Int_t nClusters =0;
   TClonesArray *emptyArray=new TClonesArray("AliITSRecPoint");
   for(Int_t iModule=0;iModule<GetITSgeom()->GetIndexMax();iModule++){
@@ -960,12 +951,44 @@ void AliITSDetTypeRec::DigitsToRecPoints(AliRawReader* rawReader,TTree *treeR,Op
   Info("DigitsToRecPoints", "total number of found recpoints in ITS: %d\n", 
        nClusters);
   
+}
+//______________________________________________________________________
+void AliITSDetTypeRec::DigitsToRecPoints(AliRawReader* rawReader,TClonesArray** clusters,Option_t *opt){
+  // cluster finding and reconstruction of space points
+  // the condition below will disappear when the geom class will be
+  // initialized for all versions - for the moment it is only for v5 !
+  // 7 is the SDD beam test version
+  // Inputs:
+  //      AliRawReader *rawReader  Pointer to the raw-data reader
+  //      TClonesArray **clusters  Clusters Array
+  // Outputs:
+  //      none.
+  // Return:
+  //      none.
+  const char *all = strstr(opt,"All");
+  const char *det[3] = {strstr(opt,"SPD"),strstr(opt,"SDD"),
+                        strstr(opt,"SSD")};
+  
+  // Reset Fast-OR fired map
+  ResetFastOrFiredMap();
+  
+  AliITSClusterFinder *rec     = 0;
+  Int_t id=0;
+
+  for(id=0;id<3;id++){
+    if (!all && !det[id]) continue;
+    rec = (AliITSClusterFinder*)GetReconstructionModel(id);
+    if (!rec)
+      AliFatal("The reconstruction class was not instantiated");
+    rec->SetDetTypeRec(this);
+    rec->RawdataToClusters(rawReader,clusters);    
+  } 
+   
   // Remove PIT in-active chips from Fast-OR fired map
   if (all || det[0]) { // SPD present
     RemoveFastOrFiredInActive();
   }  
 }
-
 //______________________________________________________________________
 void AliITSDetTypeRec::ReadOldSSDNoise(const TObjArray *array, 
                                       AliITSNoiseSSDv2 *noiseSSD) {
index 2f297bffdcfc0bc6288ae62d240c97bb03180f03..2ef7272c104985bb5dd1bba3e7e97c0b58b3d87b 100644 (file)
@@ -93,6 +93,7 @@ class AliITSDetTypeRec : public TObject {
     void MakeBranchRF(TTree *treeR){MakeBranchR(treeR,"Fast");}
     void DigitsToRecPoints(TTree *treeD,TTree *treeR,Int_t lastEntry,Option_t *det, Int_t optCluFind=0);
     void DigitsToRecPoints(AliRawReader* rawReader,TTree *treeR,Option_t *det="All");
+    void DigitsToRecPoints(AliRawReader* rawReader,TClonesArray** clusters,Option_t *opt);
 
     void   SetFastOrFiredMapOnline(UInt_t eq, UInt_t hs, UInt_t chip);
     void   SetFastOrFiredMap(UInt_t chipKey){fFastOrFiredMap.SetBitNumber(chipKey);}