ATLAS Offline Software
Functions
driftCircle.h File Reference

Go to the source code of this file.

Functions

void bits32 (unsigned int n)
 
void bits27 (unsigned int n)
 
void bits24 (unsigned int n)
 
int driftTimeBin (unsigned int m_word)
 
int trailingEdge (unsigned int m_word)
 
bool lowLevelMiddle (unsigned int m_word)
 
bool highLevel (unsigned int m_word)
 
bool highLevel1 (unsigned int m_word)
 
bool highLevel2 (unsigned int m_word)
 
bool highLevel3 (unsigned int m_word)
 
bool firstBinHigh (unsigned int m_word)
 
bool lastBinHigh (unsigned int m_word)
 
double rawDriftTime (unsigned int m_word)
 
double timeOverThreshold (unsigned int m_word)
 
int bitTimeOverThreshold (unsigned int m_word)
 
int nLTbits (unsigned int m_word)
 
void print_mword_properties (unsigned int mword)
 

Function Documentation

◆ bits24()

void bits24 ( unsigned int  n)

Definition at line 38 of file driftCircle.h.

38  {
39  for (unsigned int k=0; k<32; k++) {
40  if (k>4) {
41  unsigned int i = n & 0x80000000u;
42  bool b = (i==0x80000000u);
43  if (((k-5)%9)) std::cout << b;
44  }
45  n=n<<1;
46  }
47  std::cout << std::endl;
48 }

◆ bits27()

void bits27 ( unsigned int  n)

Definition at line 24 of file driftCircle.h.

24  {
25  for (unsigned int k=0; k<32; k++) {
26  if (k>4) {
27  unsigned int i = n & 0x80000000u;
28  bool b = (i==0x80000000u);
29  if (!((k-5)%9)) std::cout << " ";
30  std::cout << b;
31  if (!((k-5)%9)) std::cout << " ";
32  }
33  n=n<<1;
34  }
35  std::cout << std::endl;
36 }

◆ bits32()

void bits32 ( unsigned int  n)

Definition at line 14 of file driftCircle.h.

14  {
15  for (unsigned int k=0; k<32; k++) {
16  unsigned int i = n & 0x80000000u;
17  bool b = (i==0x80000000u);
18  std::cout << b;
19  n=n<<1;
20  }
21  std::cout << std::endl;
22 }

◆ bitTimeOverThreshold()

int bitTimeOverThreshold ( unsigned int  m_word)

Definition at line 124 of file driftCircle.h.

124  {
125  return floor(timeOverThreshold(m_word)/3.125+0.5);
126 }

◆ driftTimeBin()

int driftTimeBin ( unsigned int  m_word)

Definition at line 50 of file driftCircle.h.

50  {
51  unsigned mask = 0x02000000;
52  bool SawZero = false;
53  int i;
54  for(i=0;i<24;++i)
55  { if ( (m_word & mask) && SawZero) break;
56  else if ( !(m_word & mask) ) SawZero = true;
57  mask>>=1;
58  if(i==7 || i==15) mask>>=1;
59  }
60  if(i==24) i=0;
61  return i;
62 }

◆ firstBinHigh()

bool firstBinHigh ( unsigned int  m_word)

Definition at line 104 of file driftCircle.h.

104  {
105  return (m_word & 0x02000000);
106 }

◆ highLevel()

bool highLevel ( unsigned int  m_word)

Definition at line 88 of file driftCircle.h.

88  {
89  return (m_word & 0x04020100);
90 }

◆ highLevel1()

bool highLevel1 ( unsigned int  m_word)

Definition at line 92 of file driftCircle.h.

92  {
93  return (m_word & 0x04000000);
94 }

◆ highLevel2()

bool highLevel2 ( unsigned int  m_word)

Definition at line 96 of file driftCircle.h.

96  {
97  return (m_word & 0x00020000);
98 }

◆ highLevel3()

bool highLevel3 ( unsigned int  m_word)

