GammaWare  Head Version for release 0.9
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
GSI/PSAWatchers.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 _PSAWatchers
22 #define _PSAWatchers
23 
24 // Watcher definition
25 #include "Watchers.h"
26 
27 // ADF definitions
28 #include "PSAFrame.h"
29 
30 // ROOT definitions
31 #include "TH2F.h"
32 #include "TH3F.h"
33 
34 using namespace ADF;
35 using namespace Gw;
36 
38 
40 class PSAWatcher : public WatcherWithTag
41 {
42 protected:
43  SharedFP *fFrame;
44 public:
45  PSAWatcher(const char *name, const char *title, TDirectory *sp_dir = 0x0, TDirectory *tag_dir = 0x0) :
46  WatcherWithTag(name,title,sp_dir,tag_dir),
47  fFrame(0x0)
48  {;}
49  virtual ~PSAWatcher()
50  {;}
51 
53 
55  virtual Bool_t SetTrigger( ADF::DFTrigger */*trigger*/ = 0x0 );
56 
57 
58  ClassDef(PSAWatcher,0) // Trigger on PSA Frame
59 };
60 
62 /*
63 
64  for OpenGL support :
65  You must add
66  gStyle->SetCanvasPreferGL(1);
67  and TH3D::Draw("glbox") for cubic symbol
68  or TH3D::Draw("glbox1") for spherical symbol
69 
70  for plane slicing put your mouse on a plane (the plane become green)
71  stay press on shift and move the mouse
72 
73 */
74 class PSACrystal3D : public PSAWatcher
75 {
76 private:
77  static Float_t fgMetric;
78  static Float_t fRadius;
79  static Float_t fDepht;
80  static Int_t fNBinX;
81  static Int_t fNBinZ;
82  static Float_t fDefaultECutMin;
83  static Float_t fDefaultECutMax;
84 
85 private:
86  TH3F * fH3DHitPosition;
87  TH1F * fE0;
88  TH1F * fE1;
89  TH1F * fT0;
90  TH1F * fT1;
91  TH2F * fTE0;
92  TH2F * fTE1;
93  TH1F * fEnergySeg;
94  TH1F * fNbHits;
95 
96 private:
97  Float_t fCurrentECutMin;
98  Float_t fCurrentECutMax;
99 
100 protected:
102  virtual void DoCanvas(TCanvas *c, Option_t *);
103 
104 public:
105  PSACrystal3D( const char * name, const char * title, TDirectory *sp_dir = 0x0, TDirectory *tag_dir = 0x0);
106  virtual ~PSACrystal3D();
107 
108  virtual void Exec(Option_t * option="");
109 
111  void SetEnergyCut(Float_t EcutMin,
112  Float_t EcutMax ); //*MENU* *ARGS={EcutMin=>fCurrentECutMin,EcutMax=>fCurrentECutMax}
113 
114  void SetCurrentECutMin( Float_t EcutMin );
115  void SetCurrentECutMax( Float_t EcutMax );
116 
117  Float_t GetCurrentECutMin() const;
118  Float_t GetCurrentECutMax() const;
119 
120  ClassDef(PSACrystal3D,0) // To get a 3D map of hits in a particular crystal
121 };
122 
123 
124 #endif
125 
To get a 3D map of hits in a particular crystal.
PSAWatcher(const char *name, const char *title, TDirectory *sp_dir=0x0, TDirectory *tag_dir=0x0)
header file for PSAFrame.cpp
A Shared Frame Pointer.
Definition: Frame.h:597
virtual ~PSAWatcher()
Base class for a trigger on a data flow.
Definition: Trigger.h:155
Base Watcher working for any kind of Frame (Frame interface)