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
voidanalyseTracks(std::vector<fastjet::PseudoJet>& inputParticles, T const& tracks, int trackSelection, double trackingEfficinecy, const U* candidate = nullptr)
95
+
voidanalyseTracks(std::vector<fastjet::PseudoJet>& inputParticles, T const& tracks, int trackSelection, std::vector<double> trackingEfficiency, std::vector<double> trackingEfficiencyPtBinning, const U* candidate = nullptr)
96
96
{
97
97
for (auto& track : tracks) {
98
98
if (!jetderiveddatautilities::selectTrack(track, trackSelection)) {
@@ -103,10 +103,12 @@ void analyseTracks(std::vector<fastjet::PseudoJet>& inputParticles, T const& tra
103
103
continue;
104
104
}
105
105
}
106
-
if (trackingEfficinecy < 0.999) { // this code is a bit ugly but it stops us needing to do the random generation unless asked for
106
+
if (!(trackingEfficiencyPtBinning.size() == 2 && trackingEfficiency.at(0) > 0.999)) { // this code is a bit ugly but it stops us needing to do the random generation unless asked for
107
107
TRandom3 randomNumber(0);
108
-
if (randomNumber.Rndm() > trackingEfficinecy) { // Is Rndm ok to use?
109
-
continue;
108
+
for (size_t i = 0; i < trackingEfficiency.size(); i++) {
@@ -123,7 +125,7 @@ void analyseTracks(std::vector<fastjet::PseudoJet>& inputParticles, T const& tra
123
125
*/
124
126
125
127
template <typename T, typename U>
126
-
voidanalyseTracksMultipleCandidates(std::vector<fastjet::PseudoJet>& inputParticles, T const& tracks, int trackSelection, double trackingEfficinecy, U const& candidates)
128
+
voidanalyseTracksMultipleCandidates(std::vector<fastjet::PseudoJet>& inputParticles, T const& tracks, int trackSelection, std::vector<double> trackingEfficiency, std::vector<double> trackingEfficiencyPtBinning, U const& candidates)
127
129
{
128
130
for (auto& track : tracks) {
129
131
if (!jetderiveddatautilities::selectTrack(track, trackSelection)) {
if (trackingEfficinecy < 0.999) { // this code is a bit ugly but it stops us needing to do the random generation unless asked for
139
+
if (!(trackingEfficiencyPtBinning.size() == 2 && trackingEfficiency.at(0) > 0.999)) { // this code is a bit ugly but it stops us needing to do the random generation unless asked for
138
140
TRandom3 randomNumber(0);
139
-
if (randomNumber.Rndm() > trackingEfficinecy) { // Is Rndm ok to use?
140
-
continue;
141
+
for (size_t i = 0; i < trackingEfficiency.size(); i++) {
LOG(fatal, "jetFinder workflow: trackingEfficiencyPtBinning configurable should have at least two bin edges")
168
+
}
169
+
if (trackingEfficiency.size()+1 != trackingEfficiencyPtBinning.size()) {
170
+
LOG(fatal, "jetFinder workflow: trackingEfficiency configurable should have one less entry than the number of bin edges set in trackingEfficiencyPtBinning configurable")
LOG(fatal, "jetFinder workflow: trackingEfficiencyPtBinning configurable should have at least two bin edges")
172
+
}
173
+
if (trackingEfficiency.size()+1 != trackingEfficiencyPtBinning.size()) {
174
+
LOG(fatal, "jetFinder workflow: trackingEfficiency configurable should have one less entry than the number of bin edges set in trackingEfficiencyPtBinning configurable")
LOG(fatal, "jetFinder workflow: trackingEfficiencyPtBinning configurable should have at least two bin edges")
163
+
}
164
+
if (trackingEfficiency.size()+1 != trackingEfficiencyPtBinning.size()) {
165
+
LOG(fatal, "jetFinder workflow: trackingEfficiency configurable should have one less entry than the number of bin edges set in trackingEfficiencyPtBinning configurable")
LOG(fatal, "jetFinder workflow: trackingEfficiencyPtBinning configurable should have at least two bin edges")
103
+
}
104
+
if (trackingEfficiency.size()+1 != trackingEfficiencyPtBinning.size()) {
105
+
LOG(fatal, "jetFinder workflow: trackingEfficiency configurable should have one less entry than the number of bin edges set in trackingEfficiencyPtBinning configurable")
0 commit comments