48 const ToolHandle<Trig::TrigDecisionTool>* tdt,
const EventContext& context ) :
94 std::pair<xAOD::TrackParticleContainer::const_iterator, xAOD::TrackParticleContainer::const_iterator> itrpair;
97 fillv( trackView, itrpair.first, itrpair.second );
100 throw std::runtime_error(
"iterator pair not retrieved FFS for key: "+key );
122 std::pair<xAOD::VertexContainer::const_iterator, xAOD::VertexContainer::const_iterator> itrpair;
125 fillv( vertexView, itrpair.first, itrpair.second );
128 throw std::runtime_error(
"iterator pair not retrieved FFS for key: "+key );
147 if ( quality.empty() )
return true;
160 if ( quality.empty() )
return true;
163 if ( muon.muonType() != xAOD::Muon::Combined )
return false;
165 bool good_muon =
false;
169 if ( quality==
"Tight" ) good_muon = (muon.quality()<=xAOD::Muon::Quality::Tight);
170 else if ( quality==
"Medium" ) good_muon = (muon.quality()<=xAOD::Muon::Quality::Medium);
171 else if ( quality==
"Loose" ) good_muon = (muon.quality()<=xAOD::Muon::Quality::Loose);
172 else if ( quality==
"VeryLoose" ) good_muon = (muon.quality()<=xAOD::Muon::Quality::VeryLoose);
173 else good_muon =
true;
187 if ( quality.empty() && prongs.empty() )
return true;
189# ifndef XAODTAU_VERSIONS_TAUJET_V3_H
190 int Ntracks = tau.nTracks();
195 bool good_tau =
false;
204 else good_tau =
true;
212 if ( prongs.empty() )
return good_tau;
213 else if ( prongs==
"1Prong" && Ntracks==1 )
return good_tau;
214 else if ( prongs==
"2Prong" && Ntracks==2 )
return good_tau;
215 else if ( prongs==
"3Prong" && Ntracks==3 )
return good_tau;
241 if ( !tv )
throw std::runtime_error(
"not a TruthView");
245 if ( std::fabs(tv->
pt())<50 )
continue;
266 double bx = beamPosX(0);
267 double by = beamPosY(0);
268 double bz = beamPosZ(0);
277 double theta = 2*std::atan( std::exp( -
eta ) );
279 double sinphi = std::sin(
phi);
280 double cosphi = std::cos(
phi);
281 double tantheta = std::tan(
theta);
288 double z0 = dz - (dy*cosphi + dy*sinphi)/tantheta + bz;
289 double d0 = dy*cosphi - dx*sinphi;
307 const double c = 2.99792458;
309 double QR = -
charge*std::fabs(tv->
pt())*10/(B*c);
311 double nx =
sign*sinphi;
312 double ny = -
sign*cosphi;
314 double Cx = vx + QR*nx;
315 double Cy = vy + QR*ny;
317 double wx = Cx - beamPosX(0);
318 double wy = Cy - beamPosY(0);
320 double w = std::sqrt( wx*wx + wy*wy );
322 double d0 = w - std::fabs(QR);
327 double rpx = -std::fabs(QR)*wx/w;
328 double rpy = -std::fabs(QR)*wy/w;
330 double dphi =
sign*std::atan2( rvx*rpy - rvy*rpx, rvx*rpx + rvy*rpy );
337 double z0 = dz - s/tantheta + bz;
339 double phi = tp->
phi()-dphi;
Scalar eta() const
pseudorapidity method
Scalar phi() const
phi method
Scalar theta() const
theta method
double charge(const T &p)
emacs: this is -*- c++ -*-
AthMessaging(IMessageSvc *msgSvc, const std::string &name)
Constructor.
ElementLink implementation for ROOT usage.
std::vector< ParentView > m_parents
std::vector< std::unique_ptr< VertexView > > vtx_store_t
view_store_t m_reftracks
tracks
const ToolHandle< Trig::TrigDecisionTool > * m_tdt
Actually, actually, we don;t even need this AT ALL, it serves no purpose since we can control everyth...
StatusCode fillRoi(std::pair< typename T::const_iterator, typename T::const_iterator > &itrpair, const std::string &key, const ElementLink< TrigRoiDescriptorCollection > &roi_link)
more rational generic Roi fill method
bool isGoodOffline(const T &, const std::string &, const std::string &="")=delete
to be over ridden by selection for actual EDM classes
bool fillView_internal(const std::string &key, std::vector< std::unique_ptr< U > > &outView)
templates for athena type track and vertex retrieval ...
TrackAnalysisStore(const std::string &anaTag, const EventContext &context)
Constructor.
void fillView(const std::string &key, view_store_t &trackView)
track fillers ...
StatusCode initialize()
initialize this should not actually be needed - we should be creating a new instance whenever this is...
const beam_key_t * m_beamkeys
enable / diable local truth decoration handling
const std::string & anaTag()
— Setter methods —
const EventContext & m_context
std::vector< std::unique_ptr< TrackView > > view_store_t
polymoprphic master store types
Handle class for reading a decoration on an object.
a TrackView that can store a z0, d0, and phi because a TruthParticle doesn't have them
bool passSelection(bool &value, const std::string &menu) const
Check if the egamma object pass a selection menu (using the name) If the menu decision is stored in t...
bool hasProdVtx() const
Check for a production vertex on this particle.
const TruthVertex_v1 * prodVtx() const
The production vertex of this particle.
double charge() const
Physical charge.
virtual double eta() const override final
The pseudorapidity ( ) of the particle.
virtual double phi() const override final
The azimuthal angle ( ) of the particle.
float z() const
Vertex longitudinal distance along the beam line form the origin.
float y() const
Vertex y displacement.
float x() const
Vertex x displacement.
void fillv(std::vector< T > &t, Iterator first, Iterator last)
bool isStable(const T &p)
Identify if the particle is stable, i.e. has not decayed.
TauJet_v3 TauJet
Definition of the current "tau version".
TruthParticle_v1 TruthParticle
Typedef to implementation.
Muon_v1 Muon
Reference the current persistent version:
Electron_v1 Electron
Definition of the current "egamma version".