ATLAS Offline Software
Loading...
Searching...
No Matches
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 21 of file TGCRPhiCoincidenceMatrix.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
private
Enumerator
MaxNPhiHit 

Definition at line 40 of file TGCRPhiCoincidenceMatrix.h.

Constructor & Destructor Documentation

◆ TGCRPhiCoincidenceMatrix() [1/2]

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

Definition at line 131 of file TGCRPhiCoincidenceMatrix.cxx.

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

◆ ~TGCRPhiCoincidenceMatrix()

LVL1TGCTrigger::TGCRPhiCoincidenceMatrix::~TGCRPhiCoincidenceMatrix ( )
virtual

Definition at line 143 of file TGCRPhiCoincidenceMatrix.cxx.

144{
145 m_matrixOut=0;
146}

◆ TGCRPhiCoincidenceMatrix() [2/2]

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

Member Function Documentation

◆ clear()

void LVL1TGCTrigger::TGCRPhiCoincidenceMatrix::clear ( )

Definition at line 49 of file TGCRPhiCoincidenceMatrix.cxx.

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

◆ doCoincidence()

TGCRPhiCoincidenceOut * LVL1TGCTrigger::TGCRPhiCoincidenceMatrix::doCoincidence ( )

Definition at line 60 of file TGCRPhiCoincidenceMatrix.cxx.

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

◆ inputPhi()

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

Definition at line 31 of file TGCRPhiCoincidenceMatrix.cxx.

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

◆ inputR()

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

Definition at line 19 of file TGCRPhiCoincidenceMatrix.cxx.

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

◆ operator=()

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

Definition at line 148 of file TGCRPhiCoincidenceMatrix.cxx.

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

◆ setCoincidenceLUT()

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

Definition at line 127 of file TGCRPhiCoincidenceMatrix.cxx.

127 {
128 this->m_lut = std::move(lut);
129}

◆ setSideId()

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

Definition at line 24 of file TGCRPhiCoincidenceMatrix.h.

24{ m_sideId=sideIdIn;};

◆ setSSCId()

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

Definition at line 23 of file TGCRPhiCoincidenceMatrix.h.

23{ m_SSCId=SSCIdIn;};

◆ tgcArgs()

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

Definition at line 37 of file TGCRPhiCoincidenceMatrix.h.

37{ return m_tgcArgs; }

Member Data Documentation

◆ m_dPhi

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

Definition at line 53 of file TGCRPhiCoincidenceMatrix.h.

◆ m_dR

int LVL1TGCTrigger::TGCRPhiCoincidenceMatrix::m_dR
private

Definition at line 50 of file TGCRPhiCoincidenceMatrix.h.

◆ m_lut

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

Definition at line 45 of file TGCRPhiCoincidenceMatrix.h.

◆ m_matrixOut

TGCRPhiCoincidenceOut* LVL1TGCTrigger::TGCRPhiCoincidenceMatrix::m_matrixOut
private

Definition at line 44 of file TGCRPhiCoincidenceMatrix.h.

◆ m_nPhiHit

int LVL1TGCTrigger::TGCRPhiCoincidenceMatrix::m_nPhiHit
private

Definition at line 47 of file TGCRPhiCoincidenceMatrix.h.

◆ m_phi

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

Definition at line 52 of file TGCRPhiCoincidenceMatrix.h.

◆ m_ptPhi

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

Definition at line 54 of file TGCRPhiCoincidenceMatrix.h.

◆ m_ptR

int LVL1TGCTrigger::TGCRPhiCoincidenceMatrix::m_ptR
private

Definition at line 51 of file TGCRPhiCoincidenceMatrix.h.

◆ m_r

int LVL1TGCTrigger::TGCRPhiCoincidenceMatrix::m_r
private

Definition at line 49 of file TGCRPhiCoincidenceMatrix.h.

◆ m_sectorLogic

const TGCSectorLogic* LVL1TGCTrigger::TGCRPhiCoincidenceMatrix::m_sectorLogic
private

Definition at line 42 of file TGCRPhiCoincidenceMatrix.h.

◆ m_sideId

int LVL1TGCTrigger::TGCRPhiCoincidenceMatrix::m_sideId
private

Definition at line 55 of file TGCRPhiCoincidenceMatrix.h.

◆ m_SSCId

int LVL1TGCTrigger::TGCRPhiCoincidenceMatrix::m_SSCId
private

Definition at line 48 of file TGCRPhiCoincidenceMatrix.h.

◆ m_tgcArgs

const TGCArguments* LVL1TGCTrigger::TGCRPhiCoincidenceMatrix::m_tgcArgs
private

Definition at line 57 of file TGCRPhiCoincidenceMatrix.h.


The documentation for this class was generated from the following files: