GammaWare  Head Version for release 0.9
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
GANIL/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 #include "Watchers.h"
25 //#include "AgataEventDisplay.h"
26 #include "AgataEventContainer.h"
27 #include "TrackedFrame.h"
28 #include "CanvasVisu.h"
29 
30 #include "TH1.h"
31 #include "TH2.h"
32 #include "TH3.h"
33 #include "TMath.h"
34 #include "MetaFrame.h"
35 
36 class VertexBuilder;
37 
38 using namespace ADF;
39 using namespace Gw;
40 
42 
45 {
46 protected:
48 protected:
49  Double_t fZOffset;
50 
51 protected:
53  virtual Double_t DoDopplerCorrection(const TrackedHit *hit, VertexInterface *vertex);
54 
55 public:
56  TrackedWatcher(const char *name, const char *title, TDirectory *sp_dir = 0x0, TDirectory *tag_dir = 0x0) :
57  WatcherWithTag(name,title,sp_dir,tag_dir),
58  fFrame(0x0),
59  fZOffset(0.0)
60  {;}
61  virtual ~TrackedWatcher()
62  {;}
63 
65 
71  virtual void SetAgataOffset(Double_t offset = 0.0); //*MENU*
72 
74 
77  virtual Bool_t SetTrigger( ADF::DFTrigger */*trigger*/ = 0x0 );
78 
79  ClassDef(TrackedWatcher,0) // Trigger on tracked Frame
80 };
81 
82 class Coinc2D : public TrackedWatcher
83 {
84 private:
85  VertexBuilder *fVertexBuilder;
86 
87 protected:
90  TH1F *fFold;
91  TH2F *fGxG;
92  TH2F *fGxG_DC;
93  TH3F *fPos3D;
94 
95 protected:
97  virtual void DoCanvas(TCanvas *c, Option_t *);
98 
99 public:
100  Coinc2D(const char *name, const char *title, TDirectory *sp_dir = 0x0, TDirectory *tag_dir = 0x0);
101  virtual ~Coinc2D();
102 
104  virtual void Exec(Option_t *option="");
105 
106  ClassDef(Coinc2D,0) // Gamma Gamma matrix and check singles
107 };
108 
109 //__________________________________________
110 //class EveTrack : public TrackedWatcher
111 // {
112 
113 // private:
114 
115 // TH1F *fMeanRadius;
116 // TH1I *fFold;
117 // TH1F *fHitEnergy;
118 // TH1F *fTrackEnergy;
119 // Int_t fMaxCycle;
120 // const Char_t* fPathFile;
121 
122 // private:
123 // static Float_t fgMetric;
124 
125 // protected:
126 // //! To be overwritten by real implementation if a canvas is produced.
127 // virtual void DoCanvas(TCanvas *c, Option_t *);
128 
129 // public:
130 // EveTrack(const char *name, const char *title, TDirectory *sp_dir = 0x0, TDirectory *tag_dir = 0x0);
131 // virtual ~EveTrack();
132 
133 // //! watch the current frame
134 // virtual void Exec(Option_t *option="");
135 
136 // //! show eve event display
137 // virtual void ShowEve(const Char_t* agataPathFile); //*MENU* *GETTER=GetPathFile* *ARGS={agataPathFile=>fPathFile}*
138 
139 // //! Toggle active task
140 // void SetActive(Bool_t active = true); //*TOGGLE*
141 
142 // //! Set max cycle, before resetting buffer
143 // virtual void SetMaxCycle(Int_t cycle) { fMaxCycle = cycle; } //*MENU*
144 
145 // //! Get max cycle
146 // virtual Int_t GetMaxCycle() { return fMaxCycle; }
147 
148 // //! Get agata path file
149 // virtual const Char_t* GetPathFile() const { return fPathFile; }
150 
151 // ClassDef(EveTrack,0) // track container
152 //};
153 
154 
155 
157 {
158 private:
159  VertexBuilder *fVertexBuilder;
160 
161 protected:
164  TH1F *fGammaMult;
165  TH2F *fGxG;
166  TH2F *fGxG_DC;
167  TH2F *fETheta;
168  TH2F *fEThetaDC;
169 
170  TH3F *fPos3D;
171 
172 public:
173  TrackingWatcher(const char *name, const char *title, TDirectory *sp_dir = 0x0, TDirectory *tag_dir = 0x0);
174  virtual ~TrackingWatcher();
175 
176  void InitVertex(VertexInterface *vertex);
177 
178  double GetTheta(const TrackedHit *hit, VertexInterface *vertex);
179 
180  void ShowTrackedSpectra(bool OnSamePad = false); //*MENU*
181 
182  void ShowGammaGamma(const char *NoDC_DC_Both = "DC"); //*MENU*
183 
184  void ShowETheta(const char *NoDC_DC_Both = "DC"); //*MENU*
185 
186  void ShowCommonSumTrackedDC(bool OnSamePad = false, const char *DC_NoDC = "DC"); //*MENU*
187 
188  void Show3DHits(); //*MENU*
189 
190 
191 
193  virtual void Exec(Option_t *option="");
194 
195  ClassDef(TrackingWatcher,0) // Gamma Gamma matrix and check singles
196 };
197 
198 #endif
199 
Interface for any watcher that is a VertexBuilder.
header file for TrackedFrame.cpp
TH1F * fTrackedEnergyDopler
It is a hit associated to a list of Hits.
Definition: Hits.h:256
TH1F * fTrackedEnergy
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.