100 auto AVPFTauTIP = std::make_unique< edm::AssociationVector<PFTauRefProd, std::vector<reco::PFTauTransverseImpactParameterRef>>>(
PFTauRefProd(Tau));
101 auto TIPCollection_out = std::make_unique<PFTauTransverseImpactParameterCollection>();
110 const std::vector<reco::VertexRef>
SV=PFTauSVA->value(RefPFTau.key());
111 double dxy(-999), dxy_err(-999);
113 double ip3d(-999), ip3d_err(-999);
115 if(RefPFTau->leadPFChargedHadrCand().isNonnull()){
116 if(RefPFTau->leadPFChargedHadrCand()->trackRef().isNonnull()){
119 GlobalVector direction(RefPFTau->p4().px(), RefPFTau->p4().py(), RefPFTau->p4().pz());
121 dxy=signed_IP2D.second.value();
122 dxy_err=signed_IP2D.second.error();
124 ip3d=signed_IP3D.second.value();
125 ip3d_err=signed_IP3D.second.error();
134 dxy_err=RefPFTau->leadPFChargedHadrCand()->trackRef()->d0Error();
135 dxy=RefPFTau->leadPFChargedHadrCand()->trackRef()->dxy(PV->position());
136 ip3d_err=RefPFTau->leadPFChargedHadrCand()->trackRef()->dzError();
137 ip3d=RefPFTau->leadPFChargedHadrCand()->trackRef()->dz(PV->position());
146 cov(
i,j)=SV.at(0)->covariance(
i,j)+PV->covariance(
i,j);
149 GlobalVector direction(RefPFTau->px(),RefPFTau->py(),RefPFTau->pz());
150 double vSig = SecondaryVertex::computeDist3d(*PV,*SV.at(0),direction,
true).
significance();
153 TIPCollection_out->push_back(TIPV);
154 AVPFTauTIP->setValue(iPFTau,TIPVRef);
159 TIPCollection_out->push_back(TIPV);
160 AVPFTauTIP->setValue(iPFTau,TIPVRef);
reco::Vertex::Point convertPos(const GlobalPoint &p)
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()
edm::Ref< PFTauTransverseImpactParameterCollection > PFTauTransverseImpactParameterRef
presistent reference to a PFTauTransverseImpactParameter
TrajectoryStateOnSurface impactPointState() const
std::vector< reco::PFTauTransverseImpactParameter > PFTauTransverseImpactParameterCollection
collection of PFTauTransverseImpactParameter objects