28 #include "UnpackData.h"
29 #include "UnpackLib.h"
32 #include "FRSCalibrData.h"
33 #include "FRSCalibr.h"
34 #include "HectorCalibrData.h"
35 #include "HectorCalibr.h"
37 #include "FRSAnlData.h"
39 #include "LyccaData.h"
44 #include "eventapiV50/s_filhe_swap.h"
45 #include "eventapiV50/s_ves10_1_swap.h"
46 #include "eventapiV50/s_vehe_swap.h"
47 #include "eventapiV50/s_evhe_swap.h"
48 #include "eventapiV50/s_ve10_1_swap.h"
49 #include "eventapiV50/s_bufhe_swap.h"
51 #include "eventapiV50/f_evt.h"
73 Unpack::Unpack(
const char *name,
const char *title, TTree *tree, Short_t do_spectra, Short_t do_tree) :
99 tree->Branch(
"UnpackData",
"UnpackData",&
fUnpackData,32000,99);
127 if ( ADF_MBS_Key->
idmbs == 0x100 ) {
145 Int_t i_nrest = (ADF_MBS_Key->
dlen+4)/2 - 4 - 3;
152 while (i_nrest >= 3) {
154 const s_ves10_1* p_subhead = (
const s_ves10_1*)(pMBSData+i_offset);
155 Int_t i_size = (p_subhead->l_dlen-2)/2;
156 Int_t i_styp = p_subhead->i_subtype;
157 Int_t i_typ = p_subhead->i_type;
158 Int_t i_cont = p_subhead->h_control;
160 Int_t i_proc = p_subhead->i_procid;
163 fUnpacker->UnpackSubevent(i_typ, i_styp, i_size, i_proc, i_cont, ADF_MBS_Key->
trigger, pMBSData + i_offset + 3,
168 i_nrest -= i_size + 3;
169 i_offset += i_size + 3;
186 for (i=0;i<
fsis.GetSize();i++){
189 fsis.Add( MakeTH1 <TH1F>( (
const Char_t*) name,
"Raw data for SIS module",6000,0,6000,
"VME_AGATA") );
192 std::pair <GCond1D *, TH1 * > r1 =
MakeGCond1D(
"C_qtrigger",
"Cut On qtrigger",
"qtrigger",
"qtrigger",
"qtrigger distribution",20,0,20);
198 for (i=0;i<
fsis.GetSize();i++){
207 Sort::Sort(
const char *name,
const char *title, TTree *tree, Short_t do_spectra, Short_t do_tree) :
213 Unpack *unpack_w = (
Unpack *)Watcher::GetLastRegistered(
"Unpack",
"class");
214 if ( unpack_w == 0x0 ) {
215 fLog <<
error <<
" AN Unpack watcher should be registered before " <<
nline;
239 fTrigger = MakeTH1 <TH1F>(
"Sort.trigger",
"Trigger @ the Sort level",20,0,20);
249 tree->Branch(
"SortData",
"SortData",&
fSortData,32000,99);
276 Calibr::Calibr(
const char *name,
const char *title, TTree *tree, Short_t do_spectra, Short_t do_tree) :
280 fHectorCalibrData(0x0),
284 Sort *sort_w = (
Sort *)Watcher::GetLastRegistered(
"Sort",
"class");
285 if ( sort_w == 0x0 ) {
286 fLog <<
error <<
" A Sort watcher should be registered before " <<
nline;
319 fTrigger = MakeTH1 <TH1F>(
"Calibr.trigger",
"Trigger @ the Calibr level",20,0,20);
329 tree->Branch(
"FRSCalibrData",
"FRSCalibrData",&
fFRSCalibrData,32000,99);
348 Anl::Anl(
const char *name,
const char *title, TTree *tree, Short_t do_spectra, Short_t do_tree) :
352 fHectorCalibrData(0x0),
358 Sort *sort_w = (
Sort *)Watcher::GetLastRegistered(
"Sort",
"class");
359 if ( sort_w == 0x0 ) {
360 fLog <<
error <<
" A Sort watcher should be registered before " <<
nline;
364 Calibr *calib_w = (
Calibr *)Watcher::GetLastRegistered(
"Calibr",
"class");
365 if ( calib_w == 0x0 ) {
366 fLog <<
error <<
" A Calib watcher should be registered before " <<
nline;
400 fTa_PvsN = MakeTH2 <TH2F>(
"Calibr.TA_PvsN",
"Target DSSD P energy vs N energy",1000,0,2000,1000,0,2000);
401 fTa_PvsP = MakeTH2 <TH2F>(
"Calibr.TA_PvsP",
"Target DSSD P energy vs P energy",1000,0,2000,1000,0,2000);
402 fTa_NvsN = MakeTH2 <TH2F>(
"Calibr.TA_NvsN",
"Target DSSD N energy vs N energy",1000,0,2000,1000,0,2000);
403 fTa_N_strip = MakeTH2 <TH2F>(
"Calibr.N_strip",
"Target DSSD N energy vs strip number",32,0,32,1000,0,2000);
404 fTa_P_strip = MakeTH2 <TH2F>(
"Calibr.P_strip",
"Target DSSD P energy vs strip number",32,0,32,1000,0,2000);
406 fWall_D06_NvsP = MakeTH2 <TH2F>(
"Calibr.Wall_D06_PvsN",
"Wall DSSD module 06, P versus N side",1000,0,2000,1000,0,2000);
407 fWall_D07_NvsP = MakeTH2 <TH2F>(
"Calibr.Wall_D07_PvsN",
"Wall DSSD module 07, P versus N side",1000,0,2000,1000,0,2000);
408 fWall_D11_NvsP = MakeTH2 <TH2F>(
"Calibr.Wall_D11_PvsN",
"Wall DSSD module 11, P versus N side",1000,0,2000,1000,0,2000);
409 fWall_D12_NvsP = MakeTH2 <TH2F>(
"Calibr.Wall_D12_PvsN",
"Wall DSSD module 12, P versus N side",1000,0,2000,1000,0,2000);
410 fWall_D13_NvsP = MakeTH2 <TH2F>(
"Calibr.Wall_D13_PvsN",
"Wall DSSD module 13, P versus N side",1000,0,2000,1000,0,2000);
411 fWall_D14_NvsP = MakeTH2 <TH2F>(
"Calibr.Wall_D14_PvsN",
"Wall DSSD module 14, P versus N side",1000,0,2000,1000,0,2000);
412 fWall_D18_NvsP = MakeTH2 <TH2F>(
"Calibr.Wall_D18_PvsN",
"Wall DSSD module 18, P versus N side",1000,0,2000,1000,0,2000);
413 fWall_D19_NvsP = MakeTH2 <TH2F>(
"Calibr.Wall_D19_PvsN",
"Wall DSSD module 19, P versus N side",1000,0,2000,1000,0,2000);
419 for(
int i=0;i<31;i++){
420 for(
int j=0;j<31;j++){
429 for (
int i=0;i<16;i++){
430 for(
int j=0;j<16;j++){
446 tree->Branch(
"FRSAnlData",
"FRSAnlData",&
fFRSAnlData,32000,99);
447 tree->Branch(
"LyccaData",
"LyccaData",&
fLyccaData,32000,99);
480 Anl *anl_w = (
Anl *)Watcher::GetLastRegistered(
"Anl",
"class");
481 if ( anl_w == 0x0 ) {
482 fLog <<
error <<
" A Anl watcher should be registered before " <<
nline;
536 Float_t TA_TO_WALL = 7628 - 4016;
537 Float_t OFFSET_FROM_CENTER_AGATA = 0;
virtual Bool_t IsValid() const
true if it is a valid pointer
PhDUnpacker * fUnpacker
helper class to unpack data, see prespec library
LyccaData * GetLyccaData()
to get back the Data from LYCCA
void GetPosWall(Double_t &, Double_t &, Double_t &)
Get the position of the recoil on the wallD.
virtual Frame * GetFrame() const
virtual void Clear(Option_t *="")
Should be used to reset a various data filled by this watcher.
SortClass * fSortClass
helper class to sort data from an UnpackData, see prespec library
Interface for any watcher that is a VertexBuilder.
virtual void AddBranches(TTree *tree)
Add the specific branches filled by this watcher to the given tree.
virtual void SetVertex(Double_t=0., Double_t=0., Double_t=0., Double_t=0., Double_t=0., Double_t=1., Double_t=0.02)
modify the current vertext definition. In principle done by event by event in Exec ...
LogMessage & error(LogMessage &)
UnpackData * fUnpackData
UnpackData, see prespec library.
FRSCalibrData * fFRSCalibrData
CalibrData, see prespec library.
virtual void Clear(Option_t *="")
Should be used to reset a various data filled by this watcher.
void BuildSpectraByUser()
define user spectra ... to be implementted by user only if it defines its ones spectra without condit...
SortData * fSortData
Sort step is mandatory before calling this.
virtual void FillBranches()
Should be used to reset a various data filled by this watcher.
void FillSpectraByUser()
Fill user spectra ... to be implementted by user only if it defines its ones spectra without conditio...
void FillSpectraByUser()
Fill user spectra ... to be implementted by user only if it defines its ones spectra without conditio...
void FillSpectraByUser()
Fill user spectra ... to be implementted by user only if it defines its ones spectra without conditio...
FRSCalibrData * GetFRSCalibrData()
to get back the CalibrData from FRS
virtual void AddBranches(TTree *tree)
Add the specific branches filled by this watcher to the given tree.
LogMessage & nline(LogMessage &)
Bool_t fIsToBeDeleted
True if the vertex frame is to be deleted by this. Otherwise it is extracted from a trigger i...
virtual void AddBranches(TTree *tree)
Add the specific branches filled by this watcher to the given tree.
UnpackData * fUnpackData
Unpack step is mandatory before calling this.
FRSCalibr * fFRSCalibr
helper class to sort data from an UnpackData, see prespec library
void SetTA_Wall(Double_t z_tdssd_offset=0, Double_t ta_wall=3590.)
tdssd_offset is the z position of target DSSD in the AGATA FrameWork, ta_wall distance from ta to wal...
void SetPosWall(Double_t, Double_t, Double_t)
Set the position of the recoil on the wallD.
virtual void AddBranches(TTree *tree)
Add the specific branches filled by this watcher to the given tree.
HectorCalibrData * fHectorCalibrData
Calibr(const char *name, const char *title, TTree *tree=0x0, Short_t do_spectra=2, Short_t do_tree=2)
void BuildSpectraByUser()
define user spectra ... to be implementted by user only if it defines its ones spectra without condit...
Anl(const char *name, const char *title, TTree *tree=0x0, Short_t do_spectra=2, Short_t do_tree=2)
void BuildSpectraByUser()
define user spectra ... to be implementted by user only if it defines its ones spectra without condit...
Sort(const char *name, const char *title, TTree *tree=0x0, Short_t do_spectra=2, Short_t do_tree=2)
virtual std::pair< GCond1D *, TH1 * > MakeGCond1D(const Char_t *name_cond, const Char_t *title_cond, const Char_t *name_leaf, const Char_t *name_hist, const Char_t *title_hist, Int_t bin, Double_t min, Double_t max, Option_t *opt="F", const Char_t *sub="")
Build a 1D condition using the given leaf. It allocates also the spectrum.
void SetLastExecStatus(Short_t s=0)
reset last status. 0 means no error, 0 < means error, > 0 means ok with conditions ...
header file for Frame.cpp
virtual void FillBranches()
Should be used to reset a various data filled by this watcher.
void SetMeanBeta(Double_t beta=0.5)
Change mean beta.
Base class for version numbers.
LightLYCCAVertexBuilder_1(const char *, const char *)
void FillSpectraByUser()
Fill user spectra ... to be implementted by user only if it defines its ones spectra without conditio...
FRSCalibrData * fFRSCalibrData
CalibrData, see prespec library.
virtual void Clear(Option_t *="")
Should be used to reset a various data filled by this watcher.
helper structure to decode the data content of the additional key following the ADF key ...
A RawFrame gives direct access to the underlying buffer.
header file for AgataKeyFactory.cpp
LogMessage & dolog(LogMessage &)
void BuildSpectraByUser()
watch the current frame i.e. fill the UnpackData with the content of the MBS Frame ...
virtual void FillBranches()
Should be used to reset a various data filled by this watcher.
virtual BufferIO & RawBuffer()
This method gives access in reading/writing mode to the underlying data buffer.
Sort data from unpackdata watchers.
virtual void Clear(Option_t *="")
clear the current event attached to the different branches
SortData * GetSortData()
to get back the SortData
Double_t GetTheta()
Get the cosinus of the angle.
void SetTheta(Double_t cosTheta)
Set the cos of the angle.
Unpack data from mbs encapsulated in ADF frame.
void SetBeta()
Set Lycca beta.
ADF::SharedFP * fMBSFrame
MBS data are encapsulated in an ADF Frame.
Base for a watcher on an ancillary (raw) frame @ GSI.
FRSAnl * fFRSAnl
For the Analysis step.
virtual void Exec(Option_t *option="")
watch the current frame
HectorCalibr * fHectorCalibr
Unpack(const char *name, const char *title, TTree *tree=0x0, Short_t do_spectra=2, Short_t do_tree=2)
SharedFP * fVertexFrame
Pointer to a Vertex Frame. Has to do SharedFP since can be in the data flow.
UnpackData * GetUnpackData()
to get back the UnpackData
SortData * fSortData
SortData, see prespec library.
Char_t * Address()
for classes that needs it to write directly data into it.
HectorCalibrData * fHectorCalibrData
HectorCalibrData * GetHectorCalibrData()
to get back the CalibrData from Hector
virtual void FillBranches()
fill the current event attached to the different branches
SortData * fSortData
Sort step is mandatory before calling this.
virtual void SetBranches()
add branches to the tree and the ciruclar tree
Base class that described an item in a Factory.
TTree * GetTree()
to get the current Tree