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"
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]
598596static_assert (kFT0AChannels + kFT0CChannels == kFT0Bits );
599597
600598using 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
607605inline 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
615613struct 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
696694template <typename T>
0 commit comments