GammaWare  Head Version for release 0.9
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
MyTree.h
Go to the documentation of this file.
1 /***************************************************************************
2  * Copyright (C) 2010 by Olivier Stezowski *
3  * stezow(AT)ipnl.in2p3.fr *
4  * *
5  * This program is free software; you can redistribute it and/or modify *
6  * it under the terms of the GNU General Public License as published by *
7  * the Free Software Foundation; either version 2 of the License, or *
8  * (at your option) any later version. *
9  * *
10  * This program is distributed in the hope that it will be useful, *
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13  * GNU General Public License for more details. *
14  * *
15  * You should have received a copy of the GNU General Public License *
16  * along with this program; if not, write to the *
17  * Free Software Foundation, Inc., *
18  * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
19  ***************************************************************************/
20 
21 #ifndef _MyTree
22 #define _MyTree
23 
24 #include "TTreeWatchers.h"
25 #include "AgataKeyFactory.h"
26 #include "DanteWatchers.h"
27 #include "TrackedWatchers.h"
28 #include "EventPSAWatchers.h"
29 #include "EventWatchers.h"
30 
31 #ifndef Gw_AgataGeometryTransformer
33 #endif
34 
36 
43 class DoMyKeyTree : public Watcher, public TTreeBuilder
44 {
45 private:
47  SharedFP *fFrame;
49  const AgataKey *fKey;
50 private:
52  UInt_t fEventNumber;
53  ULong64_t fTimestamp;
54 
55 protected:
57  virtual void SetBranches();
58 
59 public:
60  DoMyKeyTree(const char *name, const char *title, TTree *tree = 0x0);
61  virtual ~DoMyKeyTree()
62  {;}
63 
65  virtual Bool_t SetTrigger( ADF::DFTrigger * /*trigger*/ = 0x0 );
66 
68  virtual void Exec(Option_t *option="");
69 
70  ClassDef(DoMyKeyTree,0) // built a root tree for the key part
71 };
72 
73 
75 
79 {
80 protected:
81  ULong64_t fTimestamp;
82 
83 protected:
84  virtual void SetBranches();
85 
86 public:
87  DoMyRawAncillaryTree(const char *name, const char *title, TTree *tree = 0x0);
88  virtual ~DoMyRawAncillaryTree();
89 
91  virtual void Exec(Option_t *option="");
92 
93  ClassDef(DoMyRawAncillaryTree,0) // built a raw root tree for the ancillary part
94 };
95 
97 
100 {
101 protected:
102  ULong64_t fTimestamp;
103 
104 private:
105  Float_t DR; // the data to be set in the tree
106  Float_t DTheta;
107  Float_t DPhi;
108 
109 protected:
110  virtual void SetBranches();
111 
112 public:
113  DoMyAncillaryTree(const char *name, const char *title, TTree *tree = 0x0);
114  virtual ~DoMyAncillaryTree();
115 
117  virtual void Exec(Option_t *option="");
118 
119  ClassDef(DoMyAncillaryTree,0) // built a root tree for the ancillary part
120 };
121 
123 
126 {
127 private:
129  VertexBuilder *fVertexBuilder;
130 
131 protected:
132  ULong64_t fTimestamp;
133 
134 private:
135  static const Int_t MaxGamma = 500;
136  Int_t number_of_gammas; //
137  Float_t gammaE[MaxGamma];
138  Float_t gammaEDC[MaxGamma];
139  Float_t gammaX1[MaxGamma];
140  Float_t gammaY1[MaxGamma];
141  Float_t gammaZ1[MaxGamma];
142  Float_t gammaX2[MaxGamma];
143  Float_t gammaY2[MaxGamma];
144  Float_t gammaZ2[MaxGamma];
145 
146 protected:
147  virtual void SetBranches();
148 
149 public:
150  DoMyTrackTree(const char *name, const char *title, TTree *tree = 0x0);
151  virtual ~DoMyTrackTree();
152 
154  virtual void Exec(Option_t *option="");
155 
156  ClassDef(DoMyTrackTree,0) // built a root tree for the gamma part
157 };
158 
160 
163 {
164 
165 private:
166  VertexBuilder *fVertexBuilder;
167 
168 protected:
169  ULong64_t fTimestamp;
171 
172 private:
173  static const Int_t MaxHits = 500;
174  Int_t number_of_hits; //Total hit number in AGATA
175  Int_t mult_gamma; //for more than 1 frame (built event)
176  Float_t hitE[MaxHits];
177  Float_t hitX[MaxHits];
178  Float_t hitY[MaxHits];
179  Float_t hitZ[MaxHits];
180  Int_t hit_per_cryst[MaxHits]; //Number of hit for each psa frame, for each cryst ID
181  Int_t hitId[MaxHits];
182  Int_t hitSg[MaxHits];
183  Float_t coreE0[MaxHits];
184  Float_t coreE1[MaxHits];
185 
186  Float_t MhitX[MaxHits]; //Position x of hit with , in global frame
187  Float_t MhitY[MaxHits]; //Position y of hit with , in global frame
188  Float_t MhitZ[MaxHits]; //Position z of hit with , in global frame
189  Float_t velDop[MaxHits]; //Beta for the doppler correction
190  Float_t coreDE0[MaxHits]; //Doppler with position from Hit with Max E
191  Float_t coreDE1[MaxHits]; //Doppler with position from Hit with Max E
192 
193 
194  // Spectra on the Hit tree. Used here since no tracking yet.
195  TH1 *fIdSpectra;
196  TH1 *fSumSpectra;
197  TH3F *fhitAgata; // spectra with some position in agata ref: wall, target, Gamma
198 
199 
200 protected:
202  virtual Double_t DoDopplerCorrection(const TrackedHit *hit, VertexInterface *vertex);
203 
204  virtual void SetBranches();
205 
206 
207 public:
208  DoMyHitTree(const char *name, const char *title, TTree *tree = 0x0);
209  virtual ~DoMyHitTree();
210 
212  virtual void Exec(Option_t *option="");
213 
215  void FillSpectraByUser();
216 
217  ClassDef(DoMyHitTree,0) // built a root tree for the gamma part
218 };
219 
221 
224 {
225 protected:
226  Float_t fTSCoinc;
227 
228 protected:
229  virtual void SetBranches();
230 
231 public:
232  DoMyCoincTree(const char *name, const char *title, TTree *tree = 0x0);
233  virtual ~DoMyCoincTree();
234 
236  virtual void Exec(Option_t *option="");
237 
238  ClassDef(DoMyCoincTree,0) // quantities compted from coincidences between agata and ancillary
239 };
240 
241 #endif
242 
virtual Bool_t SetTrigger(ADF::DFTrigger *=0x0)
set the trigger on the main Frame whatever it is
Definition: MyTree.C:35
DoMyTrackTree(const char *name, const char *title, TTree *tree=0x0)
Definition: MyTree.C:163
virtual void SetBranches()
add branches to the ttree.
Definition: MyTree.C:53
virtual void SetBranches()
Definition: MyTree.C:132
Interface for any watcher that is a VertexBuilder.
virtual Double_t DoDopplerCorrection(const TrackedHit *hit, VertexInterface *vertex)
Do Doppler taking into account additionnal offset of the agata position (see SetAgataOffset) ...
Definition: MyTree.C:465
built a root tree for the tracked part
Definition: MyTree.h:162
AgataGeometryTransformer * fTrans
Definition: MyTree.h:170
Interface to AgataKey.
built a root tree for the ancillary part
Definition: MyTree.h:78
ULong64_t fTimestamp
Definition: MyTree.h:132
Base for a watcher on an ancillary (raw) frame.
virtual ~DoMyRawAncillaryTree()
Definition: MyTree.C:96
built a root tree for the ancillary part
Definition: MyTree.h:99
AgataGeometryTransformer class that manage geometry transformations.
void FillSpectraByUser()
Filling the spectra.
Definition: MyTree.C:490
Base class for a Watcher.
Definition: Watchers.h:60
virtual void SetBranches()
Definition: MyTree.C:176
built branches for coincidence between agata and ancillary
Definition: MyTree.h:223
built a root tree for the tracked part
Definition: MyTree.h:125
Base class for a Watcher that fill a TTree or some branches of a TTree.
Definition: TTreeWatchers.h:51
virtual void SetBranches()
Definition: MyTree.C:87
DoMyKeyTree(const char *name, const char *title, TTree *tree=0x0)
Definition: MyTree.C:27
ULong64_t fTimestamp
Definition: MyTree.h:81
virtual ~DoMyTrackTree()
Definition: MyTree.C:191
Base Watcher working for any event:data.
header file for AgataKeyFactory.cpp
Base class for Dante Watcher.
Definition: DanteWatchers.h:90
virtual ~DoMyAncillaryTree()
Definition: MyTree.C:128
virtual void Exec(Option_t *option="")
watch the current frame
Definition: MyTree.C:303
It is a hit associated to a list of Hits.
Definition: Hits.h:256
built a tree with the event # and the timestamp of the main Frame
Definition: MyTree.h:43
DoMyAncillaryTree(const char *name, const char *title, TTree *tree=0x0)
Definition: MyTree.C:119
A Shared Frame Pointer.
Definition: Frame.h:597
virtual void Exec(Option_t *option="")
watch the current frame
Definition: MyTree.C:195
virtual ~DoMyHitTree()
Definition: MyTree.C:275
DoMyHitTree(const char *name, const char *title, TTree *tree=0x0)
Definition: MyTree.C:238
DoMyCoincTree(const char *name, const char *title, TTree *tree=0x0)
Definition: MyTree.C:499
Base class for a trigger on a data flow.
Definition: Trigger.h:155
virtual ~DoMyKeyTree()
Definition: MyTree.h:61
virtual void SetBranches()
Definition: MyTree.C:279
virtual void Exec(Option_t *option="")
watch the current frame
Definition: MyTree.C:100
ULong64_t fTimestamp
Definition: MyTree.h:169
ULong64_t fTimestamp
Definition: MyTree.h:102
DoMyRawAncillaryTree(const char *name, const char *title, TTree *tree=0x0)
Definition: MyTree.C:79
virtual void Exec(Option_t *option="")
watch the current frame
Definition: MyTree.C:139
virtual void SetBranches()
Definition: MyTree.C:511
*********************************** EventPSAWatcher Class **************************************/// ...
virtual void Exec(Option_t *option="")
watch the current frame
Definition: MyTree.C:517
Float_t fTSCoinc
Definition: MyTree.h:226
Base Watcher working for any kind of Trackek Frame (Frame interface) and.
virtual ~DoMyCoincTree()
Definition: MyTree.C:507
virtual void Exec(Option_t *option="")
watch the current frame
Definition: MyTree.C:59