|
ATLAS Offline Software
|
Go to the documentation of this file.
41 declareInterface<IDataRetriever>(
this);
48 "if true only write primary and secondary vertex, placeholder to be removed");
64 double diff1 = ( per1->parameters()[
Trk::d0] -
66 double diff2 = ( per1->parameters()[
Trk::z0] -
68 double diff3 = ( per1->parameters()[
Trk::phi0] -
70 double diff4 = ( per1->charge() -
72 double diff5 = ( per1->pT() -
75 matched = diff1+diff2+diff3+diff4+diff5 == 0.;
100 std::string searchStr =
"TrackParticle";
104 if (
found!=std::string::npos){
106 if (
msgLvl(MSG::WARNING))
msg(MSG::WARNING) <<
"Unable to retrieve track collection"
123 if (
msgLvl(MSG::WARNING))
msg(MSG::WARNING) <<
"Unable to retrieve track collection"
130 const Trk::Perigee* trackPerigee = (*track)->perigeeParameters();
138 return StatusCode::SUCCESS;
155 return StatusCode::SUCCESS;
169 if (
msgLvl(MSG::WARNING))
msg(MSG::WARNING) <<
"Primary vertex container "
186 for ( ; vtxCollectionItr != vtxCollectionsEnd; ++vtxCollectionItr ) {
189 if ( (!
m_doWriteHLT) && ( vtxCollectionItr.
key().find(
"HLT") != std::string::npos)){
199 <<
" with " << NVtx <<
" entries" <<
endmsg;
202 x.reserve(
x.size()+NVtx);
203 y.reserve(
y.size()+NVtx);
204 z.reserve(
z.size()+NVtx);
205 primVxCand.reserve(primVxCand.size()+NVtx);
209 numTracks.reserve(numTracks.size()+NVtx);
213 if (!
sc.isFailure()) {
220 for ( ; vertexItr != vtxCollectionItr->end(); ++vertexItr) {
235 float this_chi2 = -1;
242 float this_x = (*vertexItr)->recVertex().position().x()/10.;
243 float this_y = (*vertexItr)->recVertex().position().y()/10.;
244 float this_z = (*vertexItr)->recVertex().position().z()/10.;
245 float R = std::hypot (this_x, this_y);
250 <<
", R: " << R <<
endmsg; }
252 chi2.emplace_back( this_chi2 );
253 x.emplace_back( this_x );
254 y.emplace_back( this_y );
255 z.emplace_back( this_z );
263 if ( &(*vtxCollectionItr) == primaryVtxCollection ){
264 if (
Trk::PriVtx == vtx_type ){ primVxCand.emplace_back( 1 );
265 }
else{ primVxCand.emplace_back( 0 ); }
266 }
else if ( &(*vtxCollectionItr) == secondaryVtxCollection ){
267 primVxCand.emplace_back( 2 );
269 primVxCand.emplace_back( 0 );
284 covMatrix.emplace_back(
"2 -.1 .5 -.01 0.002 .01");
294 const std::vector<Trk::VxTrackAtVertex*>* trklist = (*vertexItr)->vxTrackAtVertex();
298 numTracks.emplace_back( trklist->size() );
301 tracks.emplace_back( -1 );
310 dataMap[
"primVxCand"] = primVxCand;
313 dataMap[
"numTracks"] = numTracks;
318 if (!numTracks.empty()){
320 double NTracksPerVertex = tracks.size()*1./numTracks.size();
321 std::string
tag =
"tracks multiple=\"" +
DataType(NTracksPerVertex).toString()+
"\"";
std::vector< const Trk::Perigee * > m_perigeeVector
Const iterator class for DataVector/DataList.
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
const std::string & key() const
Get the key string with which the current object was stored.
Dummy class used to allow special convertors to be called for surfaces owned by a detector element.
std::vector< DataType > DataVect
Defines a map with a key and a vector of DataType objects e.g.
bool msgLvl(const MSG::Level lvl) const
double doubleNumberDoF() const
returns the number of degrees of freedom of the overall track or vertex fit as double
std::map< std::string, DataVect > DataMap
ServiceHandle< StoreGateSvc > & evtStore()
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
VertexRetriever(const std::string &t, const std::string &n, const IInterface *p)
Standard constructor.
std::string m_conversionVertexKey
StoreGate key for conversion candidate collection.
float m_chi2Cut
Chi^2 over NumberOfDegreesOfFreedom cut.
::StatusCode StatusCode
StatusCode definition for legacy code.
virtual std::string dataTypeName() const
Return the name of the data type.
double chi2(TH1 *h0, TH1 *h1)
Class to represent and store fit qualities from track reconstruction in terms of and number of degre...
void manualPerigeeMatch(const Trk::Perigee *per1, const Trk::Perigee *per2, bool &matched)
Manually match measured perigee d0,z0,phi0 of Trk::Track and Rec::TrackParticle, some problem with di...
This header is shared inbetween the C-style server thread and the C++ Athena ServerSvc.
std::string m_trackCollection
StoreGate key for track collection for association.
FitQualityOnSurface fitQuality(const MultiComponentState &, const MeasurementBase &)
Method for determining the chi2 of the multi-component state and the number of degrees of freedom.
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
std::string m_primaryVertexKey
StoreGate key for primary vertex candidate collection.
virtual StatusCode retrieve(ToolHandle< IFormatTool > &FormatTool)
Retrieve all the data.
virtual StatusCode fillPerigeeList()
Retrieve measured perigee, automatically switch between Trk::Track and Rec::TrackParticle depending o...
std::string m_secondaryVertexKey
StoreGate key for secondary vertex candidate collection.
bool m_doWriteHLT
wether to write HLTAutoKey objects
BASE::size_type size_type
size_type size() const noexcept
Returns the number of elements in the collection.
double chiSquared() const
returns the of the overall track fit
bool m_doWritePrimAndSecVertexOnly
write primary and secondary vertizes only - placeholder, to be removed
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.