/[PAMELA software]/DarthVader/ToFLevel2/inc/ToFLevel2.h
ViewVC logotype

Contents of /DarthVader/ToFLevel2/inc/ToFLevel2.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.11 - (show annotations) (download)
Mon Jan 22 09:17:06 2007 UTC (17 years, 10 months ago) by mocchiut
Branch: MAIN
Changes since 1.10: +1 -1 lines
File MIME type: text/plain
Calorimeter selftrigger extensions upgrade

1 #ifndef ToFLevel2_h
2 #define ToFLevel2_h
3 //
4 #include <TObject.h>
5 #include <TArrayI.h>
6 #include <TArrayF.h>
7 #include <TClonesArray.h>
8
9 #include <ToFStruct.h>
10 //
11 // class which contains track related variables
12 //
13 #define ZTOF11 53.74
14 #define ZTOF12 53.04
15 #define ZTOF21 23.94
16 #define ZTOF22 23.44
17 #define ZTOF31 -23.49
18 #define ZTOF32 -24.34
19
20
21 class ToFPMT : public TObject {
22
23 private:
24
25 public:
26 Int_t pmt_id;
27 Float_t adc;
28 Float_t tdc_tw;
29 //
30 ToFPMT();
31 ToFPMT(const ToFPMT&);
32 //
33 ToFPMT* GetToFPMT(){return this;};
34 void Clear();
35
36
37
38 ClassDef(ToFPMT,1);
39 };
40
41
42 class ToFTrkVar : public TObject {
43
44 private:
45
46 public:
47 //
48 Int_t trkseqno; // tracker entry coming from tracker, 100 if image track is used, -100 if the track is not consistent with MyDetector2 one
49 //
50 Int_t npmttdc;
51 TArrayI pmttdc;
52 TArrayI tdcflag; // gf: 30 Nov 2006
53 Float_t beta[13];
54 //
55 Int_t npmtadc;
56 TArrayI pmtadc;
57 TArrayI adcflag; // gf: 30 Nov 2006
58 TArrayF dedx;
59 //
60 Float_t xtofpos[3];
61 Float_t ytofpos[3];
62 //
63 ToFTrkVar();
64 ToFTrkVar(const ToFTrkVar&);
65
66 ToFTrkVar* GetToFTrkVar(){return this;};
67 void Clear();
68
69 ClassDef(ToFTrkVar,1);
70 //
71 };
72
73 class ToFLevel2 : public TObject {
74 private:
75
76 public:
77 //
78 TClonesArray *PMT; // class needed to store PMT hit informations
79 TClonesArray *ToFTrk; // track related variable class
80 Int_t tof_j_flag[6];
81 Int_t unpackError;
82 //
83 Float_t GetdEdx(Int_t notrack, Int_t plane);
84 //
85 // methods to make life simplier during the analysis, returns a pointer to the ToFTrkVar class containing track related variables
86 //
87 Int_t ntrk(){return ToFTrk->GetEntries();};
88 Int_t npmt(){return PMT->GetEntries();};
89
90 //
91 void GetLevel2Struct(cToFLevel2 *) const;
92 //
93 ToFTrkVar *GetToFTrkVar(Int_t notrack);
94 ToFPMT *GetToFPMT(Int_t nohit);
95 Int_t GetPMTid(Int_t gg, Int_t hh);
96 TString GetPMTName(Int_t ind);
97 Int_t GetPlaneIndex(Int_t pmt_id);
98 void GetMatrix(Int_t notrack, Float_t adc[4][12], Float_t tdc[4][12]);
99 void GetPMTIndex(Int_t pmt_id, Int_t &gg, Int_t &hh);
100 //
101 // constructor
102 //
103 ToFLevel2();
104 ~ToFLevel2(){Delete();}; //ELENA
105 void Delete(); //ELENA
106 void Set();//ELENA
107 //
108 //
109 ToFLevel2* GetToFLevel2(){return this;};
110 Float_t GetZTOF(Int_t plane_id){
111 switch(plane_id){
112 case 11: return ZTOF11;
113 case 12: return ZTOF12;
114 case 21: return ZTOF21;
115 case 22: return ZTOF22;
116 case 31: return ZTOF31;
117 case 32: return ZTOF32;
118 default: return 0.;
119 };
120 };
121
122 //
123 // Paddles position
124 //
125 /*
126 S11 8 paddles 33.0 x 5.1 cm
127 S12 6 paddles 40.8 x 5.5 cm
128 S21 2 paddles 18.0 x 7.5 cm
129 S22 2 paddles 15.0 x 9.0 cm
130 S31 3 paddles 15.0 x 6.0 cm
131 S32 3 paddles 18.0 x 5.0 cm
132 */
133
134 Int_t GetToFPlaneID(Int_t ip);
135 Int_t GetToFPlaneIndex(Int_t plane_id);
136 Bool_t HitPaddle(Int_t ,Int_t);
137 Int_t GetNHitPaddles(Int_t plane);
138 void Clear();
139 //
140 ClassDef(ToFLevel2,2);
141 };
142
143 #endif

  ViewVC Help
Powered by ViewVC 1.1.23