TOF raw data: preliminary implementation and style changes
[u/mrichter/AliRoot.git] / TOF / AliTOF.h
CommitLineData
b94fa26c 1////////////////////////////////////////////////
2// //
68861244 3// Manager classe for TOF //
4// Interface : //
b94fa26c 5// AliTOF //
68861244 6// Associations between TOF related objects //
7// are defined here //
8// -- Authors: Pierella, Seganti, Vicinanza //
9// (Bologna and Salerno University) //
10// //
b94fa26c 11////////////////////////////////////////////////
12
13#ifndef ALITOF_H
14#define ALITOF_H
3da30618 15/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
16 * See cxx source for full Copyright notice */
17
18/* $Id$ */
19
2ab0c725 20class TFile;
68861244 21class TDirectory;
22class TString ;
23class TTask ;
24class TFolder ;
517b7f8f 25class AliTOFMerger;
68861244 26
27#include "TObject.h"
28#include "TTree.h"
fe4da5cc 29#include "AliDetector.h"
f8014e68 30#include <Riostream.h>
517b7f8f 31#include "AliTOFMerger.h"
32#include "AliTOFSDigitizer.h"
0f4a7374 33#include "AliTOFGeometry.h"
517b7f8f 34
2cef3cb2 35
fe4da5cc 36class AliTOF : public AliDetector {
fe4da5cc 37public:
68861244 38 AliTOF();
d599d913 39 AliTOF(const char *name, const char *title, Option_t *option="noTimeZero");
68861244 40 virtual ~AliTOF() ;
7e6dce66 41
42 static Int_t NDDL() { return kNDDL;};
43 static Int_t NTRM() { return kNTRM;}
44 static Int_t NTdc() { return kNTdc;};
45 static Int_t NCh() { return kNCh;};
46 static Int_t NPadXTRM() { return kNCh*kNTdc;};
47
b94fa26c 48// getters for AliTOF object status
7e6dce66 49 //Float_t GetTimeRes() const {return fTimeRes;};
50 //Float_t GetChrgRes() const {return fChrgRes;};
b94fa26c 51
517b7f8f 52 virtual void SetTreeAddress();
2cef3cb2 53 virtual void AddHit(Int_t track, Int_t* vol, Float_t* hits);
d599d913 54 virtual void AddT0Hit(Int_t track, Int_t* vol, Float_t* hits);
b94fa26c 55 virtual void AddDigit(Int_t* tracks, Int_t* vol, Float_t* digits);
5919c40c 56 virtual void AddSDigit(Int_t tracknum, Int_t* vol, Float_t* digits);
fe4da5cc 57 virtual void CreateGeometry();
58 virtual void CreateMaterials();
59 virtual void Init();
7e6dce66 60 //virtual void MakeBranch(Option_t* option, const char *file=0);
88cb7938 61 virtual void MakeBranch(Option_t *opt=" ");
68861244 62 virtual void Makehits(Bool_t hits=1);
2cef3cb2 63 virtual void FinishEvent();
fe4da5cc 64 virtual Int_t IsVersion() const =0;
68861244 65 Int_t DistancetoPrimitive(Int_t px, Int_t py) const;
fe4da5cc 66 virtual void StepManager()=0;
5c016a7b 67 virtual void TOFpc(Float_t /*xtof*/, Float_t /*ytof*/, Float_t /*zlenC*/,
68 Float_t /*zlenB*/, Float_t /*zlenA*/, Float_t /*ztof0*/){}
68861244 69 virtual void DrawModule() const;
517b7f8f 70 virtual void DrawDetectorModules()=0;
71 virtual void DrawDetectorStrips()=0;
7e6dce66 72 //virtual void DrawDetectorModulesinFrame()=0;
73 //virtual void DrawDetectorStripsinFrame()=0;
68861244 74 void CreateTOFFolders();
517b7f8f 75 Bool_t CheckOverlap(Int_t* vol, Float_t* digit, Int_t Track);
2ab0c725 76 virtual void SDigits2Digits();
517b7f8f 77 virtual void SetMerger(AliTOFMerger* merger);
78 virtual AliTOFMerger* Merger();
7e6dce66 79 //virtual void Hits2Digits();
517b7f8f 80 virtual void Hits2SDigits();
d61f73d9 81 virtual void Hits2SDigits(Int_t evNumber1, Int_t evNumber2);
c92eb8ad 82 virtual AliDigitizer* CreateDigitizer(AliRunDigitizer* manager) const;
7e6dce66 83 virtual void Digits2Reco() {};
84 void Digits2Raw ();
85 void Raw2Digits (){};
517b7f8f 86 virtual void ResetHits();
87 virtual void ResetDigits();
d61f73d9 88 virtual void ResetSDigits();
517b7f8f 89 TClonesArray *SDigits() const {return fSDigits;}
90 TClonesArray *ReconParticles() const {return fReconParticles;}
55991c8b 91 void RecreateSDigitsArray();
92 void CreateSDigitsArray();
0f4a7374 93 AliTOFGeometry *GetGeometry() const { return fTOFGeometry; };
55991c8b 94
b94fa26c 95protected:
68861244 96 TFolder* fFGeom ; // Folder that holds the Geometry definition
97 TTask* fDTask ; // TOF Digitizer container
98 TTask* fReTask; // TOF Reconstructioner container
7e6dce66 99 TClonesArray* fSDigits; //! List of summable digits
100 Int_t fNSDigits; //! Number of sdigits
517b7f8f 101 TClonesArray* fReconParticles; // List of reconstructed particles
7e6dce66 102 AliTOFMerger *fMerger; // ! pointer to merger
103
104 //Float_t fGapA; // Gap beetween tilted strip in A-type plate
105 //Float_t fGapB; // Gap beetween tilted strip in B-type plate
106
107 //Float_t fTimeRes; // Time resolution of the TOF
108 //Float_t fChrgRes; // Charge resolution of ADC
109
110 Int_t fIdSens; // The unique identifier for sensitive volume FPAD
111
112 Bool_t fTZero; // Flag indicating if T0 is used
0f4a7374 113 AliTOFGeometry *fTOFGeometry; //The TOF Geometry parameters
114
2cef3cb2 115private:
2cef3cb2 116
7e6dce66 117 // DAQ characteristics
118 // cfr. TOF-TDR pag. 105 for Glossary
119 // TARODA : TOF-ALICE Read Out and Data Acquisition system
120 enum {
121 kNDDL = 4, // Number of DDL (Detector Data Link) per sector
122 kNTRM = 10, // Number of TRM ( Readout Module) per DDL
123 kNTdc = 30, // Number of Tdc (Time to Digital Converter) per TRM
124 kNCh = 8 // Number of channels per Tdc
125 };
126
127 ClassDef(AliTOF,7) // Time Of Flight base class
fe4da5cc 128};
129
b94fa26c 130#endif /* ALITOF_H */