ATLAS Offline Software
Loading...
Searching...
No Matches
TRT_LoLumRawData Class Referencefinal

#include <TRT_LoLumRawData.h>

Inheritance diagram for TRT_LoLumRawData:
Collaboration diagram for TRT_LoLumRawData:

Classes

struct  Island

Public Member Functions

 TRT_LoLumRawData (const Identifier rdoId, const unsigned int word)
 TRT_LoLumRawData (const TRT_LoLumRawData &)=default
 TRT_LoLumRawData (TRT_LoLumRawData &&) noexcept=default
TRT_LoLumRawDataoperator= (const TRT_LoLumRawData &)=default
TRT_LoLumRawDataoperator= (TRT_LoLumRawData &&) noexcept=default
virtual ~TRT_LoLumRawData ()=default
virtual bool highLevel () const override final
bool highLevel (int) const
virtual double timeOverThreshold () const override final
virtual int driftTimeBin () const override final
int trailingEdge () const
bool firstBinHigh () const
bool lastBinHigh () const
 TRT_LoLumRawData ()
virtual Identifier identify () const override final
unsigned int getWord () const
void merge (const InDetRawData &other)
virtual IdentifierHash identifyHash () const
virtual const IdHelpergetHelper () const

Static Public Member Functions

static constexpr double getDriftTimeBinWidth ()
static void findLargestIsland (unsigned int word, Island &island)
static bool highLevel (unsigned int word)

Protected Attributes

unsigned int m_word = 0

Static Protected Attributes

static constexpr double m_driftTimeBinWidth = 3.125
static constexpr unsigned int m_maskFourLastBits =0xFFFFFF0
static constexpr unsigned int m_maskThreeLastBits =0xFFFFFF8

Private Attributes

CxxUtils::CachedValue< Islandm_island {}
Identifier m_rdoId

Detailed Description

Definition at line 25 of file TRT_LoLumRawData.h.

Constructor & Destructor Documentation

◆ TRT_LoLumRawData() [1/4]

TRT_LoLumRawData::TRT_LoLumRawData ( const Identifier rdoId,
const unsigned int word )

Definition at line 28 of file TRT_LoLumRawData.cxx.

29 :
30 TRT_RDORawData( rdoId, word) //call base-class constructor
31{}
TRT_RDORawData()=default

◆ TRT_LoLumRawData() [2/4]

TRT_LoLumRawData::TRT_LoLumRawData ( const TRT_LoLumRawData & )
default

◆ TRT_LoLumRawData() [3/4]

TRT_LoLumRawData::TRT_LoLumRawData ( TRT_LoLumRawData && )
defaultnoexcept

◆ ~TRT_LoLumRawData()

virtual TRT_LoLumRawData::~TRT_LoLumRawData ( )
virtualdefault

◆ TRT_LoLumRawData() [4/4]

TRT_LoLumRawData::TRT_LoLumRawData ( )

Definition at line 23 of file TRT_LoLumRawData.cxx.

23 :
24 TRT_RDORawData(Identifier(), 0) //call base-class constructor
25{}

Member Function Documentation

◆ driftTimeBin()

virtual int TRT_LoLumRawData::driftTimeBin ( ) const
inlinefinaloverridevirtual

Implements TRT_RDORawData.

Definition at line 57 of file TRT_LoLumRawData.h.

57 {
58 if (!m_island.isValid()) {
59 Island tmpIsland;
60 findLargestIsland(m_word, tmpIsland);
61 m_island.set(tmpIsland);
62 }
63 return m_island.ptr()->m_leadingEdge;
64 };
unsigned int m_word
CxxUtils::CachedValue< Island > m_island
static void findLargestIsland(unsigned int word, Island &island)

◆ findLargestIsland()

void TRT_LoLumRawData::findLargestIsland ( unsigned int word,
Island & island )
static

Definition at line 33 of file TRT_LoLumRawData.cxx.

