24 {
25
26 typedef struct SpIndexPair {
27 public:
28
29 struct compareZ {
30 public:
31 bool operator()(const std::pair<int, const TrigSiSpacePointBase*>& p1, const std::pair<int, const TrigSiSpacePointBase*>& p2) {
32 return p1.second->z() <
p2.second->z();
33 }
34 };
35
36 struct compareR {
37 public:
38 bool operator()(const std::pair<int, const TrigSiSpacePointBase*>& p1, const std::pair<int, const TrigSiSpacePointBase*>& p2) {
39 return p1.second->r() <
p2.second->r();
40 }
41 };
42
43 } SP_INDEX_PAIR;
44
45
46
47
48 const std::vector<short>& pixelLayers =
m_accelSvc->getLayerInformation(1);
49 const std::vector<short>& sctLayers =
m_accelSvc->getLayerInformation(2);
50 const std::vector<short>& layerTypes =
m_accelSvc->getLayerInformation(0);
51
52
53
54
56 const size_t bufferOffset = 256;
57 size_t totalSize = bufferOffset+dataTypeSize;
59
61
62
63 memset(pJ,0,dataTypeSize);
64
66
74
76
86
89
91
92
94
97 }
98
100
101 unsigned int nSP = vsp.size();
104 ATH_MSG_WARNING(
"MAX_NUMBER_SPACEPOINTS exceeded, exported data truncated ...");
105 }
106
107
108
110 int nLayers = static_cast<int>(layerTypes.size());
112
113 std::vector<std::vector<std::pair<int, const TrigSiSpacePointBase*> > > phiLArray;
114 phiLArray.resize(nLayers*nSlices);
115
116 for(
unsigned int i=0;
i<nSP;
i++) {
117 const TrigSiSpacePointBase&
sp = vsp[
i];
118 const std::pair<IdentifierHash, IdentifierHash>& els =
sp.offlineSpacePoint()->elementIdList();
119
120 IdentifierHash hashId = els.first;
121 short layerId = -1;
123 layerId = pixelLayers[hashId];
125 layerId = sctLayers[hashId];
126 } else {
127
128 continue;
129 }
130
131 int phiIdx = (
sp.phi()+
M_PI)/phiSliceWidth;
134 }
135 else if (phiIdx < 0) {
138 }
139
140 std::vector<std::pair<int, const TrigSiSpacePointBase*> >&
v = phiLArray[layerId + phiIdx*nLayers];
141 v.push_back(std::pair<int, const TrigSiSpacePointBase*>(i,&
sp));
142 }
143
144
145 int layerIdx=0;
146 for(std::vector<short>::const_iterator it = layerTypes.begin();it!=layerTypes.end();++it, layerIdx++) {
147 short barrel_ec = (*it);
149 std::vector<std::pair<int, const TrigSiSpacePointBase*> >&
v = phiLArray[layerIdx +
slice*nLayers];
150 if(barrel_ec==0)
std::sort(
v.begin(),
v.end(), SP_INDEX_PAIR::compareZ());
151 else std::sort(
v.begin(),
v.end(), SP_INDEX_PAIR::compareR());
152 }
153 }
154
158
159 int spIdx=0;
162 int layerStart = spIdx;
163 std::vector<std::pair<int, const TrigSiSpacePointBase*> >&
v = phiLArray[
layer +
slice*nLayers];
164 for(std::vector<std::pair<int, const TrigSiSpacePointBase*> >::iterator it =
v.begin();it!=
v.end();++it) {
165 const TrigSiSpacePointBase*
sp = (*it).second;
166 sps.
m_index[spIdx] = (*it).first;
167 sps.
m_type[spIdx] =
sp->isPixel() ? 1 : 2;
168 sps.
m_x[spIdx] =
sp->x();
169 sps.
m_y[spIdx] =
sp->y();
170 sps.
m_z[spIdx] =
sp->z();
171 sps.
m_r[spIdx] =
sp->r();
175 spIdx++;
176 }
177 int layerEnd = spIdx;
180 }
181 }
182
184
185}
#define ATH_MSG_WARNING(x)
static unsigned int totalSize(const MultiDimArray< T, N > &ht)
virtual bool isFullscan() const =0
is this a full detector RoI?
virtual double phiPlus() const =0
extreme phi values
virtual double zedPlus() const =0
the zed and eta values at the most forward and most rear ends of the RoI
virtual double phiMinus() const =0
virtual double zedMinus() const =0
virtual double etaPlus() const =0
virtual bool composite() const =0
Super RoI access methods.
static constexpr unsigned int MAX_NUMBER_SPACEPOINTS
struct TrigAccel::SeedFinderSettings SEED_FINDER_SETTINGS
struct TrigAccel::SeedMakingJob SEED_MAKING_JOB
struct TrigAccel::SpacePointStorage SPACEPOINT_STORAGE
void sort(typename DataModel_detail::iterator< DVL > beg, typename DataModel_detail::iterator< DVL > end)
Specialization of sort for DataVector/List.
unsigned int m_minEndcapPix
unsigned int m_maxBarrelPix
float m_tripletD0_PPS_Max
unsigned int m_maxTripletBufferLength
unsigned int m_maxSiliconLayer
unsigned int m_maxEndcapPix
SEED_FINDER_SETTINGS m_settings
SPACEPOINT_STORAGE m_data
int m_layerEnd[MAX_SILICON_LAYERS]
int m_layerBegin[MAX_SILICON_LAYERS]
float m_covR[MAX_NUMBER_SPACEPOINTS]
int m_index[MAX_NUMBER_SPACEPOINTS]
float m_phi[MAX_NUMBER_SPACEPOINTS]
float m_y[MAX_NUMBER_SPACEPOINTS]
float m_x[MAX_NUMBER_SPACEPOINTS]
float m_r[MAX_NUMBER_SPACEPOINTS]
float m_z[MAX_NUMBER_SPACEPOINTS]
int m_type[MAX_NUMBER_SPACEPOINTS]
float m_covZ[MAX_NUMBER_SPACEPOINTS]
SPACEPOINT_LAYER_RANGE m_phiSlices[MAX_PHI_SLICES]
unsigned int m_maxTripletBufferLength
float m_tripletD0_PPS_Max