]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - TOF/AliTOF.h
AliTOFv2FHoles.cxx added to the package
[u/mrichter/AliRoot.git] / TOF / AliTOF.h
index a20f85ec91607306571072ef8c25a0614977d51e..1228d8eb65ea5188f776a3791b7b09c4c611b509 100644 (file)
-#ifndef TOF_H
-#define TOF_H
+////////////////////////////////////////////////
+//                                           //
+//  Manager classe for TOF                    //
+//  Interface :                               //
+//  AliTOF                                    //
+//  Associations between TOF related objects  //
+//  are defined here                          //
+// -- Authors: Pierella, Seganti, Vicinanza   //
+//    (Bologna and Salerno University)        //
+//                                            //
+////////////////////////////////////////////////
+
+#ifndef ALITOF_H
+#define ALITOF_H
 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
  * See cxx source for full Copyright notice                               */
 
 /* $Id$ */
 
-////////////////////////////////////////////////
-//  Manager and hits classes for set: TOF     //
-////////////////////////////////////////////////
-#include "TObject.h"
-
 class TFile;
-#include "AliDetector.h"
-#include "AliHit.h"
-#include "AliDigit.h" 
-#include "AliTOFD.h"
+class TDirectory;
+class TString ;  
+class TTask ;
+class TFolder ;
+class AliTOFMerger;
 
