AIDA GELINA BRIKEN nToF CRIB ISOLDE CIRCE nTOFCapture DESPEC DTAS EDI_PSA 179Ta CARME StellarModelling DCF K40
  nTOFCapture, Page 3 of 4  ELOG logo
ID Date Authordown Subject
  52   Fri Oct 27 17:13:58 2023 Emma WalkerSi-30: Dedicated vs Parasitic before and after removal of ambient

Below are histograms for the weighted spectra (with deadtime correction) with and without ambient for C6D6 detector 1.

For each sample the histogram with ambient is first and then without ambient (please ignore histogram titles). 

The Dummy, Empty and C-nat have been rebined by combining 100 to 1.

The Au20, Au22, Si-30 and Sinatgood have been rebined by combining 10 to 1.

Si-30 WF used for: Si-30, Dummy, Empty, C-nat

Au20 WF used for: Au20

Au22 WF used for: Au22

Sinatgood WF used for: Sinatgood

Attachment 1: DvsP_1_rebin.pdf
DvsP_1_rebin.pdf
Attachment 2: DvsP_1_amb.pdf
DvsP_1_amb.pdf
Attachment 3: DvsP_1_dummy.pdf
DvsP_1_dummy.pdf
Attachment 4: DvsP_1_dummyamb.pdf
DvsP_1_dummyamb.pdf
Attachment 5: DvsP_1_empty.pdf
DvsP_1_empty.pdf
Attachment 6: DvsP_1_emptyamb.pdf
DvsP_1_emptyamb.pdf
Attachment 7: DvsP_1_C.pdf
DvsP_1_C.pdf
Attachment 8: DvsP_1_Camb.pdf
DvsP_1_Camb.pdf
Attachment 9: DvsP_1_Au20.pdf
DvsP_1_Au20.pdf
Attachment 10: DvsP_1_Au20amb.pdf
DvsP_1_Au20amb.pdf
Attachment 11: DvsP_1_Au22.pdf
DvsP_1_Au22.pdf
Attachment 12: DvsP_1_Au22amb.pdf
DvsP_1_Au22amb.pdf
Attachment 13: DvsP_1_Sinatgood.pdf
DvsP_1_Sinatgood.pdf
Attachment 14: DvsP_1_Sinatgoodamb.pdf
DvsP_1_Sinatgoodamb.pdf
  53   Mon Nov 6 11:13:11 2023 Emma WalkerComparison of empty, ambient and sample- Si-30

Below are graphs for each sample (weighted) showing the comparison between ambient spectra, empty/dummy holder and sample spectra. 

All four detectors are shown for each sample (Si-30, Au20, Au22, Sinatgood). 

All histograms have been rebinned by 50. 

Attachment 1: Si-30_Background_comp_1.png
Si-30_Background_comp_1.png
Attachment 2: Si-30_Background_comp_2.png
Si-30_Background_comp_2.png
Attachment 3: Si-30_Background_comp_3.png
Si-30_Background_comp_3.png
Attachment 4: Si-30_Background_comp_4.png
Si-30_Background_comp_4.png
Attachment 5: Au20_Background_comp_1.png
Au20_Background_comp_1.png
Attachment 6: Au20_Background_comp_2.png
Au20_Background_comp_2.png
Attachment 7: Au20_Background_comp_3.png
Au20_Background_comp_3.png
Attachment 8: Au20_Background_comp_4.png
Au20_Background_comp_4.png
Attachment 9: Au22_Background_comp_1.png
Au22_Background_comp_1.png
Attachment 10: Au22_Background_comp_2.png
Au22_Background_comp_2.png
Attachment 11: Au22_Background_comp_3.png
Au22_Background_comp_3.png
Attachment 12: Au22_Background_comp_4.png
Au22_Background_comp_4.png
Attachment 13: Sinatgood_Background_comp_1.png
Sinatgood_Background_comp_1.png
Attachment 14: Sinatgood_Background_comp_2.png
Sinatgood_Background_comp_2.png
Attachment 15: Sinatgood_Background_comp_3.png
Sinatgood_Background_comp_3.png
Attachment 16: Sinatgood_Background_comp_4.png
Sinatgood_Background_comp_4.png
  54   Tue Nov 7 13:21:51 2023 Emma WalkerSi-30: Comparison between background corrected and uncorrected

Below are graphs for the comparison between background corrected and uncorrected spectra (weighted) for Si-30, Au20, Au22 and Sinatgood.

This is just for C6D6 detector 1 but all detectors are consisitent. All histograms have been rebinned by 100 for clarity. 

Attachment 1: Comp_backgroundsub_Si_1.pdf
Comp_backgroundsub_Si_1.pdf
Attachment 2: Comp_backgroundsub_Au20_1.pdf
Comp_backgroundsub_Au20_1.pdf
Attachment 3: Comp_backgroundsub_Au22_1.pdf
Comp_backgroundsub_Au22_1.pdf
Attachment 4: Comp_backgroundsub_Sinatgood_1.pdf
Comp_backgroundsub_Sinatgood_1.pdf
  1   Fri Nov 3 11:19:53 2017 ClaudiaSample Preparation

77Se: m=0.9916 g; D= 20 mm

OLD: 77Se: m=0.919 g according to ntofdaq page. D~ 20 mm NEEDS TO BE CONFIRMED

78Se: m=1.989/pm0.001 g; D=20.09mm; t~1.7 mm

68Zn: m=1.998/pm0.001 g; D=20.02mm; t~1.39 mm

Attachment 1: Se-77.pdf
Se-77.pdf
Attachment 2: Se-78.pdf
Se-78.pdf
Attachment 3: Zn-68.pdf
Zn-68.pdf
  2   Fri Nov 3 11:22:43 2017 ClaudiaDetector Configuration

Distance Sample to Detector: Det1: ~10.5 cm, Det2: 11 cm, Det3: 11 cm, Det4: 11 cm

 

Attachment 1: fig1.jpg
fig1.jpg
Attachment 2: fig2.jpg
fig2.jpg
Attachment 3: fig3.jpg
fig3.jpg
  3   Fri Nov 3 15:06:51 2017 ClaudiaMeasurement Schedule updated
Attachment 1: measurementplan_new.pdf
measurementplan_new.pdf
  5   Fri Jul 3 14:01:38 2020 ClaudiaLink to Ruchi's list of runs + description

 https://docs.google.com/spreadsheets/d/1W1T2rC10UtOtrAaT8-ZAKFvX70v2PwDk_4-goYL-brI/edit?usp=sharing

  27   Tue Apr 11 14:07:43 2023 ClaudiaPhotos of the Zn68 measurement setup

Photos of the  68Zn(n,gamma) measuremement setup at n_TOF EAR-1.

Attachment 1: IMG_20180409_204846530_LL.jpg
IMG_20180409_204846530_LL.jpg
Attachment 2: IMG_20180409_204854032_LL.jpg
IMG_20180409_204854032_LL.jpg
Attachment 3: IMG_20180410_180042179_LL.jpg
IMG_20180410_180042179_LL.jpg
Attachment 4: IMG_20180411_140834699_LL.jpg
IMG_20180411_140834699_LL.jpg
Attachment 5: Zn68measurement.jpg
Zn68measurement.jpg
  32   Thu Jul 13 14:19:37 2023 Claudiadead time 30Si run

Default TTOFSort dead time setting of 30 ns is ok.

Attachment 1: consecutiveau22.pdf
consecutiveau22.pdf
  35   Mon Jul 17 11:30:54 2023 ClaudiaProperties Silicon powder samples

30Si
Mass: 0.9925(1) g;    Diameter: 22.22(1) mm;    Thickness: 1.77(4) mm;

natSi
Mass: 1.0653(2)g;    Diameter: 19.94(2) mm;    Thickness: 1.91(3) mm;

Mass of sample pre-treatment (sintering ...)

natSi 1.0238 g
30Si:  0.75034 g

  56   Wed Nov 15 13:40:50 2023 ClaudiaDetermination of neutron capture yield and related corrections

Here are all the files needed for calculation of the yield. There is some information that still needs to be added to the energyandyield.c file, for example the atomic mass of your target in amu, the neutron separation energy for the compound nucleus in MeV (this is needed due to using the Weighting technique). Also, you need to add some lines  to read the tof histogram, which will then be converted in a neutron energy hisogram and then divided by the flux.

For the conversion to neutron energy we assume an approximate flight path for now. We will determine this more accurately once we have the yields and fit resonances. Emma will need to use a different flux than Annie, because we have a different spallation target. Emma's flux is preliminary, so we also should look at the SILI detectors at some point.

There are some more instances where names for rootfiles and ascii files need to be added. In the first instance, please try and add the missing information and try running the code. I haven't tested it so there may be still problem.  To run it you will need to download the 3 rootfiles into the same folder (or move somewhere else and adjust the path name in the .c file.

PLEASE set variable THRESHSCALER to 1 for now. We dont know yet what it is :-)

Attachment 1: evalFlux_prelim.root
Attachment 2: nTOF-Ph2_fluence_2009-2011_6Dec2011.root
Attachment 3: BIF_2011_norm.root
Attachment 4: energyandyield.c
#include "TCanvas.h"
#include "TBrowser.h"
#include "TH2F.h"
#include "TH1F.h"
#include "TGraph.h"
#include "TGraphErrors.h"
#include "TMath.h"
#include <fstream>
#include "TFrame.h"
#include "TSystem.h"
#include "TLegend.h"
#include "TLegendEntry.h"
#include "TFile.h"
#include "TROOT.h"
#include "TStyle.h"
#include "TBox.h"
#include "TRandom.h"
#include "TObject.h"
#include "TObjString.h"
#include <iostream>
#include <cstdio>
#include <string>
#include <sstream>
#include "TLine.h"
#include "TTree.h"
#include "TBrowser.h"
#include "TF1.h"
#include <TStyle.h>
#include <THStack.h>
#include <TPad.h>
#include "TRandom.h"


using namespace std;

TH1F *toftoene_fixedbin(TH1F *htof,Double_t L,Double_t offset,Int_t binoffset);
void WriteHistogramFile(TString filename,TH1F *h);

float Sn= 0  ; // neutron separation energy in MeV
float Amass= 0; // mass of your nucleus in atomic mass units

/// L flight path in cm, assumed
/// offset ... any offset in time of flight from daq (N/A here, hence 0)
/// binoffset this is just to exclude very low tof bins which are at too high energy to be of interest 10000 should be ok

