// 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) //
#include "AliITSUpgradeClusterList.h"
#include <TObjArray.h>
+class TTree;
+
class AliITSUpgradeClusterFinder :public TObject{
public:
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) ;
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)
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);