|
ATLAS Offline Software
|
Go to the documentation of this file.
43 return StatusCode::SUCCESS;
74 double sigmaWidth = 0.0;
75 if(cent > 0) sigmaWidth =
atan(sqrt(
rad)/cent)*cosh(cl_eta);
76 sig_dec(*
cl) = sigmaWidth;
87 if(!vxCont->
empty()) pv0=(*vxCont)[0];
97 unsigned int ntracks = 0;
101 std::vector< ElementLink< xAOD::CaloClusterContainer > > & caloClusterLinks = assoClustDecor(*
tp);
107 ATH_MSG_DEBUG(
" Selected track " <<
tp->index() <<
" pt " <<
tp->pt() <<
" eta " <<
tp->eta() <<
" phi " <<
tp->phi() );
111 if (caloExtension ==
nullptr ) {
112 ATH_MSG_DEBUG(
" Selected track "<<
tp->index() <<
" has no caloExtension ");
117 std::vector<const xAOD::CaloCluster*> assoClusters =
associatedClusters( *caloExtension, *clusterContainer);
121 caloClusterLinks.reserve( assoClusters.size() );
122 for(
const xAOD::CaloCluster* cluster : assoClusters) caloClusterLinks.emplace_back( *clusterContainer,cluster->index() );
133 if (caloExtension ==
nullptr ) trkParamDecor( *
tp ) = nullptr ;
138 ATH_MSG_DEBUG(
" Total number of selected tracks: " << ntracks );
140 return StatusCode::SUCCESS;
146 std::vector<const xAOD::CaloCluster* >
clusters;
150 ATH_MSG_WARNING(
" NO TrackParameters caloExtension.caloEntryLayerIntersection() ");
154 float eta =
pars->position().eta();
155 float phi =
pars->position().phi();
157 double uncertEta = 0.;
158 double uncertPhi = 0.;
159 if(
pars->covariance()) {
163 double uncertExtrp = uncertEta*uncertEta + uncertPhi*uncertPhi;
177 cl_eta = detEta(*
cl);
184 float dr2Cut = dr2Cut0;
188 double sigmaWidth = sig_acc(*
cl);
189 double uncertClus = 2.*sigmaWidth*sigmaWidth;
190 if(uncertExtrp>uncertClus){
191 ATH_MSG_DEBUG(
"Extrapolation uncertainty larger than cluster width! Returning without association.");
195 dr2Cut = (sigmaWidth+uncertEta)*(sigmaWidth+uncertEta)+(sigmaWidth+uncertPhi)*(sigmaWidth+uncertPhi);
@ CENTER_MAG
Cluster Centroid ( )
@ SECOND_R
Second Moment in .
Gaudi::Property< bool > m_useCovariance
SG::ReadHandleKey< xAOD::VertexContainer > m_vertexContHandle
Scalar phi() const
phi method
SG::ReadHandleKey< xAOD::TrackParticleContainer > m_trackParticleCollectionHandle
SG::WriteDecorHandleKey< xAOD::TrackParticleContainer > m_assocClustersDecor
Tracking class to hold the extrapolation from a particle from the ID to the muon system (or the other...
Scalar eta() const
pseudorapidity method
StatusCode initialize() override
TrackParticleContainer_v1 TrackParticleContainer
Definition of the current "TrackParticle container version".
const TrackParameters * caloEntryLayerIntersection() const
access to intersection with the calorimeter entry layer return NULL if the intersection failed
Helper class to provide constant type-safe access to aux data.
const std::string & key() const
Return the StoreGate ID for the referenced object.
bool empty() const
Test if the key is blank.
SG::ReadDecorHandleKey< xAOD::CaloClusterContainer > m_detectorEtaDecor
Description of a calorimeter cluster.
double deltaPhi(double phiA, double phiB)
delta Phi in range [-pi,pi[
Handle class for reading a decoration on an object.
Helper class to provide type-safe access to aux data.
SG::WriteDecorHandleKey< xAOD::TrackParticleContainer > m_caloEntryParsDecor
Gaudi::Property< float > m_dr
::StatusCode StatusCode
StatusCode definition for legacy code.
bool dPhi(const xAOD::TauJet &tau, const xAOD::TauTrack &track, double &out)
Handle class for adding a decoration to an object.
TrackParticleClusterAssociationAlg(const std::string &name, ISvcLocator *pSvcLocator)
SG::ReadHandleKey< CaloExtensionCollection > m_caloExtKey
Handle class for adding a decoration to an object.
Gaudi::Property< double > m_ptCut
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
std::vector< const xAOD::CaloCluster * > associatedClusters(const Trk::CaloExtension &caloExtensions, const xAOD::CaloClusterContainer &allClusters)
returns the clusters from allClusters which are close enough to caloExtensions
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
Class describing a Vertex.
#define ATH_MSG_WARNING(x)
Handle class for reading a decoration on an object.
Class describing a TrackParticle.
ToolHandle< CP::ITrackVertexAssociationTool > m_trackvertexassoTool
bool dEta(const xAOD::TauJet &tau, const xAOD::TauTrack &track, double &out)
cl
print [x.__class__ for x in toList(dqregion.getSubRegions()) ]
size_type size() const noexcept
Returns the number of elements in the collection.
bool empty() const noexcept
Returns true if the collection is empty.
SG::ReadHandleKey< xAOD::CaloClusterContainer > m_caloClusters
Base class for elements of a container that can have aux data.
StatusCode execute() override