@@ -176,31 +176,6 @@ struct PhotonResoTask {
176176 Configurable<bool > cfgEnableQA{" cfgEnableQA" , false , " flag to turn QA plots on/off" };
177177 } mesonConfig;
178178
179- struct : ConfigurableGroup {
180- std::string prefix = " mixingConfig" ;
181- ConfigurableAxis cfgVtxBins{" cfgVtxBins" , {VARIABLE_WIDTH, -10 .0f , -8 .f , -6 .f , -4 .f , -2 .f , 0 .f , 2 .f , 4 .f , 6 .f , 8 .f , 10 .f }, " Mixing bins - z-vertex" };
182- ConfigurableAxis cfgCentBins{" cfgCentBins" , {VARIABLE_WIDTH, 0 .0f , 5 .0f , 10 .0f , 20 .0f , 30 .0f , 40 .0f , 50 .0f , 60 .0f , 70 .0f , 80 .0f , 90 .0f , 100 .f }, " Mixing bins - centrality" };
183- ConfigurableAxis cfgEPBins{" cfgEPBins" , {8 , o2::constants::math::PIHalf, o2::constants::math::PIHalf}, " Mixing bins - event plane angle" };
184- ConfigurableAxis cfgOccupancyBins{" cfgOccupancyBins" , {VARIABLE_WIDTH, 0 , 100 , 500 , 1000 , 2000 }, " Mixing bins - occupancy" };
185- Configurable<int > cfgMixingDepth{" cfgMixingDepth" , 2 , " Mixing depth" };
186- } mixingConfig;
187-
188- struct : ConfigurableGroup {
189- std::string prefix = " rotationConfig" ;
190- Configurable<bool > cfgDoRotation{" cfgDoRotation" , false , " Flag to enable rotation background method." };
191- Configurable<int > cfgDownsampling{" cfgDownsampling" , 1 , " Calculate rotation background only for every <value> collision." };
192- Configurable<float > cfgRotAngle{" cfgRotAngle" , std::move (const_cast <float &>(o2::constants::math::PIHalf)), " Angle used for the rotation method." };
193- Configurable<bool > cfgUseWeights{" cfgUseWeights" , false , " Flag to enable weights for rotation background method." };
194- } rotationConfig;
195-
196- struct : ConfigurableGroup {
197- std::string prefix = " correctionConfig" ;
198- Configurable<std::string> cfgSpresoPath{" cfgSpresoPath" , " Users/m/mhemmer/EM/Flow/Resolution" , " Path to SP resolution file" };
199- Configurable<int > cfgApplySPresolution{" cfgApplySPresolution" , 0 , " Apply resolution correction" };
200- Configurable<bool > doEMCalCalib{" doEMCalCalib" , 0 , " Produce output for EMCal calibration" };
201- Configurable<bool > cfgEnableNonLin{" cfgEnableNonLin" , false , " flag to turn extra non linear energy calibration on/off" };
202- } correctionConfig;
203-
204179 SliceCache cache;
205180
206181 using EMCalPhotons = soa::Join<aod::EMCEMEventIds, aod::MinClusters, aod::EMEMCClusterMCLabels>;
@@ -224,10 +199,6 @@ struct PhotonResoTask {
224199 int mRunNumber {-1 };
225200 float dBz{0 .f };
226201
227- // Usage when cfgEnableNonLin is enabled
228- std::unique_ptr<TF1> fEMCalCorrectionFactor ; // ("fEMCalCorrectionFactor","(1 + [0]/x + [1]/x^2) / (1 + [2]/x)", 0.3, 100.);
229- float energyCorrectionFactor = 1 .f;
230-
231202 void defineEMEventCut ()
232203 {
233204 fEMEventCut = EMPhotonEventCut (" fEMEventCut" , " fEMEventCut" );
@@ -320,7 +291,7 @@ struct PhotonResoTask {
320291 const AxisSpec thnAxisPGen{thnConfigAxisPt, " #it{p}_{Gen} (GeV/#it{c})" };
321292 const AxisSpec thnAxisPRec{thnConfigAxisPt, " #it{p}_{Rec} (GeV/#it{c})" };
322293 const AxisSpec thnAxisPRelative{thnConfigAxisXRelative, " #it{p}_{Rec} - #it{p}_{Gen} / #it{p}_{Gen}" };
323- const AxisSpec thnAxisEGen{thnConfigAxisPt, " #it{E}_{Rec } (GeV)" };
294+ const AxisSpec thnAxisEGen{thnConfigAxisPt, " #it{E}_{Gen } (GeV)" };
324295 const AxisSpec thnAxisERec{thnConfigAxisPt, " #it{E}_{Rec} (GeV)" };
325296 const AxisSpec thnAxisERelative{thnConfigAxisXRelative, " #it{E}_{Rec} - #it{E}_{Gen} / #it{E}_{Gen}" };
326297 const AxisSpec thnAxisInvMass{thnConfigAxisInvMass, " #it{M}_{#gamma#gamma} (GeV/#it{c}^{2})" };
@@ -375,9 +346,6 @@ struct PhotonResoTask {
375346 if (mesonConfig.cfgEnableQA .value ) {
376347 registry.add (" mesonQA/hInvMassPt" , " Histo for inv pair mass vs pt" , HistType::kTH2D , {thnAxisInvMass, thnAxisPtRec});
377348 }
378-
379- fEMCalCorrectionFactor = std::make_unique<TF1>(" fEMCalCorrectionFactor" , " (1 + [0]/x + [1]/x^2) / (1 + [2]/x)" , 0.3 , 100 .);
380- fEMCalCorrectionFactor ->SetParameters (-5.33426e-01 , 1.40144e-02 , -5.24434e-01 );
381349 }; // end init
382350
383351 template <o2::soa::is_iterator TCollision>
@@ -571,15 +539,8 @@ struct PhotonResoTask {
571539 continue ;
572540 }
573541
574- if (correctionConfig.cfgEnableNonLin .value ) {
575- energyCorrectionFactor = fEMCalCorrectionFactor ->Eval (g1.e () > MinEnergy ? g1.e () : MinEnergy);
576- }
577- if (correctionConfig.cfgEnableNonLin .value ) {
578- energyCorrectionFactor = fEMCalCorrectionFactor ->Eval (g2.e () > MinEnergy ? g2.e () : MinEnergy);
579- }
580-
581- ROOT::Math::PtEtaPhiMVector v1 (energyCorrectionFactor * g1.pt (), g1.eta (), g1.phi (), 0 .);
582- ROOT::Math::PtEtaPhiMVector v2 (energyCorrectionFactor * g2.pt (), g2.eta (), g2.phi (), 0 .);
542+ ROOT::Math::PtEtaPhiMVector v1 (g1.pt (), g1.eta (), g1.phi (), 0 .);
543+ ROOT::Math::PtEtaPhiMVector v2 (g2.pt (), g2.eta (), g2.phi (), 0 .);
583544 ROOT::Math::PtEtaPhiMVector vMeson = v1 + v2;
584545
585546 float openingAngle = std::acos (v1.Vect ().Dot (v2.Vect ()) / (v1.P () * v2.P ()));
0 commit comments