void run(){

    /// LOAD TIME OF FLIGHT SPECTRUM
    
    TH1F *hene=toftoene_fixedbin(NAMEOFTOFSPECTRUM,18500,0,10000);
    

    hene->Draw();  /// draw tof histogram concerted to energy
    
    TH1F *h_me=(TH1F*)hene->Clone();
    
    //// NOW moving on to division by flux
     /// the neutron flux is given per bunch assuming a standard proton intensity of 7E12 protons / bunch. Hence the division is by no of protons and then multiplied by 7E12 to get to the number of standard bunches
    
    
   h_me->Scale(1/(h_mon->GetBinContent(4)/7E12));

    
    
    /// file that contains the neutron flux. We are looking at the flux in isolethargic units
    TFile *fflux = new TFile("nTOF-Ph2_fluence_2009-2011_6Dec2011.root", "read"); //for EMMA: evalFlux_prelim.root
    
    TH1F *sim = (TH1F*)fflux->Get("hNFluenceEVALUATED2011"); // FOR EMMA: hEval_Abs
    
    //Neutron flux that is independent of the binning of the histogram. The number of neutrons between E1 and E1 can be found by multiplying the value in the histogram by the logarithmic bin width, i.e. log(E2)-log(E1)
      
        TH1F *yield1 = (TH1F*)h_me->Clone();
        
        cout<<"DIVIDE BY FLUX"<<endl;
        for(Int_t i=1; i<=h_me->GetNbinsX(); i++)
        {
            
            float auxbin1 = sim->FindBin(h_me->GetBinCenter(i));  // find the bin in the flux histogram
            float scaler1 = TMath::Log(h_me->GetBinLowEdge(i+1)/h_me->GetBinLowEdge(i)); // determine the binwidth of count histogram

            yield1->SetBinContent(i,h_me->GetBinContent(i)/(sim->GetBinContent(auxbin1)*scaler1));
            // this is the division by the flux. The number of coutns gets divided by the number of neutrons in that particular bin
            
            if(sim->GetBinContent(auxbin1)<=0)yield1->SetBinContent(i,0); // this is in case the flux histgram has a content <=0, so we do not divide by a negative or 0
           
             if(sim->GetBinContent(auxbin1)>0){
                 
            float binerr_rel=sqrt(pow(h_me->GetBinError(i)/h_me->GetBinContent(i),2) + pow(sim->GetBinError(auxbin1)/sim->GetBinContent(auxbin1),2));
                 
                 // this calculates the relative uncertainty taking into consideration the sample uncertainties and the uncertaities in the flux histogram
                 
            float binerr=binerr_rel*yield1->GetBinContent(i);
                  // calculation of absolute uncertainty
                 
            if(h_me->GetBinContent(i)==0)binerr=h_me->GetBinError(i)/(sim->GetBinContent(auxbin1)*scaler1);
                 /// this is again to avoid divition by  0

            yield1->SetBinError(i,binerr);
            }



        }


        for(int g=1;g<=h_me->GetNbinsX();g++)
        {
    yield1->SetBinContent(g,yield1->GetBinContent(g)*threshscaler/(Sn+  Amass/(1.0086649+Amass)*yield1->GetBinCenter(g)/1e6));
    yield1->SetBinError(g,yield1->GetBinError(g)*threshscaler/(Sn+  Amass/(1.0086649+Amass)*yield1->GetBinCenter(g)/1e6));
    }
     
    
   // this is an additional correction since the neutron beam size varies slightly with neutrom energy. Emma, you can skip that for now as it will be different for you, and we dont have that information yet.
    
        cout << "BIF CORRECTION" <<endl;
        
        TFile *bif=new TFile("BIF_2011_norm.root","read");
        TH1F *hbif=(TH1F*)bif->Get("histo");
        
        
        
        for(int f=1;f<=yield1->GetNbinsX();f++){
            float center=yield1->GetBinCenter(f);
            int binni=hbif->FindBin(center);
            
            yield1->SetBinContent(f,yield1->GetBinContent(f)/hbif->GetBinContent(binni));

            float binerr_rel=sqrt(pow(yield1->GetBinError(f)/yield1->GetBinContent(f),2) + pow(hbif->GetBinError(binni)/hbif->GetBinContent(binni),2));
            float binerr=binerr_rel*yield1->GetBinContent(f);
            if(yield1->GetBinContent(f)==0)binerr=yield1->GetBinError(f)/hbif->GetBinContent(binni);

            yield1->SetBinError(f,binerr);
        }

    cout <<"BIF CORRECTION DONE"<<endl;
    
    
    
        
    yield1->GetXaxis()->SetTitle("energy (eV)");
    yield1->GetYaxis()->SetTitle("yield");

    cout <<"WRITE FILE"<<endl;
    
    // we are writing the yield as root file and as a data file, since that is the input for resonance fitting.

    TFile *gefinalyield= new TFile(NAME, "update");
    yield1->Write(histosam);
    gefinalyield->Write();
    gefinalyield->Close();

    cout <<"ROOT FILE WRITTEN"<<endl;

    WriteHistogramFile(FILENAME,yield1);

    cout <<"TEXT FILE WRITTEN"<<endl;
    
    
}





TH1F *toftoene_fixedbin(TH1F *htof,Double_t L,Double_t offset,Int_t binoffset){
    
    
int number=htof->GetNbinsX();
float lowedge;
float eneedge[number-binoffset];

const double Mass=939565560.81;            //Neutron Mass
const double c0=29.972458;                 // speed of light

cout<<number<<endl;

for(int i=binoffset;i<=number;i++){
    lowedge=htof->GetBinLowEdge(i)+L/c0+offset;
    eneedge[number-i]=(1/pow(1-((L/(lowedge)/c0)*(L/(lowedge)/c0)),0.5)-1)*Mass;
  
    if(i==30000)cout<<lowedge<<" "<<eneedge[number-i]<<" "<<number-i<<endl;
}


TH1F *hene =new TH1F("Counts","Counts",number-binoffset-1,eneedge);
hene->GetXaxis()->Set(number-1-binoffset,eneedge);


for(int i=1;i<=hene->GetNbinsX();i++){
  
    hene->SetBinContent(i,htof->GetBinContent(number-i));
    hene->SetBinError(i,htof->GetBinError(number-i));

}
    
    
    return hene;

}




void WriteHistogramFile(TString filename,TH1F *h){

  
  FILE * fout;
  
  fout = fopen(filename,"w");
  
  for(Int_t i=1;i<=h->GetNbinsX();i++)
    {
double bincenternew=h->GetBinCenter(i);
double binContent=h->GetBinContent(i);
//if(binContent<0)binContent=0;
double binError=h->GetBinError(i);
if(binError<=0)binError=1e-8;
  if(bincenternew>0.02571)fprintf(fout,"%20.10f%20.10f%20.10f\n",bincenternew,binContent,binError);
      
    }
  fclose(fout);
  
  cout << "*************************************"<< endl;
  cout << " File " << filename  <<" written, with format: E_center_bin, Content, error "<<endl;
  cout << "*************************************"<< endl;


}



  64   Thu Apr 4 09:50:36 2024 CLWFirst Si analysis 2024 run

Au and Si29 runs normalised by proton number show consistency (dedicated pulses, example detector 4). Plots for tof spectra zooming on one resonance and histogram of counts in this resonance divided by protons with statistical errors.

Plots were produced with the macros attached.

Attachment 1: au_counts.pdf
au_counts.pdf
Attachment 2: au.pdf
au.pdf
Attachment 3: si29_counts.pdf
si29_counts.pdf
Attachment 4: si29.pdf
si29.pdf
Attachment 5: consistency.C
#include "TCanvas.h"
#include "TBrowser.h"
#include "TH2F.h"
#include "TH1F.h"
#include "TGraph.h"
#include "TGraphErrors.h"
#include "TMath.h"
#include <fstream>
#include "TFrame.h"
#include "TSystem.h"
#include "TLegend.h"
#include "TLegendEntry.h"
#include "TFile.h"
#include "TROOT.h"
#include "TStyle.h"
#include "TBox.h"
#include "TRandom.h"
#include "TObject.h"
#include "TObjString.h"
#include <iostream>
#include <cstdio>
#include <string>
#include <sstream>
#include "TLine.h"
#include "TTree.h"
#include "TBrowser.h"
#include "TF1.h"
#include <TStyle.h>
#include <THStack.h>
#include <TPad.h>
#include "TRandom.h"




void plot(){
    // replace this with name of your singles file
    TFile *f=new TFile("Single_Si29_ded.root","read");
    TString histo, norm, protons;
    
    ///file with a list of the histogram names for one detector
    // format Zn_T_u3_C6D6_runxxxxxx Zn_A_u3_SILI_runxxxxxx Zn_h_info_C6D6_runxxxxxx
    ifstream inni("Si29_C6D64_HistList.dat");
    TCanvas *c=new TCanvas();

    /// replace this with the tof around a resonance, i.e. binlow is the start of the resonance, binhigh is the end of the resonance
    // you can choose any resonance, best is a large one which is usally at big tof values
    /// this will be different for Au and for Zn.

float binlow=2250000;
float binhigh=2400000;

    TLegend *legend = new TLegend(0.65, 0.38, 0.89, 0.89);
    legend->SetBorderSize(1);
    legend->SetFillColor(0);
    legend->SetTextSize(0.03);
    int count2=0;
    int count_protons=0;
    
    
    //// replace this with the number of lines in your file "list"
int lines=59;

            float value[lines];
            float value2[lines];
            float valuesili[lines];
            float valuepkup[lines];
    float staterror[lines];
    while(1){
        
        inni>>histo>>norm>>protons;
        if ( ! inni ) break;

        
        char *s;
        if(count2==0) s="hist";
        if(count2>0)s="hist same";
        count2++;
        cout<<histo<<" "<<norm<<endl;
        
        
        TH1F *h=(TH1F*)f->Get(histo);
        //TH1F *hnorm=(TH1F*)f->Get(norm);
        TH1F *hpro=(TH1F*)f->Get(protons);
        
        
        int bin1=h->FindBin(binlow); //Ge70Bins
        int bin2=h->FindBin(binhigh);
        
        // this gives the total number of count in the resonance
        
        int counter2=h->Integral(bin1,bin2);

      
    
    value[count2-1]=float(counter2)/hpro->GetBinContent(4)*7E12;
        staterror[count2-1]=sqrt(float(counter2))/hpro->GetBinContent(4)*7E12;
             value2[count2-1]=float(counter2);
             valuesili[count2-1]=float(hpro->GetBinContent(4)/hpro->GetBinContent(8));
            valuepkup[count2-1]=float(hpro->GetBinContent(4)/hpro->GetBinContent(7));
   
        h->Scale(1/hpro->GetBinContent(4)*7E12);
        h->Rebin(50);
        h->SetLineColor(count2);
        h->DrawCopy(s);
        legend->AddEntry(h,histo, "l");
    }
    float sum=0;
    float weight=0;
     float weightsum=0;   
    for(int i=0;i<count2;i++){

        weight=value2[i]/(value[i]*value[i]);

       sum=sum+value[i]*weight;


        weightsum=weightsum+weight;

        cout<<value[i]<<" "<<weight<<" "<<i<<endl;
    }


cout<< sum/weightsum <<endl;
   
    float deviation=0;
double stddev=0;

    for(int i=0;i<count2;i++){
        deviation=(sum/weightsum-value[i])/sum*weightsum*100;

stddev=(sum/weightsum-value[i])*(sum/weightsum-value[i])+stddev;

        cout<<" "<<deviation<<" % "<<sqrt(value2[i])/value2[i]*100<<" % counting "<<deviation/(sqrt(value2[i])/value2[i]*100)<< "   "<<i<<endl;
    }
    deviation=sqrt(1/count2*deviation);
    cout<<count2<<" "<<sum/count2<<endl;

double stddev2=sqrt(1/(float(count2-1))*stddev);

//STOP PROTON SCALING

cout<<"std dev is "<<stddev2/(sum/weightsum)*100<<" %"<<endl;
    legend->Draw();
cout<<"                                "<<endl;
    for(int i=0;i<count2;i++){

        cout<<" "<<valuesili[i]<<"  Prot/SILI    "<<valuepkup[i]<<"  Prot/PKUP   "<<valuesili[i]/valuepkup[i]<<" SILI/PKUP"<<endl;
    }


TH1F *hprosi=new TH1F("","",50,0,50);
TH1F *hprook=new TH1F("","",50,0,50);
TH1F *hsipk=new TH1F("","",50,0,50);
    TH1F *hcounts=new TH1F("","",50,0,50);

for(int i=0;i<count2;i++){
hprosi->SetBinContent(i+1,valuesili[i]);
hprook->SetBinContent(i+1,valuepkup[i]);
hsipk->SetBinContent(i+1,valuesili[i]/valuepkup[i]);
    hcounts->SetBinContent(i+1,value[i]);
    hcounts->SetBinError(i+1,staterror[i]);
    }

TCanvas *c3=new TCanvas;
c3->Divide(2,2);
c3->cd(1);
hprosi->Draw();
c3->cd(2);
hprook->Draw();
c3->cd(3);
hsipk->Draw();
    c3->cd(4);
    hcounts->Draw();
    
    
    TCanvas *c5=new TCanvas;
    hcounts->Draw();
}










