Getting the trigger descriptors from CDB
[u/mrichter/AliRoot.git] / HMPID / AliHMPID.h
CommitLineData
d3da6dc4 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()
3c6274c1 8#include <TObjArray.h> //fDig,fClu field
d3da6dc4 9
423554a3 10//.
11//HMPID base class
12//.
d3da6dc4 13
14class AliHMPID : public AliDetector //TObject-TNamed-AliModule-AliDetector-AliHMPID
15{
16public:
17//ctor & dtor
59d9d4b3 18 AliHMPID(const char *nm,const char *ttl); //named ctor
19 AliHMPID( ):AliDetector( ),fDoFeed(kTRUE),fSdi(0),fDig(0),fClu(0) {} //default ctor
d3da6dc4 20 virtual ~AliHMPID();
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
d1bf51e1 25
d3da6dc4 26 virtual Int_t IsVersion ( )const=0; //from AliModule not used
27 virtual void Init ( )=0; //from AliModule invoked from AliMC::InitGeometry() after CreateGeometry() to do VolID initialization
661663fa 28 virtual void DefineOpticalProperties() {} //from AliModule invoked from AliMC::ConstructOpGeometry() to set Cerenkov properties
d3da6dc4 29 void MakeBranch (Option_t *opt=""); //from AliModule invokde from AliRun::Tree2Tree() to make requested HMPID branch
30 void SetTreeAddress ( ); //from AliModule invoked from AliRun::GetEvent(), AliLoader::SetTAddrInDet()
31 virtual void StepManager ( )=0; //from AliModule invoked from AliMC
32//private part +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1d4857c5 33 void HitCreate( ) {if(fHits)return; fHits=new TClonesArray("AliHMPIDHit"); fNhits=0; }//create hits list
d3da6dc4 34
35 TClonesArray* SdiLst ( )const{return fSdi; }//get sdigits list
1d4857c5 36 void SdiCreate( ) {if(fSdi)return; fSdi=new TClonesArray("AliHMPIDDigit"); }//create sdigits list
d3da6dc4 37 void SdiReset ( ) {if(fSdi) fSdi ->Clear(); }//clean sdigits list
d3da6dc4 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
470d5932 41 void DigCreate( ) {
42 if (fDig) return; //PH do not recreate existing containers
43 fDig=new TObjArray(7);for(Int_t i=0;i<7;i++)fDig->AddAt(new TClonesArray("AliHMPIDDigit"),i); }//create digits list
d3da6dc4 44 void DigReset ( ) {if(fDig)for(int i=0;i<7;i++)fDig->At(i)->Clear(); }//clean digits list
d3da6dc4 45
3c6274c1 46 TObjArray* CluLst ( )const{return fClu; }//get clusters list for all chambers
d3da6dc4 47 TClonesArray* CluLst (Int_t c )const{return fClu ? (TClonesArray *)fClu->At(c):0; }//get clusters list for chamber
470d5932 48 void CluCreate( ) {
49 if (fClu) return; //PH do not recreate existing containers
50 fClu=new TObjArray(7); for(Int_t i=0;i<7;i++)fClu->AddAt(new TClonesArray("AliHMPIDCluster"),i); }//create clusters list
d3da6dc4 51 void CluReset ( ) {if(fClu)for(int i=0;i<7;i++)fClu->At(i)->Clear(); }//clean clusters list
d3da6dc4 52protected:
59d9d4b3 53 Bool_t fDoFeed; //! Flag to switch on/off Feedback photon creation
d3da6dc4 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
1d4857c5 58private:
d3da6dc4 59 AliHMPID(const AliHMPID &rich );
60 AliHMPID& operator=(const AliHMPID&);
61
62 ClassDef(AliHMPID,11) //Main HMPID class
63};//class AliHMPID
cf7e313e 64
d3da6dc4 65//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
66#endif