]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - TOF/AliTOF.h
TVector.h missing
[u/mrichter/AliRoot.git] / TOF / AliTOF.h
index e20f405384761167c033412dee4c7283305eb7c1..26586c1bf3b5ba4910e9b193d1a1b8614bcab0d6 100644 (file)
@@ -30,6 +30,7 @@ class AliTOFMerger;
 #include <Riostream.h>
 #include "AliTOFMerger.h"
 #include "AliTOFSDigitizer.h"
+#include "AliTOFGeometry.h"
 
 
 class AliTOF : public AliDetector {
@@ -37,15 +38,16 @@ public:
   AliTOF(); 
   AliTOF(const char *name, const char *title, Option_t *option="noTimeZero");
   virtual ~AliTOF() ;
+
+  static  Int_t NDDL()        { return kNDDL;};
+  static  Int_t NTRM()        { return kNTRM;}
+  static  Int_t NTdc()        { return kNTdc;};
+  static  Int_t NCh()         { return kNCh;};
+  static  Int_t NPadXTRM()    { return kNCh*kNTdc;};
+
 // getters for AliTOF object status
-  Int_t GetNStripA() const {return fNStripA;}
-  Int_t GetNStripB() const {return fNStripB;}
-  Int_t GetNStripC() const {return fNStripC;}
-  Int_t GetNpadX()   const {return fNpadX;}
-  Int_t GetNpadZ()   const {return fNpadZ;}
-  Int_t GetPadXStr() const {return fPadXStr;}
-  Float_t GetTimeRes() const {return fTimeRes;}
-  Float_t GetChrgRes() const {return fChrgRes;}
+  //Float_t GetTimeRes() const {return fTimeRes;};
+  //Float_t GetChrgRes() const {return fChrgRes;};
 
   virtual void    SetTreeAddress();
   virtual void    AddHit(Int_t track, Int_t* vol, Float_t* hits);
@@ -55,81 +57,74 @@ public:
   virtual void    CreateGeometry();
   virtual void    CreateMaterials();
   virtual void    Init();
-//  virtual void    MakeBranch(Option_t* option, const char *file=0);
-  virtual void    MakeBranch(Option_t *opt=" ",const char *file=0);
+  //virtual void    MakeBranch(Option_t* option, const char *file=0);
+  virtual void    MakeBranch(Option_t *opt=" ");
   virtual void    Makehits(Bool_t hits=1);
   virtual void    FinishEvent();
   virtual Int_t   IsVersion() const =0;
   Int_t           DistancetoPrimitive(Int_t px, Int_t py) const;
   virtual void    StepManager()=0;
-  virtual void    TOFpc(Float_t xtof, Float_t ytof, Float_t zlenC,
-                        Float_t zlenB, Float_t zlenA, Float_t ztof0){}
+  virtual void    TOFpc(Float_t /*xtof*/, Float_t /*ytof*/, Float_t /*zlenC*/,
+                        Float_t /*zlenB*/, Float_t /*zlenA*/, Float_t /*ztof0*/){}
   virtual void    DrawModule() const;
   virtual void    DrawDetectorModules()=0;
   virtual void    DrawDetectorStrips()=0;
-//  virtual void   DrawDetectorModulesinFrame()=0;
-//  virtual void   DrawDetectorStripsinFrame()=0;
+  //virtual void   DrawDetectorModulesinFrame()=0;
+  //virtual void   DrawDetectorStripsinFrame()=0;
           void    CreateTOFFolders();
   Bool_t    CheckOverlap(Int_t* vol, Float_t* digit, Int_t Track);
   virtual void    SDigits2Digits();
   virtual void    SetMerger(AliTOFMerger* merger);
   virtual AliTOFMerger* Merger();
-//  virtual void    Hits2Digits();   
+  //virtual void    Hits2Digits();   
   virtual void    Hits2SDigits();
-  virtual void    Digits2Reco() {cout << "AliTOF::Digits2Reco()  dummy function called" << endl;}
-          void    Digits2Raw (Int_t evNumber=0);
-          void    Raw2Digits (Int_t evNumber=0);
+  virtual void    Hits2SDigits(Int_t evNumber1, Int_t evNumber2);
+  virtual AliDigitizer* CreateDigitizer(AliRunDigitizer* manager) const; 
+  virtual void    Digits2Reco() {};
+          void    Digits2Raw ();
+          void    Raw2Digits (){};
   virtual void    ResetHits();
   virtual void    ResetDigits();
+  virtual void    ResetSDigits();
   TClonesArray *SDigits() const {return fSDigits;}
   TClonesArray *ReconParticles() const {return fReconParticles;}
   void RecreateSDigitsArray();
   void CreateSDigitsArray();
-
-  Int_t   fNevents ;        // Number of events to digitize
+  AliTOFGeometry *GetGeometry() const { return fTOFGeometry; }; 
 
 protected:
   TFolder* fFGeom ;       //  Folder that holds the Geometry definition
   TTask*   fDTask ;       //  TOF Digitizer container
   TTask*   fReTask;       //  TOF Reconstructioner container
-  TClonesArray* fSDigits; //!  List of summable digits
-  Int_t    fNSDigits;           //! Number of sdigits
+  TClonesArray* fSDigits; //! List of summable digits
+  Int_t   fNSDigits;      //! Number of sdigits
   TClonesArray* fReconParticles; // List of reconstructed particles
-  AliTOFMerger *fMerger;   // ! pointer to merger
-  Int_t   fNTof;  // number of TOF sectors
-  Float_t fRmax;  // upper bound for radial extension of TOF detector
-  Float_t fRmin;  // lower bound for radial extension of TOF detector
-  Float_t fZlenA; // length along z-axis of type A module 
-  Float_t fZlenB; // length along z-axis of type B module
-  Float_t fZlenC; // length along z-axis of type C module
-  Float_t fZtof;  // total semi-length of TOF detector
-  Float_t fStripLn;  //  Strip Length
-  Float_t fSpace;    //  Space Beetween the strip and the bottom of the plate
-  Float_t fDeadBndZ; //  Dead Boundaries of a Strip along Z direction (width)
-  Float_t fDeadBndX; //  Dead Boundaries of a Strip along X direction (length)
-  Float_t fXpad;  //  X size of a pad
-  Float_t fZpad;  //  Z size of a pad
-  Float_t fGapA;  //  Gap beetween tilted strip in A-type plate
-  Float_t fGapB;  //  Gap beetween tilted strip in B-type plate
-  Float_t fOverSpc; // Space available for sensitive layers in radial direction
-  Int_t   fNpadX; // Number of pads in a strip along the X direction
-  Int_t   fNpadZ; // Number of pads in a strip along the Z direction
-  Int_t   fPadXStr; // Number of pads per strip
-  Int_t   fNStripA; // number of strips in A type module
-  Int_t   fNStripB; // number of strips in B type module
-  Int_t   fNStripC; // number of strips in C type module
-  Float_t fTimeRes; // time resolution of the TOF
-  Float_t fChrgRes; // charge resolution of ADC
-  Int_t   fPadXSector; // number of pads per sector
-  Int_t   fNRoc;       // number of ROC
-  Int_t   fNFec;       // number of FEC
-  Int_t   fNTdc;       // number of TDC
-  Int_t   fNPadXRoc;   // number of pads for each ROC
-  Int_t   fIdSens;     // the unique numeric identifier for sensitive volume FPAD 
+  AliTOFMerger *fMerger;  // ! pointer to merger
+
+  //Float_t fGapA;     //  Gap beetween tilted strip in A-type plate
+  //Float_t fGapB;     //  Gap beetween tilted strip in B-type plate
 
+  //Float_t fTimeRes;  //  Time resolution of the TOF
+  //Float_t fChrgRes;  //  Charge resolution of ADC
+
+  Int_t   fIdSens;     // The unique identifier for sensitive volume FPAD 
+
+  Bool_t  fTZero;      // Flag indicating if T0 is used
+  AliTOFGeometry *fTOFGeometry; //The TOF Geometry parameters
 private:
 
-  ClassDef(AliTOF,5)  // Time Of Flight base class
+  // DAQ characteristics
+  // cfr. TOF-TDR pag. 105 for Glossary
+  // TARODA : TOF-ALICE Read Out and Data Acquisition system
+  enum {
+    kNDDL        =    4, // Number of DDL (Detector Data Link) per sector
+    kNTRM        =   10, // Number of TRM ( Readout Module) per DDL
+    kNTdc        =   30, // Number of Tdc (Time to Digital Converter) per TRM
+    kNCh         =    8  // Number of channels per Tdc
+  };
+
+  ClassDef(AliTOF,7)  // Time Of Flight base class
 };
  
 #endif /* ALITOF_H */