ATLAS Offline Software
Public Member Functions | Private Types | Private Attributes | List of all members
LVL1TGCTrigger::TGCRPhiCoincidenceMatrix Class Reference

#include <TGCRPhiCoincidenceMatrix.h>

Collaboration diagram for LVL1TGCTrigger::TGCRPhiCoincidenceMatrix:

Public Member Functions

void setSSCId (int SSCIdIn)
 
void setSideId (int sideIdIn)
 
void setCoincidenceLUT (std::shared_ptr< const LVL1TGC::BigWheelCoincidenceLUT > lut)
 
void inputR (int rIn, int dRIn, int ptRIn)
 
void inputPhi (int phiIn, int dPhiIn, int ptPhiIn)
 
void clear ()
 
TGCRPhiCoincidenceOutdoCoincidence ()
 
 TGCRPhiCoincidenceMatrix (const TGCArguments *, const TGCSectorLogic *sL=0)
 
virtual ~TGCRPhiCoincidenceMatrix ()
 
 TGCRPhiCoincidenceMatrix (const TGCRPhiCoincidenceMatrix &right)=default
 
TGCRPhiCoincidenceMatrixoperator= (const TGCRPhiCoincidenceMatrix &right)
 
const TGCArgumentstgcArgs () const
 

Private Types

enum  { MaxNPhiHit = 2 }
 

Private Attributes

const TGCSectorLogicm_sectorLogic
 
TGCRPhiCoincidenceOutm_matrixOut
 
std::shared_ptr< const LVL1TGC::BigWheelCoincidenceLUTm_lut
 
int m_nPhiHit
 
int m_SSCId
 
int m_r
 
int m_dR
 
int m_ptR
 
int m_phi [MaxNPhiHit]
 
int m_dPhi [MaxNPhiHit]
 
int m_ptPhi [MaxNPhiHit]
 
int m_sideId
 
const TGCArgumentsm_tgcArgs
 

Detailed Description

Definition at line 20 of file TGCRPhiCoincidenceMatrix.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
private
Enumerator
MaxNPhiHit 

Definition at line 39 of file TGCRPhiCoincidenceMatrix.h.

39 {MaxNPhiHit = 2};

Constructor & Destructor Documentation

◆ TGCRPhiCoincidenceMatrix() [1/2]

LVL1TGCTrigger::TGCRPhiCoincidenceMatrix::TGCRPhiCoincidenceMatrix ( const TGCArguments tgcargs,
const TGCSectorLogic sL = 0 
)

Definition at line 130 of file TGCRPhiCoincidenceMatrix.cxx.

131  : m_sectorLogic(sL),
132  m_matrixOut(0), m_lut(0),
133  m_nPhiHit(0), m_SSCId(0), m_r(0), m_dR(0), m_ptR(0), m_sideId(0), m_tgcArgs(tgcargs)
134 {
135  for (int i=0; i<MaxNPhiHit; i++) {
136  m_phi[i]=0;
137  m_dPhi[i]=0;
138  m_ptPhi[i]=0;
139  }
140 }

◆ ~TGCRPhiCoincidenceMatrix()

LVL1TGCTrigger::TGCRPhiCoincidenceMatrix::~TGCRPhiCoincidenceMatrix ( )
virtual

Definition at line 142 of file TGCRPhiCoincidenceMatrix.cxx.

143 {
144  m_matrixOut=0;
145 }

◆ TGCRPhiCoincidenceMatrix() [2/2]

LVL1TGCTrigger::TGCRPhiCoincidenceMatrix::TGCRPhiCoincidenceMatrix ( const TGCRPhiCoincidenceMatrix right)
default

Member Function Documentation

◆ clear()

void LVL1TGCTrigger::TGCRPhiCoincidenceMatrix::clear ( )

Definition at line 48 of file TGCRPhiCoincidenceMatrix.cxx.

49 {
50  m_SSCId=0;
51  m_r=m_dR=m_ptR=0;
52 
53  m_nPhiHit=0;
54  int i;
55  for( i=0; i<MaxNPhiHit; i+=1)
56  m_phi[i]=m_dPhi[i]=m_ptPhi[i]=0;
57 }

◆ doCoincidence()

TGCRPhiCoincidenceOut * LVL1TGCTrigger::TGCRPhiCoincidenceMatrix::doCoincidence ( )

Definition at line 59 of file TGCRPhiCoincidenceMatrix.cxx.

