GammaWare  Head Version for release 0.9
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
MyTree.C
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 
22 #include "MyTree.h"
23 #include "TSystem.h"
24 
26 
27 DoMyKeyTree::DoMyKeyTree(const char *name, const char *title, TTree *tree) :
28  Watcher(name,title), TTreeBuilder(name,title,tree)
29 {
30  if ( GetTree() ) { // just add the branch for that watcher
31  SetBranches();
32  }
33 }
34 
36 {
37  // Action once a the Frame is passed to this
38  fFrame = trigger->GetInputSharedFP();
39 
40  // unset the frame to be treated
41  if ( fFrame == 0x0 )
42  return false;
43 
44  // trigger and Frame set,
45  fKey = dynamic_cast<const AgataKey *>(fFrame->GetFrame()->GetKey());
46 
47  if ( fKey == 0x0 )
48  { return false; }
49  else
50  { return true; }
51 }
52 
54 {
55  GetTree()->Branch("EventNumber", &fEventNumber, "evnumber/i");
56  GetTree()->Branch("TimeStamp", &fTimestamp, "timestamp/l");
57 }
58 
59 void DoMyKeyTree::Exec(Option_t * /*option*/)
60 {
61  // for debugging purpose
62  if ( gDebug > 3 )
63  printf("DoMyKeyTree::Exec is called \n");
64 
65  // be sure the frame has been set properly
66  if ( fFrame == 0x0 || !fFrame->IsValid() )
67  { SetLastExecStatus(1); return; }
68 
69  // get event # and timestamp from the key and fill the tree
70  fEventNumber = fKey->GetEventNumber();
71  fTimestamp = fKey->GetTimeStamp();
72 
73  // fill the tree only if this is the owner of the tree ... otherwise by TreeMaster
74  FillTree();
75 }
76 
78 
79 DoMyRawAncillaryTree::DoMyRawAncillaryTree(const char *name, const char *title, TTree *tree) :
80  RancLegnaroWatcher(name,title), TTreeBuilder(name,title,tree)
81 {
82  if ( GetTree() ) { // just add the branch for that watcher
83  SetBranches();
84  }
85 }
86 
88 {
89  GetTree()->Branch("lenrawBuf", &lenrawBuf, "lenrawBuf/I");
90  GetTree()->Branch("rawBuf", rawBuf, "rawBuf[lenrawBuf]/F");
91 
92  GetTree()->Branch("TSanc", &fTimestamp, "TSanc/l");
93 
94 }
95 
97 {
98 }
99 
100 void DoMyRawAncillaryTree::Exec(Option_t *option)
101 {
102  if ( gDebug > 3 )
103  printf("DoMyRawAncillaryTree::Exec is called \n");
104 
105  // be sure the frame has been set properly
106  if ( fFrame == 0x0 || !fFrame->IsValid() )
107  { SetLastExecStatus(1); return; }
108 
109  fTimestamp = ((AgataKey *)fFrame->GetFrame()->GetKey())->GetTimeStamp();
110 
111  // filling the raw buffer is done in the base class
112  RancLegnaroWatcher::Exec(option);
113  // fill the tree only if this is the owner of the tree ... otherwise by TreeMaster
114  FillTree();
115 }
116 
118 
119 DoMyAncillaryTree::DoMyAncillaryTree(const char *name, const char *title, TTree *tree) :
120  BaseDanteWatcher(name,title), TTreeBuilder(name,title,tree)
121 {
122  if ( GetTree() ) { // just add the branch for that watcher
123  SetBranches();
124 
125  }
126 }
127 
129 {
130 }
131 
133 {
134  GetTree()->Branch("DR",&DR,"DR/F");
135  GetTree()->Branch("DTheta",&DTheta,"DTheta/F");
136  GetTree()->Branch("DPhi",&DPhi,"DPhi/F");
137 }
138 
139 void DoMyAncillaryTree::Exec(Option_t *option)
140 {
141  if ( gDebug > 3 )
142  printf("DoAncillaryTree::Exec is called \n");
143 
144  // be sure the frame has been set properly
145  if ( fFrame == 0x0 || !fFrame->IsValid() )
146  { SetLastExecStatus(1); return; }
147 
148  // filling the raw buffer is done in the base class
149  RancLegnaroWatcher::Exec(option);
150 
151  // Compute from the Recoil velocity from Dante
152  /*
153  TVector3 vtmp(fDante[i].Xr,fDante[i].Yr,fDante[i].Zr);
154  DR = vtmp.Mag();
155  DTheta = vtmp.Theta();
156  DPhi = vtmp.Phi(); */
157  // fill the tree only if this is the owner of the tree ... otherwise by TreeMaster
158  FillTree();
159 }
160 
162 
163 DoMyTrackTree::DoMyTrackTree(const char *name, const char *title, TTree *tree) :
164  TrackedWatcher(name,title),
165  TTreeBuilder(name,title,tree),
166  fVertexBuilder(0x0)
167 {
168  // Vertex used for doppler correction, last registered
169  fVertexBuilder = VertexBuilder::theCurrentVertexBuilder();
170 
171  if ( GetTree() ) { // just add the branch for that watcher
172  SetBranches();
173  }
174 }
175 
177 {
178  GetTree()->Branch("number_of_gammas",&number_of_gammas,"number_of_gammas/I");
179  GetTree()->Branch("gammaE", gammaE, "gammaE[number_of_gammas]/F");
180  GetTree()->Branch("gammaEDC", gammaEDC, "gammaEDC[number_of_gammas]/F");
181  GetTree()->Branch("gammaX1",gammaX1,"gammaX1[number_of_gammas]/F");
182  GetTree()->Branch("gammaY1",gammaY1,"gammaY1[number_of_gammas]/F");
183  GetTree()->Branch("gammaZ1",gammaZ1,"gammaZ1[number_of_gammas]/F");
184  GetTree()->Branch("gammaX2",gammaX2,"gammaX2[number_of_gammas]/F");
185  GetTree()->Branch("gammaY2",gammaY2,"gammaY2[number_of_gammas]/F");
186  GetTree()->Branch("gammaZ2",gammaZ2,"gammaZ2[number_of_gammas]/F");
187 
188  GetTree()->Branch("TStrack", &fTimestamp, "TStrack/l");
189 }
190 
192 {
193 }
194 
195 void DoMyTrackTree::Exec(Option_t * /*option*/)
196 {
197  // be sure the frame has been set properly
198  if ( fFrame == 0x0 || !fFrame->IsValid() )
199  { SetLastExecStatus(1); return; }
200 
201  fTimestamp = ((AgataKey *)fFrame->GetFrame()->GetKey())->GetTimeStamp();
202 
203  // to get the data part of the frame
204  const GammaTrackedInterface *data =
205  GetCstDataPointer<GammaTrackedInterface>(fFrame);
206  VertexInterface *vertex = fVertexBuilder->GetVertex();
207 
208  // now fill the tree
209  number_of_gammas = data->GetNbGamma();
210  for (UShort_t i = 0u; i < number_of_gammas; i++) {
211 
212  const TrackedHit *gamma1 = data->GetGamma(i);
213 
214  gammaE[i] = gamma1->GetE();
215  gammaEDC[i] = DoDopplerCorrection(gamma1, vertex);
216 
217  gammaX1[i] = gamma1->GetX();
218  gammaY1[i] = gamma1->GetY();
219  gammaZ1[i] = gamma1->GetZ();
220 
221  if ( gamma1->GetHit(1) ) {
222  gammaX2[i] = gamma1->GetHit(1)->GetX();
223  gammaY2[i] = gamma1->GetHit(1)->GetY();
224  gammaZ2[i] = gamma1->GetHit(1)->GetZ();
225  }
226  else {
227  gammaX2[i] = gamma1->GetX();
228  gammaY2[i] = gamma1->GetY();
229  gammaZ2[i] = gamma1->GetZ();
230  }
231  }
232  FillTree();
233 }
234 
235 
237 
238 DoMyHitTree::DoMyHitTree(const char *name, const char *title, TTree *tree) :
239  EventPSAWatcher(name,title),
240  TTreeBuilder(name,title,tree),
241  fVertexBuilder(0x0),
242  fTrans(0x0)
243 {
244  fVertexBuilder = VertexBuilder::theCurrentVertexBuilder();
245  if ( fVertexBuilder == 0x0 )
246  std::cout << "Should not be NULL " << std::endl;
247 
249  if ( gSystem->AccessPathName("CrystalPositionLookUpTable") ) { // does not exist
250  if ( gSystem->AccessPathName("CrystalPositionLookUpTable.dat") ) {
251  fLog << error << " CrystalPositionLookUpTable required " << nline;
252  }
253  else {
254  fLog << info << " Ge positions extracted from CrystalPositionLookUpTable.dat " << nline;
255  fTrans->ReadTransformations("CrystalPositionLookUpTable.dat");
256  }
257  }
258  else {
259  fLog << info << " Ge positions extracted from CrystalPositionLookUpTable.dat " << nline;
260  fTrans->ReadTransformations("CrystalPositionLookUpTable");
261  }
262 
263  if ( GetTree() ) { // just add the branch for that watcher
264  SetBranches();
265  }
266 
267  // create spetra
268  fIdSpectra = MakeTH1<TH1F>("hit_ID_spectra","Spectra of the ID ",100,0,100);
269  fSumSpectra = MakeTH1<TH1F>("SumSpectra","Sum of all core energy ",4096,0,4096);
270  fhitAgata = MakeTH3<TH3F>("hitDW","Tracking from TaDSSD to WallD ;x;y;z",100,-200.,200.,100,-200.,200.,200,-4000.,4000.);
271 
272 
273 }
274 
276 {
277 }
278 
280 {
281  GetTree()->Branch("number_of_hits",&number_of_hits,"number_of_hits/I");
282  GetTree()->Branch("mult_gamma",&mult_gamma,"mult_gamma/I");
283  GetTree()->Branch("hitE",hitE,"hitE[number_of_hits]/F");
284  GetTree()->Branch("hitX",hitX,"hitX[number_of_hits]/F");
285  GetTree()->Branch("hitY",hitY,"hitY[number_of_hits]/F");
286  GetTree()->Branch("hitZ",hitZ,"hitZ[number_of_hits]/F");
287  GetTree()->Branch("hit_per_cryst",hit_per_cryst,"hit_per_cryst[number_of_hits]/I");
288  GetTree()->Branch("hitId",hitId,"hitId[number_of_hits]/I");
289  GetTree()->Branch("hitSg",hitSg,"hitSg[number_of_hits]/I");
290  GetTree()->Branch("coreE0",coreE0,"coreE0[number_of_hits]/F");
291  GetTree()->Branch("coreE1",coreE1,"coreE1[number_of_hits]/F");
292 
293  GetTree()->Branch("MhitX",MhitX,"MhitX[number_of_hits]/F");
294  GetTree()->Branch("MhitY",MhitY,"MhitY[number_of_hits]/F");
295  GetTree()->Branch("MhitZ",MhitZ,"MhitZ[number_of_hits]/F");
296  GetTree()->Branch("velDop",velDop,"velDop[number_of_hits]/F");
297  GetTree()->Branch("coreDE0",coreDE0,"coreDE0[number_of_hits]/F");
298  GetTree()->Branch("coreDE1",coreDE1,"coreDE1[number_of_hits]/F");
299 
300  GetTree()->Branch("TSHit", &fTimestamp, "TSHit/l");
301 }
302 
303 void DoMyHitTree::Exec(Option_t * /*option*/)
304 {
305 // cout << "Exec MyhitTree " << endl;
306  // be sure the frame has been set properly
307  if ( fFrame == 0x0 || !fFrame->IsValid() )
308  { cout << "non valid " << endl; SetLastExecStatus(1u); return; }
309  if ( !fFrame->IsValid()){ //For empty event:data:psa purpose
310  number_of_hits =0;
311  mult_gamma =0;
312  for(int i=0; i<MaxHits ; i++) {//empty array coreE0 coreE1
313  coreE0[i]=-1;
314  coreE1[i]=-1;
315  velDop[i]=-1;
316  coreDE0[i]=-1;
317  coreDE1[i]=-1;
318  }
319  return;
320  }
321 
322  fTimestamp = ((AgataKey *)fFrame->GetFrame()->GetKey())->GetTimeStamp();
323 
324  Double_t max_e = 0.0;
325  Double_t xLocal, yLocal, zLocal, xGlobal, yGlobal, zGlobal, xt,yt,zt; TrackedHitImp<EHit,EHit> gamma;
326  // the vertex used for doppler correction
327  VertexInterface *vertex = 0x0;
328  vertex = fVertexBuilder->GetVertex();
329 
330 
331  //Multiplicity gamma in case if more than one frame per event
332  mult_gamma=0;
333 
334  // Get beta0 for doppler correction
335  Float_t beta0 =-1;
336  // Nb_of hits per crystals
337  Int_t nb_hits =-1;
338  if ( vertex ) {
339  beta0=vertex->GetBeta();
340  }
341 
342  //Initialisation:
343  //--Init total number of hit per event
344  number_of_hits = 0;
345 
346  for(UInt_t i = 0u; i < GetNbFramePSA(); ++i) {
347  mult_gamma++;
348 
349  PSAInterface *data = GetDataPSA(i);
350  max_e = 0.0;
351  nb_hits =0;
352 
353  //Fill spectra
354  fIdSpectra->Fill(data->GetUID());
355  fSumSpectra->Fill(data->GetE());
356 
357 
358 
359  // First loop on the hit
360  // to get over the hits with the max of the energy, and set the energy to the core
361  // and the number of hits per crystal
362  for (Int_t j = 0; j < data->GetNbHits(); ++j) {
363  const PSAHit* pHit = (PSAHit*)data->GetHit(j);
364 
365  // Now look for the hit with the highest energy, taken for Doppler correction
366  // Kind of tracking in crystal
367  //
368  //Get hit position
369  pHit->GetXYZ(xLocal, yLocal, zLocal);
370  //To the AGATA global ref
371  fTrans->Local2Global(data->GetUID(), xLocal, yLocal, zLocal, xGlobal, yGlobal, zGlobal);
372 
373 
374  if ( pHit->GetE() > max_e ) {
375  gamma.SetXYZ(-yGlobal, -xGlobal, zGlobal); //x,y,z->-y,-x,-z
376  max_e = pHit->GetE();
377  }
378 
379  // High gain core as gamma energy
380  gamma.SetE(data->GetE());
381 
382  //Increment number of hit per crystal:
383  nb_hits++;
384  }
385 
386 
387  //Second loop on the hit, for all treatment and gamma
388  for (Int_t j = 0; j < data->GetNbHits(); ++j) {
389 
390  const PSAHit* pHit = (PSAHit*)data->GetHit(j);
391 
392  hitE[number_of_hits] = pHit->GetE();
393  hitX[number_of_hits] = pHit->GetX();
394  hitY[number_of_hits] = pHit->GetY();
395  hitZ[number_of_hits] = pHit->GetZ();
396  hit_per_cryst[number_of_hits] = nb_hits;
397  hitId[number_of_hits] = data->GetUID() ;
398  hitSg[number_of_hits] = pHit->GetID();
399  coreE0[number_of_hits] = data->GetE();
400  coreE1[number_of_hits] = data->GetE(1u);
401 
402  //Get hit position
403  pHit->GetXYZ(xLocal, yLocal, zLocal);
404  //To the AGATA global ref
405  fTrans->Local2Global(data->GetUID(), xLocal, yLocal, zLocal, xGlobal, yGlobal, zGlobal);
406 
407  // Set the Position of the hit in global ref of PRESPEC
408  MhitX[number_of_hits]= yGlobal; // inversion X-Y and opposite direction
409  MhitY[number_of_hits]= xGlobal; // inversion Y-X and opposite direction
410  MhitZ[number_of_hits]= zGlobal; // z
411  fhitAgata->Fill(yGlobal,xGlobal, zGlobal);
412 
413 
414 
415  if ( vertex &&beta0>0 && beta0<1) {
416 
417  // Get the proper LyccaVertec pointer
418  vertex->GetPosition(xt,yt,zt);
419 
420  fhitAgata->Fill(xt,yt,zt);
421  }
422 
423  //High gain core
424  gamma.SetE(data->GetE());
425  if ( vertex ) {
426  Double_t edc = DoDopplerCorrection(&gamma,vertex);
427  coreDE0[number_of_hits] = edc;
428  velDop[number_of_hits] = beta0;
429  }
430  else coreDE1[number_of_hits] = -1; //if there is no vertex, no energy
431 
432 
433  // Low gain core
434  gamma.SetE(data->GetE(1u));
435  if ( vertex ) {
436  Double_t edc = DoDopplerCorrection(&gamma,vertex);
437  coreDE1[number_of_hits] = edc;
438  }
439  else coreDE1[number_of_hits] = -1; //if there is no vertex, no energy
440 
441 
442 
443  number_of_hits++;
444 
445  if ( number_of_hits == 500 ) {
446  SetLastExecStatus(1u);
447  cout << "merdaasse" <<endl;
448  break;
449  }
450 
451 
452  } // j, hit loop
453 
454 
455  if ( number_of_hits == 500 )
456  fLog << error << " Number of Hits to hit in ! " << number_of_hits << nline;
457 
458 
459  } // end loop over PSA frame
460  FillTree();
461 
462 }
463 
464 
466 {
467  Double_t e = hit->GetE(), beta = vertex->GetBeta(), gamma = vertex->GetGamma();
468 
469  Double_t px, py, pz, dx, dy, dz;
470  vertex->GetPosition (px, py, pz);
471  vertex->GetDirection(dx, dy, dz);
472 
473 // std::cout << " " << px << " " << py << " " << pz <<std::endl;
474 // std::cout << " " << dx << " " << dy << " " << dz <<std::endl;
475 
476  Double_t x = hit->GetX() - px;
477  Double_t y = hit->GetY() - py;
478  Double_t z = hit->GetZ() - pz;
479 
480  Double_t dd = x*x + y*y + z*z;
481  if( !(dd == 0.0) ) {
482  Double_t cosTheta = (x*dx + y*dy + z*dz)/::sqrt(dd);
483  e = VertexInterface::DopplerCorrection(e,beta,gamma,cosTheta);
484  }
485  else e = -1.0;
486 
487  return e;
488 }
489 
491 {
492  //Nothing yet.
493 }
494 
495 
496 
498 
499 DoMyCoincTree::DoMyCoincTree(const char *name, const char *title, TTree *tree)
500 : EventWatcher(name,title), TTreeBuilder(name,title,tree)
501 {
502  if ( GetTree() ) { // just add the branch for that watcher
503  SetBranches();
504  }
505 }
506 
508 {
509 }
510 
512 {
513  // cout << " SetBranches\t"<< fTSCoinc << endl;
514  GetTree()->Branch("TSDiff", &fTSCoinc, "TSDiff/F");
515 }
516 
517 void DoMyCoincTree::Exec(Option_t *option)
518 {
519  // to get the main key
520  AgataKey * mainkey = dynamic_cast<AgataKey *> (GetTrigger()->GetInputFrame(0u)->GetKey()), *subkey = 0x0;
521 
522  fTSCoinc = 0;
523 
524  // loop on subframes and compute the timestamp differences
525  for(UInt_t which = 1u; which < GetTrigger()->GetNbInputFrame(); which++){
526 
527  SharedFP *fp = GetTrigger()->GetInputSharedFP(which);
528  if ( fp == 0x0 || !fp->IsValid() )
529  continue;
530 
531  // the subkey
532  subkey = dynamic_cast<AgataKey *> (GetTrigger()->GetInputFrame(which)->GetKey());
533  break;
534  }
535  if ( subkey ) {
536  fTSCoinc = subkey->GetTimeStamp() - mainkey->GetTimeStamp();
537  }
538 
539  // fill the tree only if this is the owner of the tree ... otherwise by TreeMaster
540  FillTree();
541 }
542 
543 
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 Bool_t IsValid() const
true if it is a valid pointer
Definition: Frame.h:616
virtual void GetDirection(Double_t &, Double_t &, Double_t &, Double_t=0.0) const =0
get the direction of the source (last argument is used in case the position depends on time) ...
virtual VertexInterface * GetVertex()
Get the vertex data interface.
virtual UShort_t GetNbHits() const =0
To know the number of Hits currently on the stack.
virtual Key * GetKey()=0
To get the Key associated to this frame.
virtual Double_t DoDopplerCorrection(const TrackedHit *hit, VertexInterface *vertex)
Do Doppler taking into account additionnal offset of the agat position (see SetAgataOffset) ...
printf("******************************************************************** \n")
virtual Frame * GetFrame() const
Definition: Frame.h:625
UInt_t GetNbFramePSA()
number of PSA Frames extracted from the current event
virtual Double_t GetY() const
Definition: Hits.h:57
virtual void SetBranches()
add branches to the ttree.
Definition: MyTree.C:53
virtual void SetBranches()
Definition: MyTree.C:132
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
LogMessage & error(LogMessage &)
virtual void GetPosition(Double_t &, Double_t &, Double_t &, Double_t=0.0) const =0
get the position of the source (last argument is used in case the position depends on time) ...
built a root tree for the tracked part
Definition: MyTree.h:162
virtual Double_t GetE(UInt_t=0u) const =0
to get the energy associated to the core
AgataGeometryTransformer * fTrans
Definition: MyTree.h:170
virtual Double_t GetE() const
Definition: Hits.h:67
virtual Int_t GetUID() const =0
to get the crystal ID
Interface to AgataKey.
virtual SharedFP * GetInputSharedFP(UInt_t which=0u)=0
to get back the Shared pointer that define this trigger
The tracking algorithm produces a stack of TrackedHits.
Definition: TrackedFrame.h:41
virtual TrackedHit * GetGamma(UShort_t) const =0
To get the current number of gammas in the stack.
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
LogMessage & nline(LogMessage &)
built a root tree for the ancillary part
Definition: MyTree.h:99
virtual Double_t GetX() const
Definition: Hits.h:146
AgataGeometryTransformer class that manage geometry transformations.
virtual Double_t GetE() const
Definition: Hits.h:158
void FillSpectraByUser()
Filling the spectra.
Definition: MyTree.C:490
virtual ULong64_t GetTimeStamp() const =0
To set the timestamp.
virtual Double_t GetBeta(Double_t=0.0) const =0
get recoil velocity
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
virtual UInt_t GetNbInputFrame() const =0
number of input frames that define this trigger
built a root tree for the tracked part
Definition: MyTree.h:125
void SetLastExecStatus(Short_t s=0)
reset last status. 0 means no error, 0 < means error, > 0 means ok with conditions ...
Definition: Watchers.h:294
LogMessage & info(LogMessage &)
manipulator to modify the LogMessage
Base class for a Watcher that fill a TTree or some branches of a TTree.
Definition: TTreeWatchers.h:51
LogMessage fLog
Definition: Watchers.h:86
virtual void SetBranches()
Definition: MyTree.C:87
virtual UInt_t GetEventNumber() const =0
To get the event number encoded.
DoMyKeyTree(const char *name, const char *title, TTree *tree=0x0)
Definition: MyTree.C:27
ULong64_t fTimestamp
Definition: MyTree.h:81
virtual Frame * GetInputFrame(UInt_t which=0u)=0
to get back the frames that define this trigger
virtual Double_t GetZ() const
Definition: Hits.h:150
virtual ~DoMyTrackTree()
Definition: MyTree.C:191
Base Watcher working for any event:data.
Base class for Dante Watcher.
Definition: DanteWatchers.h:90
virtual ~DoMyAncillaryTree()
Definition: MyTree.C:128
virtual void SetXYZ(Double_t x, Double_t y, Double_t z)
Definition: Hits.h:314
virtual void SetE(Double_t e)
Definition: Hits.h:321
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
virtual Double_t GetX() const
Definition: Hits.h:55
DoMyAncillaryTree(const char *name, const char *title, TTree *tree=0x0)
Definition: MyTree.C:119
PSAInterface * GetDataPSA(UInt_t which)
To get one by one the PSA Frames in one event (It fills fFramePSA). Read has beed called ! ...
A Shared Frame Pointer.
Definition: Frame.h:597
virtual void Exec(Option_t *option="")
watch the current frame
Definition: MyTree.C:195
virtual Double_t GetGamma(Double_t=0.0) const
Definition: MetaFrame.h:77
ADF::SharedFP * fFrame
virtual Int_t GetID(Int_t which_id=0) const
get crystal/segment id. if which_id > 0, get crystal ID.
Definition: PSAFrame.h:96
virtual void FillTree()
Fill the tree if it is the owner of the tree.
virtual ~DoMyHitTree()
Definition: MyTree.C:275
DoMyHitTree(const char *name, const char *title, TTree *tree=0x0)
Definition: MyTree.C:238
Float_t rawBuf[gMaxSlots *gMaxChannels+gExtraSize]
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
Bool_t ReadTransformations(const TString fileName)
read transformations file
virtual void Exec(Option_t *option="")
watch the current frame
ClassImp(DoMyKeyTree)
ADF::LogMessage & endl(ADF::LogMessage &log)
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
virtual Double_t GetZ() const
Definition: Hits.h:59
virtual UShort_t GetNbGamma() const =0
To get the current number of gammas in the stack.
DoMyRawAncillaryTree(const char *name, const char *title, TTree *tree=0x0)
Definition: MyTree.C:79
SharedFP * fFrame
main frame i.e. event:data:psa
virtual void Exec(Option_t *option="")
watch the current frame
Definition: MyTree.C:139
Concrete implementation of a tracked Hit.
Definition: Hits.h:279
virtual void SetBranches()
Definition: MyTree.C:511
virtual ADF::DFTrigger * GetTrigger() const
To know the trigger in which the frame to be watched is embedded.
Definition: Watchers.h:360
*********************************** EventPSAWatcher Class **************************************/// ...
virtual Double_t GetY() const
Definition: Hits.h:148
virtual Hit * GetHit(UShort_t)=0
To get back a particular Hit (already on the stack !)
virtual void Exec(Option_t *option="")
watch the current frame
Definition: MyTree.C:517
Float_t fTSCoinc
Definition: MyTree.h:226
void Local2Global(Int_t detID, Double_t xl, Double_t yl, Double_t zl, Double_t &xg, Double_t &yg, Double_t &zg) const
Transform point from the local reference frame of the detection id to the global reference frame...
virtual Hit * GetHit(UInt_t i=0) const =0
Get Hit number i of the track (already added with NewHit !!)
Base Watcher working for any kind of Trackek Frame (Frame interface) and.
virtual void GetXYZ(Double_t &x, Double_t &y, Double_t &z) const
Definition: Hits.h:155
virtual ~DoMyCoincTree()
Definition: MyTree.C:507
virtual void Exec(Option_t *option="")
watch the current frame
Definition: MyTree.C:59
TTree * GetTree()
to get the current Tree
static VertexBuilder * theCurrentVertexBuilder()
to get the current VertexWatcher (for other watchers) i.e. the last one registered.