]> git.uio.no Git - u/mrichter/AliRoot.git/blob - TOF/AliTOF.h
Updated version of TOF digitization, N^2 problem solved (J.Chudoba)
[u/mrichter/AliRoot.git] / TOF / AliTOF.h
1 ////////////////////////////////////////////////
2 //                                            //
3 //  Manager classe for TOF                    //
4 //  Interface :                               //
5 //  AliTOF                                    //
6 //  Associations between TOF related objects  //
7 //  are defined here                          //
8 // -- Authors: Pierella, Seganti, Vicinanza   //
9 //    (Bologna and Salerno University)        //
10 //                                            //
11 ////////////////////////////////////////////////
12
13 #ifndef ALITOF_H
14 #define ALITOF_H
15 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
16  * See cxx source for full Copyright notice                               */
17
18 /* $Id$ */
19
20 class TFile;
21 class TDirectory;
22 class TString ;  
23 class TTask ;
24 class TFolder ;
25 class AliTOFMerger;
26
27 #include "TObject.h"
28 #include "TTree.h" 
29 #include "AliDetector.h"
30 #include <iostream.h>
31 #include "AliTOFMerger.h"
32 #include "AliTOFSDigitizer.h"
33
34
35 class AliTOF : public AliDetector {
36 public:
37   AliTOF(); 
38   AliTOF(const char *name, const char *title);
39   virtual ~AliTOF() ;
40 // getters for AliTOF object status
41   Int_t GetNStripA() const {return fNStripA;}
42   Int_t GetNStripB() const {return fNStripB;}
43   Int_t GetNStripC() const {return fNStripC;}
44   Int_t GetNpadX()   const {return fNpadX;}
45   Int_t GetNpadZ()   const {return fNpadZ;}
46   Int_t GetPadXStr() const {return fPadXStr;}
47   Float_t GetTimeRes() const {return fTimeRes;}
48   Float_t GetChrgRes() const {return fChrgRes;}
49
50   virtual void    SetTreeAddress();
51   virtual void    AddHit(Int_t track, Int_t* vol, Float_t* hits);
52   virtual void    AddDigit(Int_t* tracks, Int_t* vol, Float_t* digits);
53   virtual void    AddSDigit(Int_t tracknum, Int_t* vol, Float_t* digits);
54   virtual void    CreateGeometry();
55   virtual void    CreateMaterials();
56   virtual void    Init();
57 //  virtual void    MakeBranch(Option_t* option, const char *file=0);
58   virtual void    MakeBranch(Option_t *opt=" ",const char *file=0);
59   virtual void    Makehits(Bool_t hits=1);
60   virtual void    FinishEvent();
61   virtual Int_t   IsVersion() const =0;
62   Int_t           DistancetoPrimitive(Int_t px, Int_t py) const;
63   virtual void    StepManager()=0;
64   virtual void    TOFpc(Float_t xtof, Float_t ytof, Float_t zlenC,
65                         Float_t zlenB, Float_t zlenA, Float_t ztof0){}
66   virtual void    DrawModule() const;
67   virtual void    DrawDetectorModules()=0;
68   virtual void    DrawDetectorStrips()=0;
69 //  virtual void   DrawDetectorModulesinFrame()=0;
70 //  virtual void   DrawDetectorStripsinFrame()=0;
71           void    CreateTOFFolders();
72   Bool_t    CheckOverlap(Int_t* vol, Float_t* digit, Int_t Track);
73   virtual void    SDigits2Digits();
74   virtual void    SetMerger(AliTOFMerger* merger);
75   virtual AliTOFMerger* Merger();
76 //  virtual void    Hits2Digits();   
77   virtual void    Hits2SDigits();
78   virtual void    Digits2Reco() {cout << "AliTOF::Digits2Reco()  dummy function called" << endl;}
79           void    Digits2Raw (Int_t evNumber=0);
80           void    Raw2Digits (Int_t evNumber=0);
81   virtual void    ResetHits();
82   virtual void    ResetDigits();
83   TClonesArray *SDigits() const {return fSDigits;}
84   TClonesArray *ReconParticles() const {return fReconParticles;}
85   Int_t   fNevents ;        // Number of events to digitize
86
87 protected:
88   TFolder* fFGeom ;       //  Folder that holds the Geometry definition
89   TTask*   fDTask ;       //  TOF Digitizer container
90   TTask*   fReTask;       //  TOF Reconstructioner container
91   TClonesArray* fSDigits; // List of summable digits
92   Int_t    fNSDigits;           // Number of sdigits
93   TClonesArray* fReconParticles; // List of reconstructed particles
94   AliTOFMerger *fMerger;   // ! pointer to merger
95   Int_t   fNTof;  // number of TOF sectors
96   Float_t fRmax;  // upper bound for radial extension of TOF detector
97   Float_t fRmin;  // lower bound for radial extension of TOF detector
98   Float_t fZlenA; // length along z-axis of type A module 
99   Float_t fZlenB; // length along z-axis of type B module
100   Float_t fZlenC; // length along z-axis of type C module
101   Float_t fZtof;  // total semi-length of TOF detector
102   Float_t fStripLn;  //  Strip Length
103   Float_t fSpace;    //  Space Beetween the strip and the bottom of the plate
104   Float_t fDeadBndZ; //  Dead Boundaries of a Strip along Z direction (width)
105   Float_t fDeadBndX; //  Dead Boundaries of a Strip along X direction (length)
106   Float_t fXpad;  //  X size of a pad
107   Float_t fZpad;  //  Z size of a pad
108   Float_t fGapA;  //  Gap beetween tilted strip in A-type plate
109   Float_t fGapB;  //  Gap beetween tilted strip in B-type plate
110   Float_t fOverSpc; // Space available for sensitive layers in radial direction
111   Int_t   fNpadX; // Number of pads in a strip along the X direction
112   Int_t   fNpadZ; // Number of pads in a strip along the Z direction
113   Int_t   fPadXStr; // Number of pads per strip
114   Int_t   fNStripA; // number of strips in A type module
115   Int_t   fNStripB; // number of strips in B type module
116   Int_t   fNStripC; // number of strips in C type module
117   Float_t fTimeRes; // time resolution of the TOF
118   Float_t fChrgRes; // charge resolution of ADC
119   Int_t   fPadXSector; // number of pads per sector
120   Int_t   fNRoc;       // number of ROC
121   Int_t   fNFec;       // number of FEC
122   Int_t   fNTdc;       // number of TDC
123   Int_t   fNPadXRoc;   // number of pads for each ROC
124   Int_t   fIdSens;     // the unique numeric identifier for sensitive volume FPAD 
125
126 private:
127
128   ClassDef(AliTOF,3)  // Time Of Flight base class
129 };
130  
131 #endif /* ALITOF_H */