60 {
61  TGCRPhiCoincidenceOut* out = new TGCRPhiCoincidenceOut;
62  out->clear();
63 
64  if(m_nPhiHit ==0) return out;
65 
66  out->setIdSSC(m_SSCId);
67 
68  int j0 = -1;
69  int ptMax = 1;
70  for( int j=m_nPhiHit-1; j>=0; j-=1){ // left half-SSC has priority when both output same pT
71  int subsector;
72  int chargeOut = 2;
73  int CoincidenceTypeOut=-1;
74 
76  subsector = 4*(2*m_SSCId+m_r-1)+m_phi[j];
77  } else {
78  subsector = 4*(2*m_SSCId+m_r)+m_phi[j];
79  }
80 
81  // calculate pT of muon candidate
82  int type = m_lut->getMapType(m_ptR, m_ptPhi[j]);
84  subsector,type,m_dR,m_dPhi[j]);
85  uint8_t ptOut = std::abs(pt); // 0 is no candidate.
86  chargeOut = pt<0 ? 0:1;
87  // the charge is inverted on the C-side.
88  chargeOut = m_sideId == 0 ? chargeOut : !chargeOut;
89 
90  CoincidenceTypeOut=(type==0);
91 
92  // Trigger Out (only pT>0 candidate)
93  if(ptOut >= ptMax) {
94  ptMax = ptOut;
95  out->clear();
96  out->setIdSSC(m_SSCId);
97  out->setpT(ptMax);
98  out->setR(m_r);
99  out->setPhi(m_phi[j]);
100  out->setDR(m_dR);
101  out->setDPhi(m_dPhi[j]);
102  out->setRoI(subsector);
103  out->setCharge(chargeOut);
104  out->setCoincidenceType(CoincidenceTypeOut);
105  j0 = j;
106  }
107  }
108 
109  if (tgcArgs()->MSGLEVEL() <= MSG::DEBUG){
110  MsgStream log(Athena::getMessageSvc(), "LVL1TGCTrigger::TGCRPhiCoincidenceMatrix");
111  if (j0>0) {
112  log << MSG::DEBUG << " Trigger Out : "
113  << " pt =" << ptMax+1 << " R=" << m_r << " Phi=" << m_phi[j0]
114  << " ptR=" << m_ptR << " dR=" << m_dR
115  << " ptPhi=" << m_ptPhi[j0] << " dPhi=" << m_dPhi[j0]
116  << endmsg;
117  } else {
118  log << MSG::DEBUG << "NO Trigger Out : " << endmsg;
119  }
120  }
121 
122  //m_matrixOut = out;
123  return out;
124 }

◆ inputPhi()

void LVL1TGCTrigger::TGCRPhiCoincidenceMatrix::inputPhi ( int  phiIn,
int  dPhiIn,
int  ptPhiIn 
)

Definition at line 30 of file TGCRPhiCoincidenceMatrix.cxx.

31 {
33  m_phi[m_nPhiHit]=phiIn;
34  m_dPhi[m_nPhiHit]=dPhiIn;
35  m_ptPhi[m_nPhiHit]=ptPhiIn;
36 
37 #ifdef TGCDEBUG
38  std::cout <<"LVL1TGCTrigger::TGCRPhiCoincidenceMatrix "
39  << "inputPhi phi" << m_nPhiHit << "="<< m_phi[m_nPhiHit]
40  << " dPhi=" << m_dPhi[m_nPhiHit] << " H/L=" << m_ptPhi[m_nPhiHit]
41  << std::endl;
42 #endif
43 
44  m_nPhiHit++;
45  }
46 }

◆ inputR()

void LVL1TGCTrigger::TGCRPhiCoincidenceMatrix::inputR ( int  rIn,
int  dRIn,
int  ptRIn 
)

Definition at line 18 of file TGCRPhiCoincidenceMatrix.cxx.

19 {
20  m_r=rIn;
21  m_dR=dRIn;
22  m_ptR=ptRIn;
23 
24 #ifdef TGCDEBUG
25  std::cout <<"LVL1TGCTrigger::TGCRPhiCoincidenceMatrix "
26  <<"inputR r=" <<m_r <<" dR=" <<m_dR <<" H/L=" <<m_ptR <<std::endl;
27 #endif
28 }

◆ operator=()

TGCRPhiCoincidenceMatrix & LVL1TGCTrigger::TGCRPhiCoincidenceMatrix::operator= ( const TGCRPhiCoincidenceMatrix right)

Definition at line 147 of file TGCRPhiCoincidenceMatrix.cxx.

