Commit b8c2be97 authored by Agata Analysis's avatar Agata Analysis
Browse files

recover Marcin's modifications in e699

parent 5840d99a
......@@ -154,8 +154,8 @@ void PlotResultsSelector::SlaveBegin(TTree * /*tree*/)
Binning NEDA_mult(100,-0.5,100-0.5,"Neda multiplicity");
Binning NEDA_Tdc(1000,-0.5,70000-0.5,"Neda Tdc");
Binning Energy(1000,-0.5,70000-0.5,"Neda Energy");
Binning Tzco(1000,-0.5,70000-0.5,"Neda Tzco");
Binning NEDA_DeltaTSTime(200, -100.5,100-0.5,"Neda TS Time");
Binning NEDA_Zco(3,-0.5,2.5,"Neda Zco");
Binning NEDA_DeltaTSTime(2000, -1000.5,1000-0.5,"Neda Delta TS Time");
Binning Slow(1000,0,70000,"Slow");
Binning Fast(1000,0,70000,"Fast");
......@@ -174,6 +174,7 @@ void PlotResultsSelector::SlaveBegin(TTree * /*tree*/)
Binning Diamant_Top(1000,0,70000,"Diamant Top");
Binning Diamant_PID(512,0,1,"Diamant PID");
Binning Diamant_Energy(512,0,16000,"Diamant Energy");
Binning Diamant_DeltaTSTime(2000, -1000.5,1000-0.5,"Diamant Delta TS Time");
/// AGATA Binnings
......@@ -258,11 +259,11 @@ void PlotResultsSelector::SlaveBegin(TTree * /*tree*/)
TString hist_name = Form("NEDAEnergy%02i",i);
NEDAEnergy_h[i] = BuildHist1D(hist_name,Energy,l);
}
l = new TList;l->SetName("Tzco");fNedaHistList->Add(l);
l = new TList;l->SetName("Zco");fNedaHistList->Add(l);
for (Int_t i=0; i<MaxNEDA; i++)
{
TString hist_name = Form("NEDATZco%02i",i);
NEDATzco_h[i] = BuildHist1D(hist_name,Tzco,l);
TString hist_name = Form("NEDAZco%02i",i);
NEDAZco_h[i] = BuildHist1D(hist_name,NEDA_Zco,l);
}
l = new TList;l->SetName("Cc");fNedaHistList->Add(l);
for (Int_t i=0; i<MaxNEDA; i++)
......@@ -276,7 +277,7 @@ void PlotResultsSelector::SlaveBegin(TTree * /*tree*/)
TString hist_name = Form("NEDAToF%02i",i);
NEDAToF_h[i] = BuildHist1D(hist_name,ToF,l);
}
l = new TList;l->SetName("NEDADeltaTSTime");fNedaHistList->Add(l);
l = new TList;l->SetName("DeltaTSTime");fNedaHistList->Add(l);
for (Int_t i=0; i<MaxNEDA; i++)
{
TString hist_name = Form("NEDADeltaTSTime%02i",i);
......@@ -316,7 +317,9 @@ void PlotResultsSelector::SlaveBegin(TTree * /*tree*/)
Diamant_NProtons_h = BuildHist1D("Diamant_NProtons",Diamant_nprotons,fDiamantHistList);
Diamant_NAlphas_h = BuildHist1D("Diamant_NAlphas",Diamant_nalphas,fDiamantHistList);
DiamantEnergyPIDtot_h = BuildHist2D("DiamantEnergyPIDtot",Diamant_Energy,Diamant_PID,fDiamantHistList);
l = new TList;l->SetName("Energy");fDiamantHistList->Add(l);
for (Int_t i=0; i<MaxDIAMANT; i++)
{
......@@ -338,7 +341,16 @@ void PlotResultsSelector::SlaveBegin(TTree * /*tree*/)
DiamantPID_h[i] = BuildHist1D(hist_name,Diamant_PID,l);
}
/// TH2F
l = new TList;l->SetName("DeltaTSTime");fDiamantHistList->Add(l);
for (Int_t i=0; i<MaxDIAMANT; i++)
{
TString hist_name = Form("DiamantDeltaTSTime%02i",i);
DiamantDeltaTSTime_h[i] = BuildHist1D(hist_name,Diamant_DeltaTSTime,l);
}
// TH2F
l = new TList;l->SetName("EnergyPID");fDiamantHistList->Add(l);
for (Int_t i=0; i<MaxDIAMANT; i++)
......@@ -696,7 +708,7 @@ void PlotResultsSelector::FillHistos()
NEDASlow_h[id]->Fill(Neda_Slow[i]);
NEDAFast_h[id]->Fill(Neda_Fast[i]);
NEDAEnergy_h[id]->Fill(NEDAEnergy[i]);
NEDATzco_h[id]->Fill(Neda_Zco[i]);
NEDAZco_h[id]->Fill(Neda_Zco[i]);
NEDACc_h[id]->Fill(NEDACc[i]);
NEDAToF_h[id]->Fill(NEDATof[i]);
NEDADeltaTSTime_h[id]->Fill(NEDA_DeltaTSTime[i]);
......@@ -722,6 +734,8 @@ void PlotResultsSelector::FillHistos()
DiamantTop_h[id]->Fill(Diamant_Top[i]);
DiamantPID_h[id]->Fill(Diamant_PID[i]);
DiamantEnergyPID_h[id]->Fill(Diamant_Energy[i], Diamant_PID[i]);
DiamantEnergyPIDtot_h->Fill(Diamant_Energy[i], Diamant_PID[i]);
DiamantDeltaTSTime_h[id]->Fill(Diamant_DeltaTSTime[i]);
}
/// Fill AGATA
......@@ -882,19 +896,28 @@ void PlotResultsSelector::Diamant_Identification()
DIAMANT_NDeuterons = 0;
DIAMANT_NOther = 0;
for( Int_t i = 0; i < nbDIAMANT; i++ )
{
// Particle identification
id = Diamant_Id[i];
// time0 = Diamant_deltaTSPeakPos[id]+0.5; //nearest integer
diamantTime = static_cast<ULong64_t>(trackT[0]) - Diamant_TSHit[i] + TStrack - Diamant_DeltaTS_time0;
diamant_ok = kTRUE;
if( diamantTime > Diamant_max_DeltaTS || diamantTime < Diamant_min_DeltaTS )
if( diamantTime > Diamant_max_DeltaTS || diamantTime < Diamant_min_DeltaTS ) {
diamant_ok = kFALSE;
}
Diamant_DeltaTSTime[i] = diamantTime;
Diamant_DeltaTSTimeOK[i] = diamant_ok;
}
for( Int_t i = 0; i < nbDIAMANT; i++ )
{
// Particle identification
id = Diamant_Id[i];
if( !diamant_ok )
if( !Diamant_DeltaTSTimeOK[i] )
continue; // if diamant is outside time window of the beam burst, then don't count this particle
isOther = kTRUE;
......
......@@ -143,7 +143,9 @@ public :
TCutG* DiamantEnergyPID_CutDeuteron[MaxDIAMANT];
Float_t Diamant_deltaTSPeakPos[MaxDIAMANT]; // from file
Float_t Diamant_corrDeltaTS_peakPos[MaxDIAMANT];
Bool_t Diamant_deltaTS_is_ok[MaxDIAMANT];
Int_t Diamant_DeltaTSTime[MaxDIAMANT];
// Bool_t Diamant_deltaTS_is_ok[MaxDIAMANT];
Bool_t Diamant_DeltaTSTimeOK[MaxDIAMANT];
Int_t DIAMANT_NProtons;
Int_t DIAMANT_NAlphas;
......@@ -219,7 +221,7 @@ public :
TH1F *NEDAFast_h[MaxNEDA];
TH1F *NEDACc_h[MaxNEDA]; // slow / fast
TH1F *NEDAEnergy_h[MaxNEDA]; // slow + fast
TH1F *NEDATzco_h[MaxNEDA];
TH1F *NEDAZco_h[MaxNEDA];
TH1F *NEDAToF_h[MaxNEDA]; // same as TDC + float randomization
TH1F *NEDADeltaTSTime_h[MaxNEDA];
......@@ -237,10 +239,12 @@ public :
TH1F *Diamant_NProtons_h;
TH1F *Diamant_NAlphas_h;
TH1F *DiamantDeltaTSTime_h[MaxDIAMANT];
TH1F *DiamantEnergy_h[MaxDIAMANT];
TH1F *DiamantTop_h[MaxDIAMANT];
TH1F *DiamantPID_h[MaxDIAMANT];
TH2F *DiamantEnergyPIDtot_h;
TH2F *DiamantEnergyPID_h[MaxDIAMANT];
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment