93 auto AVPFTauTIP = std::make_unique< edm::AssociationVector<PFTauRefProd, std::vector<reco::PFTauTransverseImpactParameterRef>>>(
PFTauRefProd(Tau));
94 auto TIPCollection_out = std::make_unique<PFTauTransverseImpactParameterCollection>();
102 const std::vector<reco::VertexRef>
SV=PFTauSVA->value(RefPFTau.key());
103 double dxy(-999), dxy_err(-999);
105 double ip3d(-999), ip3d_err(-999);
107 if(RefPFTau->leadPFChargedHadrCand().isNonnull()){
109 if(RefPFTau->leadPFChargedHadrCand()->trackRef().isNonnull())
110 track = RefPFTau->leadPFChargedHadrCand()->trackRef().get();
111 else if(RefPFTau->leadPFChargedHadrCand()->gsfTrackRef().isNonnull())
112 track = RefPFTau->leadPFChargedHadrCand()->gsfTrackRef().get();
113 if(track !=
nullptr){
116 GlobalVector direction(RefPFTau->p4().px(), RefPFTau->p4().py(), RefPFTau->p4().pz());
118 dxy=signed_IP2D.second.value();
119 dxy_err=signed_IP2D.second.error();
121 ip3d=signed_IP3D.second.value();
122 ip3d_err=signed_IP3D.second.error();
132 dxy=track->
dxy(PV->position());
134 ip3d=track->
dz(PV->position());
143 cov(
i,j)=SV.at(0)->covariance(
i,j)+PV->covariance(
i,j);
146 GlobalVector direction(RefPFTau->px(),RefPFTau->py(),RefPFTau->pz());
147 double vSig = SecondaryVertex::computeDist3d(*PV,*SV.at(0),direction,
true).
significance();
150 TIPCollection_out->push_back(TIPV);
151 AVPFTauTIP->setValue(iPFTau,TIPVRef);
156 TIPCollection_out->push_back(TIPV);
157 AVPFTauTIP->setValue(iPFTau,TIPVRef);
reco::Vertex::Point convertPos(const GlobalPoint &p)
double d0Error() const
error on d0
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
bool getByToken(EDGetToken token, Handle< PROD > &result) const
reco::TransientTrack build(const reco::Track *p) const
const MagneticField * field() const
edm::RefProd< PFTauCollection > PFTauRefProd
references to PFTau collection
math::Error< dimension >::type CovarianceMatrix
covariance error matrix (3x3)
edm::EDGetTokenT< std::vector< reco::PFTau > > PFTauToken_
edm::EDGetTokenT< edm::AssociationVector< PFTauRefProd, std::vector< std::vector< reco::VertexRef > > > > PFTauSVAToken_
edm::EDGetTokenT< edm::AssociationVector< PFTauRefProd, std::vector< reco::VertexRef > > > PFTauPVAToken_
math::XYZPoint Point
point in the space
RefProd< PROD > getRefBeforePut()
double dz() const
dz parameter (= dsz/cos(lambda)). This is the track z0 w.r.t (0,0,0) only if the refPoint is close to...
double dzError() const
error on dz
edm::Ref< PFTauTransverseImpactParameterCollection > PFTauTransverseImpactParameterRef
presistent reference to a PFTauTransverseImpactParameter
TrajectoryStateOnSurface impactPointState() const
std::vector< reco::PFTauTransverseImpactParameter > PFTauTransverseImpactParameterCollection
collection of PFTauTransverseImpactParameter objects
double dxy() const
dxy parameter. (This is the transverse impact parameter w.r.t. to (0,0,0) ONLY if refPoint is close t...