@@ -58,24 +58,23 @@ struct skimmerPrimaryElectronFromDalitzEE {
5858 Configurable<int > min_ncluster_tpc{" min_ncluster_tpc" , 0 , " min ncluster tpc" };
5959 Configurable<int > mincrossedrows{" mincrossedrows" , 70 , " min. crossed rows" };
6060 Configurable<float > min_tpc_cr_findable_ratio{" min_tpc_cr_findable_ratio" , 0.8 , " min. TPC Ncr/Nf ratio" };
61- Configurable<int > minitsncls{" minitsncls" , 4 , " min. number of ITS clusters" };
61+ Configurable<float > max_frac_shared_clusters_tpc{" max_frac_shared_clusters_tpc" , 999 .f , " max fraction of shared clusters in TPC" };
62+ Configurable<int > min_ncluster_its{" min_ncluster_its" , 4 , " min ncluster its" };
63+ Configurable<int > min_ncluster_itsib{" min_ncluster_itsib" , 1 , " min ncluster itsib" };
6264 Configurable<float > maxchi2tpc{" maxchi2tpc" , 5.0 , " max. chi2/NclsTPC" };
6365 Configurable<float > maxchi2its{" maxchi2its" , 6.0 , " max. chi2/NclsITS" };
64- Configurable<float > minpt{" minpt" , 0.15 , " min pt for track" };
65- Configurable<float > maxeta{" maxeta" , 0.8 , " eta acceptance" };
66+ Configurable<float > minpt{" minpt" , 0.1 , " min pt for track" };
67+ Configurable<float > maxeta{" maxeta" , 0.9 , " eta acceptance" };
6668 Configurable<float > dca_xy_max{" dca_xy_max" , 0.1 , " max DCAxy in cm" };
6769 Configurable<float > dca_z_max{" dca_z_max" , 0.1 , " max DCAz in cm" };
6870 Configurable<float > minTPCNsigmaEl{" minTPCNsigmaEl" , -2.5 , " min. TPC n sigma for electron inclusion" };
6971 Configurable<float > maxTPCNsigmaEl{" maxTPCNsigmaEl" , 3.5 , " max. TPC n sigma for electron inclusion" };
70- Configurable<float > maxTPCNsigmaPi{" maxTPCNsigmaPi" , 2.5 , " max. TPC n sigma for pion exclusion" };
71- Configurable<float > minTPCNsigmaPi{" minTPCNsigmaPi" , -1e+10 , " min. TPC n sigma for pion exclusion" };
72- Configurable<float > maxMee_lowPtee{" maxMee_lowPtee" , 0.02 , " max. mee to store dalitz ee pairs for recovery" };
73- Configurable<float > maxMee_highPtee{" maxMee_highPtee" , 0.04 , " max. mee to store dalitz ee pairs for recovery" };
72+ Configurable<float > maxTPCNsigmaPi{" maxTPCNsigmaPi" , 0.0 , " max. TPC n sigma for pion exclusion" };
73+ Configurable<float > minTPCNsigmaPi{" minTPCNsigmaPi" , 0.0 , " min. TPC n sigma for pion exclusion" };
74+ Configurable<float > maxMee{" maxMee" , 0.06 , " max. mee to store dalitz ee pairs" };
7475
7576 HistogramRegistry fRegistry {" output" , {}, OutputObjHandlingPolicy::AnalysisObject, false , false };
7677
77- std::pair<int8_t , std::set<uint8_t >> itsRequirement = {1 , {0 , 1 , 2 }}; // any hits on 3 ITS ib layers.
78-
7978 int mRunNumber ;
8079 float d_bz;
8180 Service<o2::ccdb::BasicCCDBManager> ccdb;
@@ -121,7 +120,7 @@ struct skimmerPrimaryElectronFromDalitzEE {
121120 if (d_bz_input > -990 ) {
122121 d_bz = d_bz_input;
123122 o2::parameters::GRPMagField grpmag;
124- if (fabs (d_bz) > 1e-5 ) {
123+ if (std:: fabs (d_bz) > 1e-5 ) {
125124 grpmag.setL3Current (30000 .f / (d_bz / 5 .0f ));
126125 }
127126 o2::base::Propagator::initFieldFromGRP (&grpmag);
@@ -172,12 +171,10 @@ struct skimmerPrimaryElectronFromDalitzEE {
172171 if (!track.hasITS () || !track.hasTPC ()) {
173172 return false ;
174173 }
175- if (track.itsNCls () < minitsncls ) {
174+ if (track.itsNCls () < min_ncluster_its ) {
176175 return false ;
177176 }
178-
179- auto hits = std::count_if (itsRequirement.second .begin (), itsRequirement.second .end (), [&](auto && requiredLayer) { return track.itsClusterMap () & (1 << requiredLayer); });
180- if (hits < itsRequirement.first ) {
177+ if (track.itsNClsInnerBarrel () < min_ncluster_itsib) {
181178 return false ;
182179 }
183180
@@ -193,11 +190,15 @@ struct skimmerPrimaryElectronFromDalitzEE {
193190 return false ;
194191 }
195192
196- if (abs (track.dcaXY ()) > dca_xy_max || abs (track.dcaZ ()) > dca_z_max) {
193+ if (track.tpcFractionSharedCls () > max_frac_shared_clusters_tpc) {
194+ return false ;
195+ }
196+
197+ if (std::fabs (track.dcaXY ()) > dca_xy_max || std::fabs (track.dcaZ ()) > dca_z_max) {
197198 return false ;
198199 }
199200
200- if (track.pt () < minpt || abs (track.eta ()) > maxeta) {
201+ if (track.pt () < minpt || std::fabs (track.eta ()) > maxeta) {
201202 return false ;
202203 }
203204
@@ -252,8 +253,8 @@ struct skimmerPrimaryElectronFromDalitzEE {
252253 template <bool isMC, typename TCollision, typename TTracks1, typename TTracks2>
253254 void fillPairInfo (TCollision const & collision, TTracks1 const & tracks1, TTracks2 const & tracks2)
254255 {
255- for (auto & t1 : tracks1) {
256- for (auto & t2 : tracks2) {
256+ for (const auto & t1 : tracks1) {
257+ for (const auto & t2 : tracks2) {
257258 if (!checkTrack<isMC>(collision, t1) || !checkTrack<isMC>(collision, t2)) {
258259 continue ;
259260 }
@@ -265,14 +266,8 @@ struct skimmerPrimaryElectronFromDalitzEE {
265266 ROOT::Math::PtEtaPhiMVector v2 (t2.pt (), t2.eta (), t2.phi (), o2::constants::physics::MassElectron);
266267 ROOT::Math::PtEtaPhiMVector v12 = v1 + v2;
267268
268- if (v12.Pt () < 1.0 ) { // don't store
269- if (v12.M () > maxMee_lowPtee) { // don't store
270- continue ;
271- }
272- } else {
273- if (v12.M () > maxMee_highPtee) { // don't store
274- continue ;
275- }
269+ if (v12.M () > maxMee) { // don't store
270+ continue ;
276271 }
277272 fRegistry .fill (HIST (" Pair/hMeePtee_ULS" ), v12.M (), v12.Pt ());
278273 fillTrackTable (collision, t1);
@@ -282,7 +277,7 @@ struct skimmerPrimaryElectronFromDalitzEE {
282277 }
283278
284279 std::vector<std::pair<int64_t , int64_t >> stored_trackIds;
285- Filter trackFilter = o2::aod::track::pt > minpt&& nabs(o2::aod::track::eta) < maxeta&& o2::aod::track::tpcChi2NCl < maxchi2tpc&& o2::aod::track::itsChi2NCl < maxchi2its&& ncheckbit(aod::track::v001::detectorMap, (uint8_t )o2::aod::track::ITS) == true && ncheckbit(aod::track::v001::detectorMap, (uint8_t )o2::aod::track::TPC) == true ;
280+ Filter trackFilter = o2::aod::track::pt > minpt&& nabs(o2::aod::track::eta) < maxeta&& o2::aod::track::tpcChi2NCl < maxchi2tpc&& o2::aod::track::itsChi2NCl < maxchi2its&& ncheckbit(aod::track::v001::detectorMap, (uint8_t )o2::aod::track::ITS) == true && ncheckbit(aod::track::v001::detectorMap, (uint8_t )o2::aod::track::TPC) == true && nabs(o2::aod::track::dcaXY) < dca_xy_max && nabs(o2::aod::track::dcaZ) < dca_z_max ;
286281 Filter pidFilter = minTPCNsigmaEl < o2::aod::pidtpc::tpcNSigmaEl && o2::aod::pidtpc::tpcNSigmaEl < maxTPCNsigmaEl;
287282 using MyFilteredTracks = soa::Filtered<MyTracks>;
288283 Partition<MyFilteredTracks> posTracks = o2::aod::track::signed1Pt > 0 .f;
@@ -293,7 +288,7 @@ struct skimmerPrimaryElectronFromDalitzEE {
293288 {
294289 stored_trackIds.reserve (tracks.size ());
295290
296- for (auto & collision : collisions) {
291+ for (const auto & collision : collisions) {
297292 auto bc = collision.bc_as <aod::BCsWithTimestamps>();
298293 initCCDB (bc);
299294
@@ -320,7 +315,7 @@ struct skimmerPrimaryElectronFromDalitzEE {
320315 {
321316 stored_trackIds.reserve (tracks.size ());
322317
323- for (auto & collision : collisions) {
318+ for (const auto & collision : collisions) {
324319 if (!collision.has_mcCollision ()) {
325320 continue ;
326321 }
@@ -351,10 +346,10 @@ struct skimmerPrimaryElectronFromDalitzEE {
351346//
352347// void process(aod::EMPrimaryElectrons const& electrons)
353348// {
354- // for (auto& electron : electrons) {
349+ // for (const auto& electron : electrons) {
355350// auto electrons_with_same_trackId = electrons.sliceBy(perTrack, electron.trackId());
356351// ambele_self_Ids.reserve(electrons_with_same_trackId.size());
357- // for (auto& amp_ele : electrons_with_same_trackId) {
352+ // for (const auto& amp_ele : electrons_with_same_trackId) {
358353// if (amp_ele.globalIndex() == electron.globalIndex()) { // don't store myself.
359354// continue;
360355// }
0 commit comments