190 const reco::Vertex& theHltPrimaryVertex = (*thePrimaryVertices->begin());
193 theHltPrimaryVertex.position().y(),
194 theHltPrimaryVertex.position().z());
197 if(thePFTaus.isValid()){
199 for(
unsigned int pfTauIt = 0; pfTauIt < thePFTaus->size(); ++pfTauIt){
200 const PFTauRef thisTauRef(thePFTaus,pfTauIt);
203 if(thePFTauDiscriminatorByIsolation.isValid()){
207 if(thePFTauDiscriminatorAgainstMuon.isValid()){
216 pfTauPt = thePFTaus->at(pfTauIt).pt();
217 pfTauEt = thePFTaus->at(pfTauIt).et();
218 pfTauEta = thePFTaus->at(pfTauIt).eta();
219 pfTauPhi = thePFTaus->at(pfTauIt).eta();
224 pfTauNProngs = thePFTaus->at(pfTauIt).signalPFChargedHadrCands().size();
225 pfTauLTPt = thePFTaus->at(pfTauIt).leadPFChargedHadrCand()->pt();
226 pfTauTrkIso = thePFTaus->at(pfTauIt).isolationPFChargedHadrCandsPtSum();
227 pfTauGammaIso = thePFTaus->at(pfTauIt).isolationPFGammaCandsEtSum();
230 const vector<reco::PFCandidatePtr>& theSignalCands = thePFTaus->at(pfTauIt).signalPFChargedHadrCands();
231 for(vector<reco::PFCandidatePtr>::const_iterator vIt = theSignalCands.begin(); vIt != theSignalCands.end(); ++vIt){
232 pftauSignalTrkDeltaR = ROOT::Math::VectorUtil::DeltaR((*vIt)->trackRef()->momentum(), thePFTauLeadTrack->momentum());
236 const vector<reco::PFCandidatePtr>& theIsoCands = thePFTaus->at(pfTauIt).isolationPFChargedHadrCands();
238 float PFTauLeadIsoPt = 0.;
239 Track thePFTauLeadIsoTrk;
240 for(vector<reco::PFCandidatePtr>::const_iterator vIt = theIsoCands.begin(); vIt != theIsoCands.end(); ++vIt){
241 pftauIsoTrkDeltaR = ROOT::Math::VectorUtil::DeltaR((*vIt)->trackRef()->momentum(), thePFTauLeadTrack->momentum());
244 if((*vIt)->trackRef()->pt() > PFTauLeadIsoPt){
245 thePFTauLeadIsoTrk = *((*vIt)->trackRef());
246 PFTauLeadIsoPt = (*vIt)->trackRef()->
pt();
257 for(L2TauInfoAssociation::const_iterator it = l2TauInfoAssoc->begin(); it != l2TauInfoAssoc->end(); ++it){
259 if(l2Jet.
et() < 15.)
continue;
260 double delta = ROOT::Math::VectorUtil::DeltaR(thePFTaus->at(pfTauIt).p4(),l2Jet.
p4());
264 theMatchedL2Jet = l2Jet;
280 for(IsolatedTauTagInfoCollection::const_iterator
i = tauTagInfo->begin();
i!=tauTagInfo->end();++
i){
281 double delta = ROOT::Math::VectorUtil::DeltaR(theMatchedL2Jet.
p4(),
i->jet()->p4());
282 if(delta < minDeltaR){
285 theMatchedL25TauTagInfo = *
i;
290 pftauL25DeltaR = ROOT::Math::VectorUtil::DeltaR(thePFTaus->at(pfTauIt).p4(), theMatchedL25TauTagInfo.
jet()->
p4());
302 l25TrkPt->push_back((*trkIt)->pt());
323 leadTrkJetDeltaR = ROOT::Math::VectorUtil::DeltaR(theMatchedL25TauTagInfo.
jet()->
p4().Vect(), leadTk->momentum());
326 leadTrkDeltaR = ROOT::Math::VectorUtil::DeltaR(thePFTauLeadTrack->momentum(), leadTk->momentum());
329 bool l25IsoDisc = theMatchedL25TauTagInfo.
discriminator(0.2,0.15,0.5,5.,1.,0,0.2);
337 float l25LeadIsoPt = 0.;
338 Track theL25LeadIsoTrk;
342 if(ROOT::Math::VectorUtil::DeltaR(leadTk->momentum(), (*isoIt)->momentum()) <=
_signalCone){
371 if((*isoIt)->pt() > l25LeadIsoPt){
372 theL25LeadIsoTrk = **isoIt;
373 l25LeadIsoPt = (*isoIt)->
pt();
378 if(thePFTauLeadIsoTrk.
pt() != 0)
leadIsoTrkPtRes = (theL25LeadIsoTrk.
pt() - thePFTauLeadIsoTrk.
pt()) /thePFTauLeadIsoTrk.
pt();
389 else std::cout <<
"Invalid PFTau Collection\n";
std::vector< int > * l25SignalTrkNLostHits
virtual double et() const GCC11_FINAL
transverse energy
Jets made from CaloTowers.
const Vector & momentum() const
track momentum vector
std::vector< float > * l25SignalTrkPt
virtual const LorentzVector & p4() const GCC11_FINAL
four-momentum Lorentz vector
std::vector< float > * l25TrkChi2
std::vector< float > * l25SignalTrkPhi
std::vector< int > * l25SignalTrkNRecHits
bool getByToken(EDGetToken token, Handle< PROD > &result) const
std::vector< float > * l25TrkDxy
std::vector< int > * l25SignalTrkNValidPixelHits
std::vector< float > * l25SignalTrkDxy
edm::EDGetTokenT< PFTauDiscriminator > _pfTauIsoSource
std::vector< int > * l25IsoTrkNValidHits
const_iterator end() const
Termination of iteration.
edm::EDGetTokenT< L2TauInfoAssociation > _l2TauInfoAssoc
void printInfo(const reco::PFTau &thePFTau, const reco::IsolatedTauTagInfo &theTauTagInfo)
std::vector< float > * l25IsoTrkChi2
const_iterator begin() const
Initialize an iterator over the RefVector.
std::vector< int > * l25IsoTrkNLostHits
const TrackRefVector selectedTracks() const
edm::EDGetTokenT< PFTauCollection > _pfTauSource
int numQPixTrkInSignalCone
virtual float phi() const GCC11_FINAL
momentum azimuthal angle
bool isNonnull() const
Checks for non-null.
edm::EDGetTokenT< PFTauDiscriminator > _pfTauMuonDiscSource
std::vector< float > * l25SignalTrkChi2NdF
float discriminator() const
double pt() const
track transverse momentum
std::vector< float > * l25TrkPhi
std::vector< int > * l25IsoTrkNValidPixelHits
const TrackRefVector tracksInCone(const math::XYZVector &myVector, const float size, const float pt_min) const
std::vector< float > * l25TrkNValidPixelHits
edm::EDGetTokenT< IsolatedTauTagInfoCollection > _l25JetSource
std::vector< float > * l25IsoTrkPt
std::vector< float > * l25SignalTrkDz
virtual edm::RefToBase< Jet > jet(void) const
returns a polymorphic reference to the tagged jet
float pftauSignalTrkDeltaR
virtual float eta() const GCC11_FINAL
momentum pseudorapidity
std::vector< float > * l25IsoTrkPhi
XYZPointD XYZPoint
point in space with cartesian internal representation
std::vector< int > * l25SignalTrkNValidHits
std::vector< float > * l25SignalTrkEta
virtual Vector momentum() const GCC11_FINAL
spatial momentum vector
std::vector< float > * l25TrkEta
edm::EDGetTokenT< VertexCollection > _pVtxSource
const TrackRef leadingSignalTrack() const
std::vector< float > * l25SignalTrkChi2
math::XYZPoint theVertexPosition
std::vector< float > * l25IsoTrkDxy
std::vector< int > * l25IsoTrkNRecHits
size_type size() const
Size of the RefVector.
float _l25JetLeadTkMacthingCone
std::vector< float > * l25TrkDz
std::vector< float > * l25IsoTrkChi2NdF
const TrackRefVector allTracks() const
std::vector< float > * l25IsoTrkEta
std::vector< float > * l25TrkNRecHits
std::vector< float > * l25IsoTrkDz
std::vector< float > * l25TrkPt
std::vector< float > * l25TrkChi2NdF