Skip to content
Snippets Groups Projects
Commit 9a95eb09 authored by Imanol Corredoira Fernandez's avatar Imanol Corredoira Fernandez :chart_with_upwards_trend:
Browse files

Replace TupleToolMultiplicity.h

parent 31ab9b60
No related branches found
No related tags found
1 merge request!1040Draft: Fixed formatting
Pipeline #7351958 failed
......@@ -110,67 +110,104 @@ private:
// Opening corrections file from GitLab repository
// 5TeV
msg() << "------$PARAMFILESROOT-------- " << $PARAMFILESROOT << endmsg;
if ( Year==2012&&Beam=="pPb" ) {
msg()<< "Reading corrections for pPb collisions from 2012 sample at 5TeV"<< endmsg;
// Reading corrections from Local
if (Local){
msg()<< "Reading corrections from local"<< endmsg;
// Applying data-mc corrections
if ( Year==2012&&Beam=="pPb" ) {
if (Local){
// Applying data-mc corrections
if (DataCorr){
msg()<< "Reading corrections from Dirac with data-driven corrections"<< endmsg;
TFile* corrections_file = TFile::Open("./Phys/DecayTreeTuple/data/total_correction_pA_Merged_MCsim09e.root", "READ");
hist = (TH1F*)corrections_file->Get("total_correction_pA_Merged_MCsim09e");
}
else{
TFile* corrections_file = TFile::Open("./Phys/DecayTreeTuple/data/total_correction_pA_Merged_MCsim09e_nodata_mc_corr_no_rw.root", "READ");
hist = (TH1F*)corrections_file->Get("total_correction_pA_Merged_MCsim09e.root");
}
msg()<< "Reading corrections from Local without data-driven corrections"<< endmsg;
// Opening corrections file from GitLab repository
TFile* corrections_file = TFile::Open("./Phys/DecayTreeTuple/data/total_correction_pA_MD_MCsim09e_nodata_mc_corr.root", "READ");
hist = (TH1F*)corrections_file->Get("total_correction_pA_MD_MCsim09e");
// Opening response matrix
TFile* response_file = TFile::Open("./Phys/DecayTreeTuple/data/response_matrix_norm_pA_MD_MCsim09e_2.0_4.8_Ncorr_eta1_multi_dep.root", "READ");
TH2F* response = (TH2F*)response_file->Get("response_2.0_4.8");
// Getting the profile of the response matrix
response_profile = response->ProfileY("response_profile");
}
}
// Reading corrections from Dirac
else{
msg()<< "Reading corrections from Dirac"<< endmsg;
// Applying data-mc corrections
if (DataCorr){
msg()<< "Reading corrections from Dirac with data-driven corrections"<< endmsg;
TFile* corrections_file = TFile::Open("total_correction_pA_Merged_MCsim09e", "READ");
hist = (TH1F*)corrections_file->Get("total_correction_pA_Merged_MCsim09e.root");
}
else{
msg()<< "Reading corrections from Dirac without data-driven corrections"<< endmsg;
TFile* corrections_file = TFile::Open("total_correction_pA_Merged_MCsim09e_nodata_mc_corr_no_rw.root", "READ");
hist = (TH1F*)corrections_file->Get("total_correction_pA_Merged_MCsim09e");
}
}
/*
// Opening response matrix
//TFile* response_file = TFile::Open("./Phys/DecayTreeTuple/data/response_matrix_norm_pA_MD_MCsim09e_2.0_4.8_Ncorr_eta1_multi_dep.root", "READ"); // In local
TFile* response_file = TFile::Open("response_matrix_norm_pA_MD_MCsim09e_2.0_4.8_Ncorr_eta1_multi_dep.root", "READ"); // In Dirac
TH2F* response = (TH2F*)response_file->Get("response_2.0_4.8");
// Getting the profile of the response matrix
response_profile = response->ProfileY("response_profile");
}
*/
if ( Year==2012&&Beam=="Pbp" ) {
}
if (Local){
// Applying data-mc corrections
if (DataCorr){
msg()<< "Reading corrections from Dirac with data-driven corrections"<< endmsg;
TFile* corrections_file = TFile::Open("./Phys/DecayTreeTuple/data/total_correction_Ap_Merged_MCsim09e.root", "READ");
hist = (TH1F*)corrections_file->Get("total_correction_Ap_Merged_MCsim09e");
}
else{
msg()<< "Reading corrections from Local without data-driven corrections"<< endmsg;
// Opening corrections file from GitLab repository
TFile* corrections_file = TFile::Open("./Phys/DecayTreeTuple/data/total_correction_Ap_MD_MCsim09e_nodata_mc_corr.root", "READ");
hist = (TH1F*)corrections_file->Get("total_correction_Ap_MD_MCsim09e");
// 8TeV
else if ( Year==2016&&Beam=="pPb" ) {
// Opening response matrix
TFile* response_file = TFile::Open("./Phys/DecayTreeTuple/data/response_matrix_norm_Ap_MD_MCsim09e_2.0_4.8_Ncorr_eta1_multi_dep.root", "READ");
TH2F* response = (TH2F*)response_file->Get("response_2.0_4.8");
TFile* corrections_file = TFile::Open("./Phys/DecayTreeTuple/data/merged_eff_4D_pPb_8TeV.root", "READ"); // Local
hist = (TH1F*)corrections_file->Get("heff");
// Getting the profile of the response matrix
response_profile = response->ProfileY("response_profile");
}
}
// Reading corrections from Dirac
else{
}
msg()<< "Reading corrections from Dirac"<< endmsg;
msg() << "corrections = " << hist << endmsg;
// Applying data-mc corrections
if (DataCorr){
msg()<< "Reading corrections from Dirac with data-driven corrections"<< endmsg;
TFile* corrections_file = TFile::Open("total_correction_Ap_Merged_MCsim09e", "READ");
hist = (TH1F*)corrections_file->Get("total_correction_Ap_Merged_MCsim09e.root");
}
else{
msg()<< "Reading corrections from Dirac without data-driven corrections"<< endmsg;
TFile* corrections_file = TFile::Open("total_correction_Ap_Merged_MCsim09e_nodata_mc_corr_no_rw.root", "READ");
hist = (TH1F*)corrections_file->Get("total_correction_Ap_Merged_MCsim09e");
}
}
}
}
};
#endif //
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