ATLAS Offline Software
Loading...
Searching...
No Matches
LPhiSector Struct Reference

#include <TrigTrackSeedGenerator.h>

Collaboration diagram for LPhiSector:

Classes

struct  compareR
struct  compareRless
struct  compareZ
struct  greaterThanR
struct  greaterThanR_i
struct  greaterThanZ
struct  smallerThanR
struct  smallerThanR_i
struct  smallerThanZ

Public Member Functions

 LPhiSector (int nPhiSlices)
 LPhiSector (const LPhiSector &ps)
const LPhiSectoroperator= (const LPhiSector &ps)
void reset ()
void addSpacePoint (int phiIndex, const INDEXED_SP *p)
void sortSpacePoints (bool isBarrel)
void sortSpacePoints (bool isBarrel, bool isPositive)
int size () const

Public Attributes

int m_nSP
std::vector< std::vector< const INDEXED_SP * > > m_phiSlices
std::vector< std::vector< const INDEXED_SP * > > m_phiThreeSlices
std::vector< int > m_threeIndices [3]

Private Member Functions

 LPhiSector ()

Detailed Description

Definition at line 32 of file TrigTrackSeedGenerator.h.

Constructor & Destructor Documentation

◆ LPhiSector() [1/3]

LPhiSector::LPhiSector ( int nPhiSlices)
inline

Definition at line 91 of file TrigTrackSeedGenerator.h.

91 : m_nSP(0) {
92 std::vector<const INDEXED_SP*> d;
93 m_phiSlices.resize(nPhiSlices, d);
94 m_phiThreeSlices.resize(nPhiSlices, d);
95 if(nPhiSlices == 1) {//special case
96 m_threeIndices[1].push_back(0);
97 m_threeIndices[0].push_back(-1);
98 m_threeIndices[2].push_back(-1);
99 }
100 if(nPhiSlices == 2) {//special case
101 m_threeIndices[1].push_back(0);
102 m_threeIndices[0].push_back(-1);
103 m_threeIndices[2].push_back(1);
104 m_threeIndices[1].push_back(1);
105 m_threeIndices[0].push_back(0);
106 m_threeIndices[2].push_back(-1);
107 }
108 if(nPhiSlices > 2) {
109 for(int phiIdx=0;phiIdx<nPhiSlices;phiIdx++) {
110 m_threeIndices[1].push_back(phiIdx);
111 if(phiIdx>0) m_threeIndices[0].push_back(phiIdx-1);
112 else m_threeIndices[0].push_back(nPhiSlices-1);
113 if(phiIdx<nPhiSlices-1) m_threeIndices[2].push_back(phiIdx+1);
114 else m_threeIndices[2].push_back(0);
115 }
116 }
117}
std::vector< std::vector< const INDEXED_SP * > > m_phiThreeSlices
std::vector< int > m_threeIndices[3]
std::vector< std::vector< const INDEXED_SP * > > m_phiSlices

◆ LPhiSector() [2/3]

LPhiSector::LPhiSector ( const LPhiSector & ps)
inline

Definition at line 119 of file TrigTrackSeedGenerator.h.

119 : m_nSP(ps.m_nSP), m_phiSlices(ps.m_phiSlices), m_phiThreeSlices(ps.m_phiThreeSlices) {
120 for(int i=0;i<3;i++) {
121 m_threeIndices[i] = ps.m_threeIndices[i];
122 }
123}

◆ LPhiSector() [3/3]

LPhiSector::LPhiSector ( )
inlineprivate

Definition at line 194 of file TrigTrackSeedGenerator.h.

194{};

Member Function Documentation

◆ addSpacePoint()

void LPhiSector::addSpacePoint ( int phiIndex,
const INDEXED_SP * p )
inline

Definition at line 145 of file TrigTrackSeedGenerator.h.

145 {
146 m_nSP++;
147 m_phiSlices[phiIndex].push_back(p);
148 for(int i=0;i<3;i++) {
149 if(m_threeIndices[i][phiIndex]==-1) continue;//to account for special cases nPhiSlices=1,2
151 }
152 }
unsigned int phiIndex(float phi, float binsize)
calculate phi index for a given phi
Definition EtaPhiLUT.cxx:23

