Retrieve all the data.
For all vertex collections retrieve all data.
143 {
144
146
147
148
149 SG::ConstIterator<VxContainer> vtxCollectionItr, vtxCollectionsEnd;
151 if (
msgLvl(MSG::DEBUG ))
msg(MSG::DEBUG ) <<
"No VxContainer containers found in this event" <<
endmsg;
152 return StatusCode::SUCCESS;
153 }
154
155
158 if (
msgLvl(MSG::DEBUG ))
msg(MSG::DEBUG ) <<
"No Secondary vertex container found at SecVertices" <<
endmsg;
159 }else{
160 if (
msgLvl(MSG::DEBUG ))
msg(MSG::DEBUG ) <<
"Secondary vertex container size: " << secondaryVtxCollection->
size() <<
endmsg;
161 }
162
163
166 if (
msgLvl(MSG::WARNING))
msg(MSG::WARNING) <<
"Primary vertex container "
168 }
169
170
181
182
183 for ( ; vtxCollectionItr != vtxCollectionsEnd; ++vtxCollectionItr ) {
184
185
186 if ( (!
m_doWriteHLT) && ( vtxCollectionItr.
key().find(
"HLT") != std::string::npos)){
187 if (
msgLvl(MSG::DEBUG))
msg(MSG::DEBUG) <<
"Ignoring HLT collection " << vtxCollectionItr.
key() <<
endmsg;
188 continue;
189 }
190
191
193
195 << " with " << NVtx << " entries");
196
198 if (!
sc.isFailure()) {
200 }
201
202
204 for ( ; vertexItr != vtxCollectionItr->end(); ++vertexItr) {
206
207
208
209
211
215
216 Trk::FitQuality
fitQuality = (*vertexItr)->recVertex().fitQuality();
217
218
219 float this_chi2 = -1;
222 }
223
225
226 float this_x = (*vertexItr)->recVertex().position().x()/10.;
227 float this_y = (*vertexItr)->recVertex().position().y()/10.;
228 float this_z = (*vertexItr)->recVertex().position().z()/10.;
229 float R = std::hypot (this_x, this_y);
230
233
234 << ", R: " << R);
235
236 chi2.emplace_back( this_chi2 );
237 x.emplace_back( this_x );
238 y.emplace_back( this_y );
239 z.emplace_back( this_z );
240
241
244 ATH_MSG_DEBUG(
" collection " << vtxCollectionItr.
key() <<
": VertexType: " << vtx_type);
245
246
247 if ( &(*vtxCollectionItr) == primaryVtxCollection ){
248 if (
Trk::PriVtx == vtx_type ){ primVxCand.emplace_back( 1 );
249 }else{ primVxCand.emplace_back( 0 ); }
250 }else if ( &(*vtxCollectionItr) == secondaryVtxCollection ){
251 primVxCand.emplace_back( 2 );
252 }else{
253 primVxCand.emplace_back( 0 );
254 }
255
256
258
259
260
261
262
263
268 covMatrix.emplace_back(
"2 -.1 .5 -.01 0.002 .01");
269
274
275
276
277
278 const std::vector<Trk::VxTrackAtVertex*>* trklist = (*vertexItr)->vxTrackAtVertex();
279
281
282 numTracks.emplace_back( trklist->size() );
284
285 tracks.emplace_back( -1 );
286 }
287 }
288
289
294 dataMap[
"primVxCand"] = std::move(primVxCand);
296 dataMap[
"covMatrix multiple=\"6\""] = std::move(covMatrix);
297 const std::size_t nTracks = numTracks.size();
298 dataMap[
"numTracks"] = std::move(numTracks);
299 dataMap[
"sgkey"] = std::move(sgkey);
300 dataMap[
"vertexType"] = std::move(vertexType);
301
302
303 if (nTracks!=0){
304
305 double NTracksPerVertex = tracks.size()*1./nTracks;
306 std::string
tag =
"tracks multiple=\"" +
DataType(NTracksPerVertex).toString()+
"\"";
308 }
309
313
314 return FormatTool->AddToEvent(
dataTypeName(),
"", &dataMap);
315
316 }
Athena::TPCnvVers::Old VxContainer
ServiceHandle< StoreGateSvc > & evtStore()
bool msgLvl(const MSG::Level lvl) const
DataModel_detail::const_iterator< DataVector > const_iterator
typename DataVectorBase< Trk::VxCandidate >::Base::size_type size_type
size_type size() const noexcept
Returns the number of elements in the collection.
virtual std::string dataTypeName() const
Return the name of the data type.
virtual StatusCode fillPerigeeList()
Retrieve measured perigee, automatically switch between Trk::Track and Rec::TrackParticle depending o...
virtual StatusCode retrieve(ToolHandle< IFormatTool > &FormatTool)
Retrieve all the data.
const std::string & key() const
Get the key string with which the current object was stored.
double chiSquared() const
returns the of the overall track fit
double doubleNumberDoF() const
returns the number of degrees of freedom of the overall track or vertex fit as double
double chi2(TH1 *h0, TH1 *h1)
double R(const INavigable4Momentum *p1, const double v_eta, const double v_phi)
::StatusCode StatusCode
StatusCode definition for legacy code.
std::map< std::string, DataVect > DataMap
std::vector< DataType > DataVect
Defines a map with a key and a vector of DataType objects e.g.
FitQualityOnSurface fitQuality(const MultiComponentState &, const MeasurementBase &)
Method for determining the chi2 of the multi-component state and the number of degrees of freedom.
VertexType
This file defines the enums in the Trk namespace for the different vertex types.