157 auto AVPFTau3PS = std::make_unique<edm::AssociationVector<PFTauRefProd, std::vector<reco::PFTau3ProngSummaryRef>>>(
159 auto PFTau3PSCollection_out = std::make_unique<PFTau3ProngSummaryCollection>();
178 bool passedDisc =
true;
179 if (
disc->cutFormula_)
180 passedDisc = (
disc->cutFormula_->Eval((*
disc->handle_)[
tau]) > 0.5);
197 bool SecondaryVtxOK(
false);
200 const VertexRef secVtx = theTIP->secondaryVertex();
201 GlobalPoint sv(secVtx->position().x(), secVtx->position().y(), secVtx->position().z());
202 double vtxchi2(0), vtxndf(1);
204 vtxchi2 = secVtx->chi2();
205 vtxndf = secVtx->ndof();
206 const std::vector<reco::Track>&
selectedTracks = secVtx->refittedTracks();
207 std::vector<reco::TransientTrack> transTrkVect;
211 float piMassSigma(1.
e-6), piChi(0.0), piNdf(0.0);
212 std::vector<RefCountedKinematicParticle> pions;
213 for (
unsigned int i = 0;
i < transTrkVect.size();
i++)
214 pions.push_back(kinFactory.
particle(transTrkVect[
i], pdgInfo.
pi_mass(), piChi, piNdf,
sv, piMassSigma));
216 jpTree->movePointerToTheTop();
218 AlgebraicSymMatrix77 cov = jpTree->currentParticle()->currentState().kinematicParametersError().matrix();
221 std::vector<reco::Track>
Tracks;
222 std::vector<LorentzVectorParticle> ReFitPions;
223 for (
unsigned int i = 0;
i < transTrkVect.size();
i++) {
224 c += transTrkVect[
i].charge();
225 ReFitPions.push_back(ParticleBuilder::createLorentzVectorParticle(transTrkVect[
i], *secVtx,
true,
true));
228 TVectorT<double> a1_par(LorentzVectorParticle::NLorentzandVertexPar);
229 TMatrixTSym<double> a1_cov(LorentzVectorParticle::NLorentzandVertexPar);
230 for (
int i = 0;
i < LorentzVectorParticle::NLorentzandVertexPar;
i++) {
232 for (
int j = 0;
j < LorentzVectorParticle::NLorentzandVertexPar;
j++) {
233 a1_cov(
i,
j) = cov(
i,
j);
238 SecondaryVtxOK =
true;
242 std::vector<TrackParticle> pions;
245 const std::vector<edm::Ptr<reco::Candidate>>
cands =
tau->signalChargedHadrCands();
249 if (
track !=
nullptr) {
251 pions.push_back(ParticleBuilder::createTrackParticle(transTrk, pvpoint,
true,
true));
254 TVector3
pv(secVtx->position().x(), secVtx->position().y(), secVtx->position().z());
256 SecondaryVtxOK = chi2v.fit();
258 for (
unsigned int i = 0;
i < pions.size();
i++) {
259 c += pions[
i].charge();
262 a1 = chi2v.getMother(
pdgid);
266 if (SecondaryVtxOK) {
274 pvcov(
i,
j) = pvCov(
i,
j);
277 for (
unsigned int i = 0;
i < PFTau3ProngSummary::nsolutions;
i++) {
279 bool isFitOK = TauA1NU.fit();
282 std::vector<LorentzVectorParticle> daughter = TauA1NU.getRefitDaughters();
283 std::vector<TLorentzVector> daughter_p4;
284 std::vector<int> daughter_charge, daughter_PDGID;
285 for (
unsigned int d = 0;
d < daughter.size();
d++) {
286 daughter_p4.push_back(daughter[
d].p4());
287 daughter_charge.push_back((
int)daughter[
d].
charge());
288 daughter_PDGID.push_back(daughter[
d].
pdgId());
290 PFTau3PS.
AddSolution(
i, theTau.
p4(), daughter_p4, daughter_charge, daughter_PDGID, (isFitOK), 0.0, -999);
297 PFTau3PSCollection_out->push_back(PFTau3PS);
298 AVPFTau3PS->setValue(iPFTau, PFTau3PSRef);
NVertex
parameters for fixed-width plots
std::vector< reco::PFTau3ProngSummary > PFTau3ProngSummaryCollection
collection of PFTau3ProngSummary objects
KinematicParticleVertexFitter kpvFitter_
RefCountedKinematicTree fit(const std::vector< RefCountedKinematicParticle > &particles) const
std::unique_ptr< StringCutObjectSelector< reco::PFTau > > cut_
GlobalVector inInverseGeV(const GlobalPoint &gp) const
Field value ad specified global point, in 1/Gev.
edm::InputTag PFTauTIPTag_
edm::RefProd< PFTauCollection > PFTauRefProd
references to PFTau collection
reco::TransientTrack build(const reco::Track *p) const
Abs< T >::type abs(const T &t)
RefCountedKinematicParticle particle(const reco::TransientTrack &initialTrack, const ParticleMass &massGuess, float chiSquared, float degreesOfFr, float &m_sigma) const
DiscCutPairVec discriminators_
edm::Ref< PFTau3ProngSummaryCollection > PFTau3ProngSummaryRef
presistent reference to a PFTau3ProngSummary
static const TrackGhostTrackState * getTrack(const BasicGhostTrackState *basic)
const MagneticField * field() const
virtual bool AddSolution(unsigned int solution, const TLorentzVector &tau, const std::vector< TLorentzVector > &daughter_p4, const std::vector< int > &daughter_charge, const std::vector< int > &daughter_PDGID, bool has3ProngSolution, double solutionChi2, double thetaGJsig)
ROOT::Math::SMatrix< double, 7, 7, ROOT::Math::MatRepSym< double, 7 > > AlgebraicSymMatrix77
primaryVertex
hltOfflineBeamSpot for HLTMON
TLorentzVector p4() const