]> git.uio.no Git - u/mrichter/AliRoot.git/blob - RICH/AliRICH.h
Getters are constant
[u/mrichter/AliRoot.git] / RICH / AliRICH.h
1 #ifndef AliRICH_h
2 #define AliRICH_h
3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4  * See cxx source for full Copyright notice                               */
5
6 #include <AliDetector.h>  //base class
7 #include <TClonesArray.h> //XxxCreate() 
8 #include <TObjArray.h>    //fClu field
9
10
11
12 class AliRICH : public AliDetector //TObject-TNamed-AliModule-AliDetector-AliRICH
13 {
14 public:
15 //ctor & dtor    
16             AliRICH(const char *nm,const char *ttl);                                              //named ctor
17             AliRICH(                              ):AliDetector(    ),fSdi(0),fDig(0),fClu(0) {}  //default ctor          
18             AliRICH(const AliRICH &rich           ):AliDetector(rich),fSdi(0),fDig(0),fClu(0) {}  //copy ctor not implemented
19   virtual  ~AliRICH();                                            
20   AliRICH&  operator=(const AliRICH&)                 {return *this;}                             //not implemented
21 //framework part  
22           void  BuildGeometry   (                ) {}          //from AliModule invoked from AliMC::InitGeometry() to build geometry for old event display
23   virtual void  CreateMaterials (                )=0;          //from AliModule invoked from AliMC::ConstructGeometry() to define detector materials
24   virtual void  CreateGeometry  (                )=0;          //from AliModule invoked from AliMC::ConstructGeometry() to build detector for simulation
25   virtual Int_t IsVersion       (                )const=0;     //from AliModule not used        
26   virtual void  Init            (                )=0;          //from AliModule invoked from AliMC::InitGeometry() after CreateGeometry() to do VolID initialization
27           void  MakeBranch      (Option_t *opt="");            //from AliModule invokde from AliRun::Tree2Tree() to make requested RICH branch
28           void  SetTreeAddress  (                );            //from AliModule invoked from AliRun::GetEvent(), AliLoader::SetTAddrInDet()
29   virtual void  StepManager     (                )=0;          //from AliModule invoked from AliMC
30 //private part +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 
31   void          HitCreate(         )     {if(fHits)return; fHits=new TClonesArray("AliRICHHit"); fNhits=0;      }//create hits list
32   void          HitPrint (Int_t evt)const;                                                                       //print hits list
33               
34   TClonesArray* SdiLst   (         )const{return fSdi;                                                          }//get sdigits list 
35   void          SdiCreate(         )     {if(fSdi)return; fSdi=new TClonesArray("AliRICHDigit");                }//create sdigits list
36   void          SdiReset (         )     {if(fSdi)  fSdi ->Clear();                                             }//clean sdigits list
37   void          SdiPrint (Int_t evt)const;                                                                       //print sdigits 
38          
39   TObjArray*    DigLst   (         )const{return fDig;                                                          }//get digits list for all chambers
40   TClonesArray* DigLst   (Int_t c  )const{return fDig ? (TClonesArray *)fDig->At(c):0;                          }//get digits list for chamber
41   void          DigCreate(         )     {fDig=new TObjArray(7);for(Int_t i=0;i<7;i++)fDig->AddAt(new TClonesArray("AliRICHDigit"),i);}//create digits list
42   void          DigReset (         )     {if(fDig)for(int i=0;i<7;i++)fDig->At(i)->Clear();                     }//clean digits list 
43   void          DigPrint (Int_t evt)const;                                                                       //print digits
44           
45   TClonesArray* CluLst   (Int_t c  )const{return fClu ? (TClonesArray *)fClu->At(c):0;                          }//get clusters list for chamber
46   inline void   CluCreate(         )     {fClu=new TObjArray(7); for(Int_t i=0;i<7;i++)fClu->AddAt(new TClonesArray("AliRICHCluster"),i);}//create clusters list
47          void   CluReset (         )     {if(fClu)for(int i=0;i<7;i++)fClu->At(i)->Clear();                     }//clean clusters list
48          void   CluPrint (Int_t evt)const;                                                                       //print clusters list
49          
50   void          OccupancyPrint(Int_t evt=-1);                    //print chambers occupancy 
51   void          SummaryOfEvent(Int_t evt=0)const;
52
53 protected:  
54   TClonesArray         *fSdi;                     //! list of sdigits  
55   TObjArray            *fDig;                     //! each chamber holds it's one list of digits
56   TObjArray            *fClu;                     //! each chamber holds it's one list of clusters 
57   
58   ClassDef(AliRICH,11)                            //Main RICH class 
59 };//class AliRICH  
60 //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
61 #endif