@@ -63,6 +63,8 @@ struct ConfCpr : o2::framework::ConfigurableGroup {
6363 o2::framework::Configurable<bool > plotAverage{" plotAverage" , true , " Plot average deta dphi distribution" };
6464 o2::framework::Configurable<float > detaMax{" detaMax" , 0 .01f , " Maximium deta" };
6565 o2::framework::Configurable<float > dphistarMax{" dphistarMax" , 0 .01f , " Maximum dphistar" };
66+ o2::framework::Configurable<float > detaCenter{" detaCenter" , 0 .f , " Center of deta cut" };
67+ o2::framework::Configurable<float > dphistarCenter{" dphistarCenter" , 0 .f , " Center of dphistar cut" };
6668 o2::framework::Configurable<float > kstarMin{" kstarMin" , -1 .f , " Minimum kstar of pair for plotting (Set to negative value to turn off the cut)" };
6769 o2::framework::Configurable<float > kstarMax{" kstarMax" , -1 .f , " Maximum kstar of pair for plotting (Set to negative value to turn off the cut)" };
6870 o2::framework::ConfigurableAxis binningDeta{" binningDeta" , {{250 , -0.5 , 0.5 }}, " deta" };
@@ -157,6 +159,9 @@ class CloseTrackRejection
157159 LOG (fatal) << " Limits for Close Pair Rejection are invalid (0 or negative). Breaking..." ;
158160 }
159161
162+ mDetaCenter = confCpr.detaCenter .value ;
163+ mDphistarCenter = confCpr.dphistarCenter .value ;
164+
160165 mChargeAbsTrack1 = std::abs (chargeAbsTrack1);
161166 mChargeAbsTrack2 = std::abs (chargeAbsTrack2);
162167
@@ -280,7 +285,7 @@ class CloseTrackRejection
280285 bool isCloseAnyRadius = false ;
281286
282287 if (mCutAverage ) {
283- isCloseAverage = std::hypot (mAverageDphistar / mDphistarMax , mDeta / mDetaMax ) < 1 .f ;
288+ isCloseAverage = std::hypot (( mAverageDphistar - mDphistarCenter ) / mDphistarMax , ( mDeta - mDetaCenter ) / mDetaMax ) < 1 .f ;
284289 }
285290
286291 if (mCutAnyRadius ) {
@@ -289,7 +294,7 @@ class CloseTrackRejection
289294 break ;
290295 }
291296 if (mDphistarMask .at (i)) {
292- isCloseAnyRadius = std::hypot (mDphistar .at (i) / mDphistarMax , mDeta / mDetaMax ) < 1 .f ;
297+ isCloseAnyRadius = std::hypot (( mDphistar .at (i) - mDphistarCenter ) / mDphistarMax , ( mDeta - mDetaCenter ) / mDetaMax ) < 1 .f ;
293298 }
294299 }
295300 }
@@ -316,6 +321,8 @@ class CloseTrackRejection
316321 float mMagField = 0 .f;
317322 float mDetaMax = 0 .f;
318323 float mDphistarMax = 0 .f;
324+ float mDetaCenter = 0 .f;
325+ float mDphistarCenter = 0 .f;
319326
320327 float mAverageDphistar = 0 .f;
321328 float mDeta = 0 .f;
0 commit comments