]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - ITS/AliITSsimulation.h
TRD nSigma OADB related new codes and modifications and OADB root file -- Xianguo Lu
[u/mrichter/AliRoot.git] / ITS / AliITSsimulation.h
index 1bcda08712dd8cae71c667fb3e4cf0689a49b99e..bf7fc53fc4e182b54300a0b585c798a4ce32976c 100644 (file)
 /* $Id$ */
 
 #include <TObject.h>
+#include "AliITSDetTypeSim.h"
 #include "AliITSpList.h"
 
-class AliITSresponse;
+class AliITSCalibration;
 class AliITSsegmentation;
 class AliITSmodule;
 class TRandom;
@@ -32,13 +33,17 @@ class TClonesArray;
 
 class AliITSsimulation : public TObject {
 
- public:
 public:
     AliITSsimulation(); // Default constructor
+    // Standard constructor
+    AliITSsimulation(AliITSDetTypeSim *dettyp);
     virtual ~AliITSsimulation(); // destructor
     // copy constructor. See detector specific implementation.
     AliITSsimulation(const AliITSsimulation &source);
     // Assignment opporator. See detector specific implementation.
-    virtual AliITSsimulation& operator=(const AliITSsimulation &source);
+    AliITSsimulation& operator=(const AliITSsimulation &source);
+    // Initialize simulation
+    virtual void Init() {};
 
     // *****************  Hits -> SDigits ******************
     // digitize module using the "slow" detector simulator creating
@@ -61,32 +66,38 @@ class AliITSsimulation : public TObject {
     virtual void DigitiseModule(AliITSmodule *,Int_t,Int_t) {;}
     // digitizes module using the "fast" detector simulator.
     virtual void CreateFastRecPoints(AliITSmodule *,Int_t,
-                                    TRandom *) {;}
-    // Return pointer to Response model
-    virtual AliITSresponse* GetResponseModel(){return fResponse;}
-    // set pointer to Response model
-    virtual void SetResponseModel(AliITSresponse *res){fResponse = res;}
-    // Return pointer to Response model
-    virtual AliITSsegmentation* GetSegmentationModel(){return fSegmentation;}
-    // set pointer to Response model
-    virtual void SetSegmentationModel(AliITSsegmentation *seg){
-                                                        fSegmentation = seg;}
+                                    TRandom *,TClonesArray* /*recp*/) {;}
+   // Return pointer to Response model
+    virtual AliITSCalibration* GetCalibrationModel(Int_t mod = 0){return fDetType->GetCalibrationModel(mod);}
+   // set pointer to Response model
+    virtual void SetCalibrationModel(Int_t mod, AliITSCalibration *res){fDetType->SetCalibrationModel(mod,res);}
+    // Return pointer to Segmentation object
+    virtual AliITSsegmentation* GetSegmentationModel(Int_t dt) = 0;
+    // set pointer to Segmentation object
+    virtual void SetSegmentationModel(Int_t dt,AliITSsegmentation *seg) = 0;
     virtual AliITSpList* GetMap(){return fpList;} // Returns fpList, the map.
     virtual void SetMap(AliITSpList *p){fpList = p;} // Sets fpList, the map.
     virtual void ClearMap(){fpList->ClearMap();} // Clear fpList, map.
     virtual void SetModuleNumber(Int_t mod){fModule=mod;} // Set Module number
-    virtual Int_t GetModuleNumber(){return fModule;}// Gets Module number
+    virtual Int_t GetModuleNumber()const {return fModule;}// Gets Module number
     virtual void SetEventNumber(Int_t evnt){fEvent=evnt;} // Set Event number
-    virtual Int_t GetEventNumber(){return fEvent;}// Gets Event number
+    virtual Int_t GetEventNumber()const {return fEvent;}// Gets Event number
+    // Sets the debug flag for debugging output
+    void SetDebug(Int_t level=5){fDebug=level;}
+    // Clears the debug flag so no debugging output will be generated
+    void SetNoDebug(){fDebug=0;}
+    // Returns the debug flag value
+    Bool_t GetDebug(Int_t level=1)const {return fDebug>=level;}
+    void SetDetType(AliITSDetTypeSim* dettyp) {fDetType=dettyp;}
 
  protected:
-    AliITSresponse      *fResponse;       //! response
-    AliITSsegmentation  *fSegmentation;   //! segmentation 
+    AliITSDetTypeSim    *fDetType;        //! Access resp and segm via this obj
     AliITSpList         *fpList;          //!
     Int_t                fModule;         //!
     Int_t                fEvent;          //!
+    Int_t                fDebug;          //  debug flag
 
-  ClassDef(AliITSsimulation,1)  // Simulation base class 
+  ClassDef(AliITSsimulation,4)  // Simulation base class 
     
 };