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: PWGLF/Tasks/Resonances/phitutorial_step2.cxx
+15-17Lines changed: 15 additions & 17 deletions
Original file line number
Diff line number
Diff line change
@@ -72,9 +72,9 @@ struct phitutorial_step2 {
72
72
template <typename EventType>
73
73
booleventSelection(const EventType event)
74
74
{
75
-
if (!event.sel8()) //This is required to extract good events
75
+
if (!event.sel8()) //This is required to extract good events
76
76
returnfalse;
77
-
77
+
78
78
returntrue;
79
79
};
80
80
//********************************************//
@@ -89,9 +89,9 @@ struct phitutorial_step2 {
89
89
returnfalse;
90
90
91
91
returntrue;
92
-
};
93
-
//Space for more helper functions!
94
-
//********************************************//
92
+
};
93
+
//Space for more helper functions!
94
+
//********************************************//
95
95
96
96
//********************************************//
97
97
// HELPER FCNS COMPLETE, NOW WE DO PROCESS FCNS
@@ -112,20 +112,19 @@ struct phitutorial_step2 {
112
112
// Now, we want to add some PID to ensure that we are with a higher likelhood pairing Kaons.
113
113
// Three ways to do this:
114
114
// 1.) Directly cut on the tracks in the looping functions (not recommended)
115
-
115
+
116
116
// 2.) Create a helper function above similar to trackSelection
117
-
117
+
118
118
// 3.) Partition your tracks with a preselection by adding this outside of your process function:
119
119
// Partition<TrackCandidates> kaon (nabs(aod::pidtpc::tpcNSigmaKa) <= X); // X is a cfg value or a hardcoded integer.
120
120
// Then inside the function: auto tracks1 = kaon->sliceByCached(aod::track::collisionId, collision1.globalIndex(), cache); Do the same for tracks2.
121
121
122
+
// Getters for PID:
123
+
// tracks.tpcNSigmaKa()
124
+
// tracks.tofNSigmaKa()
125
+
// Good starting value for the selected nsigma value is "3".
126
+
// You might not want to have a STRICT TOF cut, a lot of tracks with good TPC PID does not have TOF information. You can make a conditional cut on TOF by only implementing the TOF cut if track.hasTOF() returns TRUE.
122
127
123
-
//Getters for PID:
124
-
// tracks.tpcNSigmaKa()
125
-
// tracks.tofNSigmaKa()
126
-
// Good starting value for the selected nsigma value is "3".
127
-
// You might not want to have a STRICT TOF cut, a lot of tracks with good TPC PID does not have TOF information. You can make a conditional cut on TOF by only implementing the TOF cut if track.hasTOF() returns TRUE.
128
-
129
128
for (constauto& track : tracks) {
130
129
if (!trackSelection(track)) {
131
130
continue;
@@ -151,10 +150,9 @@ struct phitutorial_step2 {
151
150
} // proccessSameEvent
152
151
PROCESS_SWITCH(phitutorial_step2, processDataSameEvent, "process Data Same Event", false);
if (!event.sel8()) //This is required to extract good events
79
+
if (!event.sel8()) //This is required to extract good events
81
80
returnfalse;
82
-
81
+
83
82
returntrue;
84
83
};
85
84
//********************************************//
@@ -96,7 +95,7 @@ struct phitutorial_step3 {
96
95
returntrue;
97
96
};
98
97
99
-
//********************************************//
98
+
//********************************************//
100
99
101
100
template <typename TrackPID>
102
101
booltrackPIDKaon(const TrackPID& candidate)
@@ -136,11 +135,11 @@ struct phitutorial_step3 {
136
135
if (!eventSelection(collision))
137
136
return;
138
137
139
-
//Last step, we want to remove the cominbatorial background to get a clean peak. We want to fill our new two booked historams, Nch_LSS_Minv and Nch_ME_Minv
138
+
// Last step, we want to remove the cominbatorial background to get a clean peak. We want to fill our new two booked historams, Nch_LSS_Minv and Nch_ME_Minv
139
+
140
+
// LSS is easy, you simply need to fill the histogram if the conjugate argument below is NOT true.
141
+
// For event mixing, we have to now copy our logic into a new process function below, and iterate over track pairs between different events!
140
142
141
-
//LSS is easy, you simply need to fill the histogram if the conjugate argument below is NOT true.
142
-
// For event mixing, we have to now copy our logic into a new process function below, and iterate over track pairs between different events!
143
-
144
143
for (constauto& track : tracks) {
145
144
if (!trackSelection(track)) {
146
145
continue;
@@ -178,32 +177,31 @@ struct phitutorial_step3 {
178
177
// DEFINITION OF SLICE CACHE, BINNING AND MIXING STRUCTURE
voidprocessDataMixedEvent(EventCandidates const& collisions, TrackCandidates const& tracks)//notice the collisions subscrition, it is not an iterator here!
187
+
voidprocessDataMixedEvent(EventCandidates const& collisions, TrackCandidates const& tracks)//notice the collisions subscrition, it is not an iterator here!
189
188
{
190
-
189
+
191
190
for (constauto& [c1, tracks1, c2, tracks2] : pair) {
192
191
193
192
if (!eventSelection(c1) || !eventSelection(c2))
194
193
continue;
195
-
//Fill your event mixing logic here.
194
+
//Fill your event mixing logic here.
196
195
//..
197
196
//..
198
197
//..
199
-
} //pairs
198
+
} //pairs
200
199
} // processMixedEvent
201
200
PROCESS_SWITCH(phitutorial_step3, processDataMixedEvent, "process Data Mixed Event", false);
0 commit comments