]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - ITS/UPGRADE/AliITSUpgradeClusterFinder.h
AliITSVertexerZ: disable pileup search with PbPb (F.Prino)
[u/mrichter/AliRoot.git] / ITS / UPGRADE / AliITSUpgradeClusterFinder.h
index ec4961a832fcf33474fc63db2bf7e683389152da..3e9dc0c6530d66cd1c013d323424b780095563a8 100644 (file)
@@ -9,7 +9,7 @@
 //  For each event:                                                //
 //  1. Call StartEvent()                                           //
 //  2. For each pixel hit:                                         //
-//     Call ProcessHit(..) or ProcessHitOnline(..)                 //
+//     Call ProcessHit(..)                                         //
 //  3. Call FinishEvent()                                          //
 //  4. Access cluster information for this event by methods:       //
 //     GetClusterCount(layer)                                      //
@@ -29,6 +29,8 @@
 #include "AliITSUpgradeClusterList.h"
 #include <TObjArray.h>
 
+class TTree;
+
 class AliITSUpgradeClusterFinder :public TObject{
 
  public:
@@ -39,20 +41,24 @@ class AliITSUpgradeClusterFinder :public TObject{
   void DeActivateClusterTypeSearch(){fClusterTypeFlag=kFALSE;}
 
   void  StartEvent();
-  Int_t ProcessHit(Int_t layer, UInt_t col, UInt_t row, UShort_t charge,Int_t label[3]);
-  Int_t ProcessHitOnline(Int_t layer, UInt_t col, UInt_t row, UShort_t charge, Int_t label[3]);
+  enum {kMaxLab=24}; // maximum number of MC labels associated to the cluster
+  Int_t ProcessHit(Int_t layer, UInt_t col, UInt_t row, UShort_t charge,Int_t label[kMaxLab]);
   void  FinishEvent();
 
   void AddLabelIndex(UInt_t col, UInt_t row);
-  void SetLabels(Int_t label[3]);
+  void SetLabels(Int_t label[kMaxLab]);
+  void MakeRecPointBranch(TTree *treeR);
+  void SetRecPointTreeAddress(TTree *treeR);
+
+  void DigitsToRecPoints(const TObjArray *digList);
 
-  UInt_t  GetClusterCount(Int_t layer);
+  UInt_t  GetClusterCount(Int_t layer) const;
   Float_t GetClusterMeanCol(Int_t layer, UInt_t index);
   Float_t GetClusterMeanRow(Int_t layer, UInt_t index);
   UInt_t  GetClusterSize(Int_t layer, UInt_t index);
-  UInt_t  GetClusterWidthZ(Int_t layer, UInt_t index);
-  UInt_t  GetClusterWidthPhi(Int_t layer, UInt_t index);
-  UInt_t  GetClusterType(Int_t layer, UInt_t index);
+  UInt_t  GetClusterWidthZ(Int_t layer, UInt_t index) ;
+  UInt_t  GetClusterWidthPhi(Int_t layer, UInt_t index) ;
+  UInt_t  GetClusterType(Int_t layer, UInt_t index) ;
   UShort_t GetCharge(Int_t layer, UInt_t index); 
   UInt_t GetPixelCharge(UInt_t col, UInt_t row); 
   Int_t* GetLabels(Int_t layer,UInt_t index) ;
@@ -74,7 +80,7 @@ class AliITSUpgradeClusterFinder :public TObject{
   enum {kSHIFTRIGHT,kSHIFTDOWN};  // used for shifting the region of interest for cluster type pattern
   
   UInt_t   fNhitsLeft;     // number of hits still left to process for this module
-  Bool_t   fHits[39530][39530];// hit map for this module
+  Bool_t   fHits[39530][39530]; // hit map for this module 
   UShort_t fHitCol[999999]; // these two arrays remember which pixels are hit for this module
   UShort_t fHitRow[999999]; // these two arrays remember which pixels are hit for this module
   Short_t  fOldModule;     // remember previous module (-1 at start of event)
@@ -85,17 +91,20 @@ class AliITSUpgradeClusterFinder :public TObject{
   UInt_t   fColSum; // used to determine the center of a cluster
   UInt_t   fRowSum; // used to determine the center of a cluster
   UShort_t fCharge;        // cluster charge 
-  Int_t    fTmpLabel[3];   // label array to be kept temporarily during the clustering procedure
-  Int_t    fLabels[10];    // label array to be attached to the cluster
+  Int_t    fTmpLabel[kMaxLab];   // label array to be kept temporarily during the clustering procedure
+  Int_t    fLabels[kMAXCLUSTERTYPESIDEZ*kMAXCLUSTERTYPESIDEY*kMaxLab];    // label array to be attached to the cluster
 
-  UShort_t fClusterWidthMaxCol;
-  UShort_t fClusterWidthMinCol;
-  UShort_t fClusterWidthMaxRow;
-  UShort_t fClusterWidthMinRow;
+  UShort_t fClusterWidthMaxCol; //max column ID of the cluster
+  UShort_t fClusterWidthMinCol; //min column ID of the cluster
+  UShort_t fClusterWidthMaxRow; //max row ID of the cluster
+  UShort_t fClusterWidthMinRow; //min row ID of the cluster
   Bool_t   fClusterTypeArea[kMAXCLUSTERTYPESIDEZ][kMAXCLUSTERTYPESIDEY];// same as above comments
-  AliITSUpgradeClusterList fClusterList[8];
-  TObjArray *fChargeArray;
-
+  AliITSUpgradeClusterList **fClusterList; //[fNSectors] cluster container
+  TObjArray *fChargeArray;  // charge identifier
+  TClonesArray *fRecPoints; // used to fill treeR
+  
+  Int_t fNLayers;           // Number of layers
+  Int_t fNSectors;          // Number of sectors per layer
   AliITSUpgradeClusterFinder(const AliITSUpgradeClusterFinder &source); // copy constructor
   // assignment operator
   AliITSUpgradeClusterFinder& operator=(const AliITSUpgradeClusterFinder &source);