Definition at line 100 of file driftCircle.h.

100  {
101  return (m_word & 0x00000100);
102 }

◆ lastBinHigh()

bool lastBinHigh ( unsigned int  m_word)

Definition at line 108 of file driftCircle.h.

108  {
109  return (m_word & 0x1);
110 }

◆ lowLevelMiddle()

bool lowLevelMiddle ( unsigned int  m_word)

Definition at line 84 of file driftCircle.h.

84  {
85  return (m_word & 0x0001FE00);
86 }

◆ nLTbits()

int nLTbits ( unsigned int  m_word)

Definition at line 128 of file driftCircle.h.

128  {
129  unsigned mask = 0x02000000;
130  int m=0;
131  for (int i=0;i<24;++i) {
132  if ( m_word & mask ) m++;
133  mask>>=1;
134  if (i==7 || i==15) mask>>=1;
135  }
136  return m;
137 }

◆ print_mword_properties()

void print_mword_properties ( unsigned int  mword)

Definition at line 139 of file driftCircle.h.

139  {
140  int LE = driftTimeBin(mword);
141  int TE = trailingEdge(mword);
142  int ToT = bitTimeOverThreshold(mword);
143  int nLT = nLTbits(mword);
144  std::cout << "AJB " << LE << " " << TE << " " << ToT << " " << nLT << std::endl;
145 }

◆ rawDriftTime()

double rawDriftTime ( unsigned int  m_word)

Definition at line 112 of file driftCircle.h.

112  {
113  return (driftTimeBin(m_word)+0.5)*3.125;
114 }

◆ timeOverThreshold()

double timeOverThreshold ( unsigned int  m_word)

Definition at line 116 of file driftCircle.h.

116  {
117  double binWidth = 3.125;
118  int LE = driftTimeBin(m_word);
119  int TE = trailingEdge(m_word);
120  if ( (24 == LE) || (24 == TE) || (0 == TE) || (23 == LE) ) return 0.0;
121  return (double) (TE - LE + 1) * binWidth;
122 }

◆ trailingEdge()

int trailingEdge ( unsigned int  m_word)

Definition at line 64 of file driftCircle.h.

64  {
65  unsigned mask = 0x00000001;
66  bool SawZero=false;
67  int i;
68  for (i = 0; i < 24; ++i)
69  {
70  if ( (m_word & mask) && SawZero )
71  break;
72  else if ( !(m_word & mask) )
73  SawZero = true;
74  mask <<= 1;
75  if (i == 7 || i == 15)
76  mask <<= 1;
77  }
78 
79  if ( 24 == i )
80  return i;
81  return (23 - i);
82 }
plotBeamSpotCompare.x1
x1
Definition: plotBeamSpotCompare.py:216
python.SystemOfUnits.m
int m
Definition: SystemOfUnits.py:91
Trk::u
@ u
Enums for curvilinear frames.
Definition: ParamDefs.h:77
binWidth
void binWidth(TH1 *h)
Definition: listroot.cxx:80
python.utils.AtlRunQueryLookup.mask
string mask
Definition: AtlRunQueryLookup.py:460
bitTimeOverThreshold
int bitTimeOverThreshold(unsigned int m_word)
Definition: driftCircle.h:124
lumiFormat.i
int i
Definition: lumiFormat.py:85
beamspotman.n
n
Definition: beamspotman.py:731
SignEnum::LE
@ LE
Definition: SignEnums.h:21
plotBeamSpotMon.b
b
Definition: plotBeamSpotMon.py:77
nLTbits
int nLTbits(unsigned int m_word)
Definition: driftCircle.h:128
timeOverThreshold
double timeOverThreshold(unsigned int m_word)
Definition: driftCircle.h:116
trailingEdge
int trailingEdge(unsigned int m_word)
Definition: driftCircle.h:64
fitman.k
k
Definition: fitman.py:528
driftTimeBin
int driftTimeBin(unsigned int m_word)
Definition: driftCircle.h:50