]> git.uio.no Git - u/mrichter/AliRoot.git/blob - RICH/AliRICHReconstructor.h
Adding cut on invariant mass values in the pre-triiger decision of the AliMUONCocktai...
[u/mrichter/AliRoot.git] / RICH / AliRICHReconstructor.h
1 #ifndef AliRICHReconstructor_h
2 #define AliRICHReconstructor_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 "AliRICHTracker.h"         //CreateTracker()
8 #include "AliRICHClusterFinder.h"   //Reconstruct()
9
10 class AliRawReader;
11 class TTree;
12
13 class AliRICHReconstructor: public AliReconstructor 
14 {
15 public:
16            AliRICHReconstructor(): AliReconstructor()              {}//default ctor
17   virtual ~AliRICHReconstructor()                                  {}//dtor  
18 //framework part  
19   AliTracker*  CreateTracker         (AliRunLoader*                      )const{return new AliRICHTracker;}                 //interface from AliReconstructor
20   void         Reconstruct           (AliRunLoader* pAL                  )const{AliRICHClusterFinder cf(pAL);    cf.Exec();}//from AliReconstruction for digits->clusters
21   void         Reconstruct           (AliRunLoader* pAL,AliRawReader *pRR)const;                                            //from AliReconstruction for raw->clusters
22   using AliReconstructor::Reconstruct;                                                                            //to get rid of virtual hidden warning 
23 //private part  
24          void          Dig2Clu    (TClonesArray*pDigList,TClonesArray *pCluList                                    )const;//form clusters out of provided digits list
25          void          FormCluster(AliRICHCluster *pClu,AliRICHDigit *pDig,TClonesArray *pDigList,TMatrixF *pDigMap)const;//form cluster recursive algorithm
26   inline AliRICHDigit *UseDig     (Int_t padX,Int_t padY,TClonesArray *pDigList,TMatrixF *pDigMap                  )const;//use this pad's digit to form a cluster
27   static void          CheckPR    (                                                                                );     //utility-> run staff for stack
28   static void          RichAna    (Int_t iNevMax=99999,Bool_t isPatRec=kFALSE                                      );     //utility-> create ntuples for analysis
29   
30 protected:
31   ClassDef(AliRICHReconstructor, 0)   //class for the RICH reconstruction
32 };
33 //__________________________________________________________________________________________________
34 AliRICHDigit* AliRICHReconstructor::UseDig(Int_t padX,Int_t padY,TClonesArray *pDigList,TMatrixF *pDigMap)const
35 {
36 //Digit map contains a matrix if digit numbers.
37 //Main operation in forming initial cluster is done here. Requested digit pointer is returned and this digit marked as taken.
38 //Arguments: padX,padY - pad number
39 //           pDigList  - list of digits for one sector
40 //           pDigMap   - map of those digits
41 //  Returns: pointer to digit if not yet used or 0 if used
42   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
43   if(iDig!=-1)
44     return (AliRICHDigit*)pDigList->At(iDig);    //digit pointer
45   else      
46     return 0;
47 }
48
49 #endif