Skip to content

Commit d0b324b

Browse files
committed
Formatting fixes
1 parent 3cd6658 commit d0b324b

File tree

9 files changed

+309
-272
lines changed

9 files changed

+309
-272
lines changed

PWGUD/Core/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ o2physics_add_library(decayTree
6464
o2physics_target_root_dictionary(decayTree
6565
HEADERS decayTree.h
6666
LINKDEF decayTreeLinkDef.h)
67-
67+
6868
o2physics_add_library(FITCutParHolder
6969
SOURCES FITCutParHolder.cxx
7070
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore)

PWGUD/Core/FITCutParHolder.cxx

Lines changed: 55 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,55 @@
1-
#include "FITCutParHolder.h"
2-
3-
// setter
4-
void FITCutParHolder::SetSaveFITbitsets(bool saveFITbitsets)
5-
{
6-
mSaveFITbitsets = saveFITbitsets;
7-
}
8-
void FITCutParHolder::SetThr1FV0A(float thr1_FV0A)
9-
{
10-
mThr1FV0A = thr1_FV0A;
11-
}
12-
void FITCutParHolder::SetThr1FT0A(float thr1_FT0A)
13-
{
14-
mThr1FT0A = thr1_FT0A;
15-
}
16-
void FITCutParHolder::SetThr1FT0C(float thr1_FT0C)
17-
{
18-
mThr1FT0C = thr1_FT0C;
19-
}
20-
void FITCutParHolder::SetThr2FV0A(float thr2_FV0A)
21-
{
22-
mThr2FV0A = thr2_FV0A;
23-
}
24-
void FITCutParHolder::SetThr2FT0A(float thr2_FT0A)
25-
{
26-
mThr2FT0A = thr2_FT0A;
27-
}
28-
void FITCutParHolder::SetThr2FT0C(float thr2_FT0C)
29-
{
30-
mThr2FT0C = thr2_FT0C;
31-
}
32-
33-
// getter
34-
bool FITCutParHolder::saveFITbitsets() const { return mSaveFITbitsets; }
35-
float FITCutParHolder::thr1_FV0A() const { return mThr1FV0A; }
36-
float FITCutParHolder::thr1_FT0A() const { return mThr1FT0A; }
37-
float FITCutParHolder::thr1_FT0C() const { return mThr1FT0C; }
38-
float FITCutParHolder::thr2_FV0A() const { return mThr2FV0A; }
39-
float FITCutParHolder::thr2_FT0A() const { return mThr2FT0A; }
40-
float FITCutParHolder::thr2_FT0C() const { return mThr2FT0C; }
1+
// Copyright 2019-2020 CERN and copyright holders of ALICE O2.
2+
// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
3+
// All rights not expressly granted are reserved.
4+
//
5+
// This software is distributed under the terms of the GNU General Public
6+
// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
7+
//
8+
// In applying this license CERN does not waive the privileges and immunities
9+
// granted to it by virtue of its status as an Intergovernmental Organization
10+
// or submit itself to any jurisdiction.
11+
//
12+
// \FIT bit thresholds
13+
// \author Sandor Lokos, sandor.lokos@cern.ch
14+
// \since March 2026
15+
16+
#include "FITCutParHolder.h"
17+
18+
// setter
19+
void FITCutParHolder::SetSaveFITbitsets(bool saveFITbitsets)
20+
{
21+
mSaveFITbitsets = saveFITbitsets;
22+
}
23+
void FITCutParHolder::SetThr1FV0A(float thr1_FV0A)
24+
{
25+
mThr1FV0A = thr1_FV0A;
26+
}
27+
void FITCutParHolder::SetThr1FT0A(float thr1_FT0A)
28+
{
29+
mThr1FT0A = thr1_FT0A;
30+
}
31+
void FITCutParHolder::SetThr1FT0C(float thr1_FT0C)
32+
{
33+
mThr1FT0C = thr1_FT0C;
34+
}
35+
void FITCutParHolder::SetThr2FV0A(float thr2_FV0A)
36+
{
37+
mThr2FV0A = thr2_FV0A;
38+
}
39+
void FITCutParHolder::SetThr2FT0A(float thr2_FT0A)
40+
{
41+
mThr2FT0A = thr2_FT0A;
42+
}
43+
void FITCutParHolder::SetThr2FT0C(float thr2_FT0C)
44+
{
45+
mThr2FT0C = thr2_FT0C;
46+
}
47+
48+
// getter
49+
bool FITCutParHolder::saveFITbitsets() const { return mSaveFITbitsets; }
50+
float FITCutParHolder::thr1_FV0A() const { return mThr1FV0A; }
51+
float FITCutParHolder::thr1_FT0A() const { return mThr1FT0A; }
52+
float FITCutParHolder::thr1_FT0C() const { return mThr1FT0C; }
53+
float FITCutParHolder::thr2_FV0A() const { return mThr2FV0A; }
54+
float FITCutParHolder::thr2_FT0A() const { return mThr2FT0A; }
55+
float FITCutParHolder::thr2_FT0C() const { return mThr2FT0C; }

PWGUD/Core/FITCutParHolder.h

Lines changed: 75 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -1,60 +1,75 @@
1-
#ifndef PWGUD_CORE_FITCUTPARHOLDER_H_
2-
#define PWGUD_CORE_FITCUTPARHOLDER_H_
3-
4-
#include <Rtypes.h>
5-
6-
// object to hold customizable FIT bit thresholds
7-
class FITCutParHolder
8-
{
9-
public:
10-
// constructor
11-
FITCutParHolder(bool saveFITbitsets = true,
12-
float thr1_FV0A = 8.,
13-
float thr1_FT0A = 8.,
14-
float thr1_FT0C = 8.,
15-
float thr2_FV0A = 20.,
16-
float thr2_FT0A = 20.,
17-
float thr2_FT0C = 20.)
18-
: mSaveFITbitsets{saveFITbitsets},
19-
mThr1FV0A{thr1_FV0A},
20-
mThr1FT0A{thr1_FT0A},
21-
mThr1FT0C{thr1_FT0C},
22-
mThr2FV0A{thr2_FV0A},
23-
mThr2FT0A{thr2_FT0A},
24-
mThr2FT0C{thr2_FT0C}
25-
{
26-
}
27-
28-
// setters
29-
void SetSaveFITbitsets(bool);
30-
void SetThr1FV0A(float);
31-
void SetThr1FT0A(float);
32-
void SetThr1FT0C(float);
33-
void SetThr2FV0A(float);
34-
void SetThr2FT0A(float);
35-
void SetThr2FT0C(float);
36-
37-
// getters
38-
bool saveFITbitsets() const;
39-
float thr1_FV0A() const;
40-
float thr1_FT0A() const;
41-
float thr1_FT0C() const;
42-
float thr2_FV0A() const;
43-
float thr2_FT0A() const;
44-
float thr2_FT0C() const;
45-
46-
private:
47-
bool mSaveFITbitsets;
48-
49-
float mThr1FV0A;
50-
float mThr1FT0A;
51-
float mThr1FT0C;
52-
53-
float mThr2FV0A;
54-
float mThr2FT0A;
55-
float mThr2FT0C;
56-
57-
ClassDefNV(FITCutParHolder, 1);
58-
};
59-
60-
#endif // PWGUD_CORE_FITCUTPARHOLDER_H_
1+
// Copyright 2019-2020 CERN and copyright holders of ALICE O2.
2+
// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
3+
// All rights not expressly granted are reserved.
4+
//
5+
// This software is distributed under the terms of the GNU General Public
6+
// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
7+
//
8+
// In applying this license CERN does not waive the privileges and immunities
9+
// granted to it by virtue of its status as an Intergovernmental Organization
10+
// or submit itself to any jurisdiction.
11+
//
12+
// \FIT bit thresholds
13+
// \author Sandor Lokos, sandor.lokos@cern.ch
14+
// \since March 2026
15+
16+
#ifndef PWGUD_CORE_FITCUTPARHOLDER_H_
17+
#define PWGUD_CORE_FITCUTPARHOLDER_H_
18+
19+
#include <Rtypes.h>
20+
21+
// object to hold customizable FIT bit thresholds
22+
class FITCutParHolder
23+
{
24+
public:
25+
// constructor
26+
FITCutParHolder(bool saveFITbitsets = true,
27+
float thr1_FV0A = 8.,
28+
float thr1_FT0A = 8.,
29+
float thr1_FT0C = 8.,
30+
float thr2_FV0A = 20.,
31+
float thr2_FT0A = 20.,
32+
float thr2_FT0C = 20.)
33+
: mSaveFITbitsets{saveFITbitsets},
34+
mThr1FV0A{thr1_FV0A},
35+
mThr1FT0A{thr1_FT0A},
36+
mThr1FT0C{thr1_FT0C},
37+
mThr2FV0A{thr2_FV0A},
38+
mThr2FT0A{thr2_FT0A},
39+
mThr2FT0C{thr2_FT0C}
40+
{
41+
}
42+
43+
// setters
44+
void SetSaveFITbitsets(bool);
45+
void SetThr1FV0A(float);
46+
void SetThr1FT0A(float);
47+
void SetThr1FT0C(float);
48+
void SetThr2FV0A(float);
49+
void SetThr2FT0A(float);
50+
void SetThr2FT0C(float);
51+
52+
// getters
53+
bool saveFITbitsets() const;
54+
float thr1_FV0A() const;
55+
float thr1_FT0A() const;
56+
float thr1_FT0C() const;
57+
float thr2_FV0A() const;
58+
float thr2_FT0A() const;
59+
float thr2_FT0C() const;
60+
61+
private:
62+
bool mSaveFITbitsets;
63+
64+
float mThr1FV0A;
65+
float mThr1FT0A;
66+
float mThr1FT0C;
67+
68+
float mThr2FV0A;
69+
float mThr2FT0A;
70+
float mThr2FT0C;
71+
72+
ClassDefNV(FITCutParHolder, 1);
73+
};
74+
75+
#endif // PWGUD_CORE_FITCUTPARHOLDER_H_
Lines changed: 24 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,24 @@
1-
// Copyright 2019-2020 CERN and copyright holders of ALICE O2.
2-
// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
3-
// All rights not expressly granted are reserved.
4-
//
5-
// This software is distributed under the terms of the GNU General Public
6-
// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
7-
//
8-
// In applying this license CERN does not waive the privileges and immunities
9-
// granted to it by virtue of its status as an Intergovernmental Organization
10-
// or submit itself to any jurisdiction.
11-
#ifndef PWGUD_CORE_FITCUTPARHOLDERLINKDEF_H_
12-
#define PWGUD_CORE_FITCUTPARHOLDERLINKDEF_H_
13-
14-
#pragma link off all globals;
15-
#pragma link off all classes;
16-
#pragma link off all functions;
17-
#pragma link C++ class FITCutParHolder + ;
18-
19-
#endif // PWGUD_CORE_FITCUTPARHOLDERLINKDEF_H_
1+
// Copyright 2019-2020 CERN and copyright holders of ALICE O2.
2+
// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
3+
// All rights not expressly granted are reserved.
4+
//
5+
// This software is distributed under the terms of the GNU General Public
6+
// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
7+
//
8+
// In applying this license CERN does not waive the privileges and immunities
9+
// granted to it by virtue of its status as an Intergovernmental Organization
10+
// or submit itself to any jurisdiction.
11+
//
12+
// \FIT bit thresholds
13+
// \author Sandor Lokos, sandor.lokos@cern.ch
14+
// \since March 2026
15+
16+
#ifndef PWGUD_CORE_FITCUTPARHOLDERLINKDEF_H_
17+
#define PWGUD_CORE_FITCUTPARHOLDERLINKDEF_H_
18+
19+
#pragma link off all globals;
20+
#pragma link off all classes;
21+
#pragma link off all functions;
22+
#pragma link C++ class FITCutParHolder + ;
23+
24+
#endif // PWGUD_CORE_FITCUTPARHOLDERLINKDEF_H_

PWGUD/Core/SGCutParHolderLinkDef.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
// In applying this license CERN does not waive the privileges and immunities
99
// granted to it by virtue of its status as an Intergovernmental Organization
1010
// or submit itself to any jurisdiction.
11+
1112
#ifndef PWGUD_CORE_SGCUTPARHOLDERLINKDEF_H_
1213
#define PWGUD_CORE_SGCUTPARHOLDERLINKDEF_H_
1314

PWGUD/Core/UDHelpers.h

Lines changed: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
#include "PWGUD/Core/DGCutparHolder.h"
2020
#include "PWGUD/Core/UPCHelpers.h"
2121

22+
#include "Common/Core/RecoDecay.h"
2223
#include "Common/DataModel/EventSelection.h"
2324
#include "Common/DataModel/PIDResponse.h"
2425
#include "Common/DataModel/TrackSelectionTables.h"
@@ -27,7 +28,6 @@
2728
#include "DataFormatsFIT/Triggers.h"
2829
#include "DataFormatsFT0/Digit.h"
2930
#include "Framework/Logger.h"
30-
#include "Common/Core/RecoDecay.h"
3131

3232
#include "TLorentzVector.h"
3333

@@ -583,18 +583,16 @@ inline void buildFT0FV0Words(TFT0 const& ft0, TFV0A const& fv0a,
583583
}
584584
}
585585

