Skip to content

Commit 770f161

Browse files
authored
Use getNominalField function (#251)
1 parent 3e79191 commit 770f161

2 files changed

Lines changed: 9 additions & 10 deletions

File tree

PWGCF/Core/PairCuts.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ class PairCuts
6161
bool conversionCuts(T const& track1, T const& track2);
6262

6363
template <typename T>
64-
bool twoTrackCut(T const& track1, T const& track2, float magField);
64+
bool twoTrackCut(T const& track1, T const& track2, int magField);
6565

6666
protected:
6767
float mCuts[ParticlesLastEntry] = {-1};
@@ -80,7 +80,7 @@ class PairCuts
8080
double getInvMassSquaredFast(T const& track1, double m0_1, T const& track2, double m0_2);
8181

8282
template <typename T>
83-
float getDPhiStar(T const& track1, T const& track2, float radius, float magField);
83+
float getDPhiStar(T const& track1, T const& track2, float radius, int magField);
8484
};
8585

8686
template <typename T>
@@ -109,7 +109,7 @@ bool PairCuts::conversionCuts(T const& track1, T const& track2)
109109
}
110110

111111
template <typename T>
112-
bool PairCuts::twoTrackCut(T const& track1, T const& track2, float magField)
112+
bool PairCuts::twoTrackCut(T const& track1, T const& track2, int magField)
113113
{
114114
// the variables & cut have been developed in Run 1 by the CF - HBT group
115115
//
@@ -145,7 +145,7 @@ bool PairCuts::twoTrackCut(T const& track1, T const& track2, float magField)
145145
}
146146

147147
if (dphistarminabs < mTwoTrackDistance && std::fabs(deta) < mTwoTrackDistance) {
148-
//LOGF(debug, "Removed track pair %ld %ld with %f %f %f %f %d %f %f %d %f", track1.index(), track2.index(), deta, dphistarminabs, track1.phi2(), track1.pt(), track1.sign(), track2.phi2(), track2.pt(), track2.sign(), magField);
148+
//LOGF(debug, "Removed track pair %ld %ld with %f %f %f %f %d %f %f %d %d", track1.index(), track2.index(), deta, dphistarminabs, track1.phi2(), track1.pt(), track1.sign(), track2.phi2(), track2.pt(), track2.sign(), magField);
149149
return true;
150150
}
151151

@@ -308,7 +308,7 @@ double PairCuts::getInvMassSquaredFast(T const& track1, double m0_1, T const& tr
308308
}
309309

310310
template <typename T>
311-
float PairCuts::getDPhiStar(T const& track1, T const& track2, float radius, float magField)
311+
float PairCuts::getDPhiStar(T const& track1, T const& track2, float radius, int magField)
312312
{
313313
//
314314
// calculates dphistar

PWGCF/Tasks/correlations.cxx

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ struct CorrelationTask {
157157
ccdb->setCreatedNotAfter(now); // TODO must become global parameter from the train creation time
158158
}
159159

160-
float getMagneticField(uint64_t timestamp)
160+
int getMagneticField(uint64_t timestamp)
161161
{
162162
// TODO done only once (and not per run). Will be replaced by CCDBConfigurable
163163
static o2::parameters::GRPObject* grpo = nullptr;
@@ -167,10 +167,9 @@ struct CorrelationTask {
167167
LOGF(fatal, "GRP object not found for timestamp %llu", timestamp);
168168
return 0;
169169
}
170-
LOGF(info, "Retrieved GRP for timestamp %llu with L3 current of %f", timestamp, grpo->getL3Current());
170+
LOGF(info, "Retrieved GRP for timestamp %llu with magnetic field of %d kG", timestamp, grpo->getNominalL3Field());
171171
}
172-
float l3current = grpo->getL3Current();
173-
return l3current / 30000.0f * 5.0f;
172+
return grpo->getNominalL3Field();
174173
}
175174

176175
template <typename TCollision, typename TTracks>
@@ -197,7 +196,7 @@ struct CorrelationTask {
197196
}
198197

199198
template <typename TTarget, typename TTracks>
200-
void fillCorrelations(TTarget target, TTracks tracks1, TTracks tracks2, float centrality, float posZ, float magField)
199+
void fillCorrelations(TTarget target, TTracks tracks1, TTracks tracks2, float centrality, float posZ, int magField)
201200
{
202201
// Cache efficiency for particles (too many FindBin lookups)
203202
float* efficiencyAssociated = nullptr;

0 commit comments

Comments
 (0)