-class AliTOF : public AliDetector {
-
-protected:
-  Int_t   fIdSens;
-
-public:
-  Int_t   fNTof;
-  Float_t fRmax;
-  Float_t fRmin;
-  Float_t fZlenA;
-  Float_t fZlenB;
-  Float_t fZlenC;
-  Float_t fZtof;
-   
-  Float_t fStripLn;
-  Float_t fSpace;
-  Float_t fDeadBndZ;
-  Float_t fDeadBndX;
-  Float_t fXpad;
-  Float_t fZpad;
-  Float_t fGapA;
-  Float_t fGapB;
-  Float_t fOverSpc;
-  Int_t   fNpadX;
-  Int_t   fNpadZ;
-  Int_t   fPadXStr;
-
-  Int_t   fNStripA;
-  Int_t   fNStripB;
-  Int_t   fNStripC;
-
-  Float_t fTimeRes;
-  Float_t fChrgRes;
-  
-  Int_t   fPadXSector;
-  Int_t   fNRoc;
-  Int_t   fNFec;
-  Int_t   fNTdc;
-  Int_t   fNPadXRoc;
+#include "TObject.h"
+#include "TTree.h" 
+#include "AliDetector.h"
+#include <iostream.h>
+#include "AliTOFMerger.h"
+#include "AliTOFSDigitizer.h"
 
 
+class AliTOF : public AliDetector {
 public:
-  AliTOF();
+  AliTOF(); 
   AliTOF(const char *name, const char *title);
-  virtual        ~AliTOF() {}
+  virtual ~AliTOF() ;
+// 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;}
+
+  virtual void    SetTreeAddress();
   virtual void    AddHit(Int_t track, Int_t* vol, Float_t* hits);
-  virtual void    AddDigit(Int_t*, Int_t*, Float_t*);
+  virtual void    AddDigit(Int_t* tracks, Int_t* vol, Float_t* digits);
+  virtual void    AddSDigit(Int_t* tracks, Int_t* vol, Float_t* digits);
   virtual void    CreateGeometry();
   virtual void    CreateMaterials();
   virtual void    Init();
-  virtual void    MakeBranch(Option_t*, char *file=0);
+//  virtual void    MakeBranch(Option_t* option, const char *file=0);
+  virtual void    MakeBranch(Option_t *opt=" ",const char *file=0);
+  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);
+  Int_t           DistancetoPrimitive(Int_t px, Int_t py) const;
   virtual void    StepManager()=0;
-  virtual void    TOFpc(Float_t, Float_t, Float_t,
-                        Float_t, Float_t,Float_t) {}
-  virtual void    DrawModule();
+  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;
+          void    CreateTOFFolders();
+  Bool_t    CheckOverlap(Int_t* vol, Float_t* digit, Int_t Track);
   virtual void    SDigits2Digits();
-          void    Hits2Digits(Int_t evNumber=0);
+  virtual void    SetMerger(AliTOFMerger* merger);
+  virtual AliTOFMerger* Merger();
+//  virtual void    Hits2Digits();   
+  virtual void    TOFHits2SDigits();
+  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);
-  
-private:
-       Bool_t    CheckOverlap(Int_t*, Float_t*, Int_t);
-
-  ClassDef(AliTOF,1)  // Time Of Flight base class
-};
-//___________________________________________
-class AliTOFhit : public AliHit {
-public:
-  Int_t      fSector;  // number of sector 
-  Int_t      fPlate;   // number of plate
-  Int_t      fStrip;   // number of strip
-  Int_t      fPad_x;   // number of pad along x
-  Int_t      fPad_z;   // number of pad along z
-  Float_t    fPx;      // px in TOF
-  Float_t    fPy;      // py in TOF
-  Float_t    fPz;      // pz in TOF
-  Float_t    fPmom;    // P in TOF
-  Float_t    fTof;     // Time of Flight
-  Float_t    fDx;      // x of impact point in pad r.s.
-  Float_t    fDy;      // y of impact point in pad r.s.
-  Float_t    fDz;      // z of impact point in pad r.s.
-  Float_t    fIncA;    // Incidence angle
-  Float_t    fEdep;    // Energy lost in tof layer
-public:
-  AliTOFhit() {}
-  AliTOFhit(Int_t shunt, Int_t track, Int_t* vol, 
-            Float_t *hits);
-  virtual ~AliTOFhit() {}
-
-  inline  Int_t   GetSector() {return fSector;}
-  inline  Int_t   GetPlate()  {return fPlate;}
-  inline  Int_t   GetPad_x()  {return fPad_x;}
-  inline  Int_t   GetPad_z()  {return fPad_z;}
-  inline  Int_t   GetStrip()  {return (Int_t)(fPad_z*0.5);}
-  inline  Float_t GetTof()    {return fTof;}
-  inline  Float_t GetMom()    {return fPmom;}
-  inline  Float_t GetDx()     {return fDx;}
-  inline  Float_t GetDz()     {return fDz;}
-  inline  Float_t GetIncA()   {return fIncA;}
-  inline  Float_t GetEdep()   {return fEdep;}
+  virtual void    ResetHits();
+  virtual void    ResetDigits();
+  TClonesArray *SDigits() const {return fSDigits;}
+  TClonesArray *ReconParticles() const {return fReconParticles;}
+  Int_t   fNevents ;        // Number of events to digitize
 
-  ClassDef(AliTOFhit,1)  // Hits for Time Of Flight
-};
-
-//_______________________________________________________
-
-class AliTOFdigit : public AliDigit {
-
- public:
-  Int_t   fSector;
-  Int_t   fPlate;
-  Int_t   fStrip;
-  Int_t   fPad_x;
-  Int_t   fPad_z;
-  Float_t fTdc;
-  Float_t fAdc;
-
- public:
-  AliTOFdigit(){}
-  AliTOFdigit(Int_t*, Int_t*, Float_t*);
-  virtual ~AliTOFdigit(){}
-  void            GetLocation(Int_t*);
-  Int_t           GetTotPad();
-  void            AddTrack(Int_t);
+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* 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 
 
-  inline  Float_t GetTdc()           {return fTdc;}
-  inline  Float_t GetAdc()           {return fAdc;}
-  inline  Int_t   GetSector()        {return fSector;}
-  inline  void    SetTdc(Float_t TDC){fTdc = TDC;}
-  inline  void    SetAdc(Float_t ADC){fAdc = ADC;}
+private:
 
-  ClassDef(AliTOFdigit,2)  // Digits for Time Of Flight
+  ClassDef(AliTOF,3)  // Time Of Flight base class
 };
-
-#endif
+#endif /* ALITOF_H */