Skip to content
Snippets Groups Projects
Commit 75214e27 authored by Pierre Morfouace's avatar Pierre Morfouace
Browse files

Updating vendeta analysis

parent 916b8b4c
No related branches found
No related tags found
No related merge requests found
Pipeline #195302 passed
...@@ -72,13 +72,24 @@ void Analysis::TreatEvent(){ ...@@ -72,13 +72,24 @@ void Analysis::TreatEvent(){
} }
}*/ }*/
/*if(FC_mult==2){
double HF1, HF2;
for(int i=0; i<2; i++){
HF1 = FC->Time[0] - FC->Time_HF[0];
HF2 = FC->Time[1] - FC->Time_HF[1];
}
if(FC->AnodeNumber[0]>0 && FC->AnodeNumber[1]>0 && HF1<1790 && HF2<1790)
cout << FC->AnodeNumber[0] << " / " << FC->AnodeNumber[1] << endl;
}*/
if(FC_mult==1){ if(FC_mult==1){
int anode = FC->AnodeNumber[0]; int anode = FC->AnodeNumber[0];
double Time_FC = FC->Time[0]; double Time_FC = FC->Time[0];
bool isFake = FC->isFakeFission[0]; bool isFake = FC->isFakeFission[0];
incomingDT = FC->Time[0] - FC->Time_HF[0] - GammaOffset[anode-1]; incomingDT = FC->Time[0] - FC->Time_HF[0];
if(anode>0) incomingDT -= GammaOffset[anode-1];
if(incomingDT<0){ if(incomingDT<0){
incomingDT += 1790; incomingDT += 1790;
} }
......
This diff is collapsed.
...@@ -4,13 +4,17 @@ int NumberOfAnodes= 11; ...@@ -4,13 +4,17 @@ int NumberOfAnodes= 11;
int nentries=1e6; int nentries=1e6;
TH1F* hQ1[11]; TH1F* hQ1[11];
TH1F* hQ2[11];
TH1F* hQmax[11];
TH2F* hQ2vsQ1[11]; TH2F* hQ2vsQ1[11];
TH2F* hQmaxvsQ1[11];
TH1F* hinE; TH1F* hinE;
TH1F* hinTof;
///////////////////////////////////// /////////////////////////////////////
void LoadRootFile(){ void LoadRootFile(){
chain = new TChain("PhysicsTree"); chain = new TChain("PhysicsTree");
chain->Add("/home/faster/nptool/Outputs/Analysis/run28.root"); chain->Add("/home/faster/nptool/Outputs/Analysis/run31.root");
} }
///////////////////////////////////// /////////////////////////////////////
...@@ -20,7 +24,7 @@ void FillFCSpectra(){ ...@@ -20,7 +24,7 @@ void FillFCSpectra(){
nentries = chain->GetEntries(); nentries = chain->GetEntries();
cout << "Number of entries: " << nentries << endl; cout << "Number of entries: " << nentries << endl;
TFile* ofile = new TFile("histo_FC_run28.root","recreate"); TFile* ofile = new TFile("histo_FC_run31.root","recreate");
TH1F* hLG[791]; TH1F* hLG[791];
TH1F* hHG[791]; TH1F* hHG[791];
...@@ -29,6 +33,7 @@ void FillFCSpectra(){ ...@@ -29,6 +33,7 @@ void FillFCSpectra(){
vector<double>* inEnergy = new vector<double>(); vector<double>* inEnergy = new vector<double>();
vector<double>* FC_Q1 = new vector<double>(); vector<double>* FC_Q1 = new vector<double>();
vector<double>* FC_Q2 = new vector<double>(); vector<double>* FC_Q2 = new vector<double>();
vector<double>* FC_Qmax = new vector<double>();
vector<double>* FC_DT = new vector<double>(); vector<double>* FC_DT = new vector<double>();
vector<int>* FC_Anode_ID = new vector<int>(); vector<int>* FC_Anode_ID = new vector<int>();
vector<bool>* FC_FakeFission = new vector<bool>(); vector<bool>* FC_FakeFission = new vector<bool>();
...@@ -40,17 +45,29 @@ void FillFCSpectra(){ ...@@ -40,17 +45,29 @@ void FillFCSpectra(){
chain->SetBranchAddress("inEnergy",&inEnergy); chain->SetBranchAddress("inEnergy",&inEnergy);
chain->SetBranchAddress("FC_Q1",&FC_Q1); chain->SetBranchAddress("FC_Q1",&FC_Q1);
chain->SetBranchAddress("FC_Q2",&FC_Q2); chain->SetBranchAddress("FC_Q2",&FC_Q2);
chain->SetBranchAddress("FC_Qmax",&FC_Qmax);
chain->SetBranchAddress("FC_DT",&FC_DT); chain->SetBranchAddress("FC_DT",&FC_DT);
chain->SetBranchAddress("FC_Anode_ID",&FC_Anode_ID); chain->SetBranchAddress("FC_Anode_ID",&FC_Anode_ID);
chain->SetBranchAddress("FC_FakeFission",&FC_FakeFission); chain->SetBranchAddress("FC_FakeFission",&FC_FakeFission);
hinE = new TH1F("Incoming Energy","Incoming Energy",1000,0.5,10); hinE = new TH1F("Incoming Energy","Incoming Energy",1000,0.5,10);
hinTof = new TH1F("Incoming Tof","Incoming Tof",7200,0,1800);
for(int i=0; i<NumberOfAnodes; i++){ for(int i=0; i<NumberOfAnodes; i++){
TString histo_name = Form("Q1_Anode%i",i+1); TString histo_name = Form("Q1_Anode%i",i+1);
hQ1[i] = new TH1F(histo_name,histo_name,500,0,100e3); hQ1[i] = new TH1F(histo_name,histo_name,500,0,100e3);
histo_name = Form("Q2_Anode%i",i+1);
hQ2[i] = new TH1F(histo_name,histo_name,500,0,20e3);
histo_name = Form("Qmax_Anode%i",i+1);
hQmax[i] = new TH1F(histo_name,histo_name,500,0,10e3);
histo_name = Form("Q2vsQ1_Anode%i",i+1); histo_name = Form("Q2vsQ1_Anode%i",i+1);
hQ2vsQ1[i] = new TH2F(histo_name,histo_name,500,0,100e3,500,0,20e3); hQ2vsQ1[i] = new TH2F(histo_name,histo_name,500,0,100e3,500,0,20e3);
histo_name = Form("QmaxvsQ1_Anode%i",i+1);
hQmaxvsQ1[i] = new TH2F(histo_name,histo_name,500,0,100e3,500,0,10e3);
} }
for(int i=0; i<nentries; i++){ for(int i=0; i<nentries; i++){
...@@ -68,12 +85,17 @@ void FillFCSpectra(){ ...@@ -68,12 +85,17 @@ void FillFCSpectra(){
if(anode>0){ if(anode>0){
double q1 = FC_Q1->at(0); double q1 = FC_Q1->at(0);
double q2 = FC_Q2->at(0); double q2 = FC_Q2->at(0);
double qmax = FC_Qmax->at(0);
double DT = FC_DT->at(0); double DT = FC_DT->at(0);
bool FakeFission = FC_FakeFission->at(0); bool FakeFission = FC_FakeFission->at(0);
if(inT>80 && inT<1790 && FakeFission==0 && DT>1e7){ if(inT>10 && inT<1790 && FakeFission==0 && DT>7e6){
hQ1[anode-1]->Fill(q1); hQ1[anode-1]->Fill(q1);
hQ2[anode-1]->Fill(q2);
hQmax[anode-1]->Fill(qmax);
hQ2vsQ1[anode-1]->Fill(q1,q2); hQ2vsQ1[anode-1]->Fill(q1,q2);
hQmaxvsQ1[anode-1]->Fill(q1,qmax);
hinE->Fill(inE); hinE->Fill(inE);
hinTof->Fill(inT);
} }
} }
} }
......
...@@ -6,7 +6,7 @@ int nentries= 1e6; ...@@ -6,7 +6,7 @@ int nentries= 1e6;
////////////////////////////////////////////////// //////////////////////////////////////////////////
void OpenRootFile(){ void OpenRootFile(){
chain = new TChain("RawTree"); chain = new TChain("RawTree");
chain->Add("/home/faster/fastertonptool/data/rootfiles/run28_*.root"); chain->Add("/home/faster/fastertonptool/data/rootfiles/run31_*.root");
} }
////////////////////////////////////////////////// //////////////////////////////////////////////////
...@@ -14,7 +14,7 @@ void FillRawFCSpectra(){ ...@@ -14,7 +14,7 @@ void FillRawFCSpectra(){
OpenRootFile(); OpenRootFile();
nentries = chain->GetEntries(); nentries = chain->GetEntries();
TFile* ofile = new TFile("FC_Raw_spectra_run28.root","recreate"); TFile* ofile = new TFile("FC_Raw_spectra_run31.root","recreate");
TH1F* Q1[11]; TH1F* Q1[11];
TH1F* Q2[11]; TH1F* Q2[11];
TH1F* Qmax[11]; TH1F* Qmax[11];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment