ATLAS Offline Software
Public Member Functions | Public Attributes | List of all members
LVL1::MuCTPIBits::Candidate Struct Reference

#include <HelpersPhase1.h>

Collaboration diagram for LVL1::MuCTPIBits::Candidate:

Public Member Functions

 Candidate (uint32_t word)
 
void print () const
 

Public Attributes

bool side = false
 
SubsysID type = SubsysID::Undefined
 
uint32_t num {0}
 
uint32_t pt {0}
 
uint32_t mappedPt {0}
 
uint32_t roi {0}
 
uint32_t subsystem {0}
 
float eta {0.}
 
float phi {0.}
 
bool errorFlag = false
 
bool vetoFlag = false
 
bool sectorFlag_gtN = false
 
bool sectorFlag_nswMon = false
 
bool candFlag_phiOverlap = false
 
bool candFlag_gt1CandRoi = false
 
bool candFlag_GoodMF = false
 
bool candFlag_InnerCoin = false
 
bool candFlag_BW23 = false
 
bool candFlag_Charge = false
 

Detailed Description

Definition at line 215 of file HelpersPhase1.h.

Constructor & Destructor Documentation

◆ Candidate()

LVL1::MuCTPIBits::Candidate::Candidate ( uint32_t  word)
inline

Definition at line 236 of file HelpersPhase1.h.

237  {
238  errorFlag = maskedWord(word, RUN3_CAND_WORD_SECTORERRORFLAG_SHIFT, RUN3_CAND_WORD_SECTORERRORFLAG_MASK);
239  type = getSubsysID(word);
240  side = maskedWord(word, RUN3_SUBSYS_HEMISPHERE_SHIFT, RUN3_SUBSYS_HEMISPHERE_MASK);
241  vetoFlag = maskedWord(word, RUN3_CAND_WORD_VETO_SHIFT, RUN3_CAND_WORD_VETO_MASK);
242  sectorFlag_gtN = maskedWord(word, RUN3_CAND_WORD_SECTORFLAGS_GTN_SHIFT, RUN3_CAND_WORD_SECTORFLAGS_GTN_MASK);
243  pt = maskedWord(word, RUN3_CAND_WORD_PT_SHIFT, RUN3_CAND_WORD_PT_MASK);
244  mappedPt = maskedWord(word, RUN3_CAND_WORD_PT_SHIFT, RUN3_CAND_WORD_PT_MASK);
245  roi = maskedWord(word, RUN3_CAND_WORD_ROI_SHIFT, RUN3_CAND_WORD_ROI_MASK);
246  sectorFlag_nswMon = maskedWord(word, RUN3_CAND_WORD_CANDFLAGS_NSWMON_SHIFT, RUN3_CAND_WORD_CANDFLAGS_NSWMON_MASK); // for BA is zero
247  if(type==SubsysID::Endcap) {
248  candFlag_GoodMF = maskedWord(word, RUN3_CAND_WORD_CANDFLAGS_ECFW_GOODMF_SHIFT, RUN3_CAND_WORD_CANDFLAGS_ECFW_GOODMF_MASK);
249  candFlag_InnerCoin = maskedWord(word, RUN3_CAND_WORD_CANDFLAGS_ECFW_INNERCOIN_SHIFT, RUN3_CAND_WORD_CANDFLAGS_ECFW_INNERCOIN_MASK);
250  candFlag_BW23 = maskedWord(word, RUN3_CAND_WORD_CANDFLAGS_ECFW_BW23_SHIFT, RUN3_CAND_WORD_CANDFLAGS_ECFW_BW23_MASK);
251  candFlag_Charge = maskedWord(word, RUN3_CAND_WORD_CANDFLAGS_ECFW_CHARGE_SHIFT, RUN3_CAND_WORD_CANDFLAGS_ECFW_CHARGE_MASK);
252  num = maskedWord(word, RUN3_CAND_SECTORID_SHIFT, ENDCAP_SECTORID_MASK);
253  subsystem = 1;
254  }
255  else if(type==SubsysID::Barrel)
256  {
257  candFlag_phiOverlap = maskedWord(word, RUN3_CAND_WORD_CANDFLAGS_BA_PHIOVERLAP_SHIFT, RUN3_CAND_WORD_CANDFLAGS_BA_PHIOVERLAP_MASK);
258  candFlag_gt1CandRoi = maskedWord(word, RUN3_CAND_WORD_CANDFLAGS_BA_GT1ROI_SHIFT, RUN3_CAND_WORD_CANDFLAGS_BA_GT1ROI_MASK);
259  subsystem = 0;
260  num = maskedWord(word, RUN3_CAND_SECTORID_SHIFT, BARREL_SECTORID_MASK);//same as FW
261  }
262  else
263  {
264  candFlag_GoodMF = maskedWord(word, RUN3_CAND_WORD_CANDFLAGS_ECFW_GOODMF_SHIFT, RUN3_CAND_WORD_CANDFLAGS_ECFW_GOODMF_MASK);
265  candFlag_InnerCoin = maskedWord(word, RUN3_CAND_WORD_CANDFLAGS_ECFW_INNERCOIN_SHIFT, RUN3_CAND_WORD_CANDFLAGS_ECFW_INNERCOIN_MASK);
266  candFlag_BW23 = maskedWord(word, RUN3_CAND_WORD_CANDFLAGS_ECFW_BW23_SHIFT, RUN3_CAND_WORD_CANDFLAGS_ECFW_BW23_MASK);
267  candFlag_Charge = maskedWord(word, RUN3_CAND_WORD_CANDFLAGS_ECFW_CHARGE_SHIFT, RUN3_CAND_WORD_CANDFLAGS_ECFW_CHARGE_MASK);
268  num = maskedWord(word, RUN3_CAND_SECTORID_SHIFT, BARREL_SECTORID_MASK);//same as FW
269  subsystem = 2;
270  }
271  }