33 {
34 unsigned long mask = 0x02000000; // 0 0 10000000 0 00000000 0 00000000
35 unsigned int bestLength = 0;
36 unsigned int currentLength = 0;
37
38 // set 4 last bits to zero (to match data and MC bitmasks)
39 unsigned int wordLE = word & m_maskFourLastBits;
40
41 mask >>=1; // 0 0 01000000 0 00000000 0 00000000
42 bool SawZero = false;
43 unsigned int k = 1;
44 island.m_leadingEdge=0, island.m_trailingEdge=0;
45 unsigned int currentLeadingEdge=0, currentTrailingEdge=0;
46
47 // shift bitmask to the right until end
48 while (true) {
49 if (!(wordLE & mask) && !SawZero) SawZero = true; // search for the first 0 to 1 transition
50 if (SawZero) {
51 if (wordLE & mask){
52 if (currentLength==0) currentLeadingEdge=k;
53 currentTrailingEdge=k;
54 ++currentLength;
55 } else { // remember longest island, ignore islands of length 1 which are very likely noise
56 if (currentLength >= bestLength && currentLeadingEdge<18 && currentLength > 1) {
57 bestLength = currentLength;
58 island.m_leadingEdge = currentLeadingEdge;
59 island.m_trailingEdge = currentTrailingEdge;
60 }
61 currentLength = 0;
62 }
63 }
64 mask >>= 1;
65 if (!(mask & m_maskThreeLastBits)) break; // stop after checking 20 LT bits
66 if (k == 7 || k == 15) mask >>= 1; // ignore HT bits
67 assert(k < 20);
68 ++k;
69 }
70 assert(k == 20);
71 // avoid very early TE, most likely from previous BX. Hit will still be used for tracking if it has a valid LE
72 if (island.m_trailingEdge < 8) island.m_trailingEdge = 0;
73}
static constexpr unsigned int m_maskThreeLastBits
static constexpr unsigned int m_maskFourLastBits

◆ firstBinHigh()

bool TRT_LoLumRawData::firstBinHigh ( ) const
inline

Definition at line 154 of file TRT_LoLumRawData.h.

155{
156 return (m_word & 0x02000000);
157}

◆ getDriftTimeBinWidth()

constexpr double TRT_LoLumRawData::getDriftTimeBinWidth ( )
inlinestaticconstexpr

Definition at line 88 of file TRT_LoLumRawData.h.

88 {
90 };
static constexpr double m_driftTimeBinWidth

◆ getHelper()

const IdHelper * Identifiable::getHelper ( ) const
virtualinherited

Definition at line 18 of file Identifiable.cxx.

18 {
19 return (nullptr);
20}

◆ getWord()

unsigned int InDetRawData::getWord ( ) const
inlineinherited

Definition at line 47 of file InDetRawData.h.

48 {
49 return m_word;
50 }

◆ highLevel() [1/3]

bool TRT_LoLumRawData::highLevel ( ) const
inlinefinaloverridevirtual

Implements TRT_RDORawData.

Definition at line 128 of file TRT_LoLumRawData.h.

129{
130 return highLevel(m_word);
131}
virtual bool highLevel() const override final

◆ highLevel() [2/3]

bool TRT_LoLumRawData::highLevel ( int BX) const
inline

Definition at line 140 of file TRT_LoLumRawData.h.

141{
142 if ( (BX < 1) || (BX > 3) )
143 return false;
144
145 return (m_word & ( 1 << (9 * BX - 1) ));
146
147}

◆ highLevel() [3/3]

bool TRT_LoLumRawData::highLevel ( unsigned int word)
inlinestatic

Definition at line 100 of file TRT_LoLumRawData.h.

100 {
101 // return (m_word & 0x04020100); // check any of the three HT bits
102 return (word & 0x00020000); // check only middle HT bit
103 }

◆ identify()

virtual Identifier InDetRawData::identify ( ) const
inlinefinaloverridevirtualinherited

Implements Identifiable.

Definition at line 41 of file InDetRawData.h.

42 {
43 return m_rdoId;
44 }
Identifier m_rdoId

◆ identifyHash()

IdentifierHash Identifiable::identifyHash ( ) const
virtualinherited

