@@ -1313,6 +1313,7 @@ struct AnalysisSameEventPairing {
13131313 Configurable<std::string> track{" cfgTrackCuts" , " jpsiO2MCdebugCuts2" , " Comma separated list of barrel track cuts" };
13141314 Configurable<std::string> muon{" cfgMuonCuts" , " " , " Comma separated list of muon cuts" };
13151315 Configurable<std::string> pair{" cfgPairCuts" , " " , " Comma separated list of pair cuts" };
1316+ Configurable<std::string> qVector{" cfgQvectorTrackCut" , " " , " Track cut of Q-vector, enable this if you want to remove the auto-correlation in TPC" };
13161317 Configurable<bool > event{" cfgRemoveCollSplittingCandidates" , false , " If true, remove collision splitting candidates as determined by the event selection task upstream" };
13171318 // TODO: Add pair cuts via JSON
13181319 } fConfigCuts ;
@@ -1390,6 +1391,7 @@ struct AnalysisSameEventPairing {
13901391
13911392 uint32_t fTrackFilterMask = 0 ; // mask for the track cuts required in this task to be applied on the barrel cuts produced upstream
13921393 uint32_t fMuonFilterMask = 0 ; // mask for the muon cuts required in this task to be applied on the muon cuts produced upstream
1394+ uint32_t fQvectorFilterMask = 0 ; // mask for the track cuts required to be applied on the tracks used for the Q-vector calculation
13931395 int fNCutsBarrel = 0 ;
13941396 int fNCutsMuon = 0 ;
13951397 int fNPairCuts = 0 ;
@@ -1462,6 +1464,7 @@ struct AnalysisSameEventPairing {
14621464 if (!muonCutsStr.IsNull ()) {
14631465 objArrayMuonCuts = muonCutsStr.Tokenize (" ," );
14641466 }
1467+ TString qVectorCutStr = fConfigCuts .qVector .value ;
14651468
14661469 if (fConfigML .applyBDT ) {
14671470 // BDT cuts via JSON
@@ -1529,6 +1532,9 @@ struct AnalysisSameEventPairing {
15291532 fNCutsBarrel = objArray->GetEntries ();
15301533 for (int icut = 0 ; icut < objArray->GetEntries (); ++icut) {
15311534 TString tempStr = objArray->At (icut)->GetName ();
1535+ if (tempStr.CompareTo (qVectorCutStr) == 0 ) {
1536+ fQvectorFilterMask |= (static_cast <uint32_t >(1 ) << icut);
1537+ }
15321538 fTrackCuts .push_back (tempStr);
15331539 if (objArrayTrackCuts->FindObject (tempStr.Data ()) != nullptr ) {
15341540 fTrackFilterMask |= (static_cast <uint32_t >(1 ) << icut);
@@ -1966,13 +1972,17 @@ struct AnalysisSameEventPairing {
19661972
19671973 fNPairPerEvent ++;
19681974
1969- VarManager::fgValues[VarManager::kAmbi1 ] = -999 .;
1970- VarManager::fgValues[VarManager::kAmbi2 ] = -999 .;
1971- if (t1.reducedeventId () != event.globalIndex ()) {
1972- VarManager::fgValues[VarManager::kAmbi1 ] = 1 .;
1975+ VarManager::fgValues[VarManager::kSel1 ] = -999 .;
1976+ VarManager::fgValues[VarManager::kSel2 ] = -999 .;
1977+ if (t1.reducedeventId () == event.globalIndex ()) {
1978+ if ((a1.isBarrelSelected_raw () & fQvectorFilterMask ) > 0 ) {
1979+ VarManager::fgValues[VarManager::kSel1 ] = 1 .;
1980+ }
19731981 }
1974- if (t2.reducedeventId () != event.globalIndex ()) {
1975- VarManager::fgValues[VarManager::kAmbi2 ] = 1 .;
1982+ if (t2.reducedeventId () == event.globalIndex ()) {
1983+ if ((a2.isBarrelSelected_raw () & fQvectorFilterMask ) > 0 ) {
1984+ VarManager::fgValues[VarManager::kSel2 ] = 1 .;
1985+ }
19761986 }
19771987 VarManager::FillPair<TPairType, TTrackFillMap>(t1, t2);
19781988 // compute quantities which depend on the associated collision, such as DCA
0 commit comments