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

#include <HelpersPhase1.h>

Collaboration diagram for LVL1::MuCTPIBits::TopoTOB:

Public Member Functions

void setTopoRoI ()
 
 TopoTOB (uint32_t word)
 
void print () const
 

Public Attributes

bool side = false
 
uint32_t pt {0}
 
uint32_t etaRaw {0}
 
uint32_t phiRaw {0}
 
uint32_t roi {0}
 
uint32_t barrel_eta_lookup {0}
 
uint32_t barrel_phi_lookup {0}
 
uint32_t det {0}
 
uint32_t sec {0}
 
uint32_t subsystem {0}
 
float etaDecoded {0.}
 
float phiDecoded {0.}
 
bool candFlag_GoodMF = false
 
bool candFlag_InnerCoin = false
 
bool candFlag_BW23 = false
 
bool candFlag_Charge = false
 

Detailed Description

Definition at line 307 of file HelpersPhase1.h.

Constructor & Destructor Documentation

◆ TopoTOB()

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

Definition at line 343 of file HelpersPhase1.h.

344  {
345  side = maskedWord(word, RUN3_TOPO_WORD_HEMI_SHIFT, RUN3_TOPO_WORD_HEMI_MASK);
346  det = maskedWord(word, RUN3_TOPO_WORD_DET_SHIFT, RUN3_TOPO_WORD_DET_MASK);
347  pt = maskedWord(word, RUN3_TOPO_WORD_PT_SHIFT, RUN3_TOPO_WORD_PT_MASK);
348  // Barrel:00 - EC:1X - FW:01 - see: https://indico.cern.ch/event/864390/contributions/3642129/attachments/1945776/3234220/ctp_topo_encoding.pdf
349  // set EC to 2 instead of sometimes 3 - see above why
350  if(det > 2) det = 2;
351  if(det == 0) subsystem = 0;
352  else if(det == 1) subsystem = 2;
353  else if(det == 2) subsystem = 1;
354  candFlag_GoodMF = maskedWord(word, RUN3_TOPO_WORD_CANDFLAGS_ECFW_GOODMF_SHIFT, RUN3_TOPO_WORD_CANDFLAGS_ECFW_GOODMF_MASK);
355  candFlag_InnerCoin = maskedWord(word, RUN3_TOPO_WORD_CANDFLAGS_ECFW_INNERCOIN_SHIFT, RUN3_TOPO_WORD_CANDFLAGS_ECFW_INNERCOIN_MASK);
356  candFlag_BW23 = maskedWord(word, RUN3_TOPO_WORD_CANDFLAGS_ECFW_BW23_SHIFT, RUN3_TOPO_WORD_CANDFLAGS_ECFW_BW23_MASK);
357  candFlag_Charge = maskedWord(word, RUN3_TOPO_WORD_CANDFLAGS_ECFW_CHARGE_SHIFT, RUN3_TOPO_WORD_CANDFLAGS_ECFW_CHARGE_MASK);
358  etaRaw = maskedWord(word, RUN3_TOPO_WORD_ETA_SHIFT, RUN3_TOPO_WORD_ETA_MASK);
359  phiRaw = maskedWord(word, RUN3_TOPO_WORD_PHI_SHIFT, RUN3_TOPO_WORD_PHI_MASK);
360  setTopoRoI();
361  }

Member Function Documentation

◆ print()

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

Definition at line 362 of file HelpersPhase1.h.

363  {
364  std::cout << "Muon word content (TOB) : ";
365  std::cout << (side?"Side A, ":"Side C, ");
366  if(det == 0)
367  std::cout << "BA" << sec << " ";
368  else
369  std::cout << (det==1?"FW":"EC") << sec << " ";
370  std::cout << "Eta = " << etaDecoded << " ";
371  std::cout << "Phi = " << phiDecoded << " ";
372  std::cout << "pT = " << pt << std::endl;
373  std::cout << "CF:";
374  if(det == 1 || det == 2) {
375  std::cout << " GMF: " << (candFlag_GoodMF?"1":"0");
376  std::cout << " InC: " << (candFlag_InnerCoin?"1":"0");
377  std::cout << " -BW: " << (candFlag_BW23?"1":"0");
378  std::cout << " Chg: " << (candFlag_Charge?"1":"0");
379  }
380  std::cout << std::endl;
381  }

◆ setTopoRoI()

void LVL1::MuCTPIBits::TopoTOB::setTopoRoI ( )
inline

Definition at line 324 of file HelpersPhase1.h.

325  {
326  // BA
327  if (det == 0){
328  sec = phiRaw >> 3;
329  barrel_eta_lookup = (etaRaw >> 1) & 0xf;
330  barrel_phi_lookup = phiRaw & 0x7;
331  }
332  // FWD
333  else if (det == 1){
334  sec = phiRaw >> 3 ;
335  roi = ((etaRaw & 0x1f) << 2) | ((phiRaw >> 1) & 0x3) ;
336  }
337  // EC
338  else if (det == 2){
339  sec = phiRaw >> 2 ;
340  roi = ((etaRaw & 0x3f) << 2) | (phiRaw & 0x3) ;
341  }
342  }

