Loading [MathJax]/extensions/tex2jax.js
ATLAS Offline Software
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
Classes | Public Member Functions | Static Public Member Functions | Protected Attributes | Static Protected Attributes | Private Attributes | List of all members
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_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  };

◆ 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 }

◆ firstBinHigh()

bool TRT_LoLumRawData::firstBinHigh ( ) const
inline

Definition at line 154 of file TRT_LoLumRawData.h.

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

◆ getDriftTimeBinWidth()

static constexpr double TRT_LoLumRawData::getDriftTimeBinWidth ( )
inlinestaticconstexpr

Definition at line 88 of file TRT_LoLumRawData.h.

88  {
89  return m_driftTimeBinWidth;
90  };

◆ 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 }

◆ 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]

static 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  }

◆ identifyHash()

IdentifierHash Identifiable::identifyHash ( ) const
virtualinherited

◆ 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  };

◆ 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

constexpr 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.

◆ m_maskFourLastBits

constexpr unsigned int TRT_LoLumRawData::m_maskFourLastBits =0xFFFFFF0
staticconstexprprotected

Definition at line 83 of file TRT_LoLumRawData.h.

◆ m_maskThreeLastBits

constexpr 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:
plotBeamSpotCompare.x1
x1
Definition: plotBeamSpotCompare.py:216
get_generator_info.result
result
Definition: get_generator_info.py:21
TRT_LoLumRawData::m_island
CxxUtils::CachedValue< Island > m_island
Definition: TRT_LoLumRawData.h:114
TRT_LoLumRawData::highLevel
virtual bool highLevel() const override final
Definition: TRT_LoLumRawData.h:128
TRT_LoLumRawData::m_driftTimeBinWidth
static constexpr double m_driftTimeBinWidth
Definition: TRT_LoLumRawData.h:80
TRT_LoLumRawData::m_maskThreeLastBits
static constexpr unsigned int m_maskThreeLastBits
Definition: TRT_LoLumRawData.h:84
python.utils.AtlRunQueryLookup.mask
string mask
Definition: AtlRunQueryLookup.py:460
TRT_LoLumRawData::driftTimeBin
virtual int driftTimeBin() const override final
Definition: TRT_LoLumRawData.h:57
TRT_LoLumRawData::findLargestIsland
static void findLargestIsland(unsigned int word, Island &island)
Definition: TRT_LoLumRawData.cxx:33
InDetRawData::m_word
unsigned int m_word
Definition: InDetRawData.h:72
InDetRawData::m_rdoId
Identifier m_rdoId
Definition: InDetRawData.h:69
TRT_LoLumRawData::trailingEdge
int trailingEdge() const
Definition: TRT_LoLumRawData.h:66
TRT_RDORawData::TRT_RDORawData
TRT_RDORawData()=default
InDetDD::other
@ other
Definition: InDetDD_Defs.h:16
TRT_LoLumRawData::m_maskFourLastBits
static constexpr unsigned int m_maskFourLastBits
Definition: TRT_LoLumRawData.h:83
IdentifierHash
This is a "hash" representation of an Identifier. This encodes a 32 bit index which can be used to lo...
Definition: IdentifierHash.h:25
fitman.k
k
Definition: fitman.py:528
Identifier
Definition: IdentifierFieldParser.cxx:14