29 #include "TGraphErrors.h"
31 #include "TSpectrum.h"
41 if ( ! Watcher::SetTrigger(trigger) ){
47 fFrame = GetTrigger()->GetInputSharedFP();
49 if ( fFrame->GetFrame()->GetSignature().GetVersion().GetMinor() == 1 )
53 for (UInt_t i = 0; i < 100; i++)
54 fEvent.push_back(sub);
61 return fMap.Load(fname);
77 fCurrentTS = key->
GetUID();
82 for (UInt_t i = 0; i < fNbSubEvent; i++) {
85 buf >> dts; fEvent[i].DTS = dts;
90 buf >> fEvent[i].UID >> fEvent[i].E;
92 fEvent[i].TS = fCurrentTS + fEvent[i].DTS;
94 switch ( fMap.allDigitizer[fEvent[i].UID].Family ) {
96 fGEEvent.push_back(&fEvent[i]);
99 fACEvent.push_back(&fEvent[i]);
102 fLAEvent.push_back(&fEvent[i]);
117 fTimeline(kMaxUShort,0UL),
125 const Char_t *hname; TH1 *h;
129 fUIDDistri = MakeTH1<TH1F>(
"UID",
"Unique ID distribution",
fMap.maxUID,0,
fMap.maxUID);
131 fFoldDistri = MakeTH1<TH1F>(
"Fold",
"Fold distribution",20,0,20);
134 fTimelineUID.resize(
fMap.maxUID,0);
136 for (Int_t i = 0; i <
fMap.maxUID; i++ ) {
138 if (
fMap.tsShift.At(i) ) {
139 hname = Form(
"ADC_%s",
fMap.tsShift.At(i)->GetName());
140 h = MakeTH1<TH1F>(hname,
"uncalibrated spectrum", 2*4096,0,2*4096);
144 hname = Form(
"E_%s",
fMap.tsShift.At(i)->GetName());
145 h = MakeTH1<TH1F>(hname,
"calibrated spectrum", 2*4096,0,10000);
148 hname = Form(
"TS_%s",
fMap.tsShift.At(i)->GetName());
149 h = MakeTH2<TH2F>(hname,
"TS alignment",
fMap.maxUID,0,
fMap.maxUID,400,-200,200);
153 fADCSpectra.Add(0x0); fESpectra.Add(0x0); fTSSpectra.Add(0x0);
162 fSigma = sig; fThreshold = thre;
167 f->SetParameter(0,sig*2.35482);
173 fMap.Save(fname,opt);
178 const Int_t time_depth_c = 0, time_depth_s = 0;
189 fUIDDistri->Fill(
fEvent[i].UID);
191 h = (TH1 *)fADCSpectra.At(
fEvent[i].UID);
193 h = (TH1 *)fESpectra.At(
fEvent[i].UID);
199 fTimelineUID[
fEvent[i].UID] = fEvent[i].TS;
218 if ( fTimeline.first != kMaxUShort ) {
220 hh = (TH2 *)fTSSpectra.At(fTimeline.first);
221 hh->Fill(fEvent[i].UID,
fCurrentTS - fTimeline.second);
223 hh = (TH2 *)fTSSpectra.At(fEvent[i].UID);
224 hh->Fill(fTimeline.first, -Float_t(
fCurrentTS - fTimeline.second));
230 fTimeline.first = fEvent[i].UID; fTimeline.second =
fCurrentTS + fEvent[i].DTS;
294 TH1 *h; TH2 *hh = 0x0; TObject *obj; Int_t which_ref; TString option = opt, algo_used = algo; TObjArray alllines;
297 alllines.SetOwner(
false);
300 if ( TVirtualPad::Pad() == 0x0 ) {
301 fLog <<
warning <<
" Display the matrix to be used for alignment first" <<
dolog;
306 TIter next(TVirtualPad::Pad()->GetListOfPrimitives());
307 while ( (obj = next()) ) {
308 if ( obj->InheritsFrom(
"TH2") && fTSSpectra.FindObject(obj) ) {
310 which_ref = (UInt_t)fTSSpectra.IndexOf(obj);
312 if ( obj->InheritsFrom(
"TLine") )
320 else std::cout <<
" Reference Detector used for TS alignment " << hh->GetName() <<
std::endl;
323 TLine ld, *l; ld.SetLineColor(kRed); ld.SetLineWidth(2); Double_t val_to_center_on; Int_t val_int_to_center_on;
325 for (Int_t i = 0; i <
fMap.maxUID; i++ ) {
327 if ( i == which_ref ) {
328 TParameter<Int_t> *tsoffset =
329 (TParameter<Int_t> *)
fMap.tsShift.At(i);
334 h = hh->ProjectionY(
"_py",i+1,i+2);
340 TParameter<Int_t> *tsoffset =
341 (TParameter<Int_t> *)
fMap.tsShift.At(i);
343 if ( h->Integral() ) {
344 TIter next(&alllines); l = 0x0;
345 while ( (obj = next()) ) {
346 if ( obj->InheritsFrom(
"TLine") ) {
348 if ( l->GetX1() >= i && l->GetX2() <= i+1 )
354 if ( algo_used.Contains(
"mean") ) {
355 val_to_center_on = h->GetMean( );
356 if ( val_to_center_on < 0 )
357 val_int_to_center_on = Int_t ( val_to_center_on - 0.5 );
359 val_int_to_center_on = Int_t ( val_to_center_on + 0.5 );
362 Int_t bin_to_center_on = h->GetMaximumBin(), nb_val_mean = 0; Double_t weight = 0.0;
363 val_to_center_on = 0;
364 for (Int_t k = bin_to_center_on - 2; k < bin_to_center_on + 3; k++) {
365 if ( k < 1 || k > h->GetNbinsX() )
367 weight += h->GetBinContent(k);
368 val_to_center_on += h->GetBinContent(k)*h->GetBinCenter(k);
371 val_to_center_on /= weight;
373 val_to_center_on = h->GetMean();
375 if ( val_to_center_on < 0 )
376 val_int_to_center_on = Int_t ( val_to_center_on - 0.5 );
378 val_int_to_center_on = Int_t ( val_to_center_on + 0.5 );
381 l = ld.DrawLine(i+0.1,val_int_to_center_on,i+0.9,val_int_to_center_on);
382 std::cout <<
" DrawLine for Detector " << tsoffset->GetName() <<
" " << val_int_to_center_on <<
std::endl;
385 val_to_center_on = l->GetY1();
386 if ( val_to_center_on < 0 )
387 val_int_to_center_on = Int_t ( val_to_center_on - 0.5 );
389 val_int_to_center_on = Int_t ( val_to_center_on + 0.5 );
392 if ( !option.Contains(
"dry") ) {
393 tsoffset->SetVal(val_int_to_center_on);
407 if(source.Contains(
"Co60"))
409 const Int_t np_peaks = 2;
410 const Double_t peaks[np_peaks] = { 1173.228, 1332.492 };
415 if(source.Contains(
"Eu152"))
417 const Int_t np_peaks = 7;
418 const Double_t peaks[np_peaks] = { 121.7824, 244.692, 344.276, 778.903, 964.131, 1112.116, 1408.011 };
423 if(source.Contains(
"BaCl"))
425 const Int_t np_peaks = 10;
426 const Double_t peaks[np_peaks] = { 1131.244, 1327.396, 1601.065, 2311.493, 3116.087, 4979.888, 5715.356, 6110.980, 7414.086, 7790.454 };
431 ifstream file(source,ios::in);
434 std::vector<Double_t> peaks;
439 while(getline(file, str_val))
443 fLog <<
warning <<
"Input file reading broken due to more than 100 entries !" <<
dolog;
446 if(np_peaks>(Int_t)peaks.capacity())
448 fLog <<
warning <<
"Input file reading broken due to number of entries greater than vector capacity !" <<
dolog;
451 peaks.push_back(atof(str_val.c_str()));
474 TIter next(TVirtualPad::Pad()->GetListOfPrimitives()); TObject *obj; TList list_of_peaks;
475 list_of_peaks.SetOwner(
false);
477 TF1 *tfit = 0x0; TList list_of_fit; TH1 *h = 0x0;
480 while ( (obj=next()) )
482 if ( obj->InheritsFrom(
"Gw::Peak1D") ) {
484 list_of_peaks.Add(p);
486 list_of_fit.Add(tfit);
488 if ( obj->InheritsFrom(
"TH1") ) {
493 fLog <<
warning <<
" Cannot find any spectrum in the current pad " <<
nline;
497 if ( list_of_peaks.GetSize() == 0 ) {
499 for (Int_t i = 0 ; i < np_peaks; i++) {
502 p->SetName( Form(
"%f",peaks[i]) );
505 list_of_peaks.Add(p);
508 if(do_fit.Contains(
"fitted"))
510 p->
Fit(h,
"RN",
"pol1");
513 list_of_fit.Add(tfit);
516 list_of_peaks.Draw();
523 if(do_fit.Contains(
"sto"))
525 Double_t PeakArea[np_peaks];
526 Double_t diff[np_peaks];
527 Double_t ErrorArea[np_peaks];
529 ofstream fichier(
"PeaksPositions.txt", ios::app);
534 if(do_fit.Contains(
"fitted"))
536 fichier << h->GetName() <<
"\t" << do_fit <<
": Etab Emeas d_Emeas Etab-Emeas FWHM d_FWHM area sqrt(area)"<<
std::endl;
540 fichier << h->GetName() <<
"\t" << do_fit <<
": Etab Emeas Etab-Emeas"<<
std::endl;
542 for (Int_t i = 0; i < list_of_peaks.GetSize(); i++)
545 tfit = (TF1* )list_of_fit.At(i);
552 ErrorArea[i]=sqrt(PeakArea[i]);
554 if(do_fit.Contains(
"fitted"))
556 fichier<< p->GetName() <<
"\t" << p->
GetPosition() <<
"\t" << tfit->GetParError(1) <<
"\t" << diff[i]<<
"\t" << fwhm <<
"\t" << tfit->GetParError(2) <<
"\t" << PeakArea[i] <<
"\t" << ErrorArea[i] <<
std::endl;
574 TArrayD *raw = 0x0, *tabulated = 0x0 ; raw =
new TArrayD(peaks.GetSize()); tabulated =
new TArrayD(peaks.GetSize()); TObject *obj ;
Gw::Peak1D *p;
576 TIter next(&peaks); Int_t nb_peaks = 0;
577 while ( (obj=next()) ) {
579 raw->SetAt(p->
GetPosition(),nb_peaks); tabulated->SetAt(atof(p->GetName()),nb_peaks); nb_peaks++;
582 TGraphErrors *graph =
583 new TGraphErrors(nb_peaks,raw->GetArray(),tabulated->GetArray());
584 graph->
Fit(
function,
"",
"",h->GetXaxis()->GetXmin(),h->GetXaxis()->GetXmax());
587 std::cout <<
" [+] – In DoEXOILLCalib::Calibrate : Check calibration - "<<
std::endl;
588 std::cout <<
" # of Peaks used " << tabulated->GetSize() <<
" E[tabulated] \t E[Calib] \t DELTA = E[tabulated] - E[Calib] \t FWHM (keV)" <<
std::endl;
589 for (Int_t i = 0; i < tabulated->GetSize(); i++) {
590 Double_t diff = tabulated->GetAt(i) -
function->Eval(raw->GetAt(i));
592 Double_t fwhm =
function->Eval(raw->GetAt(i)+p->
GetFWHM()/2) - function->Eval(raw->GetAt(i)-p->
GetFWHM()/2);
593 std::cout << tabulated->GetAt(i) <<
"\t" <<
function->Eval(raw->GetAt(i)) <<
"\t" << diff <<
"\t" << fwhm << std::endl;
595 std::cout <<
" [-] -----–--------------------------------------------- "<<
std::endl;
598 Int_t slot = fADCSpectra.IndexOf(h); TH1 *hc = (TH1 *)fESpectra.At(slot);
600 hc->SetBins(h->GetNbinsX(),
function->Eval(h->GetXaxis()->GetXmin()),function->Eval(h->GetXaxis()->GetXmax()));
601 for (Int_t i = 0; i < hc->GetNbinsX() + 1; i++) {
602 hc->SetBinContent(i,h->GetBinContent(i));
604 delete graph;
delete raw;
delete tabulated;
609 TSpectrum spectrum; Int_t NbPeaks = spectrum.Search(h,fSigma,
"goff",fThreshold);
615 Float_t *tab_X = spectrum.GetPositionX();
616 Float_t *tab_Y = spectrum.GetPositionY();
617 Int_t *index =
new Int_t[NbPeaks];
618 TMath::Sort(NbPeaks,tab_Y,index,1);
622 if ( tab_X[index[0]] < tab_X[index[1]] ) {
623 p = pc->
CreatePeak(h, tab_X[index[0]],
"bg apt");
624 p->SetName(
"1173.228");
626 list_of_peaks.Add(p);
627 p->
Fit(h,
"RN",
"pol1");
629 p = pc->
CreatePeak(h, tab_X[index[1]],
"bg apt");
630 p->SetName(
"1332.492");
632 list_of_peaks.Add(p);
633 p->
Fit(h,
"RN",
"pol1");
636 p = pc->
CreatePeak(h, tab_X[index[1]],
"bg apt");
637 p->SetName(
"1332.492");
639 list_of_peaks.Add(p);
640 p->
Fit(h,
"RN",
"pol1");
642 p = pc->
CreatePeak(h, tab_X[index[0]],
"bg apt");
643 p->SetName(
"1173.228");
645 list_of_peaks.Add(p);
646 p->
Fit(h,
"RN",
"pol1");
654 static const Int_t eu_np_peaks = 7;
655 static const Double_t eu_peaks[eu_np_peaks] = { 121.7824, 244.692, 344.276, 778.903, 964.131, 1112.116, 1408.011 };
661 TSpectrum spectrum; Int_t NbPeaks = spectrum.Search(h,fSigma,
"goff",fThreshold);
667 Float_t *tab_X = spectrum.GetPositionX();
668 Float_t *tab_Y = spectrum.GetPositionY();
669 Int_t *index =
new Int_t[NbPeaks];
671 TMath::Sort(NbPeaks,tab_X,index,1);
681 for (Int_t i = 0 ; i < eu_np_peaks; i++) {
683 Int_t which_ref = -1; Double_t what_ref = kMaxULong64;
685 for (Int_t j = 0; j < NbPeaks ; j++) {
686 if ( TMath::Abs( fcalib->Eval(tab_X[j]) - eu_peaks[i] ) < what_ref ) {
688 what_ref = TMath::Abs( fcalib->Eval(tab_X[j]) - eu_peaks[i] );
692 if ( which_ref == -1 ) {
697 p = pc->
CreatePeak(h, tab_X[which_ref],
"bg apt");
698 p->SetName( Form(
"%f",eu_peaks[i]) );
701 list_of_peaks.Add(p);
703 p->
Fit(h,
"RN",
"pol1");
708 Double_t slope = (1408.011-121.7824) / (tab_X[index[0]] - tab_X[index[NbPeaks-1]]) ;
709 Double_t offset = (1408.011 - slope*tab_X[index[0]]);
711 for (Int_t i = 0 ; i < eu_np_peaks; i++) {
713 Int_t which_ref = -1; Double_t what_ref = kMaxULong64;
715 for (Int_t j = 0; j < NbPeaks ; j++) {
716 if ( TMath::Abs( (slope*tab_X[j]+offset) - eu_peaks[i] ) < what_ref ) {
718 what_ref = TMath::Abs ( (slope*tab_X[j]+offset) - eu_peaks[i] );
722 if ( which_ref == -1 ) {
727 p = pc->
CreatePeak(h, tab_X[which_ref],
"bg apt");
728 p->SetName( Form(
"%f",eu_peaks[i]) );
731 list_of_peaks.Add(p);
733 p->
Fit(h,
"RN",
"pol1");
743 static const Int_t nb_ref_peaks = 3;
744 static const Double_t ref_peaks[nb_ref_peaks] = { 1164.860, 6110.98, 7790.454 };
751 TSpectrum spectrum; Int_t NbPeaks = spectrum.Search(h,fSigma,
"goff",fThreshold);
757 Float_t *tab_X = spectrum.GetPositionX();
758 Float_t *tab_Y = spectrum.GetPositionY();
759 Int_t *index =
new Int_t[NbPeaks];
761 TMath::Sort(NbPeaks,tab_X,index,1);
771 for (Int_t i = 0 ; i < nb_ref_peaks; i++) {
773 Int_t which_ref = -1; Double_t what_ref = kMaxULong64;
775 for (Int_t j = 0; j < NbPeaks ; j++) {
776 if ( TMath::Abs( fcalib->Eval(tab_X[j]) - ref_peaks[i] ) < what_ref ) {
778 what_ref = TMath::Abs( fcalib->Eval(tab_X[j]) - ref_peaks[i] );
781 if ( (which_ref == -1 ) || (what_ref > 2*fSigma*2.35482)){
786 p = pc->
CreatePeak(h, tab_X[which_ref],
"bg apt");
787 p->SetName( Form(
"%f",ref_peaks[i]) );
790 list_of_peaks.Add(p);
792 p->
Fit(h,
"RN",
"pol1");
805 TString FileName(DefFileName);
811 TIter next(TVirtualPad::Pad()->GetListOfPrimitives()); TObject *obj; TList list_of_peaks; TH1 *h = 0x0;
812 list_of_peaks.SetOwner(
false);
814 while ( (obj=next()) )
816 if ( obj->InheritsFrom(
"Gw::Peak1D") ) {
817 list_of_peaks.Add(obj);
819 if ( obj->InheritsFrom(
"TH1") ) {
824 fLog <<
warning <<
" Cannot find any spectrum in the current pad " <<
nline;
827 TString
tmp = h->GetName();
829 TF1 *f = (TF1 *)
fMap.adcCalib.FindObject(tmp.Data());
832 TString source(what_source);
833 if ( source.Contains(
"Co60") ) {
834 if ( list_of_peaks.GetSize() != 2 ) {
836 list_of_peaks.Draw();
839 if ( source.Contains(
"Eu152") ) {
840 if ( option.Contains(
"dry") ) {
841 if ( TMath::Abs(f->Eval(1000)-1000) < 0.4 && TMath::Abs(f->Eval(100)-100) < 0.4 ) {
848 list_of_peaks.Draw();
851 if ( source.Contains(
"BaCl") ) {
852 if ( option.Contains(
"dry") ) {
854 list_of_peaks.Draw();
857 if ( !option.Contains(
"dry") ) {
863 if(option.Contains(
"sto"))
865 if(option.Contains(
"use"))
868 TList temp_peak_list;
869 ifstream fichier(FileName, ios::in);
873 while(
true != fichier.eof())
887 while(name.IsFloat())
889 fichier>>position>>FWHM;
894 temp_peak_list.Add(p);
912 ofstream fichier2(FileName, ios::app);
916 for(Int_t IterPeak = 0; IterPeak< list_of_peaks.GetSize(); IterPeak++)
933 for(Int_t temp = 0; temp< temp_peak_list.GetSize(); temp++)
935 list_of_peaks.Add(temp_peak_list.At(temp));
942 ofstream fichier(FileName, ios::app);
946 for(Int_t IterPeak = 0; IterPeak< list_of_peaks.GetSize(); IterPeak++)
963 if(option.Contains(
"use"))
966 ifstream fichier(FileName, ios::in);
970 while(
true != fichier.eof())
984 while(name.IsFloat())
986 fichier>>position>>FWHM;
991 list_of_peaks.Add(p);
1028 fFoldDistri = MakeTH1<TH1F>(
"Fold",
"Fold distribution",20,0,20);
1031 fGG = MakeTH2<TH2F>(Form(
"ExE_%s",name),
"Gamma Gamma Matrix",4000,0,4000,4000,0,4000);
1032 fGT = MakeTH2<TH2F>(Form(
"TxE_%s",name),
"Time Energy Matrix",100,-50,+50,4000,0,4000);
1034 fUIDT = MakeTH2<TH2F>(Form(
"UIDxT_%s",name),
"Time Diff per Detector",
fMap.maxUID,0,+
fMap.maxUID,100,-50,+50);
1035 fUIDUID = MakeTH2<TH2F>(Form(
"UIDxUID_%s",name),
"Correlation between detector",
fMap.maxUID,0,+
fMap.maxUID,
fMap.maxUID,0,+
fMap.maxUID);
1037 fGeELaE = MakeTH2<TH2F>(Form(
"GeExLaE_%s",name),
"Correlation between detector",4000,0,4000,200,0,20000);
1038 fGeELaT = MakeTH2<TH2F>(Form(
"GeExLaT_%s",name),
"Correlation between detector",4000,0,4000,200,0,20000);
1050 for (UInt_t i = 0; i <
fGEEvent.size(); i++ ) {
1051 for (UInt_t j = i+1; j <
fGEEvent.size(); j++ ) {
1058 for (UInt_t j = 0; j <
fLAEvent.size(); j++ ) {
1096 fGG = MakeTH2<TH2F>(Form(
"ExE_%s",name),
"Gated Gamma Gamma Matrix",4000,0,4000,4000,0,4000);
1099 std::string
tmp; std::ifstream filein(Form(
"%s.gate",name));
1100 if ( filein.is_open() == true ) {
1101 getline(filein,tmp);
1103 while ( filein.good() && !filein.eof() ) {
1104 if ( tmp[0] ==
'#' ) {
1105 getline(filein,tmp);
1110 std::istringstream decode(tmp); std::pair<Float_t, Float_t> g; decode >> g.first >> g.second;
1112 if( decode.good() ) {
1113 fListOfGates.push_back(g);
1114 fLog <<
info <<
" add gate to gate the matrix " << g.first <<
" " << g.second <<
nline;
1116 getline(filein,tmp);
1127 Int_t nb_cond_filled;
1132 for (UInt_t i = 0; i <
fGEEvent.size(); i++ ) {
1137 for (
size_t gg = 0; gg < fListOfGates.size(); gg++) {
1138 if (
fGEEvent[i]->E < fListOfGates[gg].first ) {
1141 if (
fGEEvent[i]->E > fListOfGates[gg].second ) {
1144 nb_cond_filled++;
fGEEvent[i]->UID = 1;
1148 if ( nb_cond_filled ) {
1149 switch (nb_cond_filled) {
1152 for (UInt_t i = 0; i <
fGEEvent.size(); i++ ) {
1155 for (UInt_t j = 0; j <
fGEEvent.size(); j++ ) {
1166 for (UInt_t i = 0; i <
fGEEvent.size(); i++ ) {
1167 for (UInt_t j = 0; j <
fGEEvent.size(); j++ ) {
1178 for (UInt_t i = 0; i <
fGEEvent.size(); i++ ) {
1179 for (UInt_t j = 0; j <
fGEEvent.size(); j++ ) {
1203 GetTree()->Branch(
"TS", &TS,
"TS/l");
1204 GetTree()->Branch(
"FOLD",&FOLD,
"FOLD/I");
1206 GetTree()->Branch(
"E", E,
"E[FOLD]/F");
1207 GetTree()->Branch(
"DT",DT,
"DT[FOLD]/I");
1208 GetTree()->Branch(
"ID", ID,
"ID[FOLD]/I");
virtual void Exec(Option_t *option="")
header file for PeakCreator.cpp
virtual TF1 * SetSignalFunction(const char *nameFunc="gaus", TH1 *h=0x0)=0
Set pre-defined function to fit the signal.
header file for DefaultKeyFactory.cpp
virtual Bool_t LoadConfig(const Char_t *fname="EXOILLWatcher.conf")
virtual void Fit(TH1 *h, Option_t *optFit="RN", Option_t *optBkg="lin")=0
Fit peak with background.
RawMatrices(const char *name, const char *title)
MyILLTree(const char *name, const char *title, TTree *tree=0x0)
LogMessage & warning(LogMessage &)
void FindEu152(TH1 *h, TList &list_of_peaks, const TF1 *fcalib)
virtual void SetPosition(const Double_t position, Option_t *axis="X")
Set Position of peak.
virtual void Exec(Option_t *option="")
virtual void SetFWHM(const Double_t FWHM, Option_t *axis="X")
Set FWHM of peak.
virtual UInt_t GetDataLength() const
LogMessage & nline(LogMessage &)
static PeakCreator * AddPeakCreator(TVirtualPad *pad=0x0)
add a peak creator to the given pad. Current pad if argument is 0x0
Double_t GetPeakIntegral() const
Get integral of peak after calling area method.
Base class for a watcher for EXOGAM.
GatedGG(const char *name, const char *title)
void SaveMAP(const Char_t *fname="NOMADMap.conf.new", Option_t *opt="")
Save current mapping.
void Calibrate(TH1 *h, TF1 *function, const TList &peaks)
LogMessage & info(LogMessage &)
manipulator to modify the LogMessage
Base class for a Watcher that fill a TTree or some branches of a TTree.
std::vector< NOMADEvent * > fGEEvent
subevent per type
virtual void Fit(TH1 *histo, Option_t *optFit="RN", Option_t *optBkg="pol1")
Fit peak with background.
A RawFrame gives direct access to the underlying buffer.
virtual Double_t GetFWHM(Option_t *axis="X") const
Get FWHM of peak.
ULong64_t fCurrentTS
Global TS for the current event.
virtual void Exec(Option_t *option="")
virtual ULong64_t GetUID() const =0
Get unique ID. Could be event number / timestamp for instance.
LogMessage & dolog(LogMessage &)
virtual Double_t GetPosition(Option_t *axis="X") const
Get position of peak.
Base Key for frames assoeciated with a id which could be event # or Timestamp (32 bits) ...
void Calib(const Char_t *what_source="Co60", Option_t *opt="dry", Option_t *DefFileName="CalibStorage.txt")
apply calibration for the spectrum in the current pad
Base class for building control spectra and calibrate.
Built some correlation matrices.
void TagOn(TObject *)
Add this histogram to the list of tagged histograms.
void DisplayPeaks(Option_t *opt="BaCl", Option_t *fit="fitted")
Display some peaks on the spectrum in the current pad.
void FindCo60(TH1 *h, TList &list_of_peaks)
virtual Bool_t SetTrigger(ADF::DFTrigger *=0x0)
Set the Frame to be watched.
std::vector< NOMADEvent * > fLAEvent
Base class for a trigger on a data flow.
ADF::LogMessage & endl(ADF::LogMessage &log)
virtual void Area(Option_t *opt="h")
to get the Area (+bkg) of this peak
void SearchParameters(Double_t sig=2.0, Double_t thre=0.05)
Parameters required by the search method.
A BasePeak is defined by a height, intensity and a dimension of the peak.
Shows how to save data in a TTree.
virtual void Exec(Option_t *option="")
ClassImp(BaseEXOILLWatcher)
A graphical interface for placing schematic peak onto a 1D histogram with a given position...
static TF1 * GetGlobalPeakFWHM()
virtual void SetBranches()
virtual TF1 * SetSignalFunction(const char *nameFunc="gaus", TH1 *h=0x0)
Set pre-defined function to fit the signal.
std::vector< NOMADEvent > fEvent
subevents
UInt_t fNbSubEvent
number of subevents read from fFrame
void ProcessDisplayPeaks(Int_t np_peaks, const Double_t peaks[], Option_t *fit)
virtual void Exec(Option_t *option="")
void AlignTS(Option_t *opt="dry", Option_t *algo="mean")
align all time spectra using which_ref as a reference.
virtual TF1 * GetSigFunction()
Get signal function.
virtual BasePeak * CreatePeak(const TH1 *h, Double_t x, Option_t *opt="")
It creates a peak at position x for the 1D spectra.
void FindBaCl2(TH1 *h, TList &list_of_peaks, const TF1 *fcalib)
DoEXOILLCalib(const char *name, const char *title)
UInt_t SetOffset(UInt_t off=0u) const
change the current position.
TTree * GetTree()
to get the current Tree