Member Data Documentation

◆ barrel_eta_lookup

uint32_t LVL1::MuCTPIBits::TopoTOB::barrel_eta_lookup {0}

Definition at line 313 of file HelpersPhase1.h.

◆ barrel_phi_lookup

uint32_t LVL1::MuCTPIBits::TopoTOB::barrel_phi_lookup {0}

Definition at line 314 of file HelpersPhase1.h.

◆ candFlag_BW23

bool LVL1::MuCTPIBits::TopoTOB::candFlag_BW23 = false

Definition at line 322 of file HelpersPhase1.h.

◆ candFlag_Charge

bool LVL1::MuCTPIBits::TopoTOB::candFlag_Charge = false

Definition at line 323 of file HelpersPhase1.h.

◆ candFlag_GoodMF

bool LVL1::MuCTPIBits::TopoTOB::candFlag_GoodMF = false

Definition at line 320 of file HelpersPhase1.h.

◆ candFlag_InnerCoin

bool LVL1::MuCTPIBits::TopoTOB::candFlag_InnerCoin = false

Definition at line 321 of file HelpersPhase1.h.

◆ det

uint32_t LVL1::MuCTPIBits::TopoTOB::det {0}

Definition at line 315 of file HelpersPhase1.h.

◆ etaDecoded

float LVL1::MuCTPIBits::TopoTOB::etaDecoded {0.}

Definition at line 318 of file HelpersPhase1.h.

◆ etaRaw

uint32_t LVL1::MuCTPIBits::TopoTOB::etaRaw {0}

Definition at line 310 of file HelpersPhase1.h.

◆ phiDecoded

float LVL1::MuCTPIBits::TopoTOB::phiDecoded {0.}

Definition at line 319 of file HelpersPhase1.h.

◆ phiRaw

uint32_t LVL1::MuCTPIBits::TopoTOB::phiRaw {0}

Definition at line 311 of file HelpersPhase1.h.

◆ pt

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

Definition at line 309 of file HelpersPhase1.h.

◆ roi

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

Definition at line 312 of file HelpersPhase1.h.

◆ sec

uint32_t LVL1::MuCTPIBits::TopoTOB::sec {0}

Definition at line 316 of file HelpersPhase1.h.

◆ side

bool LVL1::MuCTPIBits::TopoTOB::side = false

Definition at line 308 of file HelpersPhase1.h.

◆ subsystem

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

Definition at line 317 of file HelpersPhase1.h.


The documentation for this struct was generated from the following file:
LVL1::MuCTPIBits::TopoTOB::etaDecoded
float etaDecoded
Definition: HelpersPhase1.h:318
LVL1::MuCTPIBits::TopoTOB::barrel_phi_lookup
uint32_t barrel_phi_lookup
Definition: HelpersPhase1.h:314
LVL1::MuCTPIBits::TopoTOB::barrel_eta_lookup
uint32_t barrel_eta_lookup
Definition: HelpersPhase1.h:313
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::TopoTOB::candFlag_BW23
bool candFlag_BW23
Definition: HelpersPhase1.h:322
LVL1::MuCTPIBits::TopoTOB::phiRaw
uint32_t phiRaw
Definition: HelpersPhase1.h:311
LVL1::MuCTPIBits::TopoTOB::side
bool side
Definition: HelpersPhase1.h:308
LVL1::MuCTPIBits::TopoTOB::subsystem
uint32_t subsystem
Definition: HelpersPhase1.h:317
LVL1::MuCTPIBits::TopoTOB::candFlag_Charge
bool candFlag_Charge
Definition: HelpersPhase1.h:323
LVL1::MuCTPIBits::TopoTOB::candFlag_InnerCoin
bool candFlag_InnerCoin
Definition: HelpersPhase1.h:321
LVL1::MuCTPIBits::TopoTOB::phiDecoded
float phiDecoded
Definition: HelpersPhase1.h:319
LVL1::MuCTPIBits::TopoTOB::det
uint32_t det
Definition: HelpersPhase1.h:315
LVL1::MuCTPIBits::TopoTOB::candFlag_GoodMF
bool candFlag_GoodMF
Definition: HelpersPhase1.h:320
LVL1::MuCTPIBits::TopoTOB::setTopoRoI
void setTopoRoI()
Definition: HelpersPhase1.h:324
LVL1::MuCTPIBits::TopoTOB::etaRaw
uint32_t etaRaw
Definition: HelpersPhase1.h:310
LVL1::MuCTPIBits::TopoTOB::sec
uint32_t sec
Definition: HelpersPhase1.h:316
LVL1::MuCTPIBits::TopoTOB::roi
uint32_t roi
Definition: HelpersPhase1.h:312
LVL1::MuCTPIBits::TopoTOB::pt
uint32_t pt
Definition: HelpersPhase1.h:309