26 #include "MFMBasicFrame.h"
27 #include "MFMBlobFrame.h"
28 #include "MFMExogamFrame.h"
29 #include "MFMEbyedatFrame.h"
30 #include "MFMMergeFrame.h"
31 #include "MFMCoboFrame.h"
32 #include "MFMOscilloFrame.h"
33 #include "DataParameters.h"
36 #include "TPaveStats.h"
37 #include "TPavesText.h"
39 #include "DataParameters.h"
41 #include "BashColor.h"
49 fMFMFrame(new MFMCommonFrame()),
50 fEBYFrame(new MFMEbyedatFrame()),
51 fInsideFrame(new MFMCommonFrame()),
52 fMergedFrame(new MFMMergeFrame()),
54 fDataParameters(new DataParameters())
64 std::cout <<
" fMFMinADFFrame " <<
std::endl;
76 std::cout <<
" fInsideFrame " <<
std::endl;
80 std::cout <<
" fMergedFrame " <<
std::endl;
84 std::cout <<
" fDataParameters " <<
std::endl;
92 if(full_name_of_action_file==
"")full_name_of_action_file =
gActionDefault;
94 DataParameters *tmp_data_parameter =
new DataParameters();
96 Int_t result = tmp_data_parameter->FillFromActionFile(full_name_of_action_file.data());
103 cout <<
" ***** ACTIONS PARAMETER FOR MFM Frames read From " << full_name_of_action_file <<
std::endl;
105 else {
delete tmp_data_parameter; tmp_data_parameter = 0x0; }
118 printf(
"GANILInterface::Exec is called \n");
140 frame_type =
fMFMFrame->GetFrameTypeAttribut();
143 switch ( frame_type ) {
144 case MFM_COBO_FRAME_TYPE:
147 case MFM_COBOF_FRAME_TYPE:
150 case MFM_EXO2_FRAME_TYPE:
153 case MFM_OSCI_FRAME_TYPE:
156 case MFM_RAWD_FRAME_TYPE:
159 case MFM_EBY_EN_FRAME_TYPE:
164 case MFM_EBY_TS_FRAME_TYPE:
169 case MFM_EBY_EN_TS_FRAME_TYPE:
174 case MFM_MERGE_EN_FRAME_TYPE:
177 case MFM_MERGE_TS_FRAME_TYPE:
217 fMeanNumberOfValues(0x0),
218 fLabelsDistribution(0x0)
221 fFrameType->GetXaxis()->SetBinLabel(kUnknown+1,
"Unknown");
234 fFrameSize = MakeTH1 <TH1I> (
"FrameSize",
"Frame Size Distribution",1000,0,10000) ;
243 fParXValue = MakeTH2 <TH2I> (
"ParXValue",
"Values for all Parameters",max_label,0,max_label,2048,0,16384) ;
244 fLabelsDistribution = MakeTH1 <TH1D>(
"LabelDist",
"Gives the distribution of labels per MFM frames",max_label,0,max_label);
247 fParXValue = MakeTH2 <TH2I> (
"ParXValue",
"Values for all Parameters",20,0,20,2048,0,16384) ;
248 fLabelsDistribution = MakeTH1 <TH1D>(
"LabelDist",
"Gives the distribution of labels in MFM frames",20,0,20);
253 fLabelsDistribution->GetXaxis()->SetTitle(
"Label, see ACTIONS_agata_vamos.CHC_PAR file for meaning");
254 fMeanNumberOfValues = MakeTH1 <TH1D>(
"NbOfValue",
"Gives the number of values in MFM frames",500,0,500);
265 return Watcher::GetFromTrigger(trigger,
"data:ranc0",
fMFMinADFFrame);
272 if(full_name_of_action_file==
"")full_name_of_action_file =
gActionDefault;
294 TString option = opt;
295 c->Divide(2,2,0.001,0.001);
315 switch ( frame_type ) {
316 case MFM_COBO_FRAME_TYPE:
318 case MFM_COBOF_FRAME_TYPE:
320 case MFM_EXO2_FRAME_TYPE:
322 case MFM_OSCI_FRAME_TYPE:
324 case MFM_RAWD_FRAME_TYPE:
326 case MFM_EBY_EN_FRAME_TYPE:
329 for (Int_t i = 0; i <
fEBYFrame->GetNbItemsAttribut(); i++) {
332 fEBYFrame->EbyedatGetParameters(i, &label, &value);
339 case MFM_EBY_TS_FRAME_TYPE:
342 for (Int_t i = 0; i <
fEBYFrame->GetNbItemsAttribut(); i++) {
345 fEBYFrame->EbyedatGetParameters(i, &label, &value);
352 case MFM_EBY_EN_TS_FRAME_TYPE:
354 for (Int_t i = 0; i <
fEBYFrame->GetNbItemsAttribut(); i++) {
357 fEBYFrame->EbyedatGetParameters(i, &label, &value);
365 case MFM_MERGE_EN_FRAME_TYPE:
367 case MFM_MERGE_TS_FRAME_TYPE:
391 GetTree()->Branch(
"NbValues",&fNbValues,
"NbValues/I");
392 GetTree()->Branch(
"Values",fValues,
"Values[NbValues]/i");
393 GetTree()->Branch(
"Labels",fLabels,
"Labels[NbValues]/i");
398 return Watcher::GetFromTrigger(trigger,
"data:ranc0",
fMFMinADFFrame);
409 uint16_t
value, label; UInt_t frame_type =
fMFMFrame->GetFrameTypeAttribut();
412 switch ( frame_type ) {
413 case MFM_COBO_FRAME_TYPE:
415 case MFM_COBOF_FRAME_TYPE:
417 case MFM_EXO2_FRAME_TYPE:
419 case MFM_OSCI_FRAME_TYPE:
421 case MFM_RAWD_FRAME_TYPE:
423 case MFM_EBY_EN_FRAME_TYPE:
424 fNbValues =
fEBYFrame->GetNbItemsAttribut();
426 for (Int_t i = 0; i <
fEBYFrame->GetNbItemsAttribut(); i++) {
429 fEBYFrame->EbyedatGetParameters(i, &label, &value);
435 case MFM_EBY_TS_FRAME_TYPE:
437 fNbValues =
fEBYFrame->GetNbItemsAttribut();
438 for (Int_t i = 0; i <
fEBYFrame->GetNbItemsAttribut(); i++) {
441 fEBYFrame->EbyedatGetParameters(i, &label, &value);
447 case MFM_EBY_EN_TS_FRAME_TYPE:
448 fNbValues =
fEBYFrame->GetNbItemsAttribut();
449 for (Int_t i = 0; i <
fEBYFrame->GetNbItemsAttribut(); i++) {
452 fEBYFrame->EbyedatGetParameters(i, &label, &value);
459 case MFM_MERGE_EN_FRAME_TYPE:
461 case MFM_MERGE_TS_FRAME_TYPE:
495 DataPar *par; Int_t is_time = 0;
500 fVTS[0].first = par->Label(); is_time++;
507 fVTS[1].first = par->Label(); is_time++;
514 fVTS[2].first = par->Label(); is_time++;
522 fT[0].first = par->Label(); is_time++;
529 fT[1].first = par->Label(); is_time++;
536 fT[2].first = par->Label(); is_time++;
547 fMW05.first = par->Label();
554 int atctocluster[60];
555 for(
int i=0 ; i<60 ; i++)atctocluster[i]=-1;
558 atctocluster[3] = 12;
559 atctocluster[4] = 13;
562 atctocluster[7] = 11;
566 std::pair<std::pair<Int_t,Int_t>,Float_t> p;
568 for (Int_t atc = 0; atc < 60; atc++) {
570 if(par && atctocluster[atc]==-1) cout<<
"\E[31;1mWARNING, ATC "<<atc<<
" needs to be configure in the DefaultWatchers/GANILWatchers.C file, in the atctocluster tab !!!\E[m"<<
endl;
571 if (par && atctocluster[atc]>=0) {
572 p.first.first = par->Label();
573 p.first.second = 3*atctocluster[atc]+0;
578 if (par && atctocluster[atc]>=0) {
579 p.first.first = par->Label();
580 p.first.second = 3*atctocluster[atc]+1;
585 if (par && atctocluster[atc]>=0) {
586 p.first.first = par->Label();
587 p.first.second = 3*atctocluster[atc]+2;
593 if ( is_time == 6 ) {
594 fTimeCorrelation = MakeTH2<TH2F>(
"T_AGATAxVAMOS",
"Time Correlation between AGATA and VAMOS",
602 for (
size_t vamos = 0; vamos <
fAGATAE.size(); vamos++) {
603 if (
fAGATAE[vamos].first.second == i ) {
604 TH2 *h = MakeTH2<TH2F>(Form(
"CorE_%d_%d",i,
fAGATAE[vamos].first.first),
"Correlation energy AGATA versus VAMOS",
614 fCoreCommomVamos = MakeTH1<TH1F>(
"CoreCommonVamos",
"Core common spectrum from Vamos side",2000,0,2000);
618 fCoreCommomAgata = MakeTH1<TH1F>(
"CoreCommonAgata",
"Core common spectrum from Agata side",2000,0,2000);
622 fSumSpectraVamos = MakeTH1<TH1F>(
"SumSpectraVamos",
"Sum spectra from Vamos side",2000,0,2000);
626 fSumSpectraAgata = MakeTH1<TH1F>(
"SumSpectraAgata",
"Sum spectra spectrum from Agata side",2000,0,2000);
630 fTimeVTS_to_TS = MakeTH1<TH1F>(
"TimeVTS_to_TS",
"Delay VTS-AGATA Timestamp",600,-3000,3000);
631 fTimeVTS_to_TS->GetXaxis()->SetTitle(
"Delay VTS-AGATA Timestamp [ns]");
634 fTOF = MakeTH1<TH1F>(
"TOF",
"Time Of Flight",1400,3000,10000);
635 fTOF->GetXaxis()->SetTitle(
"Time of flight [ADC]");
636 fTOF->GetYaxis()->SetTitle(
"Counts");
638 fVTS_Centrum = MakeTH2<TH2F>(
"VTS-Centrum",
"VTS Centrum correlation",3600,0,3600,3600,0,3600);
642 fCoreDistri = MakeTH1<TH1F>(
"CoreDistriIn",
"Core distribution",180,0,180);
644 fTimeStampSpread = MakeTH1<TH1F>(
"CentrumTimeStampSpread",
"CentrumTimeStampSpread (ms)",5000,0,50);
645 fTimeStampSpread->GetXaxis()->SetTitle(
"Time between two successive centrum timestamps (ms)");
652 if ( !Watcher::GetFromTrigger(trigger,
"event:data:psa",
fEventPSA) )
654 if ( !Watcher::GetFromTrigger(trigger,
"data:ranc0",
fMFMinADFFrame) )
662 k_defined = ConfAgent::theGlobalAgent()->GetDFAgent()->WhichKnownKey (i_asked,i_asked);
663 f_defined = ConfAgent::theGlobalAgent()->GetDFAgent()->WhichKnownFrame (i_asked,i_asked);
665 Frame *f = MainFrameFactory::theMainFactory().New(k_defined,f_defined);
698 printf(
"EventPSAWatcher::GetDataPSA cannot LinkSubFrame \n");
704 printf(
"EventPSAWatcher::GetDataPSA cannot Read \n");
708 return GetDataPointer<PSAInterface>(
fPSAFrame);
719 TString Name = Form(
"Coinc_CrystSpectra_%d_%d",PadNbr+1,PadNbr+16);
720 TString Title =
"Crystal of the hited crystals in coincidence between agata and vamos";
726 c->Divide(4,4,0.001,0.001);
728 double topmarg = 0.0679612;
729 double rightmarg = 0.0121951;
730 double leftmarg = 0.0983588;
731 double bottommarg = 0.11165;
734 gPad->SetRightMargin(rightmarg);
735 gPad->SetTopMargin(topmarg);
736 gPad->SetLeftMargin(leftmarg);
737 gPad->SetBottomMargin(bottommarg);
758 TPaveStats *st = (TPaveStats*)
fCoreDistri->FindObject(
"stats");
761 st->SetX2NDC(1-rightmarg);
762 st->SetY2NDC(1-topmarg);
763 st->SetX1NDC(0.681013);
764 st->SetY1NDC(0.663962);
775 TString Name = Form(
"Coinc_CrystSpectra_%d_%d",PadNbr+1,PadNbr+16);
779 c->Divide(4,4,0.001,0.001);
787 gPad->SetRightMargin(rightmarg);
788 gPad->SetTopMargin(topmarg);
789 gPad->SetLeftMargin(leftmarg);
790 gPad->SetBottomMargin(bottommarg);
792 h->SetBit(TH1::kNoTitle);
794 h->GetXaxis()->SetTitle(
"E AGATA (keV)");
795 h->GetXaxis()->SetLabelSize(0.05);
796 h->GetXaxis()->SetTitleSize(0.06);
797 h->GetXaxis()->SetTitleOffset(0.85);
799 h->GetYaxis()->SetTitle(
"ADC [VAMOS electronic]");
800 h->GetYaxis()->SetLabelSize(0.05);
801 h->GetYaxis()->SetTitleSize(0.06);
802 h->GetYaxis()->SetTitleOffset(0.90);
811 st = (TPaveStats*)h->FindObject(
"stats");
814 st->SetX2NDC(1-rightmarg);
815 st->SetY2NDC(1-topmarg);
816 st->SetX1NDC(0.681013);
817 st->SetY1NDC(0.663962);
828 TString Name =
"Coinc_Time";
829 TString Title =
"Time coincidences between vamos and agata";
833 c->Divide(2,2,0.001,0.001);
835 double topmarg = 0.0508798;
836 double rightmarg = 0.00236867;
837 double leftmarg = 0.0820247;
838 double bottommarg = 0.0995025;
842 for(
int i=0 ; i<4 ; i++)
846 gPad->SetRightMargin(rightmarg);
847 gPad->SetTopMargin(topmarg);
848 gPad->SetLeftMargin(leftmarg);
849 gPad->SetBottomMargin(bottommarg);
863 if(i==0)gPad->SetLogy();
865 htemp->GetXaxis()->SetTitleSize(0.05);
866 htemp->GetXaxis()->SetLabelSize(0.05);
867 htemp->GetXaxis()->SetTitleOffset(1.);
869 htemp->GetYaxis()->SetTitleSize(0.05);
870 htemp->GetYaxis()->SetLabelSize(0.05);
871 htemp->GetYaxis()->SetTitleOffset(0.89);
876 TPaveStats *st = (TPaveStats*)htemp->FindObject(
"stats");
879 st->SetX2NDC(1-rightmarg);
880 st->SetY2NDC(1-topmarg);
883 TPaveText *txt = (TPaveText*)gPad->FindObject(
"title");
886 double width = txt->GetY2NDC()-txt->GetY1NDC();
887 txt->SetY2NDC(1-topmarg);
888 txt->SetY1NDC(txt->GetY2NDC()-width);
889 txt->SetTextSize(0.05);
898 TString Name =
"Coinc_CommonAndSum";
899 TString Title =
"Core common and Sum spectra from agata and vamos";
903 c->Divide(1,2,0.001,0.001);
905 double topmarg = 0.0657599;
906 double rightmarg = 0.00726832;
907 double leftmarg = 0.0490612;
908 double bottommarg = 0.114119;
912 for(
int i=0 ; i<2 ; i++)
916 gPad->SetRightMargin(rightmarg);
917 gPad->SetTopMargin(topmarg);
918 gPad->SetLeftMargin(leftmarg);
919 gPad->SetBottomMargin(bottommarg);
921 TH1 *htemp1 = h[i][0];
924 htemp1->SetBit(TH1::kNoTitle);
926 htemp1->SetStats(
false);
929 h[i][1]->SetBit(TH1::kNoTitle);
930 h[i][1]->Draw(
"same");
931 h[i][1]->SetStats(
false);
933 htemp1->GetXaxis()->SetTitle(
"Energy (keV)");
934 htemp1->GetXaxis()->SetTitleSize(0.06);
935 htemp1->GetXaxis()->SetLabelSize(0.06);
936 htemp1->GetXaxis()->SetTitleOffset(0.91);
938 htemp1->GetYaxis()->SetTitle(
"Counts");
939 htemp1->GetYaxis()->SetTitleSize(0.06);
940 htemp1->GetYaxis()->SetLabelSize(0.06);
941 htemp1->GetYaxis()->SetTitleOffset(0.45);
946 TPaveStats *st = (TPaveStats*)htemp1->FindObject(
"stats");
949 st->SetX2NDC(1-rightmarg);
950 st->SetY2NDC(1-topmarg);
953 TLegend *leg =
new TLegend(0.823664,0.699182,1-rightmarg,1-topmarg,((TString)htemp1->GetTitle()).ReplaceAll(
" from Vamos side",
""),
"NDC");
954 leg->AddEntry(h[i][0],
"VAMOS",
"l");
955 leg->AddEntry(h[i][1],
"AGATA",
"l");
971 std::vector < std::pair<Int_t,Float_t> > agata_e;
974 for(UInt_t iu = 0u; iu <nb_frames; iu++) {
976 agata_e.push_back(std::pair<Int_t,Float_t>(data->
GetUID(),data->
GetE()));
980 uint16_t
value, label;
981 std::pair<Float_t,Float_t> TSC;
983 Float_t isVAMOSE[180];
984 for (Int_t isvamos = 0; isvamos < 180; isvamos++ ) {
985 isVAMOSE[isvamos] = -1;
991 Int_t fNbValues =
fEBYFrame->GetNbItemsAttribut(); Int_t isVTS = 0; Int_t isT = 0; Bool_t is_RawTof =
false;
992 for (Int_t i = 0; i < fNbValues; i++) {
995 fEBYFrame->EbyedatGetParameters(i, &label, &value);
997 if ( label ==
fRawToF.first ) {
1002 if ( label ==
fMW05.first ) {
1007 for (
size_t vts = 0; vts <
fVTS.size(); vts++)
1008 if ( label ==
fVTS[vts].first ) {
1013 for (
size_t t = 0; t <
fT.size(); t++)
1014 if ( label ==
fT[t].first ) {
1020 for(Int_t evamos = 0; evamos < (int)
fAGATAE.size(); evamos++ ) {
1021 if (
fAGATAE[evamos].first.first == label ) {
1029 ULong64_t fullvts = 0UL;
1030 fullvts = (
fVTS[2].second << 32) + (
fVTS[1].second<<16) + (
fVTS[0].second);
1031 ULong64_t fullt = 0UL;
1032 fullt = (
fT[2].second << 32) + (
fT[1].second<<16) + (
fT[0].second);
1040 double DiffTimeVTS = ((double)fullvts-(
double)
fFirstVTS)*10*1e-9;
1041 double DiffTimeCentrum = ((double)fullt-(
double)
fFirstCentrum)*10*1e-9;
1072 double DeltaTCentrum = ((double)fullt-(
double)
fLastCentrum)*10*1e-6;
1074 fTimeStampSpread->Fill(DeltaTCentrum);
1076 double TVamosToAgata = (Double_t(fullvts) - Double_t(agatats))*10;
1081 fVTS_Centrum->Fill(fmod(DiffTimeVTS,3600),fmod(DiffTimeCentrum,3600));
1085 double SumEVamos = 0.;
1086 double SumEAgata = 0.;
1093 for (
size_t ii = 0; ii < agata_e.size(); ii++){
1095 CrystalNbr = agata_e[ii].first;
1096 EVamos = isVAMOSE[CrystalNbr];
1097 EAgata = agata_e[ii].second;
1099 SumEVamos += EVamos;
1100 SumEAgata += EAgata;
1113 h->Fill(EAgata,EVamos);
1146 int size = 3 + 3 + ((TString)GetName()).Length() + 5 + ((TString)GetTitle()).Length() + 3 + 3;
1147 for(
int i=0; i<
size ; i++) std::cout<<
"*";
1149 std::cout<<
"*** "<<GetName()<<
" --- "<<GetTitle()<<
" ***"<<
std::endl;
1150 for(
int i=0; i<
size ; i++) std::cout<<
"*";
1153 std::cout<<
"Number of treated events : "<<fNevts<<
std::endl;
1155 std::cout<<
"Number of reversed VTS timestamp : "<<fNVTSRev<<
std::endl;
1156 std::cout<<
"Number of reversed Centrum timestamp : "<<fNCentrumRev<<
std::endl;
1166 #include "LocalDefines.hh"
1167 #include "GWInterface.hh"
1169 #include "Defines.hh"
1170 #include "Parameters.hh"
1172 #include "HistoManager.hh"
1174 #include "Analysis.hh"
1178 VAMOSWatcher::VAMOSWatcher(
const char *name,
const char *title, TTree *tree):
1206 cout <<
"Found Tree" <<
endl ;
1215 fLog <<
error <<
" Cannot Init VAMOS Watcher, Set Watcher to Inactive " <<
dolog;
1231 return Watcher::GetFromTrigger(trigger,
"data:ranc0", fMFMinADFFrame);
1234 void VAMOSWatcher::Clear(Option_t * )
1249 void VAMOSWatcher::FillBranches()
1251 static Int_t compt = 0;
1256 UShort_t Pattern =0;
1259 const short NTrigBranch = 4;
1261 Char_t TrigName[NTrigBranch][20] = {
"VAMOS",
"DC1",
"AGAVA",
"DC2",
"MW"};
1262 UShort_t fTrigLbl[NTrigBranch] = {1,1000,2000,3000,4000};
1266 for(UShort_t k=0; k< NTrigBranch;k++)
1273 Int_t
size = fEBYFrame->GetNbItemsAttribut();
1277 for (Int_t i = 0; i <
size; i++) {
1279 fEBYFrame->EbyedatGetParameters(i, &Data[0], &Data[1]);
1286 sprintf(Error,
"LABEL Error : Label 0 found in the data MABEL: %d DATA : %d !",Data[0],Data[1]);
1287 MErr * Er =
new MErr(WhoamI,0,0, Error);
1292 for(UShort_t j = 0; j< NTrigBranch ; j++) {
1293 if(Data[0] == fTrigLbl[j] && Data[1] > 0)
1306 if(Pattern != PatMask)
1308 cout <<
"\n ! Error in Merging " <<
endl;
1309 for(UShort_t i = 0; i<NTrigBranch ; i++)
1310 cout << TrigName[i] <<
" : " << ((Pattern>>i) & 1) <<
" - " ;
1311 cout << Pattern <<
" -> Expecting : " << PatMask <<
endl;
1319 ULong64_t MFM_TS = 0;
1321 MFM_TS = fEBYFrame->GetTimeStamp();
1324 Data[1] = (UShort_t) (MFM_TS*1.e-5) ;
1329 Data[1] = (UShort_t) (fEBYFrame->GetEventNumber()) ;
1339 ULong64_t ATS = LTS->GetTS();
1340 if(ATS != MFM_TS || ATS==0)
1341 cout <<
" \033[1;31m /!\\ Error : \033[0m Time Stamp Mismatch [MFM : " << MFM_TS <<
"] - [AGAVA : "<< ATS <<
"] [Diff = " << MFM_TS-ATS <<
"]"<<
endl;
1370 An->FillHistograms();
1384 void VAMOSWatcher::RetriveHistograms()
1389 void VAMOSWatcher::RetrivePointers()
1394 DetManager *DM = DetManager::getInstance();
1397 Id = (Identification*) DM->GetDetector((
char *)
"Identification");
1401 LTS = (TimeStamp*) DM->GetDetector((
char *)
"LTS");
1404 TP = (TargetPos*) DM->GetDetector((
char *)
"TP");
1415 void VAMOSWatcher::InitVAMOS(UShort_t mode, Option_t *opt, Int_t RunNr,
const Char_t* OutDir)
1420 LM = LogManager::getInstance();
1421 LM->SetLogFile(Form(
"%s/Run%4.4d.log",OutDir,RunNr));
1423 L = LM->GetFilePtr();
1424 PL =
new Parameters(16387);
1426 H =
new HistoManager();
1428 if ( GetTree() == 0x0 ) {
1429 std::cout <<
" Warning empty tree ! " <<
std::endl;
1432 TFile *
tmp =
new TFile(
"tmp_tree_vamos.root",
"recreate");
1435 An =
new Analysis(GetTree(),PL,H);
1440 char actionFilePAR[500];
1442 An->SetOutTFile(
new TFile(opt,
"recreate") );
1444 Int_t NumberOfParameters = 0;
1448 string BasePath =
"/agatadisks/" ;
1449 BasePath += Analysis_ExpName.c_str() ;
1451 BasePath += Analysis_ExpName.c_str() ;
1453 string rpath = An->GetDirName(RunNr,BasePath.c_str());
1454 fActionCurrent = BasePath + rpath;
1455 fActionCurrent +=
"/RCC_conf_files/ACTIONS_" ;
1456 fActionCurrent += Analysis_ExpName.c_str() ;
1457 fActionCurrent +=
".CHC_PAR";
1461 PL->GetParametersFromActionFile((
char *)fActionCurrent.c_str());
1466 fActionCurrent.empty();
1467 fActionCurrent =
"./ACTIONS_" ;
1468 fActionCurrent += Analysis_ExpName.c_str() ;
1469 fActionCurrent +=
".CHC_PAR";
1470 PL->GetParametersFromActionFile((
char *)fActionCurrent.c_str());
1475 Float_t Brho = An->GetBrhoRef(RunNr);
1480 fBashColor->SetErrorOut();
1482 cout <<
"Brho needs to be define for Run "<< RunNr <<
" in ./ConfVAMOS/Calibs/ListBrho.dat ==> Exit !" <<
endl;
1483 fBashColor->ResetColor();
1484 gROOT->ProcessLine(
".qqqqqqqqqqqqqqqqqqqqqqqqqqqq");
1490 cout <<
"No RunNr specified, Default Mode " <<
endl;
1491 cout <<
"Reading Paramter List from " << fActionCurrent <<
endl;
1492 cout <<
"Setting Brho to 1.0 Tm" <<
endl;
1495 PL->GetParametersFromActionFile((
char *)fActionCurrent.c_str());
1497 NumberOfParameters = PL->GetNParameters();
1500 PL->Add(16384,
"DAQ_PATTERN",13);
1501 NumberOfParameters++;
1503 PL->Add(16385,
"MFM_TS",13);
1504 NumberOfParameters++;
1505 PL->Add(16386,
"MFM_EVTNUM",13);
1506 NumberOfParameters++;
1508 PL->SetNParameters(NumberOfParameters);
1510 An->GetMap()->DataOp(PL);
1511 An->SetUpDetectors(fMode);
1512 DetManager *DM = DetManager::getInstance();
1515 RetriveHistograms();
1522 fBashColor->SetErrorOut();
1524 fLog <<
error <<
" Cannot Init VAMOS Watcher, Set Watcher to Inactive ==> Exit" <<
dolog;
1525 fBashColor->ResetColor();
1527 gROOT->ProcessLine(
".qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq");
1531 Float_t VAMOSWatcher::SetBrhoRef(Float_t brho)
1533 Float_t cbrho = fBrhoRef;
1536 if ( brho > 0. && brho < 2.4) {
1539 An->SetBrhoWatcher(fBrhoRef);
1542 cout <<
"WRONG Brho !! Switch Watcher as INACTIVE" <<
endl;
1556 VAMOSWatcher::~VAMOSWatcher()
1560 An = CleanDelete(An);
1561 PL = CleanDelete(PL);
1575 void VAMOSWatcher::DoCanvas(TCanvas *c, Option_t *opt)
1577 TString option = opt;
1578 c->Divide(2,2,0.001,0.001);
1580 TH1 *h = H->FindHistogram((
char *)
"Eg_vsNr");
1586 void VAMOSWatcher::Exec(Option_t *option)
1596 if ( fEGTYPE == kEBYENTS || fEGTYPE == kEBYTS || fEGTYPE == kEBYENTS ) {
1606 VAMOSVertexBuilder::VAMOSVertexBuilder(
const char *name,
const char *title):
1614 fVertexFrame = MainFrameFactory::theMainFactory().
1616 fIsToBeDeleted =
true;
1619 fVAMOSWatcher = (VAMOSWatcher *)Watcher::GetLastRegistered(
"VAMOSWatcher",
"class");
1620 if ( fVAMOSWatcher == 0x0 ) {
1621 fLog <<
error <<
" A VAMOSWatcher watcher should be registered before " <<
nline;
1624 fTP = fVAMOSWatcher->GetTP();
1627 fId = fVAMOSWatcher->GetId();
1632 void VAMOSVertexBuilder::Exec(Option_t * )
1634 if ( fVAMOSWatcher ) {
1647 Double_t Beta = fId->GetBeta();
1652 Double_t Theta = fTP->GetTheta();
1653 Double_t Phi = fTP->GetPhi();
1655 Double_t ThetaZ = Theta;
1656 Double_t PhiZ = atan(tan(Phi/1000.)*cos(Theta/1000.))*1000.;
1661 Double_t XV = sin(ThetaZ/1000.)*cos(PhiZ/1000.);
1662 Double_t YV = sin(PhiZ/1000.);
1663 Double_t ZV = cos(ThetaZ/1000.)*cos(PhiZ/1000.);
1664 Double_t XAgata = -1.*YV;
1665 Double_t YAgata = XV;
1666 Double_t ZAgata = ZV;
1671 SetVertex(Xt,Yt,Zt,XAgata,YAgata,ZAgata,Beta);
TH2 * fTimeCorrelation
time correlation AGATA versus VAMOS i.e. Delta[TSAGATA-VTS] versus TimeOfFlight
virtual Bool_t IsValid() const
true if it is a valid pointer
ADF::Frame * fPSAFrame
current PSA frame to help decoding one by one
virtual Key * GetKey()=0
To get the Key associated to this frame.
virtual Bool_t SetTrigger(ADF::DFTrigger *=0x0)
set trigger in which one can retrieve encapsulated MFM Frame
printf("******************************************************************** \n")
virtual Frame * GetFrame() const
MFMEbyedatFrame * fEBYFrame
used to decode depending of the MFM type
Interface for any watcher that is a VertexBuilder.
Int_t fEGTYPE
To get the EG TYPE.
LogMessage & error(LogMessage &)
virtual UInt_t Read()
It reads the content into dedicated structures from the Frame (data part)
MFMCommonFrame * fInsideFrame
virtual ~GANILInterface()
virtual Double_t GetE(UInt_t=0u) const =0
to get the energy associated to the core
TH1 * fCoreCommomVamos
All GE.
virtual ~AGATAVAMOSCoinc()
virtual Int_t GetUID() const =0
to get the crystal ID
AGATAVAMOSCoinc(const char *, const char *, TDirectory *sp_dir=0x0, TDirectory *tag_dir=0x0)
TH1D * fLabelsDistribution
DataParameters * fDataParameters
use to decode the Raw MFM frame
virtual Key * GetKey()
To get the Key associated to this frame.
TCanvas * NewCanvas(TString cname, TString ctitle)
LogMessage & nline(LogMessage &)
virtual void Exec(Option_t *option="")
watch the current frame
std::pair< Int_t, ULong64_t > fMW05
Bool_t ADF2MFM()
Move current ADF Frame to MFM.
ADF::SharedFP * fEventPSA
main frame i.e. event:data:psa
virtual ULong64_t GetTimeStamp() const =0
To set the timestamp.
Base class for a Watcher.
std::vector< std::pair< Int_t, ULong64_t > > fT
std::vector< TH2 * > fGAGATAxGVAMOS
correlation Gamma e-energy AGATA versus VAMOS
virtual void SetBranches()
virtual Bool_t SetTrigger(ADF::DFTrigger *=0x0)
set trigger in which one can retrieve encapsulated MFM Frame
header file for GANILWatchers.C
Base class for a Watcher that fill a TTree or some branches of a TTree.
void ShowCoreCommomAndSumSpectra()
Base class for version numbers.
LoupOnPad, a class to Loupe on a Pad in a Canvas with many pads in it.
MFMCommonFrame * fMFMFrame
always filled
A RawFrame gives direct access to the underlying buffer.
header file for AgataKeyFactory.cpp
MFMWatcher(const char *, const char *, TDirectory *sp_dir=0x0, TDirectory *tag_dir=0x0)
LogMessage & dolog(LogMessage &)
void ShowCrystalSpectra()
virtual void Exec(Option_t *option="")
watch the current frame
GANILInterce, base class for all GANIL based watchers.
void SetItem(const Char_t *whichfactory, const Char_t *whichitem, Version itemversion, Short_t factversion=-1, void *ptr=0x0)
to change an item
RawMFMTree(const char *name, const char *title, TTree *tree=0x0)
virtual BufferIO & RawBuffer()
This method gives access in reading/writing mode to the underlying data buffer.
MFMMergeFrame * fMergedFrame
header file for DFAgent.cpp
std::vector< std::pair< Int_t, ULong64_t > > fVTS
virtual void FillTree()
Fill the tree if it is the owner of the tree.
virtual Bool_t LinkSubFrame(UInt_t, Frame *)
Attach the sub-frame corresponding to the given subkey # to the Frame given in the second argument...
Base class for a trigger on a data flow.
ADF::LogMessage & endl(ADF::LogMessage &log)
ADF::PSAInterface * GetDataPSA(UInt_t which)
To get one by one the PSA Frames in one event (It fills fFramePSA). Read has beed called ! ...
virtual void Print(Option_t *option="") const
UInt_t GetNbFramePSA()
number of PSA Frames extracted from the current event
std::string gActionDefault
Default file for ACTIONS.
virtual UInt_t Scan()
Scan this Frame. If it is a composite frame, it looks for the keys of sub-frames. ...
std::string gActionDefault
Char_t * Address()
for classes that needs it to write directly data into it.
virtual void Exec(Option_t *option="")
watch the current frame
virtual UInt_t GetNbSubFrame() const
Returns the number of sub-frames composing this frame. Scan have to be called first.
std::vector< std::pair< std::pair< Int_t, Int_t >, Float_t > > fAGATAE
virtual Int_t ReadActionFile(std::string full_name_of_action_file="")
read the file that contains the mapping. It returns the numbers of parameters, otherwise 0 ...
virtual Int_t ReadActionFile(std::string full_name_of_action_file="")
read the file that contains the mapping. It returns the numbers of parameters, otherwise 0 ...
ADF::SharedFP * fMFMinADFFrame
Pointer to the Ancillary Frame as delivered by the ADF Trigger.
virtual Bool_t SetTrigger(ADF::DFTrigger *=0x0)
set trigger in which one can retrieve encapsulated MFM Frame
std::string fActionCurrent
Current actions files.
TH1D * fMeanNumberOfValues
virtual void DoCanvas(TCanvas *c, Option_t *)
To be overwritten by real implementation if a canvas is produced.
Base class that described an item in a Factory.
virtual void SetLoupe(bool loupeon=true)
std::pair< Int_t, ULong64_t > fRawToF
void SetLastError(Short_t s=0)
TMP : migration to TreeWatcher with Cuts : should be removed.
TTree * GetTree()
to get the current Tree