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: ...@@ -110,67 +110,104 @@ private:
// Opening corrections file from GitLab repository // Opening corrections file from GitLab repository
// 5TeV // 5TeV
if ( Year==2012&&Beam=="pPb" ) {
msg() << "------$PARAMFILESROOT-------- " << $PARAMFILESROOT << endmsg; if (Local){
if ( Year==2012&&Beam=="pPb" ) { // Applying data-mc corrections
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 (DataCorr){ 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"); 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"); hist = (TH1F*)corrections_file->Get("total_correction_pA_Merged_MCsim09e");
} }
else{ else{
TFile* corrections_file = TFile::Open("./Phys/DecayTreeTuple/data/total_correction_pA_Merged_MCsim09e_nodata_mc_corr_no_rw.root", "READ"); msg()<< "Reading corrections from Local without data-driven corrections"<< endmsg;
hist = (TH1F*)corrections_file->Get("total_correction_pA_Merged_MCsim09e.root"); // 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 // Reading corrections from Dirac
else{ else{
msg()<< "Reading corrections from Dirac"<< endmsg;
// Applying data-mc corrections // Applying data-mc corrections
if (DataCorr){ if (DataCorr){
msg()<< "Reading corrections from Dirac with data-driven corrections"<< endmsg;
TFile* corrections_file = TFile::Open("total_correction_pA_Merged_MCsim09e", "READ"); TFile* corrections_file = TFile::Open("total_correction_pA_Merged_MCsim09e", "READ");
hist = (TH1F*)corrections_file->Get("total_correction_pA_Merged_MCsim09e.root"); hist = (TH1F*)corrections_file->Get("total_correction_pA_Merged_MCsim09e.root");
} }
else{ 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"); 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"); 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 // Opening response matrix
else if ( Year==2016&&Beam=="pPb" ) { 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 // Getting the profile of the response matrix
hist = (TH1F*)corrections_file->Get("heff"); 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 // #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