40 E =
A +
B*tmp +
C*TMath::Power(tmp,2) ;
51 fLog <<
warning <<
"LLaBr3.conf not found in the current directory ... LoadCalibration should be called at least once, please use LoadCalibration !! " <<
dolog;
61 std::ifstream in(calib_file); std::string
tmp;
63 if ( in.is_open() == false )
68 while ( in.good() && !in.eof() ) {
70 if ( tmp[0] ==
'#' ) {
75 Float_t r, theta, phy, a,
b, c; Int_t tmin, tmax;
77 std::istringstream decode(tmp);
83 decode >>
gLUT[j][i] ;
94 decode >> r >> theta >> phy >> tmin >> tmax >> a >> b >> c ;
98 fLaBr3[which].
P.SetMagThetaPhi(r,theta*TMath::Pi()/180.0,phy*TMath::Pi()/180.0);
180 fE_no_doppler(gMaxNumberOfModules),
181 fE_doppler(gMaxNumberOfModules),
182 fT(gMaxNumberOfModules)
192 TString
tmp; TH1F *h;
194 tmp = Form(
"LaBr3_E_%d",i);
195 h = MakeTH1<TH1F>(tmp.Data(),
"Calibrated energy",1000,0,6000);
198 tmp = Form(
"LaBr3_E_Doppler_%d",i);
199 h = MakeTH1<TH1F>(tmp.Data(),
"Doppler corrected energy",1000,0,6000);
202 tmp = Form(
"LaBr3_T_%d",i);
203 h = MakeTH1<TH1F>(tmp.Data(),
"Time",1000,0,6000);
215 c->Divide(4, 2, 0.001, 0.001);
229 UShort_t nb_fired = 0u;
233 if (
fLaBr3[i].has_fired ) {
271 GetTree()->Branch(
"NbLaBr", &fNbLaBr3,
"NbLaBr/I");
272 GetTree()->Branch(
"WhichLaBr3", fWhichLaBr3,
"WhichLaBr3[NbLaBr]/s");
274 GetTree()->Branch(
"ELaBr3", fELaBr3,
"E[NbLaBr]/F");
275 GetTree()->Branch(
"TLaBr3", fTLaBr3,
"T[NbLaBr]/F");
285 printf(
"MyLLaBr3Tree::Exec is called \n");
296 fWhichLaBr3[fNbLaBr3] = i;
297 fELaBr3[fNbLaBr3] =
fLaBr3[i].
E;
298 fTLaBr3[fNbLaBr3] =
fLaBr3[i].
T;
virtual Bool_t IsValid() const
true if it is a valid pointer
virtual VertexInterface * GetVertex()
Get the vertex data interface.
printf("******************************************************************** \n")
MyLLaBr3Tree(const char *name, const char *title, TTree *tree=0x0)
static const Short_t gNumberOfItems
MyLLaBr3 fLaBr3[gMaxNumberOfModules]
LogMessage & warning(LogMessage &)
virtual ~BaseLLaBr3Watcher()
Base for a watcher on an ancillary (raw) frame.
static Short_t gLUT[gNumberOfItems][gMaxNumberOfModules]
virtual void Exec(Option_t *option="")
watch the current frame
virtual Double_t GetBeta(Double_t=0.0) const =0
get recoil velocity
ClassImp(BaseLLaBr3Watcher)
virtual void Exec(Option_t *option="")
watch the current frame
void SetLastExecStatus(Short_t s=0)
reset last status. 0 means no error, 0 < means error, > 0 means ok with conditions ...
Base class for a Watcher that fill a TTree or some branches of a TTree.
virtual void Exec(Option_t *option="")
watch the current frame
DisplayLLaBr3(const char *, const char *, TDirectory *sp_dir=0x0, TDirectory *tag_dir=0x0)
static const Short_t gMaxNumberOfModules
LogMessage & dolog(LogMessage &)
BaseLLaBr3Watcher(const char *, const char *, TDirectory *sp_dir=0x0, TDirectory *tag_dir=0x0)
virtual void FillTree()
Fill the tree if it is the owner of the tree.
Float_t rawBuf[gMaxSlots *gMaxChannels+gExtraSize]
virtual void Exec(Option_t *option="")
watch the current frame
ADF::LogMessage & endl(ADF::LogMessage &log)
virtual void DoCanvas(TCanvas *c, Option_t *o)
To be overwritten by real implementation if a canvas is produced.
virtual void SetBranches()
Bool_t LoadCalibration(const char *calib_file="LLaBr3.conf")
TTree * GetTree()
to get the current Tree
static VertexBuilder * theCurrentVertexBuilder()
to get the current VertexWatcher (for other watchers) i.e. the last one registered.