◆ operator=()

const LPhiSector & LPhiSector::operator= ( const LPhiSector & ps)
inline

Definition at line 125 of file TrigTrackSeedGenerator.h.

125 {
126 m_nSP = ps.m_nSP;
127 m_phiSlices = ps.m_phiSlices;
128 m_phiThreeSlices = ps.m_phiThreeSlices;
129 for(int i=0;i<3;i++) {
130 m_threeIndices[i] = ps.m_threeIndices[i];
131 }
132 return *this;
133 }

◆ reset()

void LPhiSector::reset ( )
inline

Definition at line 135 of file TrigTrackSeedGenerator.h.

135 {
136 for(std::vector<std::vector<const INDEXED_SP*> >::iterator it = m_phiSlices.begin();it!=m_phiSlices.end();++it) {
137 (*it).clear();
138 }
139 for(std::vector<std::vector<const INDEXED_SP*> >::iterator it = m_phiThreeSlices.begin();it!=m_phiThreeSlices.end();++it) {
140 (*it).clear();
141 }
142 m_nSP = 0;
143 }

◆ size()

int LPhiSector::size ( ) const
inline

Definition at line 186 of file TrigTrackSeedGenerator.h.

186{ return m_nSP; }

◆ sortSpacePoints() [1/2]

void LPhiSector::sortSpacePoints ( bool isBarrel)
inline

Definition at line 154 of file TrigTrackSeedGenerator.h.

154 {
155 for(std::vector<std::vector<const INDEXED_SP*> >::iterator it=m_phiSlices.begin();it!=m_phiSlices.end();++it) {
156 if((*it).empty()) continue;
157 if(isBarrel) std::sort(it->begin(), it->end(), compareZ());
158 else std::sort(it->begin(), it->end(), compareR());
159 }
160 for(std::vector<std::vector<const INDEXED_SP*> >::iterator it=m_phiThreeSlices.begin();it!=m_phiThreeSlices.end();++it) {
161 if((*it).empty()) continue;
162 if(isBarrel) std::sort(it->begin(), it->end(), compareZ());
163 else std::sort(it->begin(), it->end(), compareR());
164 }
165 }
void sort(typename DataModel_detail::iterator< DVL > beg, typename DataModel_detail::iterator< DVL > end)
Specialization of sort for DataVector/List.

◆ sortSpacePoints() [2/2]

void LPhiSector::sortSpacePoints ( bool isBarrel,
bool isPositive )
inline

Definition at line 167 of file TrigTrackSeedGenerator.h.

167 {
168 for(std::vector<std::vector<const INDEXED_SP*> >::iterator it=m_phiSlices.begin();it!=m_phiSlices.end();++it) {
169 if((*it).empty()) continue;
170 if(isBarrel) std::sort(it->begin(), it->end(), compareZ());
171 else {
172 if(isPositive) std::sort(it->begin(), it->end(), compareRless());
173 else std::sort(it->begin(), it->end(), compareR());
174 }
175 }
176 for(std::vector<std::vector<const INDEXED_SP*> >::iterator it=m_phiThreeSlices.begin();it!=m_phiThreeSlices.end();++it) {
177 if((*it).empty()) continue;
178 if(isBarrel) std::sort(it->begin(), it->end(), compareZ());
179 else {
180 if(isPositive) std::sort(it->begin(), it->end(), compareRless());
181 else std::sort(it->begin(), it->end(), compareR());
182 }
183 }
184 }

Member Data Documentation

◆ m_nSP

int LPhiSector::m_nSP

Definition at line 188 of file TrigTrackSeedGenerator.h.

◆ m_phiSlices

std::vector<std::vector<const INDEXED_SP*> > LPhiSector::m_phiSlices

Definition at line 189 of file TrigTrackSeedGenerator.h.

◆ m_phiThreeSlices

std::vector<std::vector<const INDEXED_SP*> > LPhiSector::m_phiThreeSlices

Definition at line 190 of file TrigTrackSeedGenerator.h.

◆ m_threeIndices

std::vector<int> LPhiSector::m_threeIndices[3]

Definition at line 191 of file TrigTrackSeedGenerator.h.


The documentation for this struct was generated from the following file: