]> git.uio.no Git - u/mrichter/AliRoot.git/blob - HMPID/AliHMPIDReconstructor.h
This commit was generated by cvs2svn to compensate for changes in r15977,
[u/mrichter/AliRoot.git] / HMPID / AliHMPIDReconstructor.h
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  
32   static        void          Dig2Clu (TClonesArray*pDigLst,TClonesArray *pCluLst,Bool_t isTryUnfold=kTRUE            );//digits list -> clusters list
33   static        void          CluQA   (AliRunLoader* pAL                                                              );//QA for clusters
34   static        void          FormClu (AliHMPIDCluster *pClu,AliHMPIDDigit *pDig,TClonesArray *pDigLst,TMatrixF *pDigMap);//cluster formation recursive algorithm
35   static inline AliHMPIDDigit* UseDig  (Int_t padX,Int_t padY,TClonesArray *pDigList,TMatrixF *pDigMap                 );//use this pad's digit to form a cluster
36
37   protected:
38   ClassDef(AliHMPIDReconstructor, 0)   //class for the HMPID reconstruction
39 };
40 //__________________________________________________________________________________________________
41 AliHMPIDDigit* AliHMPIDReconstructor::UseDig(Int_t padX,Int_t padY,TClonesArray *pDigLst,TMatrixF *pDigMap)
42 {
43 //Digit map contains a matrix if digit numbers.
44 //Main operation in forming initial cluster is done here. Requested digit pointer is returned and this digit marked as taken.
45 //Arguments: padX,padY - pad number
46 //           pDigLst   - list of digits for one sector
47 //           pDigMap   - map of those digits
48 //  Returns: pointer to digit if not yet used or 0 if used
49   Int_t iDig=(Int_t)(*pDigMap)(padX,padY);(*pDigMap)(padX,padY)=-1;//take digit number from the map and reset this map cell to -1
50   if(iDig!=-1)    return (AliHMPIDDigit*)pDigLst->At(iDig);         //digit pointer
51   else            return 0;
52 }
53
54 #endif