Skip to content

Commit dfdc2a2

Browse files
authored
Rename GlobalTrack to Track + code checker (#5843)
1 parent f4e3199 commit dfdc2a2

File tree

5 files changed

+14
-12
lines changed

5 files changed

+14
-12
lines changed

Analysis/Core/include/AnalysisCore/TrackSelection.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ class TrackSelection
184184
private:
185185
bool FulfillsITSHitRequirements(uint8_t itsClusterMap);
186186

187-
o2::aod::track::TrackTypeEnum mTrackType{o2::aod::track::TrackTypeEnum::GlobalTrack};
187+
o2::aod::track::TrackTypeEnum mTrackType{o2::aod::track::TrackTypeEnum::Track};
188188

189189
// kinematic cuts
190190
float mMinPt{0.f}, mMaxPt{1e10f}; // range in pT

Analysis/Core/include/AnalysisCore/TrackSelectionDefaults.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
TrackSelection getGlobalTrackSelection()
2424
{
2525
TrackSelection selectedTracks;
26-
selectedTracks.SetTrackType(o2::aod::track::Run2GlobalTrack);
26+
selectedTracks.SetTrackType(o2::aod::track::Run2Track);
2727
selectedTracks.SetPtRange(0.1f, 1e10f);
2828
selectedTracks.SetEtaRange(-0.8f, 0.8f);
2929
selectedTracks.SetRequireITSRefit(true);

Analysis/Core/src/AODMerger.cxx

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,11 @@ int main(int argc, char* argv[])
2929
int this_option_optind = optind ? optind : 1;
3030
int option_index = 0;
3131
static struct option long_options[] = {
32-
{"input", required_argument, 0, 0},
33-
{"output", required_argument, 0, 1},
34-
{"max-size", required_argument, 0, 2},
35-
{"help", no_argument, 0, 3},
36-
{0, 0, 0, 0}};
32+
{"input", required_argument, nullptr, 0},
33+
{"output", required_argument, nullptr, 1},
34+
{"max-size", required_argument, nullptr, 2},
35+
{"help", no_argument, nullptr, 3},
36+
{nullptr, 0, nullptr, 0}};
3737

3838
while (true) {
3939
int c = getopt_long(argc, argv, "", long_options, &option_index);
@@ -74,8 +74,9 @@ int main(int argc, char* argv[])
7474
while (in.good()) {
7575
in >> line;
7676

77-
if (line.Length() == 0)
77+
if (line.Length() == 0) {
7878
continue;
79+
}
7980

8081
printf("Processing input file: %s\n", line.Data());
8182

@@ -84,8 +85,9 @@ int main(int argc, char* argv[])
8485
keyList->Sort();
8586

8687
for (auto key1 : *keyList) {
87-
if (!((TObjString*)key1)->GetString().BeginsWith("DF_"))
88+
if (!((TObjString*)key1)->GetString().BeginsWith("DF_")) {
8889
continue;
90+
}
8991

9092
auto dfName = ((TObjString*)key1)->GetString().Data();
9193

Analysis/Tasks/trackextension.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ struct TrackExtensionTask {
4040

4141
std::array<float, 2> dca{1e10f, 1e10f};
4242
// FIXME: temporary solution to remove tracks that should not be there after conversion
43-
if (track.trackType() == o2::aod::track::TrackTypeEnum::Run2GlobalTrack && track.itsChi2NCl() != 0.f && track.tpcChi2NCl() != 0.f && std::abs(track.x()) < 10.f) {
43+
if (track.trackType() == o2::aod::track::TrackTypeEnum::Run2Track && track.itsChi2NCl() != 0.f && track.tpcChi2NCl() != 0.f && std::abs(track.x()) < 10.f) {
4444
float magField = 5.0; // in kG (FIXME: get this from CCDB)
4545
auto trackPar = getTrackPar(track);
4646
trackPar.propagateParamToDCA({collision.posX(), collision.posY(), collision.posZ()}, magField, &dca);

Framework/Core/include/Framework/DataTypes.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@ enum CollisionFlagsRun2 : uint16_t {
2727
namespace o2::aod::track
2828
{
2929
enum TrackTypeEnum : uint8_t {
30-
GlobalTrack = 0,
30+
Track = 0,
3131
ITSStandaloneTrack,
32-
Run2GlobalTrack = 254,
32+
Run2Track = 254,
3333
Run2Tracklet = 255
3434
};
3535
enum TrackFlagsRun2Enum {

0 commit comments

Comments
 (0)