void plotau(){
    // replace this with name of your singles file
    TFile *f=new TFile("Single_Au_ded.root","read");
    TString histo, norm, protons;
    
    ///file with a list of the histogram names for one detector
    // format Zn_T_u3_C6D6_runxxxxxx Zn_A_u3_SILI_runxxxxxx Zn_h_info_C6D6_runxxxxxx
    ifstream inni("Au_C6D64_HistList.dat");
    TCanvas *c=new TCanvas();

    /// replace this with the tof around a resonance, i.e. binlow is the start of the resonance, binhigh is the end of the resonance
    // you can choose any resonance, best is a large one which is usally at big tof values
    /// this will be different for Au and for Zn.

float binlow=12000000;
float binhigh=14000000;

    TLegend *legend = new TLegend(0.65, 0.38, 0.89, 0.89);
    legend->SetBorderSize(1);
    legend->SetFillColor(0);
    legend->SetTextSize(0.03);
    int count2=0;
    int count_protons=0;
    
    
    //// replace this with the number of lines in your file "list"
int lines=59;

            float value[lines];
            float value2[lines];
            float valuesili[lines];
            float valuepkup[lines];
    float staterror[lines];
    while(1){
        
        inni>>histo>>norm>>protons;
        if ( ! inni ) break;

        
        char *s;
        if(count2==0) s="hist";
        if(count2>0)s="hist same";
        count2++;
        cout<<histo<<" "<<norm<<endl;
        
        
        TH1F *h=(TH1F*)f->Get(histo);
        //TH1F *hnorm=(TH1F*)f->Get(norm);
        TH1F *hpro=(TH1F*)f->Get(protons);
        
        
        int bin1=h->FindBin(binlow); //Ge70Bins
        int bin2=h->FindBin(binhigh);
        
        // this gives the total number of count in the resonance
        
        int counter2=h->Integral(bin1,bin2);

      
    
    value[count2-1]=float(counter2)/hpro->GetBinContent(4)*7E12;
        staterror[count2-1]=sqrt(float(counter2))/hpro->GetBinContent(4)*7E12;
             value2[count2-1]=float(counter2);
             valuesili[count2-1]=float(hpro->GetBinContent(4)/hpro->GetBinContent(8));
            valuepkup[count2-1]=float(hpro->GetBinContent(4)/hpro->GetBinContent(7));
   
        h->Scale(1/hpro->GetBinContent(4)*7E12);
        h->Rebin(50);
        h->SetLineColor(count2);
        h->DrawCopy(s);
        legend->AddEntry(h,histo, "l");
    }
    float sum=0;
    float weight=0;
     float weightsum=0;
    for(int i=0;i<count2;i++){

        weight=value2[i]/(value[i]*value[i]);

       sum=sum+value[i]*weight;


        weightsum=weightsum+weight;

        cout<<value[i]<<" "<<weight<<" "<<i<<endl;
    }


cout<< sum/weightsum <<endl;
   
    float deviation=0;
double stddev=0;

    for(int i=0;i<count2;i++){
        deviation=(sum/weightsum-value[i])/sum*weightsum*100;

stddev=(sum/weightsum-value[i])*(sum/weightsum-value[i])+stddev;

        cout<<" "<<deviation<<" % "<<sqrt(value2[i])/value2[i]*100<<" % counting "<<deviation/(sqrt(value2[i])/value2[i]*100)<< "   "<<i<<endl;
    }
    deviation=sqrt(1/count2*deviation);
    cout<<count2<<" "<<sum/count2<<endl;

double stddev2=sqrt(1/(float(count2-1))*stddev);

//STOP PROTON SCALING

cout<<"std dev is "<<stddev2/(sum/weightsum)*100<<" %"<<endl;
    legend->Draw();
cout<<"                                "<<endl;
    for(int i=0;i<count2;i++){
... 36 more lines ...
Attachment 6: List_Formatter.cpp
// g++ -Wall -O3 -g List_Formatter.cpp -o List_Formatter && ./List_Formatter

#include <iostream>
#include <fstream>
#include <sstream>
#include <string>
#include <vector>

using namespace std;

int main(){
	
	string sample_name = "Au"; //A prefix for the TTOFSort output file histogram names, e.g. Zn1 is the first block of zinc runs
	
    int runlist[]={118026, 118027, 118028, -1};
		
	for(int detn = 1; detn <= 4; detn++){ //Loop over 4 C6D6 detectors
		
		string outname = sample_name; //Create output file name in the format Sample_C6D6#_HistList.dat
		outname += "_C6D6";
		stringstream formatter;
		formatter << detn;
		outname += formatter.str(); //This string stream now contains detector name integer converted to string
		outname += "_HistList.dat";
		
		ofstream ofile;
		ofile.open(outname.c_str());
		if(!ofile.is_open()){cout << "ERROR: Cannot open output file " << outname << endl; return 0;}
		
		for(int run_index = 0; run_index < (int)(sizeof(runlist) / sizeof(int)); run_index++){ //Loop over each of the runs
			
			if(runlist[run_index] != -1){
				
				stringstream run_str;
				run_str << runlist[run_index]; //Save run number as string
				
				string histname1 = sample_name;
				histname1 += "_T_u";
				histname1 += formatter.str();
				histname1 += "_C6D6_run";
				histname1 += run_str.str();
				
				string histname2 = sample_name;
				histname2 += "_A_u";
				histname2 += formatter.str();
				histname2 += "_SILI_run";
				histname2 += run_str.str();
				
				string histname3 = sample_name;
				histname3 += "_h_info_C6D6_run";
				histname3 += run_str.str();
				
				run_str.str(""); //Clear the stringstream
				
				ofile << histname1 << " " << histname2 << " " << histname3 << endl;
			}
		}
		
		formatter.str(""); //Clear the stringstream
		
		ofile.close();
	}
	
	return 0;
}

  66   Fri Jun 7 15:58:24 2024 CLWISOFLEX Certificates for enriched Si samples

Isoflex certificates for enriched silicon samples

Attachment 1: Si30_isoflex.pdf
Si30_isoflex.pdf Si30_isoflex.pdf Si30_isoflex.pdf
Attachment 2: 231226-01_-_Shipping_Documents(1).pdf
231226-01_-_Shipping_Documents(1).pdf 231226-01_-_Shipping_Documents(1).pdf 231226-01_-_Shipping_Documents(1).pdf 231226-01_-_Shipping_Documents(1).pdf 231226-01_-_Shipping_Documents(1).pdf 231226-01_-_Shipping_Documents(1).pdf
  28   Thu Jun 15 09:57:01 2023 AnnieSi Set Up

Si Set up images and documentation.

Detector 1 - C6D6D: Distance= 9 cm, Angle= 135 deg relative to BL (check set up pdf for drawing if unsure), Voltage= 1550 V

Detector 2 - C6D6E: Distance= 9 cm, Angle= 135 deg relative to BL, Voltage= 1590 V

Detector 3 - C6D6H: Distance= 9 cm, Angle= 135 deg relative to BL, Voltage= 1450 V

Detector 4 - C6D6L: Distance= 9 cm, Angle= 135 deg relative to BL, Voltage= 1460 V

 

Note: Voltages were increased by 30V after the first few runs, these voltages are titled as "new voltages" in the DAQ when they were being tried out, and are now the final voltages.

 

 

Attachment 1: IMG_2101.JPG
IMG_2101.JPG
Attachment 2: IMG_2103.JPG
IMG_2103.JPG
Attachment 3: IMG_2109.JPG
IMG_2109.JPG
Attachment 4: IMG_2114.JPG
IMG_2114.JPG
Attachment 5: IMG_2116.JPG
IMG_2116.JPG
Attachment 6: IMG_2122.JPG
IMG_2122.JPG
Attachment 7: IMG_2122.JPG
IMG_2122.JPG
Attachment 8: IMG_2131.JPG
IMG_2131.JPG
Attachment 9: IMG_2132.JPG
IMG_2132.JPG
Attachment 10: IMG_2124.JPG
IMG_2124.JPG
Attachment 11: IMG_2120.JPG
IMG_2120.JPG
Attachment 12: Si_Set_Up_final.pdf
Si_Set_Up_final.pdf Si_Set_Up_final.pdf Si_Set_Up_final.pdf Si_Set_Up_final.pdf Si_Set_Up_final.pdf Si_Set_Up_final.pdf
  29   Thu Jun 22 10:37:39 2023 AnnieGold 22mm Sample Images

New 22mm sample compared to old 20mm sample used at the beginning of the campaign + picture of dummy target in the setup.

Attachment 1: IMG_2187.JPG
IMG_2187.JPG
Attachment 2: IMG_2186.JPG
IMG_2186.JPG
Attachment 3: IMG_2185.JPG
IMG_2185.JPG
  30   Thu Jun 29 09:21:13 2023 AnnieInfo on Samples

Both Au samples (20mm and 22mm) are single mylar.

Both Si30 (22mm) and natSi (20mm) are double mylar.

Empty is single mylar ONLY

Dummy is double mylar + glue 

Attachment 1: IMG_2242.JPG
IMG_2242.JPG
Attachment 2: IMG_2248.JPG
IMG_2248.JPG
Attachment 3: IMG_2247.JPG
IMG_2247.JPG
Attachment 4: IMG_2246.JPG
IMG_2246.JPG
  43   Fri Aug 4 10:45:05 2023 AnnieZn Plots: Normalised Spectra, Ratio Plots, Integral/Protons vs Cut (all dets)

All plots in the ratios all look pretty contstant. Zn1 for all detectors seems to have some strange spike in the integral, and a dip in the SILI measurements (and therefore in the SILI/PKUP ratio). 

Det1 & Det4 dont look great for the Integral/Proton plots, im planning to make these plots with the PKUP protons and SILI and then comapre all of those errors and ratios that come from those, so we'll see what that comparison brings. 

Nothing has been seperated by dedicated or paracitic beam yet, so those comparisons need to be made too. 

Attachment 1: Norm_spec_zn3_det4_singles.pdf
Norm_spec_zn3_det4_singles.pdf
Attachment 2: Norm_spec_zn3_Det3_singles.pdf
Norm_spec_zn3_Det3_singles.pdf
Attachment 3: Norm_spec_zn3_det2_singles.pdf
Norm_spec_zn3_det2_singles.pdf
Attachment 4: Norm_spec_zn3_det1_singles.pdf
Norm_spec_zn3_det1_singles.pdf
Attachment 5: Norm_spec_zn2_det4_singles.pdf
Norm_spec_zn2_det4_singles.pdf
Attachment 6: Norm_spec_zn2_det3_singles.pdf
Norm_spec_zn2_det3_singles.pdf
Attachment 7: Norm_spec_zn2_det2_singles.pdf
Norm_spec_zn2_det2_singles.pdf
Attachment 8: Norm_spec_zn2_det1_singles.pdf
Norm_spec_zn2_det1_singles.pdf
Attachment 9: Norm_spec_zn1_det4_singles.pdf
Norm_spec_zn1_det4_singles.pdf
Attachment 10: Norm_spec_zn1_det3_singles.pdf
Norm_spec_zn1_det3_singles.pdf
Attachment 11: Norm_spec_zn1_det2_singles.pdf
Norm_spec_zn1_det2_singles.pdf
Attachment 12: Norm_spec_zn1_det1_singles.pdf
Norm_spec_zn1_det1_singles.pdf
Attachment 13: Ratio_plot_zn3_det4.pdf
Ratio_plot_zn3_det4.pdf
Attachment 14: Ratio_plot_zn3_det3.pdf
Ratio_plot_zn3_det3.pdf
Attachment 15: Ratio_plot_zn3_det2.pdf
Ratio_plot_zn3_det2.pdf
Attachment 16: Ratio_plot_zn3_det1.pdf
Ratio_plot_zn3_det1.pdf
Attachment 17: Ratio_plot_zn2_det4.pdf
Ratio_plot_zn2_det4.pdf
Attachment 18: Ratio_plot_zn2_det3.pdf
Ratio_plot_zn2_det3.pdf
Attachment 19: Ratio_plot_zn2_det2.pdf
Ratio_plot_zn2_det2.pdf
Attachment 20: Ratio_plot_zn2_det1.pdf
Ratio_plot_zn2_det1.pdf
Attachment 21: Ratio_plot_zn1_det4.pdf
Ratio_plot_zn1_det4.pdf
Attachment 22: Ratio_plot_zn1_det3.pdf
Ratio_plot_zn1_det3.pdf
Attachment 23: Ratio_plot_zn1_det2.pdf
Ratio_plot_zn1_det2.pdf
Attachment 24: Ratio_plot_zn1_det1.pdf
Ratio_plot_zn1_det1.pdf
Attachment 25: zn_res3_vs_protons.pdf
zn_res3_vs_protons.pdf
Attachment 26: zn_res2_vs_protons.pdf
zn_res2_vs_protons.pdf
Attachment 27: zn_res3_vs_protons.pdf
zn_res3_vs_protons.pdf
  51   Tue Oct 24 11:29:46 2023 ARWeighted Histograms Vs Deadtime*Corrected: 68Zn
Attachment 1: combined_vs_weighted_parasitic_det3.pdf
combined_vs_weighted_parasitic_det3.pdf
Attachment 2: combined_vs_weighted_parasitic_det2.pdf
combined_vs_weighted_parasitic_det2.pdf
Attachment 3: combined_vs_weighted_parasitic_all_dets.pdf
combined_vs_weighted_parasitic_all_dets.pdf
Attachment 4: combined_vs_weighted_dedicated_det3.pdf
combined_vs_weighted_dedicated_det3.pdf
Attachment 5: combined_vs_weighted_dedicated_det2.pdf
combined_vs_weighted_dedicated_det2.pdf
Attachment 6: combined_vs_weighted_dedicated_all_dets.pdf
combined_vs_weighted_dedicated_all_dets.pdf
Attachment 7: combined_parasitic_all_dets.pdf
combined_parasitic_all_dets.pdf
Attachment 8: corrected_dedicated_both_dets.pdf
corrected_dedicated_both_dets.pdf
Attachment 9: weighted_para_vs_ded_det3.pdf
weighted_para_vs_ded_det3.pdf
Attachment 10: weighted_para_vs_ded_det3_R3.pdf
weighted_para_vs_ded_det3_R3.pdf
Attachment 11: weighted_para_vs_ded_det3_R2.pdf
weighted_para_vs_ded_det3_R2.pdf
Attachment 12: weighted_para_vs_ded_det3_R1.pdf
weighted_para_vs_ded_det3_R1.pdf
Attachment 13: Weighted_para_vs_ded_det2.pdf
Weighted_para_vs_ded_det2.pdf
Attachment 14: weighted_para_vs_ded_det2_R3.pdf
weighted_para_vs_ded_det2_R3.pdf
Attachment 15: weighted_para_vs_ded_det2_R1.pdf
weighted_para_vs_ded_det2_R1.pdf
Attachment 16: weighred_para_vs_ded_det2_R2.pdf
weighred_para_vs_ded_det2_R2.pdf
Attachment 17: corrected_para_vs_ded_det3.pdf
corrected_para_vs_ded_det3.pdf
Attachment 18: corrected_para_vs_ded_det3_R3.pdf
corrected_para_vs_ded_det3_R3.pdf
Attachment 19: corrected_para_vs_ded_det3_R2.pdf
corrected_para_vs_ded_det3_R2.pdf
Attachment 20: corrected_para_vs_ded_det3_R1.pdf
corrected_para_vs_ded_det3_R1.pdf
Attachment 21: corrected_para_vs_ded_det2.pdf
corrected_para_vs_ded_det2.pdf
Attachment 22: corrected_para_vs_ded_det2_R3.pdf
corrected_para_vs_ded_det2_R3.pdf
Attachment 23: corrected_para_vs_ded_det2_R2.pdf
corrected_para_vs_ded_det2_R2.pdf
Attachment 24: corrected_para_vs_ded_det2_R1.pdf
corrected_para_vs_ded_det2_R1.pdf
  55   Wed Nov 8 11:47:44 2023 ARZn68 TTOFSort codes
Attachment 1: Process_Au_31-10.C
// g++ -Wall -O3 -g `root-config --cflags --ldflags --glibs` process_runs_Zn_full.cpp -o process_runs_Zn_full && ./process_runs_Zn_full

#include <iostream>
#include <TFile.h>
#include <TCanvas.h>
#include <TPad.h>
#include <TAxis.h>
#include <TH1D.h>
#include <TF1.h>
#include <TLegend.h>
#include <TLegendEntry.h>
#include <TDirectory.h>
#include <fstream>
#include <math.h>

#include "/eos/experiment/ntof/codes/TTOFSort/TTOFSort_nTOF.h"
#ifndef __CINT__
#include "/eos/experiment/ntof/codes/TTOFSort/TTOFSort_nTOF.cxx"
#endif

using namespace std;

Double_t caldet1(Double_t x){return(-0.0126844 + 0.000250511 * x);}
//Double_t caldet1b(Double_t x){return(0.0300862 + 0.000239789 * x);}
//Double_t caldet1c(Double_t x){return(-0.00982159 + 0.000243208 * x);}
Double_t caldet2(Double_t x){return(0.00933879 + 0.000223045 * x);}
Double_t caldet3(Double_t x){return(0.0448306 + 0.000295976 * x);}
Double_t caldet4(Double_t x){return(0.039253 + 0.000228249 * x);}
Double_t caldet5(Double_t x){return(0.039253 + 0.000228249 * x);}
Double_t caldet6(Double_t x){return(0.039253 + 0.000228249 * x);}

Double_t wfzn1(Double_t x){return(52.4331 - 15.7227 * x + 129.696 * x * x - 21.3173 * x * x * x + 1.23419 * x * x * x * x);} //Coeff 0.0810697 0.0604489 0
Double_t wfzn2(Double_t x){return(54.8656 - 23.9266 * x + 136.114 * x * x - 22.9382 * x * x * x + 1.36142 * x * x * x * x);} //Coeff 0.0810697 0.0604489 0
Double_t wfzn3(Double_t x){return(55.0448 - 24.1592 * x + 135.662 * x * x - 22.6676 * x * x * x + 1.32807 * x * x * x * x);} //Coeff 0.0810697 0.0604489 0
Double_t wfzn4(Double_t x){return(53.7253 - 20.1490 * x + 133.263 * x * x - 22.2370 * x * x * x + 1.30748 * x * x * x * x);} //Coeff 0.0810697 0.0604489 0

Double_t wfau1(Double_t x){return(33.0459 - 14.2600 * x + 79.6741 * x * x - 12.5454 * x * x * x + 75.7094 * x * x * x * x);} //Coeff 0.0810697 0.0604489 0
Double_t wfau2(Double_t x){return(31.1978 - 8.63083 * x + 76.0325 * x * x - 11.7987 * x * x * x + 71.1593 * x * x * x * x);} //Coeff 0.0810697 0.0604489 0
Double_t wfau3(Double_t x){return(30.1989 - 5.58729 * x + 74.0714 * x * x - 11.4009 * x * x * x + 68.8028 * x * x * x * x);} //Coeff 0.0810697 0.0604489 0
Double_t wfau4(Double_t x){return(30.0116 - 5.09782 * x + 73.9204 * x * x - 11.4115 * x * x * x + 69.3298 * x * x * x * x);} //Coeff 0.0810697 0.0604489 0

Double_t dummy_function(Double_t x){return 0.;}

int Zn68(){

	Char_t prefix[] = "root://eospublic.cern.ch//eos/experiment/ntof/data/rootfiles/2018/ear1/run";

	Char_t suffix[] = ".root";

	//Int_t runlist_ZnP[]={108570, 108569, 108568, 108567, 108566, 108565, 108560, 108558, -1};

	//Int_t runlist_Zn[]={108347,108348,108349,108350,108351,108352,108353,108354,\
				108355,108357,108359,108360,108361,108362,108363,\
				108364,108400,108399,108398,108397,108396,108395,\
				108411,108410,108409,108408,108407,108406,\
				108419,108418,108417,108416,108415,108414,\
				108444,108443,108442,108441,108440,108439,108438,108437,108436,\
				108435,108434,108433,108432,108431,108430,108429,108428,108427,\
				108426,108425,108423,108422,108462,108461,108460,108459,108458,\
				108457,108520,108519,108518,108517,108516,108515,108514,108513,\
				108512,108523,108527,108526,108525,108524,108539,108538,108537,\
				108536,108535,108560,108559,108548,\
				108570, 108569, 108568, 108567,108566, 108565, 108560, 108558,-1};

	Int_t runlist_E[]={108393,108392,108391,108390,108389,108388,108387,108495,108494,108493,108492,108491,-1};

	Int_t runlist_Au[]={108339,108340,108343,108344,108345,108346,108403,108404,108405,108490,108489,-1}; // isue with 108341? remove?



	TTOFSort *a = new TTOFSort();
	 a->SetEnableMonitorPerBunch(); // include information on monitors per bunch


	a->AddDetector(kC6D6, 4);
	a->AddDetector(kSILI,4);
	a->AddDetector(kPKUP,1);
	a->SetNewVariableNames_amplitude(kC6D6, "amp");   // use instead of variable amp
	a->SetNewVariableNames_amplitude(kSILI ,"amp");
	a->SetNewVariableNames_amplitude(kPKUP ,"amp");

	//a->SetPriorCut(kC6D6,"PulseIntensity>5E12"); a->SetPriorCut(kC6D6,"PulseIntensity>2E12",&&,"PulseIntensity<5E12");
	//a->SetPriorCut(kC6D6,"PulseIntensity>5E12 && detn!=1 && detn!=4 && detn!=5 && detn!=6");
	


		a->SetNewBinParsA(kC6D6, 0.0, 7000, 70000);        // CLW: CHANGED BINNING
		a->SetNewBinParsA(kSILI, 0.0, 7000, 70000);        // CLW: CHANGED BINNING

		 a->SetNewVariableNames_amplitude(kC6D6, "amp");

		 a->SetNewFixedDeadtime(kC6D6, 50.0);    // fixed deadtime of 30 ns
		 a->SetNewCoincidencetime (kC6D6, 40.0); // Coincidences between 30 ns




	a->UseWeightingFunction(kC6D6, wfau1, wfau2, wfau3, wfau4); //Zero the additonal two C6D6s

	a->UseCalibration(kC6D6, caldet1, caldet2, caldet3, caldet4);
	a->SetNewCutsEg(kC6D6, 0.200, 10.0);

	a->ProcessListOfRuns_Single(prefix, runlist_Au, suffix, "Au_single.root", "Au", "RECREATE");
	a->ProcessListOfRuns_Single(prefix, runlist_E, suffix, "Au_single.root", "E", "UPDATE");
	a->ProcessListOfRuns_Sum(prefix, runlist_Au, suffix, "Au_sum.root", "Au", "RECREATE");
	a->ProcessListOfRuns_Sum(prefix, runlist_E, suffix, "Au_sum.root", "E", "UPDATE");

	return 0;
}
Attachment 2: Process_Au_dedicated_31-10.C
// g++ -Wall -O3 -g `root-config --cflags --ldflags --glibs` process_runs_Zn_full.cpp -o process_runs_Zn_full && ./process_runs_Zn_full

#include <iostream>
#include <TFile.h>
#include <TCanvas.h>
#include <TPad.h>
#include <TAxis.h>
#include <TH1D.h>
#include <TF1.h>
#include <TLegend.h>
#include <TLegendEntry.h>
#include <TDirectory.h>
#include <fstream>
#include <math.h>

#include "/eos/experiment/ntof/codes/TTOFSort/TTOFSort_nTOF.h"
#ifndef __CINT__
#include "/eos/experiment/ntof/codes/TTOFSort/TTOFSort_nTOF.cxx"
#endif

using namespace std;

Double_t caldet1(Double_t x){return(-0.0126844 + 0.000250511 * x);}
//Double_t caldet1b(Double_t x){return(0.0300862 + 0.000239789 * x);}
//Double_t caldet1c(Double_t x){return(-0.00982159 + 0.000243208 * x);}
Double_t caldet2(Double_t x){return(0.00933879 + 0.000223045 * x);}
Double_t caldet3(Double_t x){return(0.0448306 + 0.000295976 * x);}
Double_t caldet4(Double_t x){return(0.039253 + 0.000228249 * x);}
Double_t caldet5(Double_t x){return(0.039253 + 0.000228249 * x);}
Double_t caldet6(Double_t x){return(0.039253 + 0.000228249 * x);}

Double_t wfzn1(Double_t x){return(52.4331 - 15.7227 * x + 129.696 * x * x - 21.3173 * x * x * x + 1.23419 * x * x * x * x);} //Coeff 0.0810697 0.0604489 0
Double_t wfzn2(Double_t x){return(54.8656 - 23.9266 * x + 136.114 * x * x - 22.9382 * x * x * x + 1.36142 * x * x * x * x);} //Coeff 0.0810697 0.0604489 0
Double_t wfzn3(Double_t x){return(55.0448 - 24.1592 * x + 135.662 * x * x - 22.6676 * x * x * x + 1.32807 * x * x * x * x);} //Coeff 0.0810697 0.0604489 0
Double_t wfzn4(Double_t x){return(53.7253 - 20.1490 * x + 133.263 * x * x - 22.2370 * x * x * x + 1.30748 * x * x * x * x);} //Coeff 0.0810697 0.0604489 0

Double_t wfau1(Double_t x){return(33.0459 - 14.2600 * x + 79.6741 * x * x - 12.5454 * x * x * x + 75.7094 * x * x * x * x);} //Coeff 0.0810697 0.0604489 0
Double_t wfau2(Double_t x){return(31.1978 - 8.63083 * x + 76.0325 * x * x - 11.7987 * x * x * x + 71.1593 * x * x * x * x);} //Coeff 0.0810697 0.0604489 0
Double_t wfau3(Double_t x){return(30.1989 - 5.58729 * x + 74.0714 * x * x - 11.4009 * x * x * x + 68.8028 * x * x * x * x);} //Coeff 0.0810697 0.0604489 0
Double_t wfau4(Double_t x){return(30.0116 - 5.09782 * x + 73.9204 * x * x - 11.4115 * x * x * x + 69.3298 * x * x * x * x);} //Coeff 0.0810697 0.0604489 0

Double_t dummy_function(Double_t x){return 0.;}

int Zn68(){

	Char_t prefix[] = "root://eospublic.cern.ch//eos/experiment/ntof/data/rootfiles/2018/ear1/run";

	Char_t suffix[] = ".root";

	//Int_t runlist_ZnP[]={108570, 108569, 108568, 108567, 108566, 108565, 108560, 108558, -1};

	//Int_t runlist_Zn[]={108347,108348,108349,108350,108351,108352,108353,108354,\
				108355,108357,108359,108360,108361,108362,108363,\
				108364,108400,108399,108398,108397,108396,108395,\
				108411,108410,108409,108408,108407,108406,\
				108419,108418,108417,108416,108415,108414,\
				108444,108443,108442,108441,108440,108439,108438,108437,108436,\
				108435,108434,108433,108432,108431,108430,108429,108428,108427,\
				108426,108425,108423,108422,108462,108461,108460,108459,108458,\
				108457,108520,108519,108518,108517,108516,108515,108514,108513,\
				108512,108523,108527,108526,108525,108524,108539,108538,108537,\
				108536,108535,108560,108559,108548,\
				108570, 108569, 108568, 108567,108566, 108565, 108560, 108558,-1};

	Int_t runlist_E[]={108393,108392,108391,108390,108389,108388,108387,108495,108494,108493,108492,108491,-1};

	Int_t runlist_Au[]={108339,108340,108343,108344,108345,108346,108403,108404,108405,108490,108489,-1}; // isue with 108341? remove?



	TTOFSort *a = new TTOFSort();
	 a->SetEnableMonitorPerBunch(); // include information on monitors per bunch


	a->AddDetector(kC6D6, 4);
	a->AddDetector(kSILI,4);
	a->AddDetector(kPKUP,1);
	a->SetNewVariableNames_amplitude(kC6D6, "amp");   // use instead of variable amp
	a->SetNewVariableNames_amplitude(kSILI ,"amp");
	a->SetNewVariableNames_amplitude(kPKUP ,"amp");

	//a->SetPriorCut(kC6D6,"PulseIntensity>5E12"); a->SetPriorCut(kC6D6,"PulseIntensity>2E12",&&,"PulseIntensity<5E12");
	//a->SetPriorCut(kC6D6,"PulseIntensity>5E12 && detn!=1 && detn!=4 && detn!=5 && detn!=6");
	a->SetPriorCut(kC6D6,"PulseIntensity>5E12"); 
	a->SetPriorCut(kSILI,"PulseIntensity>5E12");
	a->SetPriorCut(kPKUP,"PulseIntensity>5E12");


		a->SetNewBinParsA(kC6D6, 0.0, 7000, 70000);        // CLW: CHANGED BINNING
		a->SetNewBinParsA(kSILI, 0.0, 7000, 70000);        // CLW: CHANGED BINNING

		 a->SetNewVariableNames_amplitude(kC6D6, "amp");

		 a->SetNewFixedDeadtime(kC6D6, 50.0);    // fixed deadtime of 30 ns
		 a->SetNewCoincidencetime (kC6D6, 40.0); // Coincidences between 30 ns




	a->UseWeightingFunction(kC6D6, wfau1, wfau2, wfau3, wfau4); //Zero the additonal two C6D6s

	a->UseCalibration(kC6D6, caldet1, caldet2, caldet3, caldet4);
	a->SetNewCutsEg(kC6D6, 0.200, 10.0);

	a->ProcessListOfRuns_Single(prefix, runlist_Au, suffix, "Au_single_dedicated.root", "Au", "RECREATE");
	a->ProcessListOfRuns_Single(prefix, runlist_E, suffix, "Au_single_dedicated.root", "E", "UPDATE");
	a->ProcessListOfRuns_Sum(prefix, runlist_Au, suffix, "Au_sum_dedicated.root", "Au", "RECREATE");
	a->ProcessListOfRuns_Sum(prefix, runlist_E, suffix, "Au_sum_dedicated.root", "E", "UPDATE");

	return 0;
}
Attachment 3: Process_Au_parasitic_31-10.C
// g++ -Wall -O3 -g `root-config --cflags --ldflags --glibs` process_runs_Zn_full.cpp -o process_runs_Zn_full && ./process_runs_Zn_full

