]>
Commit | Line | Data |
---|---|---|
d3da6dc4 | 1 | #ifndef AliHMPIDReconstructor_h |
2 | #define AliHMPIDReconstructor_h | |
3 | /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
4 | * See cxx source for full Copyright notice */ | |
5 | ||
6 | #include <AliReconstructor.h> //base class | |
7 | #include "AliHMPIDTracker.h" //CreateTracker() | |
8 | #include <TMatrixF.h> //UseDig() | |
9 | #include <TClonesArray.h> //UseDig() | |
10 | class AliRawReader; //Reconstruct() with raw data | |
11 | class AliHMPIDDigit; //Dig2Clu(), UseDig() | |
12 | class AliHMPIDCluster; //Dig2Clu() | |
13 | ||
14 | class AliHMPIDReconstructor: public AliReconstructor | |
15 | { | |
16 | public: | |
17 | AliHMPIDReconstructor(): AliReconstructor() {}//default ctor | |
18 | virtual ~AliHMPIDReconstructor() {}//dtor | |
19 | //framework part | |
20 | AliTracker* CreateTracker (AliRunLoader* )const{return new AliHMPIDTracker;} //from AliReconstructor for clusters->PID | |
21 | void Reconstruct (AliRunLoader* pAL )const; //from AliReconstruction for digits->clusters | |
22 | void Reconstruct (AliRunLoader* pAL,AliRawReader *pRR)const; //from AliReconstruction for raws->clusters | |
23 | virtual void FillESD (AliRunLoader* pAL,AliESD *pESD)const; //calculate pid for HMPID | |
24 | virtual void FillESD(AliRunLoader*, AliRawReader*, AliESD*) const { }; | |
25 | virtual void FillESD(AliRawReader*, TTree*, AliESD*) const { }; | |
26 | virtual void FillESD(TTree*, TTree*, AliESD*) const { }; | |
27 | ||
28 | ||
29 | using AliReconstructor::Reconstruct; //to get rid of virtual hidden warning | |
30 | ||
31 | //private part | |
3c6274c1 | 32 | static void Dig2Clu (TObjArray *pDigLst,TObjArray *pCluLst,Bool_t isUnfold=kTRUE );//digits->clusters |
33 | static void FormClu (AliHMPIDCluster *pClu,AliHMPIDDigit *pDig,TClonesArray *pDigLst,TMatrixF *pPadMap);//cluster formation recursive algorithm | |
34 | static inline AliHMPIDDigit* UseDig (Int_t padX,Int_t padY, TClonesArray *pDigLst,TMatrixF *pDigMap);//use this pad's digit to form a cluster | |
d3da6dc4 | 35 | |
36 | protected: | |
37 | ClassDef(AliHMPIDReconstructor, 0) //class for the HMPID reconstruction | |
38 | }; | |
cf7e313e | 39 | |
40 | typedef AliHMPIDReconstructor AliRICHReconstructor; // for backward compatibility | |
41 | ||
d3da6dc4 | 42 | //__________________________________________________________________________________________________ |
3c6274c1 | 43 | AliHMPIDDigit* AliHMPIDReconstructor::UseDig(Int_t padX,Int_t padY,TClonesArray *pDigLst,TMatrixF *pPadMap) |
d3da6dc4 | 44 | { |
45 | //Digit map contains a matrix if digit numbers. | |
46 | //Main operation in forming initial cluster is done here. Requested digit pointer is returned and this digit marked as taken. | |
47 | //Arguments: padX,padY - pad number | |
48 | // pDigLst - list of digits for one sector | |
49 | // pDigMap - map of those digits | |
50 | // Returns: pointer to digit if not yet used or 0 if used | |
3c6274c1 | 51 | Int_t iDig=(Int_t)(*pPadMap)(padX,padY);(*pPadMap)(padX,padY)=-1;//take digit number from the map and reset this map cell to -1 |
52 | if(iDig!=-1) return (AliHMPIDDigit*)pDigLst->At(iDig); //digit pointer | |
d3da6dc4 | 53 | else return 0; |
54 | } | |
55 | ||
56 | #endif |