]> git.uio.no Git - u/mrichter/AliRoot.git/blob - HMPID/AliHMPID.h
HMPIDConfig.C renamed as Hconfig.C
[u/mrichter/AliRoot.git] / HMPID / AliHMPID.h
1 #ifndef AliHMPID_h
2 #define AliHMPID_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 AliHMPID : public AliDetector //TObject-TNamed-AliModule-AliDetector-AliHMPID
13 {
14 public:
15 //ctor & dtor    
16             AliHMPID(const char *nm,const char *ttl);                                              //named ctor
17             AliHMPID(                              ):AliDetector(    ),fSdi(0),fDig(0),fClu(0) {}  //default ctor          
18   virtual  ~AliHMPID();                                            
19 //framework part  
20           void  BuildGeometry   (                ) {}          //from AliModule invoked from AliMC::InitGeometry() to build geometry for old event display
21   virtual void  CreateMaterials (                )=0;          //from AliModule invoked from AliMC::ConstructGeometry() to define detector materials
22   virtual void  CreateGeometry  (                )=0;          //from AliModule invoked from AliMC::ConstructGeometry() to build detector for simulation
23   virtual Int_t IsVersion       (                )const=0;     //from AliModule not used        
24   virtual void  Init            (                )=0;          //from AliModule invoked from AliMC::InitGeometry() after CreateGeometry() to do VolID initialization
25           void  MakeBranch      (Option_t *opt="");            //from AliModule invokde from AliRun::Tree2Tree() to make requested HMPID branch
26           void  SetTreeAddress  (                );            //from AliModule invoked from AliRun::GetEvent(), AliLoader::SetTAddrInDet()
27   virtual void  StepManager     (                )=0;          //from AliModule invoked from AliMC
28 //private part +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 
29   void          HitCreate(         )     {if(fHits)return; fHits=new TClonesArray("AliHMPIDHit"); fNhits=0;      }//create hits list
30   void          HitPrint (Int_t evt)const;                                                                       //print hits list
31               
32   TClonesArray* SdiLst   (         )const{return fSdi;                                                          }//get sdigits list 
33   void          SdiCreate(         )     {if(fSdi)return; fSdi=new TClonesArray("AliHMPIDDigit");                }//create sdigits list
34   void          SdiReset (         )     {if(fSdi)  fSdi ->Clear();                                             }//clean sdigits list
35   void          SdiPrint (Int_t evt)const;                                                                       //print sdigits 
36          
37   TObjArray*    DigLst   (         )const{return fDig;                                                          }//get digits list for all chambers
38   TClonesArray* DigLst   (Int_t c  )const{return fDig ? (TClonesArray *)fDig->At(c):0;                          }//get digits list for chamber
39   void          DigCreate(         )     {fDig=new TObjArray(7);for(Int_t i=0;i<7;i++)fDig->AddAt(new TClonesArray("AliHMPIDDigit"),i);}//create digits list
40   void          DigReset (         )     {if(fDig)for(int i=0;i<7;i++)fDig->At(i)->Clear();                     }//clean digits list 
41   void          DigPrint (Int_t evt)const;                                                                       //print digits
42           
43   TClonesArray* CluLst   (Int_t c  )const{return fClu ? (TClonesArray *)fClu->At(c):0;                          }//get clusters list for chamber
44   inline void   CluCreate(         )     {fClu=new TObjArray(7); for(Int_t i=0;i<7;i++)fClu->AddAt(new TClonesArray("AliHMPIDCluster"),i);}//create clusters list
45          void   CluReset (         )     {if(fClu)for(int i=0;i<7;i++)fClu->At(i)->Clear();                     }//clean clusters list
46          void   CluPrint (Int_t evt)const;                                                                       //print clusters list
47          
48   void          OccupancyPrint(Int_t evt=-1);                    //print chambers occupancy 
49   void          SummaryOfEvent(Int_t evt=0)const;
50
51 protected:  
52   TClonesArray         *fSdi;                     //! list of sdigits  
53   TObjArray            *fDig;                     //! each chamber holds it's one list of digits
54   TObjArray            *fClu;                     //! each chamber holds it's one list of clusters 
55   
56  private:
57   AliHMPID(const AliHMPID &rich           );
58   AliHMPID&  operator=(const AliHMPID&);
59
60   ClassDef(AliHMPID,11)                            //Main HMPID class 
61 };//class AliHMPID  
62
63 typedef AliHMPID AliRICH; // for backward compatibility
64
65 //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
66 #endif