GammaWare  Head Version for release 0.9
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
GSI/TrackedWatchers.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 _TrackedWatchers
22 #define _TrackedWatchers
23 
24 // Gw and Watcher definition
25 #ifndef Gw_Watchers
26 #include "Watchers.h"
27 #endif
28 
29 #ifndef Gw_AgataEventDisplay
30 #include "AgataEventDisplay.h"
31 #endif
32 
33 #ifndef Gw_AgataEventContainer
34 #include "AgataEventContainer.h"
35 #endif
36 
37 // ADF definitions
38 #ifndef ADF_TrackedFrame
39 #include "TrackedFrame.h"
40 #endif
41 
42 // ROOT definitions
43 #ifndef ROOT_TH2F
44 #include "TH2F.h"
45 #endif
46 #ifndef ROOT_TH3F
47 #include "TH3F.h"
48 #endif
49 #ifndef ROOT_TMath
50 #include "TMath.h"
51 #endif
52 #include "MetaFrame.h"
53 
54 class VertexBuilder;
55 
56 using namespace ADF;
57 using namespace Gw;
58 
60 
62 class TrackedWatcher : public WatcherWithTag
63 {
64 protected:
65  SharedFP *fFrame;
66 protected:
67  Double_t fZOffset;
68 
69 protected:
71  virtual Double_t DoDopplerCorrection(const TrackedHit *hit, VertexInterface *vertex);
72 
73 public:
74  TrackedWatcher(const char *name, const char *title, TDirectory *sp_dir = 0x0, TDirectory *tag_dir = 0x0) :
75  WatcherWithTag(name,title,sp_dir,tag_dir),
76  fFrame(0x0),
77  fZOffset(0.0)
78  {;}
79  virtual ~TrackedWatcher()
80  {;}
81 
83 
89  virtual void SetAgataOffset(Double_t offset = 0.0); //*MENU*
90 
92 
95  virtual Bool_t SetTrigger( ADF::DFTrigger */*trigger*/ = 0x0 );
96 
97  ClassDef(TrackedWatcher,0) // Trigger on tracked Frame
98 };
99 
100 class Coinc2D : public TrackedWatcher
101 {
102 private:
103  VertexBuilder *fVertexBuilder;
104 
105 protected:
106  TH1F *fTrackedEnergy;
107  TH1F *fTrackedEnergyDopler;
108  TH1F *fFold;
109  TH2F *fGxG;
110  TH2F *fGxG_DC;
111  TH3F *fPos3D;
112 
113 protected:
115  virtual void DoCanvas(TCanvas *c, Option_t *);
116 
117 public:
118  Coinc2D(const char *name, const char *title, TDirectory *sp_dir = 0x0, TDirectory *tag_dir = 0x0);
119  virtual ~Coinc2D();
120 
122  virtual void Exec(Option_t *option="");
123 
124  ClassDef(Coinc2D,0) // Gamma Gamma matrix and check singles
125 };
126 
127 //__________________________________________
128 class EveTrack : public TrackedWatcher
129  {
130 
131  private:
132 
133  TH1F *fMeanRadius;
134  TH1I *fFold;
135  TH1F *fHitEnergy;
136  TH1F *fTrackEnergy;
137  Int_t fMaxCycle;
138  const Char_t* fPathFile;
139 
140  private:
141  static Float_t fgMetric;
142 
143  protected:
145  virtual void DoCanvas(TCanvas *c, Option_t *);
146 
147  public:
148  EveTrack(const char *name, const char *title, TDirectory *sp_dir = 0x0, TDirectory *tag_dir = 0x0);
149  virtual ~EveTrack();
150 
152  virtual void Exec(Option_t *option="");
153 
155  virtual void ShowEve(const Char_t* agataPathFile); //*MENU* *GETTER=GetPathFile* *ARGS={agataPathFile=>fPathFile}*
156 
158  void SetActive(Bool_t active = true); //*TOGGLE*
159 
161  virtual void SetMaxCycle(Int_t cycle) { fMaxCycle = cycle; } //*MENU*
162 
164  virtual Int_t GetMaxCycle() { return fMaxCycle; }
165 
167  virtual const Char_t* GetPathFile() const { return fPathFile; }
168 
169  ClassDef(EveTrack,0) // track container
170 };
171 
172 #endif
173 
Interface for any watcher that is a VertexBuilder.
header file for TrackedFrame.cpp
virtual Int_t GetMaxCycle()
Get max cycle.
virtual const Char_t * GetPathFile() const
Get agata path file.
virtual ~TrackedWatcher()
It is a hit associated to a list of Hits.
Definition: Hits.h:256
A Shared Frame Pointer.
Definition: Frame.h:597
TrackedWatcher(const char *name, const char *title, TDirectory *sp_dir=0x0, TDirectory *tag_dir=0x0)
Base class for a trigger on a data flow.
Definition: Trigger.h:155
header file for MetaFrame.cpp
Base Watcher working for any kind of Trackek Frame (Frame interface) and.
virtual void SetMaxCycle(Int_t cycle)
Set max cycle, before resetting buffer.