GammaWare  Head Version for release 0.9
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
PrismaWatchers.h
Go to the documentation of this file.
1 #ifndef _PrismaWatchers
2 #define _PrismaWatchers
3 
4 // Gw and Watcher definition
5 #include "TTreeWatchers.h"
6 #include "MetaWatchers.h"
7 #include "RancLegnaroWatchers.h"
8 #include "AgataEventDisplay.h"
9 #include "AgataEventContainer.h"
10 
11 // ROOT
12 #include "TString.h"
13 
14 //includes for libPrisma.so or any other library needed
15 #include "prismaManager.hh"
16 #include "detData.hh"
17 
19 
26 {
27 public:
28  // number of slot (packet of 32 channels) needed by PRISMA
29  static const UShort_t gMaxSlotsForPrisma = 3u ;
30  // number of sections in the MWPPAC
31  static const Int_t gMaxSections = 10;
32  // max number of type od detector composing Prisma
33  static const Int_t gmaxTypes = 4;
34 
35 protected:
36  // prisma manager : singleton
37  prismaManager *fPM;
38  std::vector<detData*> theMcpData;
39  std::vector<detData*> thePpacData;
40  std::vector<detData*> theIcData;
41  std::vector<detData*> theSideData;
42 
43 private:
45  size_t fCurrentSize;
46  std::vector<detData *> fDetData;
47 
48 private:
49  // map to be filled by rawData using the LUT
50  Float_t theMap[240];
51  // LUT
52  Int_t LUT[gMaxSlotsForPrisma][gMaxChannels];
53 
54 protected:
56  Bool_t InitLUT(const char *);
58  detData *GetNextDetData(Int_t, Int_t);
61  { fCurrentSize = 0; }
62 
63 public:
64  BasePrismaWatcher(const char *name, const char *title);
65  virtual ~BasePrismaWatcher();
66 
67  void Configure(const char *pmanager = "Conf/", const char *plut = "Conf/");
68 
70  virtual void Exec(Option_t *option="");
71 
72  ClassDef(BasePrismaWatcher,0) // Base for a Prisma watcher
73 };
74 
76 {
77 private:
78  // spectra for focal plane
79  TObjArray *fFP;
80  TObjArray *fLR;
81 
82 public:
83  RawPrisma(const char *name, const char *title);
84  ~RawPrisma();
85 
87  virtual void Exec(Option_t *option="");
88 
89  ClassDef(RawPrisma,0) // Display raw PRISMA spectra
90 };
91 
93 {
94 private:
95  // TH2 *Ic_Range;
96  TH2 *TOF_D;
97  TH2 *PRISMA_MCPcal;
98  TH1 *PRISMA_X_FP;
99  TH1 *PRISMA_Vel;
100  TH2 *IcABvsABCD;
101  TH2 *Range_Energy;
102  TH2 *Vel_Theta;
103  TH2 *a_over_q;
104  TH2 *Energy_RBeta;
105  TH1 *PRISMA_Mass;
106  TH2 *IcAvsABCD;
107 
108 protected:
110  virtual void DoCanvas(TCanvas *c, Option_t *);
111 
112 public:
113  DisplayPrisma(const char *name, const char *title);
115  {;}
116 
118  virtual void Exec(Option_t *option="");
119 
120 
121  ClassDef(DisplayPrisma,0) // Display some standard calibrated PRISMA spectra
122 };
123 
125 {
126 
127 private:
128  TString fTypeName;
129  Int_t fMaxCycle;
130 
131  const Char_t* fConfFileName;
132  const Char_t* fPathFile;
133 
134 public:
135  EvePrisma(const char *name, const char *title);
137 
139  virtual void Exec(Option_t *option="");
140 
142  virtual void ShowEve(const Char_t* prismaConfFile, const Char_t* agataPathFile); //*MENU* *GETTER=GetConfFileName,GetPathFile* *ARGS={prismaConfFile=>fConfFileName,agataPathFile=>fPathFile}*
143 
145  virtual void SetActive(Bool_t active = true); //*TOGGLE*
146 
148  virtual void SetMaxCycle(Int_t cycle) { fMaxCycle = cycle; } //*MENU*
149 
151  virtual const Char_t* GetConfFileName() const { return fConfFileName; }
152 
154  virtual const Char_t* GetPathFile() const { return fPathFile; }
155 
156  ClassDef(EvePrisma,0) // Display some standard calibrated PRISMA spectra
157 };
158 
160 {
161 private:
162  Float_t fAoverQ;
163  Float_t fRadius;
164  Float_t fIc_AB_DE;
165  Float_t fIc_A_DE;
166  Float_t fIc;
167  Float_t fx_fp;
168  Float_t fTOF;
169  Float_t fRange;
170 protected:
171  virtual void SetBranches();
172 
173 public:
174  MyPrismaTree(const char *name, const char *title, TTree *tree = 0x0);
175  ~MyPrismaTree();
176 
178  virtual void Exec(Option_t *option="");
179 
180  ClassDef(MyPrismaTree,0) // Display some standard calibrated PRISMA spectra
181 };
182 
184 
187 {
188 public:
189  DoPrismaDoppler(const char *name, const char *title);
190  virtual ~DoPrismaDoppler()
191  {;}
192 
194  virtual void Exec(Option_t *option="");
195 
196  ClassDef(DoPrismaDoppler,0) // change doppler of the dedicated watcher
197 };
198 
199 
200 #endif
201 
std::vector< detData * > theSideData
DisplayPrisma(const char *name, const char *title)
virtual void Exec(Option_t *option="")
watch the current frame
Interface for any watcher that is a VertexBuilder.
DoPrismaDoppler(const char *name, const char *title)
virtual void ShowEve(const Char_t *prismaConfFile, const Char_t *agataPathFile)
show eve event display
virtual void SetActive(Bool_t active=true)
Toggle active task.
prismaManager * fPM
Bool_t InitLUT(const char *)
to init the LUT from a file
BasePrismaWatcher(const char *name, const char *title)
detData * GetNextDetData(Int_t, Int_t)
Next detData in the pool.
virtual void DoCanvas(TCanvas *c, Option_t *)
To be overwritten by real implementation if a canvas is produced.
Apply the doppler correction.
virtual const Char_t * GetPathFile() const
Get agata path file.
static const Int_t gmaxTypes
Base for a watcher on an ancillary (raw) frame.
virtual ~BasePrismaWatcher()
Base for a watcher on Prisma (raw) frame.
void ResetDetDataStack()
Reset stack.
Base class for a Watcher that fill a TTree or some branches of a TTree.
Definition: TTreeWatchers.h:51
virtual void Exec(Option_t *option="")
watch the current frame
static const UShort_t gMaxChannels
static const Int_t gMaxSections
virtual void Exec(Option_t *option="")
watch the current frame
EvePrisma(const char *name, const char *title)
virtual void SetMaxCycle(Int_t cycle)
Set max cycle, before resetting buffer.
static const UShort_t gMaxSlotsForPrisma
std::vector< detData * > thePpacData
virtual void Exec(Option_t *option="")
watch the current frame
RawPrisma(const char *name, const char *title)
virtual void SetBranches()
virtual void Exec(Option_t *option="")
watch the current frame
void Configure(const char *pmanager="Conf/", const char *plut="Conf/")
std::vector< detData * > theIcData
std::vector< detData * > theMcpData
MyPrismaTree(const char *name, const char *title, TTree *tree=0x0)
virtual void Exec(Option_t *option="")
watch the current frame
virtual ~DoPrismaDoppler()
virtual const Char_t * GetConfFileName() const
Get Prima conf file.