31 double baseScorePerHit = 17.;
43 double hitQualityScore;
47 hitQualityScore = (1.2 * (baseScorePerHit -
x2 * .5));
49 hitQualityScore = (baseScorePerHit -
x2);
50 if (hitQualityScore < 0.)
53 quality += hitQualityScore;
102 return StatusCode::SUCCESS;
115 if (!
key.key().empty()) {
132 ATH_CHECK(outputTracks.record(std::make_unique<TrackCollection>()));
143 auto theVertexContainer = std::make_unique<xAOD::VertexContainer>();
144 auto theVertexAuxContainer = std::make_unique<xAOD::VertexAuxContainer>();
145 theVertexContainer->setStore( theVertexAuxContainer.get() );
149 std::vector<InDet::IZWindowRoISeedTool::ZWindow> listRoIs;
151 double ZBoundary[2] = {0.0, 0.0};
153 if ( listRoIs.empty() ) {
157 ZBoundary[0] = listRoIs[0].zWindow[0];
158 ZBoundary[1] = listRoIs[0].zWindow[1];
159 ATH_MSG_DEBUG(
"selectedRoIs " << ZBoundary[0] <<
" " << ZBoundary[1]);
169 for(
size_t r = 0;
r < listRoIs.size();
r++ ){
173 theVertexContainer->back()->setZ( listRoIs[
r].zReference );
174 vtxDecor_boundaryLow(*theVertexContainer->back()) = listRoIs[
r].zWindow[0];;
175 vtxDecor_boundaryHigh(*theVertexContainer->back()) = listRoIs[
r].zWindow[1];
176 vtxDecor_perigeeZ0Lead(*theVertexContainer->back()) = listRoIs[
r].zPerigeePos[0];
177 vtxDecor_perigeeZ0Sublead(*theVertexContainer->back()) = listRoIs[
r].zPerigeePos[1];
178 vtxDecor_isHS(*theVertexContainer->back()) = 1;
187 double RandZBoundary[2];
188 std::vector<InDet::IZWindowRoISeedTool::ZWindow> listRandRoIs;
193 while( std::abs( listRoIs[0].zReference - listRandRoIs[0].zReference ) < 5. || std::abs(listRandRoIs[0].zReference) > 250.0 ){
194 listRandRoIs.clear();
198 RandZBoundary[0] = listRandRoIs[0].zWindow[0];
199 RandZBoundary[1] = listRandRoIs[0].zWindow[1];
200 for(
size_t r = 0;
r < listRandRoIs.size();
r++ ){
204 theVertexContainer->back()->setZ( listRandRoIs[
r].zReference );
205 vtxDecor_boundaryLow(*theVertexContainer->back()) = listRoIs[
r].zWindow[0];;
206 vtxDecor_boundaryHigh(*theVertexContainer->back()) = listRoIs[
r].zWindow[1];
207 vtxDecor_perigeeZ0Lead(*theVertexContainer->back()) = listRoIs[
r].zPerigeePos[0];
208 vtxDecor_perigeeZ0Sublead(*theVertexContainer->back()) = listRoIs[
r].zPerigeePos[1];
209 vtxDecor_isHS(*theVertexContainer->back()) = 0;
215 CHECK( vxOut_h.
record ( std::move(theVertexContainer), std::move(theVertexAuxContainer) ) );
221 if (not listRoIs.empty()) {
222 std::list<Trk::Vertex> VZ;
236 bool doWriteNtuple =
m_seedsmaker->getWriteNtupleBoolProperty();
237 unsigned long EvNumber = 0;
248 std::multimap<double,Trk::Track*> qualitySortedTrackCandidates;
251 while((seed =
m_seedsmaker->next(ctx, seedEventData))) {
253 const std::list<Trk::Track*> trackList =
m_trackmaker->getTracks(ctx, trackEventData, seed->spacePoints());
255 qualitySortedTrackCandidates.insert(std::make_pair( -trackQuality(
t),
t ));
260 if (seed->r3() > 200.) {
261 if (seed->r1() < 200.) {
267 m_seedsmaker->writeNtuple(seed, !trackList.empty() ? trackList.front() :
nullptr, seedType, EvNumber) ;
284 for (
const std::pair<const double, Trk::Track*> & qualityAndTrack: qualitySortedTrackCandidates) {
290 outputTracks->push_back(qualityAndTrack.second);
298 outputTracks->clear();
309 return StatusCode::SUCCESS;
319 dump(MSG::INFO, &m_counterTotal);
321 return StatusCode::SUCCESS;
330 msg(assign_level) <<std::endl;
331 MsgStream& out_msg=
msg();
346 std::string
s2;
for(
int i=0;
i<
n; ++
i)
s2.append(
" ");
s2.append(
"|");
348 std::string
s3;
for(
int i=0;
i<
n; ++
i)
s3.append(
" ");
s3.append(
"|");
350 std::string
s4;
for(
int i=0;
i<
n; ++
i)
s4.append(
" ");
s4.append(
"|");
352 out<<
"|----------------------------------------------------------------"
353 <<
"----------------------------------------------------|"
361 out<<
"|----------------------------------------------------------------"
362 <<
"----------------------------------------------------|"
376 out<<
"|-------------------------------------------------------------------|" <<std::endl;
377 out<<
"| Investigated "
378 <<std::setw(9)<<
ns<<
" space points seeds and found ";
379 out<<std::setw(9)<<
nt<<
" tracks using RoI-z strategy |"<<std::endl;
381 out<<
"|-------------------------------------------------------------------|" <<std::endl;
389 out<<
"|-------------------------------------------------------------------|" <<std::endl;
399 (std::multimap<double,Trk::Track*>& qualitySortedTracks)
const
401 std::set<const Trk::PrepRawData*>
clusters;
403 std::vector<const Trk::PrepRawData*> freeClusters;
404 freeClusters.reserve(15);
409 while (it_qualityAndTrack!=qualitySortedTracks.end()) {
410 freeClusters.clear();
429 if (not
pr)
continue;
435 freeClusters.push_back(
pr);
440 int nFreeClusters =
static_cast<int>(freeClusters.size());
441 if (nFreeClusters >=
m_nfreeCut || nFreeClusters==nClusters) {
444 clusters.insert(freeClusters.begin(), freeClusters.end());
447 ++it_qualityAndTrack;
450 int nFreeClusters =
static_cast<int>(freeClusters.size());
451 if(
passEtaDepCuts( (*it_qualityAndTrack).second, nClusters, nFreeClusters, nPixels) ){
453 ++it_qualityAndTrack;
456 delete (*it_qualityAndTrack).second;
457 qualitySortedTracks.erase(it_qualityAndTrack++);
462 delete (*it_qualityAndTrack).second;
463 qualitySortedTracks.erase(it_qualityAndTrack++);
490 if(!
par)
return false;
492 double eta = std::abs(
par->eta());
493 if(nClusters < m_etaDependentCutsSvc->getMinSiHitsAtEta(eta))
return false;
494 if(nFreeClusters < m_etaDependentCutsSvc->getMinSiNotSharedAtEta(eta))
return false;
496 if(nPixels < m_etaDependentCutsSvc->getMinPixelHitsAtEta(eta))
return false;