Member Function Documentation

◆ print()

void LVL1::MuCTPIBits::Candidate::print ( ) const
inline

Definition at line 272 of file HelpersPhase1.h.

273  {
274  std::cout << "Muon word content (cand): ";
275  std::cout << (side?"Side A, ":"Side C, ");
276  if(type == SubsysID::Barrel)
277  std::cout << "BA" << num << " ";
278  else
279  std::cout << (type==SubsysID::Forward?"FW":"EC") << num << " ";
280  std::cout << "Eta = " << eta << " ";
281  std::cout << "Phi = " << phi << " ";
282  std::cout << "pT = " << pt << " "; //Remember the internal mapping. RPC has 6 thresholds and TGC has 15.
283  std::cout << "mappedPt = " << mappedPt << " ";
284  std::cout << "CF: ";
285  if(type != SubsysID::Barrel) {
286  std::cout << " GMF: " << (candFlag_GoodMF?"1":"0");
287  std::cout << " InC: " << (candFlag_InnerCoin?"1":"0");
288  std::cout << " -BW: " << (candFlag_BW23?"1":"0");
289  std::cout << " Chg: " << (candFlag_Charge?"1":"0");
290  }
291  else {
292  std::cout << " PhO: " << (candFlag_phiOverlap?"1":"0");
293  std::cout << " 1Ro: " << (candFlag_gt1CandRoi?"1":"0");
294  }
295  std::cout << " SF: " << std::endl;
296  if(type != SubsysID::Barrel) {
297  std::cout << " NSM: " << (sectorFlag_nswMon?"1":"0");
298  std::cout << " 4SL: " << (sectorFlag_gtN?"1":"0");
299  }
300  else {
301  std::cout << " 2SL: " << (sectorFlag_gtN?"1":"0");
302  }
303  std::cout << " Veto = " << (vetoFlag?"1":"0") << " ";
304  std::cout << std::endl;
305  }

Member Data Documentation

◆ candFlag_BW23

bool LVL1::MuCTPIBits::Candidate::candFlag_BW23 = false

Definition at line 234 of file HelpersPhase1.h.

◆ candFlag_Charge

bool LVL1::MuCTPIBits::Candidate::candFlag_Charge = false

Definition at line 235 of file HelpersPhase1.h.

◆ candFlag_GoodMF

bool LVL1::MuCTPIBits::Candidate::candFlag_GoodMF = false

Definition at line 232 of file HelpersPhase1.h.

◆ candFlag_gt1CandRoi

bool LVL1::MuCTPIBits::Candidate::candFlag_gt1CandRoi = false

Definition at line 231 of file HelpersPhase1.h.

◆ candFlag_InnerCoin

bool LVL1::MuCTPIBits::Candidate::candFlag_InnerCoin = false

Definition at line 233 of file HelpersPhase1.h.

◆ candFlag_phiOverlap

bool LVL1::MuCTPIBits::Candidate::candFlag_phiOverlap = false

Definition at line 230 of file HelpersPhase1.h.

◆ errorFlag

bool LVL1::MuCTPIBits::Candidate::errorFlag = false

Definition at line 226 of file HelpersPhase1.h.

◆ eta

float LVL1::MuCTPIBits::Candidate::eta {0.}

Definition at line 224 of file HelpersPhase1.h.

◆ mappedPt

uint32_t LVL1::MuCTPIBits::Candidate::mappedPt {0}

Definition at line 221 of file HelpersPhase1.h.

◆ num

uint32_t LVL1::MuCTPIBits::Candidate::num {0}