586-
587-
588586
// -----------------------------------------------------------------------------
589587
// return eta and phi of a given FIT channel based on the bitset
590588
// Bit layout contract:
591-
constexpr int kFT0Bits = 208; // FT0 total channels
592-
constexpr int kFV0Bits = 48; // FV0A channels
593-
constexpr int kTotalBits = 256; // 4*64
589+
constexpr int kFT0Bits = 208; // FT0 total channels
590+
constexpr int kFV0Bits = 48; // FV0A channels
591+
constexpr int kTotalBits = 256; // 4*64
594592

595593
// FT0 side split
596-
constexpr int kFT0AChannels = 96; // FT0A channels are [0..95]
597-
constexpr int kFT0CChannels = 112; // FT0C channels are [96..207]
594+
constexpr int kFT0AChannels = 96; // FT0A channels are [0..95]
595+
constexpr int kFT0CChannels = 112; // FT0C channels are [96..207]
598596
static_assert(kFT0AChannels + kFT0CChannels == kFT0Bits);
599597

600598
using Bits256 = std::array<uint64_t, 4>;
@@ -606,14 +604,16 @@ inline Bits256 makeBits256(uint64_t w0, uint64_t w1, uint64_t w2, uint64_t w3)
606604

607605
inline bool testBit(Bits256 const& w, int bit)
608606
{
609-
if (bit < 0 || bit >= kTotalBits) {
607+
if (bit < 0 || bit >= kTotalBits) {
610608
return false;
611609
}
612610
return (w[bit >> 6] >> (bit & 63)) & 1ULL;
613611
}
614612

615613
struct FitBitRef {
616-
enum class Det : uint8_t { FT0, FV0, Unknown };
614+
enum class Det : uint8_t { FT0,
615+
FV0,
616+
Unknown };
617617
Det det = Det::Unknown;
618618
int ch = -1; // FT0: 0..207, FV0: 0..47
619619
bool isC = false; // only meaningful for FT0
@@ -624,13 +624,13 @@ inline FitBitRef decodeFitBit(int bit)
624624
FitBitRef out;
625625
if (bit >= 0 && bit < kFT0Bits) {
626626
out.det = FitBitRef::Det::FT0;
627-
out.ch = bit; // FT0 channel id
628-
out.isC = (bit >= kFT0AChannels); // C side if in upper range
627+
out.ch = bit; // FT0 channel id
628+
out.isC = (bit >= kFT0AChannels); // C side if in upper range
629629
return out;
630630
}
631631
if (bit >= kFT0Bits && bit < kTotalBits) {
632632
out.det = FitBitRef::Det::FV0;
633-
out.ch = bit - kFT0Bits; // FV0A channel id 0..47
633+
out.ch = bit - kFT0Bits; // FV0A channel id 0..47
634634
return out;
635635
}
636636
return out;
@@ -677,20 +677,18 @@ inline bool getPhiEtaFromFitBit(FT0DetT& ft0Det,
677677
double& phi,
678678
double& eta)
679679
{
680-
auto ref = decodeFitBit(bit);
680+
auto ref = decodeFitBit(bit);
681681
if (ref.det != FitBitRef::Det::FT0) {
682682
return false;
683683
}
684-
684+
685685
// FT0A: 0..95, FT0C: 96..207
686686
const int ft0Ch = bit;
687687
phi = getPhiFT0_fromChannel(ft0Det, ft0Ch, offsetFT0, iRunOffset);
688688
eta = getEtaFT0_fromChannel(ft0Det, ft0Ch, offsetFT0, iRunOffset);
689689
return true;
690-
691690
}
692691

693-
694692
// -----------------------------------------------------------------------------
695693

696694
template <typename T>

0 commit comments

Comments
 (0)