ATLAS Offline Software
Static Public Member Functions | Private Types | List of all members
PixelSimHelper Class Reference

#include <PixelSimHelper.h>

Collaboration diagram for PixelSimHelper:

Static Public Member Functions

static void noise (InDetSimData &sdo, bool flag)
 
static void belowThreshold (InDetSimData &sdo, bool flag)
 
static void disabled (InDetSimData &sdo, bool flag)
 
static void badToT (InDetSimData &sdo, bool flag)
 
static bool isNoise (const InDetSimData &sdo)
 
static bool isBelowThreshold (const InDetSimData &sdo)
 
static bool isDisabled (const InDetSimData &sdo)
 
static bool hasBadTOT (const InDetSimData &sdo)
 
static bool isRejected (const InDetSimData &sdo, bool rejectOutOfBunch, bool rejectUnconnected, bool rejectBelowThreshold, bool rejectDisabled, bool rejectLostInReadout, bool rejectNotTrack, bool rejectExtraNoise, bool rejectBadTOT)
 

Private Types

enum  {
  NOISE_SET = 0x1, NOISE_CLEAR = 0xfffffffe, BT_SET = 0x2, BT_CLEAR = 0xfffffffd,
  DISABLED_SET = 0x4, DISABLED_CLEAR = 0xfffffffb, BADTOT_SET = 0x8, BADTOT_CLEAR = 0xfffffff7
}
 

Detailed Description

Definition at line 27 of file PixelSimHelper.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
private
Enumerator
NOISE_SET 
NOISE_CLEAR 
BT_SET 
BT_CLEAR 
DISABLED_SET 
DISABLED_CLEAR 
BADTOT_SET 
BADTOT_CLEAR 

Definition at line 57 of file PixelSimHelper.h.

61 {
62  if (flag)
63  {

Member Function Documentation

◆ badToT()

void PixelSimHelper::badToT ( InDetSimData sdo,
bool  flag 
)
inlinestatic

Definition at line 96 of file PixelSimHelper.h.

97 {
98 
99  if (flag)
100  {
101  sdo.m_word |= BADTOT_SET;
102  }
103  else
104  {
105  sdo.m_word &= BADTOT_CLEAR;
106  };
107 }

◆ belowThreshold()

void PixelSimHelper::belowThreshold ( InDetSimData sdo,
bool  flag 
)
inlinestatic

Definition at line 72 of file PixelSimHelper.h.

73 {
74  if (flag)
75  {
76  sdo.m_word |= BT_SET;
77  }
78  else
79  {
80  sdo.m_word &= BT_CLEAR;
81  };
82 }

◆ disabled()

void PixelSimHelper::disabled ( InDetSimData sdo,
bool  flag 
)
inlinestatic

Definition at line 84 of file PixelSimHelper.h.

85 {
86  if (flag)
87  {
88  sdo.m_word |= DISABLED_SET;
89  }
90  else
91  {
92  sdo.m_word &= DISABLED_CLEAR;
93  };
94 }

◆ hasBadTOT()

bool PixelSimHelper::hasBadTOT ( const InDetSimData sdo)
inlinestatic

Definition at line 124 of file PixelSimHelper.h.

125 {
126  return (sdo.m_word&BADTOT_SET) != 0;
127 }

◆ isBelowThreshold()

bool PixelSimHelper::isBelowThreshold ( const InDetSimData sdo)
inlinestatic

Definition at line 114 of file PixelSimHelper.h.

115 {
116  return (sdo.m_word&BT_SET) != 0;
117 }

◆ isDisabled()

bool PixelSimHelper::isDisabled ( const InDetSimData sdo)
inlinestatic

Definition at line 119 of file PixelSimHelper.h.

120 {
121  return (sdo.m_word&DISABLED_SET) != 0;
122 }

◆ isNoise()

bool PixelSimHelper::isNoise ( const InDetSimData sdo)
inlinestatic

Definition at line 109 of file PixelSimHelper.h.

110 {
111  return (sdo.m_word&NOISE_SET) != 0;
112 }

◆ isRejected()

bool PixelSimHelper::isRejected ( const InDetSimData sdo,
bool  rejectOutOfBunch,
bool  rejectUnconnected,
bool  rejectBelowThreshold,
bool  rejectDisabled,
bool  rejectLostInReadout,
bool  rejectNotTrack,
bool  rejectExtraNoise,
bool  rejectBadTOT 
)
inlinestatic

Definition at line 129 of file PixelSimHelper.h.

138 {
139  // rejectOutOfBunch not implemented
140  // rejectUnconnected not implemented
141  if (rejectBelowThreshold && isBelowThreshold(sdo) && !isNoise(sdo))
142  return true; // as in previous PixelDigitTDR_Cnv
143  if (rejectDisabled && isDisabled(sdo)) return true;
144  // rejectLostInReadout not implemented
145  if (rejectBadTOT && hasBadTOT(sdo)) return true;
146  // rejectNotTrack not implemented
147  if (rejectExtraNoise && isNoise(sdo) && isBelowThreshold(sdo))
148  return true;
149  return false;
150 }

◆ noise()

void PixelSimHelper::noise ( InDetSimData sdo,
bool  flag 
)
inlinestatic

Definition at line 60 of file PixelSimHelper.h.

61 {
62  if (flag)
63  {
64  sdo.m_word |= NOISE_SET;
65  }
66  else
67  {
68  sdo.m_word &= NOISE_CLEAR;
69  };
70 }

The documentation for this class was generated from the following file:
PixelSimHelper::NOISE_SET
@ NOISE_SET
Definition: PixelSimHelper.h:59
PixelSimHelper::BT_SET
@ BT_SET
Definition: PixelSimHelper.h:60
PixelSimHelper::DISABLED_SET
@ DISABLED_SET
Definition: PixelSimHelper.h:61
PixelSimHelper::NOISE_CLEAR
@ NOISE_CLEAR
Definition: PixelSimHelper.h:59
PixelSimHelper::isNoise
static bool isNoise(const InDetSimData &sdo)
Definition: PixelSimHelper.h:109
PixelSimHelper::BADTOT_SET
@ BADTOT_SET
Definition: PixelSimHelper.h:62
PixelSimHelper::hasBadTOT
static bool hasBadTOT(const InDetSimData &sdo)
Definition: PixelSimHelper.h:124
PixelSimHelper::BT_CLEAR
@ BT_CLEAR
Definition: PixelSimHelper.h:60
master.flag
bool flag
Definition: master.py:29
PixelSimHelper::BADTOT_CLEAR
@ BADTOT_CLEAR
Definition: PixelSimHelper.h:62
PixelSimHelper::isBelowThreshold
static bool isBelowThreshold(const InDetSimData &sdo)
Definition: PixelSimHelper.h:114
PixelSimHelper::DISABLED_CLEAR
@ DISABLED_CLEAR
Definition: PixelSimHelper.h:61
InDetSimData::m_word
int m_word
Definition: InDetSimData.h:64
PixelSimHelper::isDisabled
static bool isDisabled(const InDetSimData &sdo)
Definition: PixelSimHelper.h:119