Reimplemented in CaloDetDescrElement, CaloDetDescriptor, InDetRawDataCollection< RawDataT >, InDetRawDataCollection< Pixel1RawData >, InDetRawDataCollection< PixelRDORawData >, InDetRawDataCollection< PixelTB04RawData >, InDetRawDataCollection< RDO >, InDetRawDataCollection< SCT3_RawData >, InDetRawDataCollection< SCT_RDORawData >, InDetRawDataCollection< SCT_TB03_RawData >, InDetRawDataCollection< SCT_TB04_RawData >, InDetRawDataCollection< TRT_RDORawData >, InDetRawDataCollection< TRT_TB04_RawData >, Muon::MuonPrepDataCollection< PrepDataT >, Muon::MuonPrepDataCollection< CscPrepData >, Muon::MuonPrepDataCollection< CscStripPrepData >, Muon::MuonPrepDataCollection< MdtPrepData >, Muon::MuonPrepDataCollection< MMPrepData >, Muon::MuonPrepDataCollection< Muon::CscPrepData >, Muon::MuonPrepDataCollection< Muon::CscStripPrepData >, Muon::MuonPrepDataCollection< Muon::MdtPrepData >, Muon::MuonPrepDataCollection< Muon::MMPrepData >, Muon::MuonPrepDataCollection< Muon::RpcPrepData >, Muon::MuonPrepDataCollection< Muon::sTgcPrepData >, Muon::MuonPrepDataCollection< Muon::TgcPrepData >, Muon::MuonPrepDataCollection< RpcPrepData >, Muon::MuonPrepDataCollection< sTgcPrepData >, Muon::MuonPrepDataCollection< TgcPrepData >, SiChargedDiodeCollection, SpacePointCollection, Trk::PrepRawDataCollection< PrepRawDataT >, Trk::PrepRawDataCollection< HGTD_Cluster >, Trk::PrepRawDataCollection< InDet::SiCluster >, Trk::PrepRawDataCollection< PixelCluster >, Trk::PrepRawDataCollection< SCT_Cluster >, Trk::PrepRawDataCollection< TrigSiSpacePoint >, and Trk::PrepRawDataCollection< TRT_DriftCircle >.

Definition at line 11 of file Identifiable.cxx.

11 {
12 IdentifierHash result;
13 return (result);
14}

◆ lastBinHigh()

bool TRT_LoLumRawData::lastBinHigh ( ) const
inline

Definition at line 165 of file TRT_LoLumRawData.h.

166{
167 return (m_word & 0x1);
168}

◆ merge()

void InDetRawData::merge ( const InDetRawData & other)
inlineinherited

Definition at line 60 of file InDetRawData.h.

61 {
62 m_word |= other.m_word;
63 }

◆ operator=() [1/2]

TRT_LoLumRawData & TRT_LoLumRawData::operator= ( const TRT_LoLumRawData & )
default

◆ operator=() [2/2]

TRT_LoLumRawData & TRT_LoLumRawData::operator= ( TRT_LoLumRawData && )
defaultnoexcept

◆ timeOverThreshold()

virtual double TRT_LoLumRawData::timeOverThreshold ( ) const
inlinefinaloverridevirtual

Implements TRT_RDORawData.

Definition at line 47 of file TRT_LoLumRawData.h.

47 {
48 unsigned int leadingEdge = driftTimeBin();
49 unsigned int trailingEdge = this->trailingEdge();
50 if (leadingEdge && trailingEdge) {
51 return (trailingEdge - leadingEdge + 1) * m_driftTimeBinWidth;
52 };
53 return 0.;
54 };
int trailingEdge() const
virtual int driftTimeBin() const override final

◆ trailingEdge()

int TRT_LoLumRawData::trailingEdge ( ) const
inline

Definition at line 66 of file TRT_LoLumRawData.h.

66 {
67 if (!m_island.isValid()) {
68 Island tmpIsland;
69 findLargestIsland(m_word, tmpIsland);
70 m_island.set(tmpIsland);
71 }
72 return m_island.ptr()->m_trailingEdge;
73 };

Member Data Documentation

◆ m_driftTimeBinWidth

double TRT_LoLumRawData::m_driftTimeBinWidth = 3.125
staticconstexprprotected

Definition at line 80 of file TRT_LoLumRawData.h.

◆ m_island

CxxUtils::CachedValue<Island> TRT_LoLumRawData::m_island {}
private

Definition at line 114 of file TRT_LoLumRawData.h.

114{};

◆ m_maskFourLastBits

unsigned int TRT_LoLumRawData::m_maskFourLastBits =0xFFFFFF0
staticconstexprprotected

Definition at line 83 of file TRT_LoLumRawData.h.

◆ m_maskThreeLastBits

unsigned int TRT_LoLumRawData::m_maskThreeLastBits =0xFFFFFF8
staticconstexprprotected

Definition at line 84 of file TRT_LoLumRawData.h.

◆ m_rdoId

Identifier InDetRawData::m_rdoId
privateinherited

Definition at line 69 of file InDetRawData.h.

◆ m_word

unsigned int InDetRawData::m_word = 0
protectedinherited

Definition at line 72 of file InDetRawData.h.


The documentation for this class was generated from the following files: