You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: PWGDQ/Tasks/filterPPwithAssociation.cxx
+28-28Lines changed: 28 additions & 28 deletions
Original file line number
Diff line number
Diff line change
@@ -107,7 +107,7 @@ using MyBarrelTracks = soa::Join<aod::Tracks, aod::TracksExtra, aod::TracksDCA,
107
107
aod::pidTOFFullKa, aod::pidTOFFullPr>;
108
108
using MyBarrelTracksTPCPID = soa::Join<aod::Tracks, aod::TracksExtra, aod::TracksDCA,
109
109
aod::pidTPCFullEl, aod::pidTPCFullPi,
110
-
aod::pidTPCFullKa, aod::pidTPCFullPr>;
110
+
aod::pidTPCFullKa, aod::pidTPCFullPr>;
111
111
112
112
using MyBarrelTracksAssocSelected = soa::Join<TrackAssoc, aod::DQBarrelTrackCuts, aod::DQEMuBarrelTrackCuts>; // As the kinelatic values must be re-computed for the tracks everytime it is associated to a collision, the selection is done not on the tracks, but on the track-collision association
std::map<uint64_t, uint64_t> fFiltersMap; // map of filters for events that passed at least one filter
559
559
std::map<uint64_t, std::vector<bool>> fCEFPfilters; // map of CEFP filters for events that passed at least one filter
560
560
561
-
uint32_tfPairingLSBarrel; // used to set in which cut setting LS pairs will be analysed
562
-
uint32_tfPairingLSMuon; // used to set in which cut setting LS pairs will be analysed
563
-
uint32_tfPairingLSBarrelMuon; // used to set in which cut setting LS pairs will be analysed
561
+
uint32_tfPairingLSBarrel; // used to set in which cut setting LS pairs will be analysed
562
+
uint32_tfPairingLSMuon; // used to set in which cut setting LS pairs will be analysed
563
+
uint32_tfPairingLSBarrelMuon; // used to set in which cut setting LS pairs will be analysed
564
564
565
565
voidDefineCuts()
566
566
{
@@ -745,7 +745,7 @@ struct DQFilterPPTask {
745
745
VarManager::ResetValues(0, VarManager::kNVars);
746
746
VarManager::FillEvent<TEventFillMap>(collision); // event properties could be needed for cuts or histogramming
747
747
748
-
std::vector<std::map<uint64_t,int>> taggedCollisions(fNBarrelCuts+fNMuonCuts+fNElectronMuonCuts);// collisions corresponding to selected associations or to which selected tracks are assigned in AO2D
748
+
std::vector<std::map<uint64_t,int>> taggedCollisions(fNBarrelCuts + fNMuonCuts + fNElectronMuonCuts); // collisions corresponding to selected associations or to which selected tracks are assigned in AO2D
749
749
750
750
std::vector<int> objCountersBarrel(fNBarrelCuts, 0); // init all counters to zero
751
751
uint32_t pairingMask = 0; // in order to know which of the selections actually require pairing
@@ -756,10 +756,10 @@ struct DQFilterPPTask {
756
756
for (int i = 0; i < fNBarrelCuts; ++i) {
757
757
if (trackAssoc.isDQBarrelSelected() & (static_cast<uint32_t>(1) << i)) {
758
758
objCountersBarrel[i] += 1;
759
-
taggedCollisions[i][collision.globalIndex()] = 1; // add the current associated collision to the map
759
+
taggedCollisions[i][collision.globalIndex()] = 1; // add the current associated collision to the map
760
760
auto t1 = trackAssoc.templatetrack_as<TTracks>();
761
761
if (t1.has_collision()) {
762
-
taggedCollisions[i][t1.collisionId()] = 1; // add the originally assigned collision to the map
762
+
taggedCollisions[i][t1.collisionId()] = 1; // add the originally assigned collision to the map
763
763
}
764
764
}
765
765
}
@@ -772,7 +772,7 @@ struct DQFilterPPTask {
772
772
pairingMask |= (static_cast<uint32_t>(1) << i);
773
773
}
774
774
objCountersBarrel[i] = 0; // reset counters for selections where pairing is needed (count pairs instead)
775
-
taggedCollisions[i].clear(); // empty the list of tagged collisions if pairing is needed (so we count just events with pairs or containing selected pair legs)
775
+
taggedCollisions[i].clear(); // empty the list of tagged collisions if pairing is needed (so we count just events with pairs or containing selected pair legs)
776
776
}
777
777
}
778
778
@@ -808,12 +808,12 @@ struct DQFilterPPTask {
808
808
continue;
809
809
}
810
810
811
-
taggedCollisions[icut][collision.globalIndex()] = 1; // add the originally assigned collision to the map
811
+
taggedCollisions[icut][collision.globalIndex()] = 1; // add the originally assigned collision to the map
812
812
if (t1.has_collision()) {
813
-
taggedCollisions[icut][t1.collisionId()] = 1; // add the originally assigned collision to the map
813
+
taggedCollisions[icut][t1.collisionId()] = 1; // add the originally assigned collision to the map
814
814
}
815
815
if (t2.has_collision()) {
816
-
taggedCollisions[icut][t2.collisionId()] = 1; // add the originally assigned collision to the map
816
+
taggedCollisions[icut][t2.collisionId()] = 1; // add the originally assigned collision to the map
817
817
}
818
818
819
819
objCountersBarrel[icut] += 1; // count the pair
@@ -832,10 +832,10 @@ struct DQFilterPPTask {
832
832
for (int i = 0; i < fNMuonCuts; ++i) {
833
833
if (muon.isDQMuonSelected() & (static_cast<uint32_t>(1) << i)) {
834
834
objCountersMuon[i] += 1;
835
-
taggedCollisions[i + fNBarrelCuts][collision.globalIndex()] = 1; // add the current associated collision to the map
835
+
taggedCollisions[i + fNBarrelCuts][collision.globalIndex()] = 1; // add the current associated collision to the map
836
836
auto t1 = muon.templatefwdtrack_as<TMuons>();
837
837
if (t1.has_collision()) {
838
-
taggedCollisions[i + fNBarrelCuts][t1.collisionId()] = 1; // add the originally assigned collision to the map
838
+
taggedCollisions[i + fNBarrelCuts][t1.collisionId()] = 1; // add the originally assigned collision to the map
839
839
}
840
840
}
841
841
}
@@ -849,7 +849,7 @@ struct DQFilterPPTask {
849
849
pairingMask |= (static_cast<uint32_t>(1) << i);
850
850
}
851
851
objCountersMuon[i] = 0; // reset counters for selections where pairing is needed (count pairs instead)
852
-
taggedCollisions[i + fNBarrelCuts].clear(); // empty the list of tagged collisions if pairing is needed (so we count just events with pairs or containing selected pair legs)
852
+
taggedCollisions[i + fNBarrelCuts].clear(); // empty the list of tagged collisions if pairing is needed (so we count just events with pairs or containing selected pair legs)
853
853
}
854
854
}
855
855
@@ -888,12 +888,12 @@ struct DQFilterPPTask {
888
888
continue;
889
889
}
890
890
891
-
taggedCollisions[icut + fNBarrelCuts][collision.globalIndex()] = 1; // add the originally assigned collision to the map
891
+
taggedCollisions[icut + fNBarrelCuts][collision.globalIndex()] = 1; // add the originally assigned collision to the map
892
892
if (t1.has_collision()) {
893
-
taggedCollisions[icut + fNBarrelCuts][t1.collisionId()] = 1; // add the originally assigned collision to the map
893
+
taggedCollisions[icut + fNBarrelCuts][t1.collisionId()] = 1; // add the originally assigned collision to the map
894
894
}
895
895
if (t2.has_collision()) {
896
-
taggedCollisions[icut + fNBarrelCuts][t2.collisionId()] = 1; // add the originally assigned collision to the map
896
+
taggedCollisions[icut + fNBarrelCuts][t2.collisionId()] = 1; // add the originally assigned collision to the map
897
897
}
898
898
899
899
objCountersMuon[icut] += 1;
@@ -918,7 +918,7 @@ struct DQFilterPPTask {
918
918
}
919
919
}
920
920
}
921
-
921
+
922
922
// run pairing if there is at least one selection that requires it
923
923
pairFilter = 0;
924
924
if (pairingMask > 0) {
@@ -948,12 +948,12 @@ struct DQFilterPPTask {
948
948
continue;
949
949
}
950
950
951
-
taggedCollisions[icut + fNBarrelCuts + fNMuonCuts][collision.globalIndex()] = 1; // add the originally assigned collision to the map
951
+
taggedCollisions[icut + fNBarrelCuts + fNMuonCuts][collision.globalIndex()] = 1; // add the originally assigned collision to the map
952
952
if (t1.has_collision()) {
953
-
taggedCollisions[icut + fNBarrelCuts + fNMuonCuts][t1.collisionId()] = 1; // add the originally assigned collision to the map
953
+
taggedCollisions[icut + fNBarrelCuts + fNMuonCuts][t1.collisionId()] = 1; // add the originally assigned collision to the map
954
954
}
955
955
if (t2.has_collision()) {
956
-
taggedCollisions[icut + fNBarrelCuts + fNMuonCuts][t2.collisionId()] = 1; // add the originally assigned collision to the map
956
+
taggedCollisions[icut + fNBarrelCuts + fNMuonCuts][t2.collisionId()] = 1; // add the originally assigned collision to the map
957
957
}
958
958
959
959
objCountersElectronMuon[icut] += 1;
@@ -965,7 +965,7 @@ struct DQFilterPPTask {
965
965
}
966
966
}
967
967
// compute the decisions and publish
968
-
uint64_t filter = 0;
968
+
uint64_t filter = 0;
969
969
ifconstexpr (static_cast<bool>(TTrackFillMap)) {
970
970
for (int i = 0; i < fNBarrelCuts; i++) {
971
971
if (objCountersBarrel[i] >= fBarrelNreqObjs[i]) {
@@ -1044,9 +1044,9 @@ struct DQFilterPPTask {
1044
1044
} else { // this collision was already fired, possible via collision - track association; add as an OR the new decisions
0 commit comments