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 137 of file TGCRPhiCoincidenceMatrix.cxx.

138  : m_sectorLogic(sL),
139  m_matrixOut(0), m_lut(0),
140  m_nPhiHit(0), m_SSCId(0), m_r(0), m_dR(0), m_ptR(0), m_sideId(0), m_tgcArgs(tgcargs)
141 {
142  for (int i=0; i<MaxNPhiHit; i++) {
143  m_phi[i]=0;
144  m_dPhi[i]=0;
145  m_ptPhi[i]=0;
146  }
147 }

◆ ~TGCRPhiCoincidenceMatrix()

LVL1TGCTrigger::TGCRPhiCoincidenceMatrix::~TGCRPhiCoincidenceMatrix ( )
virtual

Definition at line 149 of file TGCRPhiCoincidenceMatrix.cxx.

150 {
151  m_matrixOut=0;
152 }

◆ TGCRPhiCoincidenceMatrix() [2/2]

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

Member Function Documentation

◆ clear()

void LVL1TGCTrigger::TGCRPhiCoincidenceMatrix::clear ( )

Definition at line 51 of file TGCRPhiCoincidenceMatrix.cxx.

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

◆ doCoincidence()

TGCRPhiCoincidenceOut * LVL1TGCTrigger::TGCRPhiCoincidenceMatrix::doCoincidence ( )

Definition at line 62 of file TGCRPhiCoincidenceMatrix.cxx.

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

◆ inputPhi()

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

Definition at line 33 of file TGCRPhiCoincidenceMatrix.cxx.

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

◆ inputR()

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

Definition at line 21 of file TGCRPhiCoincidenceMatrix.cxx.

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

◆ operator=()

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

Definition at line 154 of file TGCRPhiCoincidenceMatrix.cxx.

155 {
156  if (this != &right){
157  m_sideId = right.m_sideId;
158  m_tgcArgs = right.m_tgcArgs;
159  m_sectorLogic = right.m_sectorLogic;
160  delete m_matrixOut;
161  m_matrixOut =0;
162  m_nPhiHit = 0;
163  m_SSCId = 0;
164  m_r = 0;
165  m_dR = 0;
166  m_ptR = 0;
167  for (int i=0; i<MaxNPhiHit; i++) {
168  m_phi[i]=0;
169  m_dPhi[i]=0;
170  m_ptPhi[i]=0;
171  }
172  }
173  return *this;
174 }

◆ setCoincidenceLUT()

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

Definition at line 133 of file TGCRPhiCoincidenceMatrix.cxx.

133  {
134  this->m_lut = lut;
135 }

◆ 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:575
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::TGCSectorLogic::getModuleID
int getModuleID() const
Definition: TGCSectorLogic.h:178
ITkPixEncoding::lut
constexpr auto lut(Generator &&f)
Definition: ITkPixQCoreEncodingLUT.h:19
StdJOSetup.msgSvc
msgSvc
Provide convenience handles for various services.
Definition: StdJOSetup.py:36
lumiFormat.i
int i
Definition: lumiFormat.py:92
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::MaxNPhiHit
@ MaxNPhiHit
Definition: TGCRPhiCoincidenceMatrix.h:39
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