148 {
149  if (this != &right){
150  m_sideId = right.m_sideId;
151  m_tgcArgs = right.m_tgcArgs;
152  m_sectorLogic = right.m_sectorLogic;
153  delete m_matrixOut;
154  m_matrixOut =0;
155  m_nPhiHit = 0;
156  m_SSCId = 0;
157  m_r = 0;
158  m_dR = 0;
159  m_ptR = 0;
160  for (int i=0; i<MaxNPhiHit; i++) {
161  m_phi[i]=0;
162  m_dPhi[i]=0;
163  m_ptPhi[i]=0;
164  }
165  }
166  return *this;
167 }

◆ setCoincidenceLUT()

void LVL1TGCTrigger::TGCRPhiCoincidenceMatrix::setCoincidenceLUT ( std::shared_ptr< const LVL1TGC::BigWheelCoincidenceLUT lut)

Definition at line 126 of file TGCRPhiCoincidenceMatrix.cxx.

126  {
127  this->m_lut = lut;
128 }

◆ setSideId()

void LVL1TGCTrigger::TGCRPhiCoincidenceMatrix::setSideId ( int  sideIdIn)
inline

Definition at line 23 of file TGCRPhiCoincidenceMatrix.h.

23 { m_sideId=sideIdIn;};

◆ setSSCId()

void LVL1TGCTrigger::TGCRPhiCoincidenceMatrix::setSSCId ( int  SSCIdIn)
inline

Definition at line 22 of file TGCRPhiCoincidenceMatrix.h.

22 { m_SSCId=SSCIdIn;};

◆ tgcArgs()

const TGCArguments* LVL1TGCTrigger::TGCRPhiCoincidenceMatrix::tgcArgs ( ) const
inline

Definition at line 36 of file TGCRPhiCoincidenceMatrix.h.

36 { return m_tgcArgs; }

Member Data Documentation

◆ m_dPhi

int LVL1TGCTrigger::TGCRPhiCoincidenceMatrix::m_dPhi[MaxNPhiHit]
private

Definition at line 52 of file TGCRPhiCoincidenceMatrix.h.

◆ m_dR

int LVL1TGCTrigger::TGCRPhiCoincidenceMatrix::m_dR
private

Definition at line 49 of file TGCRPhiCoincidenceMatrix.h.

◆ m_lut

std::shared_ptr<const LVL1TGC::BigWheelCoincidenceLUT> LVL1TGCTrigger::TGCRPhiCoincidenceMatrix::m_lut
private

Definition at line 44 of file TGCRPhiCoincidenceMatrix.h.

◆ m_matrixOut

TGCRPhiCoincidenceOut* LVL1TGCTrigger::TGCRPhiCoincidenceMatrix::m_matrixOut
private

Definition at line 43 of file TGCRPhiCoincidenceMatrix.h.

◆ m_nPhiHit

int LVL1TGCTrigger::TGCRPhiCoincidenceMatrix::m_nPhiHit
private

Definition at line 46 of file TGCRPhiCoincidenceMatrix.h.

◆ m_phi

int LVL1TGCTrigger::TGCRPhiCoincidenceMatrix::m_phi[MaxNPhiHit]
private

Definition at line 51 of file TGCRPhiCoincidenceMatrix.h.

◆ m_ptPhi

int LVL1TGCTrigger::TGCRPhiCoincidenceMatrix::m_ptPhi[MaxNPhiHit]
private

Definition at line 53 of file TGCRPhiCoincidenceMatrix.h.

◆ m_ptR

int LVL1TGCTrigger::TGCRPhiCoincidenceMatrix::m_ptR
private

Definition at line 50 of file TGCRPhiCoincidenceMatrix.h.

◆ m_r

int LVL1TGCTrigger::TGCRPhiCoincidenceMatrix::m_r
private

Definition at line 48 of file TGCRPhiCoincidenceMatrix.h.

◆ m_sectorLogic

const TGCSectorLogic* LVL1TGCTrigger::TGCRPhiCoincidenceMatrix::m_sectorLogic
private

Definition at line 41 of file TGCRPhiCoincidenceMatrix.h.

◆ m_sideId

int LVL1TGCTrigger::TGCRPhiCoincidenceMatrix::m_sideId
private

Definition at line 54 of file TGCRPhiCoincidenceMatrix.h.

◆ m_SSCId

int LVL1TGCTrigger::TGCRPhiCoincidenceMatrix::m_SSCId
private

Definition at line 47 of file TGCRPhiCoincidenceMatrix.h.

◆ m_tgcArgs

const TGCArguments* LVL1TGCTrigger::TGCRPhiCoincidenceMatrix::m_tgcArgs
private