#include <iostream>
#include <TFile.h>
#include <TCanvas.h>
#include <TPad.h>
#include <TAxis.h>
#include <TH1D.h>
#include <TF1.h>
#include <TLegend.h>
#include <TLegendEntry.h>
#include <TDirectory.h>
#include <fstream>
#include <math.h>

#include "/eos/experiment/ntof/codes/TTOFSort/TTOFSort_nTOF.h"
#ifndef __CINT__
#include "/eos/experiment/ntof/codes/TTOFSort/TTOFSort_nTOF.cxx"
#endif

using namespace std;

Double_t caldet1(Double_t x){return(-0.0126844 + 0.000250511 * x);}
//Double_t caldet1b(Double_t x){return(0.0300862 + 0.000239789 * x);}
//Double_t caldet1c(Double_t x){return(-0.00982159 + 0.000243208 * x);}
Double_t caldet2(Double_t x){return(0.00933879 + 0.000223045 * x);}
Double_t caldet3(Double_t x){return(0.0448306 + 0.000295976 * x);}
Double_t caldet4(Double_t x){return(0.039253 + 0.000228249 * x);}
Double_t caldet5(Double_t x){return(0.039253 + 0.000228249 * x);}
Double_t caldet6(Double_t x){return(0.039253 + 0.000228249 * x);}