Definition at line 218 of file HelpersPhase1.h.

◆ phi

float LVL1::MuCTPIBits::Candidate::phi {0.}

Definition at line 225 of file HelpersPhase1.h.

◆ pt

uint32_t LVL1::MuCTPIBits::Candidate::pt {0}

Definition at line 219 of file HelpersPhase1.h.

◆ roi

uint32_t LVL1::MuCTPIBits::Candidate::roi {0}

Definition at line 222 of file HelpersPhase1.h.

◆ sectorFlag_gtN

bool LVL1::MuCTPIBits::Candidate::sectorFlag_gtN = false

Definition at line 228 of file HelpersPhase1.h.

◆ sectorFlag_nswMon

bool LVL1::MuCTPIBits::Candidate::sectorFlag_nswMon = false

Definition at line 229 of file HelpersPhase1.h.

◆ side

bool LVL1::MuCTPIBits::Candidate::side = false

Definition at line 216 of file HelpersPhase1.h.

◆ subsystem

uint32_t LVL1::MuCTPIBits::Candidate::subsystem {0}

Definition at line 223 of file HelpersPhase1.h.

◆ type

SubsysID LVL1::MuCTPIBits::Candidate::type = SubsysID::Undefined

Definition at line 217 of file HelpersPhase1.h.

◆ vetoFlag

bool LVL1::MuCTPIBits::Candidate::vetoFlag = false

Definition at line 227 of file HelpersPhase1.h.


The documentation for this struct was generated from the following file:
LVL1::MuCTPIBits::Candidate::candFlag_phiOverlap
bool candFlag_phiOverlap
Definition: HelpersPhase1.h:230
LVL1::MuCTPIBits::Candidate::candFlag_InnerCoin
bool candFlag_InnerCoin
Definition: HelpersPhase1.h:233
LVL1::MuCTPIBits::Candidate::vetoFlag
bool vetoFlag
Definition: HelpersPhase1.h:227
LVL1::MuCTPIBits::maskedWord
constexpr uint32_t maskedWord(uint32_t word, uint32_t shift, uint32_t mask)
Extract sub-word from 32-bit word by applying a shift and a mask.
Definition: HelpersPhase1.h:44
LVL1::MuCTPIBits::Candidate::sectorFlag_gtN
bool sectorFlag_gtN
Definition: HelpersPhase1.h:228
LVL1::MuCTPIBits::Candidate::candFlag_GoodMF
bool candFlag_GoodMF
Definition: HelpersPhase1.h:232
LVL1::MuCTPIBits::Candidate::roi
uint32_t roi
Definition: HelpersPhase1.h:222
LVL1::MuCTPIBits::Candidate::type
SubsysID type
Definition: HelpersPhase1.h:217
LVL1::MuCTPIBits::Candidate::eta
float eta
Definition: HelpersPhase1.h:224
LVL1::MuCTPIBits::Candidate::subsystem
uint32_t subsystem
Definition: HelpersPhase1.h:223
LVL1::MuCTPIBits::Candidate::phi
float phi
Definition: HelpersPhase1.h:225
LVL1::MuCTPIBits::Candidate::side
bool side
Definition: HelpersPhase1.h:216
LVL1::MuCTPIBits::Candidate::candFlag_BW23
bool candFlag_BW23
Definition: HelpersPhase1.h:234
LVL1::MuCTPIBits::SubsysID::Endcap
@ Endcap
LVL1::MuCTPIBits::Candidate::sectorFlag_nswMon
bool sectorFlag_nswMon
Definition: HelpersPhase1.h:229
LVL1::MuCTPIBits::SubsysID::Forward
@ Forward
LVL1::MuCTPIBits::Candidate::pt
uint32_t pt
Definition: HelpersPhase1.h:219
LVL1::MuCTPIBits::Candidate::candFlag_gt1CandRoi
bool candFlag_gt1CandRoi
Definition: HelpersPhase1.h:231
LVL1::MuCTPIBits::Candidate::candFlag_Charge
bool candFlag_Charge
Definition: HelpersPhase1.h:235
LVL1::MuCTPIBits::getSubsysID
constexpr SubsysID getSubsysID(uint32_t word)
Decode the subsys ID from RoI candidate word.
Definition: HelpersPhase1.h:174
LVL1::MuCTPIBits::Candidate::mappedPt
uint32_t mappedPt
Definition: HelpersPhase1.h:221
LVL1::MuCTPIBits::Candidate::num
uint32_t num
Definition: HelpersPhase1.h:218
LVL1::MuCTPIBits::SubsysID::Barrel
@ Barrel
LVL1::MuCTPIBits::Candidate::errorFlag
bool errorFlag
Definition: HelpersPhase1.h:226