@@ -30,24 +30,14 @@ FlowMapper::FlowMapper()
3030 mBinsPhi = 4000 ; // a first guess
3131}
3232
33- void FlowMapper::Setv2VsPt (TH1D hv2VsPtProvided)
34- {
35- // Sets the v2 vs pT to be used.
36- mhv2vsPt = std::make_unique<TH1D>(hv2VsPtProvided);
37- }
38- void FlowMapper::SetEccVsB (TH1D hEccVsBProvided)
39- {
40- // Sets the v2 vs pT to be used.
41- mhEccVsB = std::make_unique<TH1D>(hEccVsBProvided);
42- }
43- void FlowMapper::CreateLUT ()
33+ void FlowMapper::CreateLUT (TH1D* mhv2vsPt, TH1D* mhEccVsB)
4434{
4535 if (!mhv2vsPt) {
46- LOG (fatal) << " You did not specify a v2 vs pT histogram!" ;
36+ LOG (fatal) << " You did not specify a valid v2 vs pT histogram!" ;
4737 return ;
4838 }
4939 if (!mhEccVsB) {
50- LOG (fatal) << " You did not specify an ecc vs B histogram!" ;
40+ LOG (fatal) << " You did not specify a valid ecc vs B histogram!" ;
5141 return ;
5242 }
5343 LOG (info) << " Proceeding to creating a look-up table..." ;
@@ -71,6 +61,7 @@ void FlowMapper::CreateLUT()
7161 // std::make_unique<TH1F>("hSign", "Sign of electric charge;charge sign", 3, -1.5, 1.5);
7262
7363 mhLUT = std::make_unique<TH3D>(" mhLUT" , " " , nbinsB, binsB.data (), nbinsPt, binsPt.data (), nbinsPhi, binsPhi.data ());
64+ mhLUT->SetDirectory (nullptr ); // just in case context is incorrect
7465
7566 // loop over each centrality (b) bin
7667 for (int ic = 0 ; ic < nbinsB; ic++) {
@@ -147,4 +138,4 @@ Double_t FlowMapper::MapPhi(Double_t lPhiInput, Double_t b, Double_t pt)
147138} /* namespace eventgen */
148139} /* namespace o2 */
149140
150- ClassImp (o2::eventgen::FlowMapper);
141+ ClassImp (o2::eventgen::FlowMapper);
0 commit comments