Double_t wfzn1(Double_t x){return(52.4331 - 15.7227 * x + 129.696 * x * x - 21.3173 * x * x * x + 1.23419 * x * x * x * x);} //Coeff 0.0810697 0.0604489 0
Double_t wfzn2(Double_t x){return(54.8656 - 23.9266 * x + 136.114 * x * x - 22.9382 * x * x * x + 1.36142 * x * x * x * x);} //Coeff 0.0810697 0.0604489 0
Double_t wfzn3(Double_t x){return(55.0448 - 24.1592 * x + 135.662 * x * x - 22.6676 * x * x * x + 1.32807 * x * x * x * x);} //Coeff 0.0810697 0.0604489 0
Double_t wfzn4(Double_t x){return(53.7253 - 20.1490 * x + 133.263 * x * x - 22.2370 * x * x * x + 1.30748 * x * x * x * x);} //Coeff 0.0810697 0.0604489 0

Double_t wfau1(Double_t x){return(33.0459 - 14.2600 * x + 79.6741 * x * x - 12.5454 * x * x * x + 75.7094 * x * x * x * x);} //Coeff 0.0810697 0.0604489 0
Double_t wfau2(Double_t x){return(31.1978 - 8.63083 * x + 76.0325 * x * x - 11.7987 * x * x * x + 71.1593 * x * x * x * x);} //Coeff 0.0810697 0.0604489 0
Double_t wfau3(Double_t x){return(30.1989 - 5.58729 * x + 74.0714 * x * x - 11.4009 * x * x * x + 68.8028 * x * x * x * x);} //Coeff 0.0810697 0.0604489 0
Double_t wfau4(Double_t x){return(30.0116 - 5.09782 * x + 73.9204 * x * x - 11.4115 * x * x * x + 69.3298 * x * x * x * x);} //Coeff 0.0810697 0.0604489 0

