59 enum Alg{useInputPV=0, useFont};
75 useFullCalculation_(iConfig.getParameter<
bool>(
"useFullCalculation"))
77 produces<edm::AssociationVector<PFTauRefProd, std::vector<reco::PFTauTransverseImpactParameterRef> > >();
78 produces<PFTauTransverseImpactParameterCollection>(
"PFTauTIP");
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 isNonnull() const
Checks for non-null.
bool getByToken(EDGetToken token, Handle< PROD > &result) const
#define DEFINE_FWK_MODULE(type)
reco::TransientTrack build(const reco::Track *p) const
const MagneticField * field() const
key_type key() const
Accessor for product key.
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_
~PFTauTransverseImpactParameters() override
math::XYZPoint Point
point in the space
RefProd< PROD > getRefBeforePut()
PFTauTransverseImpactParameters
edm::Ref< PFTauTransverseImpactParameterCollection > PFTauTransverseImpactParameterRef
presistent reference to a PFTauTransverseImpactParameter
PFTauTransverseImpactParameters(const edm::ParameterSet &iConfig)
TrajectoryStateOnSurface impactPointState() const
std::vector< reco::PFTauTransverseImpactParameter > PFTauTransverseImpactParameterCollection
collection of PFTauTransverseImpactParameter objects
void produce(edm::Event &, const edm::EventSetup &) override