Definition at line 56 of file TGCRPhiCoincidenceMatrix.h.


The documentation for this class was generated from the following files:
LVL1TGCTrigger::TGCRegionType::ENDCAP
@ ENDCAP
LVL1TGCTrigger::TGCRPhiCoincidenceMatrix::m_sideId
int m_sideId
Definition: TGCRPhiCoincidenceMatrix.h:54
LVL1TGCTrigger::TGCSectorLogic::getRegion
TGCRegionType getRegion() const
Definition: TGCSectorLogic.h:62
LVL1TGCTrigger::TGCRPhiCoincidenceMatrix::m_SSCId
int m_SSCId
Definition: TGCRPhiCoincidenceMatrix.h:47
LVL1TGCTrigger::TGCRPhiCoincidenceMatrix::m_ptPhi
int m_ptPhi[MaxNPhiHit]
Definition: TGCRPhiCoincidenceMatrix.h:53
LVL1TGCTrigger::TGCRPhiCoincidenceMatrix::m_ptR
int m_ptR
Definition: TGCRPhiCoincidenceMatrix.h:50
LVL1TGCTrigger::TGCRPhiCoincidenceMatrix::m_matrixOut
TGCRPhiCoincidenceOut * m_matrixOut
Definition: TGCRPhiCoincidenceMatrix.h:43
xAOD::uint8_t
uint8_t
Definition: Muon_v1.cxx:557
LVL1TGCTrigger::TGCSectorLogic::getOctantID
int getOctantID() const
Definition: TGCSectorLogic.h:185
LVL1TGCTrigger::TGCRPhiCoincidenceMatrix::m_sectorLogic
const TGCSectorLogic * m_sectorLogic
Definition: TGCRPhiCoincidenceMatrix.h:41
LVL1TGCTrigger::TGCRPhiCoincidenceMatrix::m_nPhiHit
int m_nPhiHit
Definition: TGCRPhiCoincidenceMatrix.h:46
test_pyathena.pt
pt
Definition: test_pyathena.py:11
python.AthDsoLogger.out
out
Definition: AthDsoLogger.py:71
LVL1TGCTrigger::TGCRPhiCoincidenceMatrix::m_phi
int m_phi[MaxNPhiHit]
Definition: TGCRPhiCoincidenceMatrix.h:51
LVL1TGCTrigger::TGCRPhiCoincidenceMatrix::m_dPhi
int m_dPhi[MaxNPhiHit]
Definition: TGCRPhiCoincidenceMatrix.h:52
LVL1TGCTrigger::TGCRPhiCoincidenceMatrix::tgcArgs
const TGCArguments * tgcArgs() const
Definition: TGCRPhiCoincidenceMatrix.h:36
LVL1TGCTrigger::TGCRPhiCoincidenceMatrix::m_r
int m_r
Definition: TGCRPhiCoincidenceMatrix.h:48
LVL1TGCTrigger::TGCRPhiCoincidenceMatrix::m_dR
int m_dR
Definition: TGCRPhiCoincidenceMatrix.h:49
LVL1TGCTrigger::TGCRPhiCoincidenceMatrix::MaxNPhiHit
@ MaxNPhiHit
Definition: TGCRPhiCoincidenceMatrix.h:39
LVL1TGCTrigger::TGCSectorLogic::getModuleID
int getModuleID() const
Definition: TGCSectorLogic.h:178
Athena::getMessageSvc
IMessageSvc * getMessageSvc(bool quiet=false)
Definition: getMessageSvc.cxx:20
ITkPixEncoding::lut
constexpr auto lut(Generator &&f)
Definition: ITkPixQCoreEncodingLUT.h:19
lumiFormat.i
int i
Definition: lumiFormat.py:85
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
LVL1TGCTrigger::TGCRPhiCoincidenceMatrix::m_lut
std::shared_ptr< const LVL1TGC::BigWheelCoincidenceLUT > m_lut
Definition: TGCRPhiCoincidenceMatrix.h:44
LVL1TGCTrigger::TGCArguments::MSGLEVEL
MSG::Level MSGLEVEL() const
Definition: TGCArguments.cxx:40
LVL1TGCTrigger::TGCRPhiCoincidenceMatrix::m_tgcArgs
const TGCArguments * m_tgcArgs
Definition: TGCRPhiCoincidenceMatrix.h:56
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
DEBUG
#define DEBUG
Definition: page_access.h:11
python.CaloCondTools.log
log
Definition: CaloCondTools.py:20