Double_t dummy_function(Double_t x){return 0.;}

int Zn68(){

	Char_t prefix[] = "root://eospublic.cern.ch//eos/experiment/ntof/data/rootfiles/2018/ear1/run";

	Char_t suffix[] = ".root";

	//Int_t runlist_ZnP[]={108570, 108569, 108568, 108567, 108566, 108565, 108560, 108558, -1};

	//Int_t runlist_Zn[]={108347,108348,108349,108350,108351,108352,108353,108354,\
				108355,108357,108359,108360,108361,108362,108363,\
				108364,108400,108399,108398,108397,108396,108395,\
				108411,108410,108409,108408,108407,108406,\
				108419,108418,108417,108416,108415,108414,\
				108444,108443,108442,108441,108440,108439,108438,108437,108436,\
				108435,108434,108433,108432,108431,108430,108429,108428,108427,\
				108426,108425,108423,108422,108462,108461,108460,108459,108458,\
				108457,108520,108519,108518,108517,108516,108515,108514,108513,\
				108512,108523,108527,108526,108525,108524,108539,108538,108537,\
				108536,108535,108560,108559,108548,\
				108570, 108569, 108568, 108567,108566, 108565, 108560, 108558,-1};

	Int_t runlist_E[]={108393,108392,108391,108390,108389,108388,108387,108495,108494,108493,108492,108491,-1};

	Int_t runlist_Au[]={108339,108340,108343,108344,108345,108346,108403,108404,108405,108490,108489,-1};

	TTOFSort *a = new TTOFSort();
	 a->SetEnableMonitorPerBunch(); // include information on monitors per bunch


	a->AddDetector(kC6D6, 4);
	a->AddDetector(kSILI,4);
	a->AddDetector(kPKUP,1);
	a->SetNewVariableNames_amplitude(kC6D6, "amp");   // use instead of variable amp
	a->SetNewVariableNames_amplitude(kSILI ,"amp");
	a->SetNewVariableNames_amplitude(kPKUP ,"amp");

	//a->SetPriorCut(kC6D6,"PulseIntensity>5E12"); a->SetPriorCut(kC6D6,"PulseIntensity>2E12",&&,"PulseIntensity<5E12");
	//a->SetPriorCut(kC6D6,"PulseIntensity>2E12 && PulseIntensity<5E12 && detn!=1 && detn!=4 && detn!=5 && detn!=6");
	a->SetPriorCut(kC6D6,"PulseIntensity>2E12 && PulseIntensity<5E12");
	a->SetPriorCut(kSILI,"PulseIntensity>2E12 && PulseIntensity<5E12");
	a->SetPriorCut(kPKUP,"PulseIntensity>2E12 && PulseIntensity<5E12");


		a->SetNewBinParsA(kC6D6, 0.0, 7000, 70000);        // CLW: CHANGED BINNING
		a->SetNewBinParsA(kSILI, 0.0, 7000, 70000);        // CLW: CHANGED BINNING

		 a->SetNewVariableNames_amplitude(kC6D6, "amp");

		 a->SetNewFixedDeadtime(kC6D6, 50.0);    // fixed deadtime of 30 ns
		 a->SetNewCoincidencetime (kC6D6, 40.0); // Coincidences between 30 ns



	a->UseWeightingFunction(kC6D6, wfau1, wfau2, wfau3, wfau4); //Zero the additonal two C6D6s

	a->UseCalibration(kC6D6, caldet1, caldet2, caldet3, caldet4);
	a->SetNewCutsEg(kC6D6, 0.200, 10.0);

	a->ProcessListOfRuns_Single(prefix, runlist_Au, suffix, "Au_single_parasitic.root", "Au", "RECREATE");
	a->ProcessListOfRuns_Single(prefix, runlist_E, suffix, "Zn_single_ALL_parasitic.root", "E", "UPDATE");
	a->ProcessListOfRuns_Sum(prefix, runlist_Au, suffix, "Au_sum_parasitic.root", "Au", "RECREATE");
	a->ProcessListOfRuns_Sum(prefix, runlist_E, suffix, "Zn_sum_ALL_parasitic.root", "E", "UPDATE");

	return 0;
}
Attachment 4: Process_Zn_inc_prob_dedicated.C
// g++ -Wall -O3 -g `root-config --cflags --ldflags --glibs` process_runs_Zn_full.cpp -o process_runs_Zn_full && ./process_runs_Zn_full

#include <iostream>
#include <TFile.h>
#include <TCanvas.h>
#include <TPad.h>
#include <TAxis.h>
#include <TH1D.h>
#include <TF1.h>
#include <TLegend.h>
#include <TLegendEntry.h>
#include <TDirectory.h>
#include <fstream>
#include <math.h>

#include "/eos/experiment/ntof/codes/TTOFSort/TTOFSort_nTOF.h"
#ifndef __CINT__
#include "/eos/experiment/ntof/codes/TTOFSort/TTOFSort_nTOF.cxx"
#endif

using namespace std;

Double_t caldet1(Double_t x){return(-0.0126844 + 0.000250511 * x);}
//Double_t caldet1b(Double_t x){return(0.0300862 + 0.000239789 * x);}
//Double_t caldet1c(Double_t x){return(-0.00982159 + 0.000243208 * x);}
Double_t caldet2(Double_t x){return(0.00933879 + 0.000223045 * x);}
Double_t caldet3(Double_t x){return(0.0448306 + 0.000295976 * x);}
Double_t caldet4(Double_t x){return(0.039253 + 0.000228249 * x);}
Double_t caldet5(Double_t x){return(0.039253 + 0.000228249 * x);}
Double_t caldet6(Double_t x){return(0.039253 + 0.000228249 * x);}

Double_t wfzn1(Double_t x){return(52.4331 - 15.7227 * x + 129.696 * x * x - 21.3173 * x * x * x + 1.23419 * x * x * x * x);} //Coeff 0.0810697 0.0604489 0
Double_t wfzn2(Double_t x){return(54.8656 - 23.9266 * x + 136.114 * x * x - 22.9382 * x * x * x + 1.36142 * x * x * x * x);} //Coeff 0.0810697 0.0604489 0
Double_t wfzn3(Double_t x){return(55.0448 - 24.1592 * x + 135.662 * x * x - 22.6676 * x * x * x + 1.32807 * x * x * x * x);} //Coeff 0.0810697 0.0604489 0
Double_t wfzn4(Double_t x){return(53.7253 - 20.1490 * x + 133.263 * x * x - 22.2370 * x * x * x + 1.30748 * x * x * x * x);} //Coeff 0.0810697 0.0604489 0

Double_t wfau1(Double_t x){return(33.0459 - 14.2600 * x + 79.6741 * x * x - 12.5454 * x * x * x + 75.7094 * x * x * x * x);} //Coeff 0.0810697 0.0604489 0
Double_t wfau2(Double_t x){return(31.1978 - 8.63083 * x + 76.0325 * x * x - 11.7987 * x * x * x + 71.1593 * x * x * x * x);} //Coeff 0.0810697 0.0604489 0
Double_t wfau3(Double_t x){return(30.1989 - 5.58729 * x + 74.0714 * x * x - 11.4009 * x * x * x + 68.8028 * x * x * x * x);} //Coeff 0.0810697 0.0604489 0
Double_t wfau4(Double_t x){return(30.0116 - 5.09782 * x + 73.9204 * x * x - 11.4115 * x * x * x + 69.3298 * x * x * x * x);} //Coeff 0.0810697 0.0604489 0

