59 enum Alg{useInputPV=0, useFont};
72 PFTauToken_(consumes<std::vector<
reco::
PFTau> >(iConfig.getParameter<edm::
InputTag>(
"PFTauTag"))),
75 useFullCalculation_(iConfig.getParameter<bool>(
"useFullCalculation"))
77 produces<edm::AssociationVector<PFTauRefProd, std::vector<reco::PFTauTransverseImpactParameterRef> > >();
78 produces<PFTauTransverseImpactParameterCollection>(
"PFTauTIP");
100 auto_ptr<edm::AssociationVector<PFTauRefProd, std::vector<reco::PFTauTransverseImpactParameterRef> > > AVPFTauTIP(
new edm::AssociationVector<
PFTauRefProd, std::vector<reco::PFTauTransverseImpactParameterRef> >(
PFTauRefProd(Tau)));
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()){
118 reco::TransientTrack transTrk=transTrackBuilder->build(RefPFTau->leadPFChargedHadrCand()->trackRef());
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);
164 iEvent.
put(TIPCollection_out,
"PFTauTIP");
165 iEvent.
put(AVPFTauTIP);
reco::Vertex::Point convertPos(const GlobalPoint &p)
bool isNonnull() const
Checks for non-null.
bool getByToken(EDGetToken token, Handle< PROD > &result) const
#define DEFINE_FWK_MODULE(type)
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_
virtual void produce(edm::Event &, const edm::EventSetup &)
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
math::XYZPoint Point
point in the space
RefProd< PROD > getRefBeforePut()
edm::Ref< PFTauTransverseImpactParameterCollection > PFTauTransverseImpactParameterRef
presistent reference to a PFTauTransverseImpactParameter
PFTauTransverseImpactParameters(const edm::ParameterSet &iConfig)
tuple PFTauTransverseImpactParameters
TrajectoryStateOnSurface impactPointState() const
std::vector< reco::PFTauTransverseImpactParameter > PFTauTransverseImpactParameterCollection
collection of PFTauTransverseImpactParameter objects
~PFTauTransverseImpactParameters()