Double_t dummy_function(Double_t x){return 0.;}

int Zn68(){

	Char_t prefix[] = "root://eospublic.cern.ch//eos/experiment/ntof/data/rootfiles/2018/ear1/run";

	Char_t suffix[] = ".root";

	//Int_t runlist_ZnP[]={108570, 108569, 108568, 108567, 108566, 108565, 108560, 108558, -1};

	Int_t runlist_Zn[]{108347,108348,108349,108350,108351,108352,108353,108355,108357,108359,108360,108361,108362,\
				108363,108364,108397,108398,108399,108400,108406,108408,\
				108409,108410,108411,108414,108415,108416,108417,108418,108419,\
				108422,108423,108425,108426,108427,108428,108429,\
				108430,108431,108432,108433,108434,108435,108436,108437,108438,108440,\
				108441,108442,108443,108444,108459,108460,108461,\
				108512,108513,108514,108515,108516,108517,108518,108519,\
				108520,108523,108524,108525,108526,108527,\
				108535,108536,108537,108538,108539,108548,108559,108565,-1};


	Int_t runlist_E[]={108393,108392,108391,108390,108389,108388,108387,108495,108494,108493,108492,108491,-1};

	//Int_t runlist_Au[]={108339,108340,108342,108343,108344,108345,108346,108403,108404,108405,108490,108489,-1};



	TTOFSort *a = new TTOFSort();
	 a->SetEnableMonitorPerBunch(); // include information on monitors per bunch


	a->AddDetector(kC6D6, 6);
	a->AddDetector(kSILI,4);
	a->AddDetector(kPKUP,1);
	a->SetNewVariableNames_amplitude(kC6D6, "amp");   // use instead of variable amp
	a->SetNewVariableNames_amplitude(kSILI ,"amp");
	a->SetNewVariableNames_amplitude(kPKUP ,"amp");

	//a->SetPriorCut(kC6D6,"PulseIntensity>5E12"); a->SetPriorCut(kC6D6,"PulseIntensity>2E12",&&,"PulseIntensity<5E12");
	a->SetPriorCut(kC6D6,"PulseIntensity>5E12");
	a->SetPriorCut(kSILI,"PulseIntensity>5E12");
	a->SetPriorCut(kPKUP,"PulseIntensity>5E12");


		a->SetNewBinParsA(kC6D6, 0.0, 7000, 70000);        // CLW: CHANGED BINNING
		a->SetNewBinParsA(kSILI, 0.0, 7000, 70000);        // CLW: CHANGED BINNING

		 a->SetNewVariableNames_amplitude(kC6D6, "amp");

		 a->SetNewFixedDeadtime(kC6D6, 50.0);    // fixed deadtime of 30 ns
		 a->SetNewCoincidencetime (kC6D6, 40.0); // Coincidences between 30 ns



	a->UseWeightingFunction(kC6D6, wfzn1, wfzn2, wfzn3, wfzn4); //Zero the additonal two C6D6s

	a->UseCalibration(kC6D6, caldet1, caldet2, caldet3, caldet4);
	a->SetNewCutsEg(kC6D6, 0.200, 10.0);

	a->ProcessListOfRuns_Single(prefix, runlist_Zn, suffix, "Zn_single_ALL_dedicated.root", "Zn", "RECREATE");
	a->ProcessListOfRuns_Single(prefix, runlist_E, suffix, "Zn_single_ALL_dedicated.root", "E", "UPDATE");
	a->ProcessListOfRuns_Sum(prefix, runlist_Zn, suffix, "Zn_sum_ALL_dedicated.root", "Zn", "RECREATE");
	a->ProcessListOfRuns_Sum(prefix, runlist_E, suffix, "Zn_sum_ALL_dedicated.root", "E", "UPDATE");

	return 0;
}
Attachment 5: Process_Zn_inc_prob_parasitic.C
// g++ -Wall -O3 -g `root-config --cflags --ldflags --glibs` process_runs_Zn_full.cpp -o process_runs_Zn_full && ./process_runs_Zn_full

#include <iostream>
#include <TFile.h>
#include <TCanvas.h>
#include <TPad.h>
#include <TAxis.h>
#include <TH1D.h>
#include <TF1.h>
#include <TLegend.h>
#include <TLegendEntry.h>
#include <TDirectory.h>
#include <fstream>
#include <math.h>

#include "/eos/experiment/ntof/codes/TTOFSort/TTOFSort_nTOF.h"
#ifndef __CINT__
#include "/eos/experiment/ntof/codes/TTOFSort/TTOFSort_nTOF.cxx"
#endif

using namespace std;

Double_t caldet1(Double_t x){return(-0.0126844 + 0.000250511 * x);}
//Double_t caldet1b(Double_t x){return(0.0300862 + 0.000239789 * x);}
//Double_t caldet1c(Double_t x){return(-0.00982159 + 0.000243208 * x);}
Double_t caldet2(Double_t x){return(0.00933879 + 0.000223045 * x);}
Double_t caldet3(Double_t x){return(0.0448306 + 0.000295976 * x);}
Double_t caldet4(Double_t x){return(0.039253 + 0.000228249 * x);}
Double_t caldet5(Double_t x){return(0.039253 + 0.000228249 * x);}
Double_t caldet6(Double_t x){return(0.039253 + 0.000228249 * x);}

Double_t wfzn1(Double_t x){return(52.4331 - 15.7227 * x + 129.696 * x * x - 21.3173 * x * x * x + 1.23419 * x * x * x * x);} //Coeff 0.0810697 0.0604489 0
Double_t wfzn2(Double_t x){return(54.8656 - 23.9266 * x + 136.114 * x * x - 22.9382 * x * x * x + 1.36142 * x * x * x * x);} //Coeff 0.0810697 0.0604489 0
Double_t wfzn3(Double_t x){return(55.0448 - 24.1592 * x + 135.662 * x * x - 22.6676 * x * x * x + 1.32807 * x * x * x * x);} //Coeff 0.0810697 0.0604489 0
Double_t wfzn4(Double_t x){return(53.7253 - 20.1490 * x + 133.263 * x * x - 22.2370 * x * x * x + 1.30748 * x * x * x * x);} //Coeff 0.0810697 0.0604489 0

Double_t wfau1(Double_t x){return(33.0459 - 14.2600 * x + 79.6741 * x * x - 12.5454 * x * x * x + 75.7094 * x * x * x * x);} //Coeff 0.0810697 0.0604489 0
Double_t wfau2(Double_t x){return(31.1978 - 8.63083 * x + 76.0325 * x * x - 11.7987 * x * x * x + 71.1593 * x * x * x * x);} //Coeff 0.0810697 0.0604489 0
Double_t wfau3(Double_t x){return(30.1989 - 5.58729 * x + 74.0714 * x * x - 11.4009 * x * x * x + 68.8028 * x * x * x * x);} //Coeff 0.0810697 0.0604489 0
Double_t wfau4(Double_t x){return(30.0116 - 5.09782 * x + 73.9204 * x * x - 11.4115 * x * x * x + 69.3298 * x * x * x * x);} //Coeff 0.0810697 0.0604489 0

Double_t dummy_function(Double_t x){return 0.;}

int Zn68(){

	Char_t prefix[] = "root://eospublic.cern.ch//eos/experiment/ntof/data/rootfiles/2018/ear1/run";

	Char_t suffix[] = ".root";


	Int_t runlist_Zn[]={108347,108348,108349,108350,108351,108352,108353,108355,108357,108359,108360,108361,108362,\
				108363,108364,108397,108398,108399,108400,108406,108408,\
				108409,108410,108411,108414,108415,108416,108417,108418,108419,\
				108422,108423,108425,108426,108427,108428,108429,\
				108430,108431,108432,108433,108434,108435,108436,108437,108438,108440,\
				108441,108442,108443,108444,108459,108460,108461,\
				108512,108513,108514,108515,108516,108517,108518,108519,\
				108520,108523,108524,108525,108526,108527,\
				108535,108536,108537,108538,108539,108548,108559,108565,-1};



	Int_t runlist_E[]={108393,108392,108391,108390,108389,108388,108387,108495,108494,108493,108492,108491,-1};

	//Int_t runlist_Au[]={108339,108340,108342,108343,108344,108345,108346,108403,108404,108405,108490,108489,-1};

	TTOFSort *a = new TTOFSort();
	 a->SetEnableMonitorPerBunch(); // include information on monitors per bunch


	a->AddDetector(kC6D6, 6);
	a->AddDetector(kSILI,4);
	a->AddDetector(kPKUP,1);
	a->SetNewVariableNames_amplitude(kC6D6, "amp");   // use instead of variable amp
	a->SetNewVariableNames_amplitude(kSILI ,"amp");
	a->SetNewVariableNames_amplitude(kPKUP ,"amp");

	//a->SetPriorCut(kC6D6,"PulseIntensity>5E12"); a->SetPriorCut(kC6D6,"PulseIntensity>2E12",&&,"PulseIntensity<5E12");
	a->SetPriorCut(kC6D6,"PulseIntensity>2E12 && PulseIntensity<5E12");
	//a->SetPriorCut(kC6D6,"PulseIntensity>5E12 && detn!=1 && detn!=4");
	a->SetPriorCut(kSILI,"PulseIntensity>2E12 && PulseIntensity<5E12");
	a->SetPriorCut(kPKUP,"PulseIntensity>2E12 && PulseIntensity<5E12");


		a->SetNewBinParsA(kC6D6, 0.0, 7000, 70000);        // CLW: CHANGED BINNING
		a->SetNewBinParsA(kSILI, 0.0, 7000, 70000);        // CLW: CHANGED BINNING

		 a->SetNewVariableNames_amplitude(kC6D6, "amp");

		 a->SetNewFixedDeadtime(kC6D6, 50.0);    // fixed deadtime of 30 ns
		 a->SetNewCoincidencetime (kC6D6, 40.0); // Coincidences between 30 ns



	a->UseWeightingFunction(kC6D6, wfzn1, wfzn2, wfzn3, wfzn4); //Zero the additonal two C6D6s

	a->UseCalibration(kC6D6, caldet1, caldet2, caldet3, caldet4);
	a->SetNewCutsEg(kC6D6, 0.200, 10.0);

	a->ProcessListOfRuns_Single(prefix, runlist_Zn, suffix, "Zn_single_ALL_parasitic.root", "Zn", "RECREATE");
	a->ProcessListOfRuns_Single(prefix, runlist_E, suffix, "Zn_single_ALL_parasitic.root", "E", "UPDATE");
	a->ProcessListOfRuns_Sum(prefix, runlist_Zn, suffix, "Zn_sum_ALL_parasitic.root", "Zn", "RECREATE");
	a->ProcessListOfRuns_Sum(prefix, runlist_E, suffix, "Zn_sum_ALL_parasitic.root", "E", "UPDATE");

	return 0;
}
Attachment 6: Process_Zn_inc_prob.C
// g++ -Wall -O3 -g `root-config --cflags --ldflags --glibs` process_runs_Zn_full.cpp -o process_runs_Zn_full && ./process_runs_Zn_full

#include <iostream>
#include <TFile.h>
#include <TCanvas.h>
#include <TPad.h>
#include <TAxis.h>
#include <TH1D.h>
#include <TF1.h>
#include <TLegend.h>
#include <TLegendEntry.h>
#include <TDirectory.h>
#include <fstream>
#include <math.h>

#include "/eos/experiment/ntof/codes/TTOFSort/TTOFSort_nTOF.h"
#ifndef __CINT__
#include "/eos/experiment/ntof/codes/TTOFSort/TTOFSort_nTOF.cxx"
#endif

using namespace std;

Double_t caldet1(Double_t x){return(-0.0126844 + 0.000250511 * x);}
//Double_t caldet1b(Double_t x){return(0.0300862 + 0.000239789 * x);}
//Double_t caldet1c(Double_t x){return(-0.00982159 + 0.000243208 * x);}
Double_t caldet2(Double_t x){return(0.00933879 + 0.000223045 * x);}
Double_t caldet3(Double_t x){return(0.0448306 + 0.000295976 * x);}
Double_t caldet4(Double_t x){return(0.039253 + 0.000228249 * x);}
Double_t caldet5(Double_t x){return(0.039253 + 0.000228249 * x);}
Double_t caldet6(Double_t x){return(0.039253 + 0.000228249 * x);}

Double_t wfzn1(Double_t x){return(52.4331 - 15.7227 * x + 129.696 * x * x - 21.3173 * x * x * x + 1.23419 * x * x * x * x);} //Coeff 0.0810697 0.0604489 0
Double_t wfzn2(Double_t x){return(54.8656 - 23.9266 * x + 136.114 * x * x - 22.9382 * x * x * x + 1.36142 * x * x * x * x);} //Coeff 0.0810697 0.0604489 0
Double_t wfzn3(Double_t x){return(55.0448 - 24.1592 * x + 135.662 * x * x - 22.6676 * x * x * x + 1.32807 * x * x * x * x);} //Coeff 0.0810697 0.0604489 0
Double_t wfzn4(Double_t x){return(53.7253 - 20.1490 * x + 133.263 * x * x - 22.2370 * x * x * x + 1.30748 * x * x * x * x);} //Coeff 0.0810697 0.0604489 0

Double_t wfau1(Double_t x){return(33.0459 - 14.2600 * x + 79.6741 * x * x - 12.5454 * x * x * x + 75.7094 * x * x * x * x);} //Coeff 0.0810697 0.0604489 0
Double_t wfau2(Double_t x){return(31.1978 - 8.63083 * x + 76.0325 * x * x - 11.7987 * x * x * x + 71.1593 * x * x * x * x);} //Coeff 0.0810697 0.0604489 0
Double_t wfau3(Double_t x){return(30.1989 - 5.58729 * x + 74.0714 * x * x - 11.4009 * x * x * x + 68.8028 * x * x * x * x);} //Coeff 0.0810697 0.0604489 0
Double_t wfau4(Double_t x){return(30.0116 - 5.09782 * x + 73.9204 * x * x - 11.4115 * x * x * x + 69.3298 * x * x * x * x);} //Coeff 0.0810697 0.0604489 0

Double_t dummy_function(Double_t x){return 0.;}

int Zn68(){

	Char_t prefix[] = "root://eospublic.cern.ch//eos/experiment/ntof/data/rootfiles/2018/ear1/run";

	Char_t suffix[] = ".root";

	Int_t runlist_Zn[]{108347,108348,108349,108350,108351,108352,108353,108355,108357,108359,108360,108361,108362,\
				108363,108364,108397,108398,108399,108400,108406,108408,\
				108409,108410,108411,108414,108415,108416,108417,108418,108419,\
				108422,108423,108425,108426,108427,108428,108429,\
				108430,108431,108432,108433,108434,108435,108436,108437,108438,108440,\
				108441,108442,108443,108444,108459,108460,108461,\
				108512,108513,108514,108515,108516,108517,108518,108519,\
				108520,108523,108524,108525,108526,108527,\
				108535,108536,108537,108538,108539,108548,108559,108565,-1};


	Int_t runlist_E[]={108393,108392,108391,108390,108389,108388,108387,108495,108494,108493,108492,108491,-1};

	//Int_t runlist_Au[]={108339,108340,108342,108343,108344,108345,108346,108403,108404,108405,108490,108489,-1};



	TTOFSort *a = new TTOFSort();
	 a->SetEnableMonitorPerBunch(); // include information on monitors per bunch


	a->AddDetector(kC6D6, 6);
	a->AddDetector(kSILI,4);
	a->AddDetector(kPKUP,1);
	a->SetNewVariableNames_amplitude(kC6D6, "amp");   // use instead of variable amp
	a->SetNewVariableNames_amplitude(kSILI ,"amp");
	a->SetNewVariableNames_amplitude(kPKUP ,"amp");

	//a->SetPriorCut(kC6D6,"PulseIntensity>5E12"); a->SetPriorCut(kC6D6,"PulseIntensity>2E12",&&,"PulseIntensity<5E12");
	//a->SetPriorCut(kC6D6);
	//a->SetPriorCut(kSILI);
	//a->SetPriorCut(kPKUP);


		a->SetNewBinParsA(kC6D6, 0.0, 7000, 70000);        // CLW: CHANGED BINNING
		a->SetNewBinParsA(kSILI, 0.0, 7000, 70000);        // CLW: CHANGED BINNING

		 a->SetNewVariableNames_amplitude(kC6D6, "amp");

		 a->SetNewFixedDeadtime(kC6D6, 50.0);    // fixed deadtime of 30 ns
		 a->SetNewCoincidencetime (kC6D6, 40.0); // Coincidences between 30 ns



	a->UseWeightingFunction(kC6D6, wfzn1, wfzn2, wfzn3, wfzn4); //Zero the additonal two C6D6s

	a->UseCalibration(kC6D6, caldet1, caldet2, caldet3, caldet4);
	a->SetNewCutsEg(kC6D6, 0.200, 10.0);

	a->ProcessListOfRuns_Single(prefix, runlist_Zn, suffix, "Zn_single_ALL.root", "Zn", "RECREATE");
	a->ProcessListOfRuns_Single(prefix, runlist_E, suffix, "Zn_single_ALL.root", "E", "UPDATE");
	a->ProcessListOfRuns_Sum(prefix, runlist_Zn, suffix, "Zn_sum_ALL.root", "Zn", "RECREATE");
	a->ProcessListOfRuns_Sum(prefix, runlist_E, suffix, "Zn_sum_ALL.root", "E", "UPDATE");

	return 0;
}
  57   Thu Nov 30 14:43:28 2023 ARZn + Au Background subtraction: Plots

Plots for Zn and Au with Empty subtracted, and compared to weighted spectra.

Note: Au are logged x and y, Zn is only logged x.

Attachment 1: Au_BG_correction_det3_inc_uncorr.pdf
Au_BG_correction_det3_inc_uncorr.pdf
Attachment 2: Au_BG_correction_det2_inc_uncorr.pdf
Au_BG_correction_det2_inc_uncorr.pdf
Attachment 3: Au_BG_Correction_det1_inc_uncorr.pdf
Au_BG_Correction_det1_inc_uncorr.pdf
Attachment 4: Zn_BG_Correction_det3_R3_inc_uncorr.pdf
Zn_BG_Correction_det3_R3_inc_uncorr.pdf
Attachment 5: Zn_BG_Correction_det3_R2_inc_uncorr.pdf
Zn_BG_Correction_det3_R2_inc_uncorr.pdf
Attachment 6: Zn_BG_Correction_det3_R1_inc_uncorr.pdf
Zn_BG_Correction_det3_R1_inc_uncorr.pdf
Attachment 7: Zn_BG_Correction_det2_R3_inc_uncorr.pdf
Zn_BG_Correction_det2_R3_inc_uncorr.pdf
Attachment 8: Zn_BG_Correction_det2_R2_inc_uncorr.pdf
Zn_BG_Correction_det2_R2_inc_uncorr.pdf
Attachment 9: Zn_BG_Correction_det2_R1_inc_uncorr.pdf
Zn_BG_Correction_det2_R1_inc_uncorr.pdf
Attachment 10: Zn_BG_Correction_det1_R1_inc_uncorr.pdf
Zn_BG_Correction_det1_R1_inc_uncorr.pdf
Attachment 11: Zn_BG_Corrected_det1_R3_inc_uncorr.pdf
Zn_BG_Corrected_det1_R3_inc_uncorr.pdf
Attachment 12: Zn_BG_Correction_det1_R2_inc_uncorr.pdf
Zn_BG_Correction_det1_R2_inc_uncorr.pdf
Attachment 13: Au_BG_Correction_Comp_weighted_det3_zoom.pdf
Au_BG_Correction_Comp_weighted_det3_zoom.pdf
Attachment 14: Au_BG_Corection_Comp_Weighted_det2_Zoom.pdf
Au_BG_Corection_Comp_Weighted_det2_Zoom.pdf
Attachment 15: Au_BG_Correction_Comp_Weighted_det1_Zoom.pdf
Au_BG_Correction_Comp_Weighted_det1_Zoom.pdf
Attachment 16: Zn_BG_Correction_Comp_Weighted_det3_zoom.pdf
Zn_BG_Correction_Comp_Weighted_det3_zoom.pdf
Attachment 17: Zn_BG_Correction_Comp_Weighted_det3.pdf
Zn_BG_Correction_Comp_Weighted_det3.pdf
Attachment 18: Zn_BG_Correction_Comp_Weighted_det2_zoom.pdf
Zn_BG_Correction_Comp_Weighted_det2_zoom.pdf
Attachment 19: Zn_BG_Correction_Comp_weighted_det2.pdf
Zn_BG_Correction_Comp_weighted_det2.pdf
Attachment 20: Zn_BG_Correction_Comp_Weighted_det1_zoom.pdf
Zn_BG_Correction_Comp_Weighted_det1_zoom.pdf
Attachment 21: Zn_BG_Correction_Comp_Weighted_det1.pdf
Zn_BG_Correction_Comp_Weighted_det1.pdf
ELOG V3.1.4-unknown