Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 12:54:26

0001 #include "DataFormats/PatCandidates/interface/TauPFSpecific.h"
0002 
0003 #include "DataFormats/JetReco/interface/Jet.h"
0004 
0005 pat::tau::TauPFSpecific::TauPFSpecific(const reco::PFTau& tau)
0006     :  // reference to PFJet from which PFTau was made
0007       pfJetRef_(tau.jetRef()),
0008       // Leading track/charged candidate
0009       leadPFChargedHadrCand_(tau.leadPFChargedHadrCand()),
0010       leadPFChargedHadrCandsignedSipt_(tau.leadPFChargedHadrCandsignedSipt()),
0011       // Leading neutral candidate
0012       leadPFNeutralCand_(tau.leadPFNeutralCand()),
0013       // Leading charged or neutral candidate
0014       leadPFCand_(tau.leadPFCand()),
0015       // Signal cone
0016       selectedSignalPFCands_(tau.signalPFCands()),
0017       selectedSignalPFChargedHadrCands_(tau.signalPFChargedHadrCands()),
0018       selectedSignalPFNeutrHadrCands_(tau.signalPFNeutrHadrCands()),
0019       selectedSignalPFGammaCands_(tau.signalPFGammaCands()),
0020       signalTauChargedHadronCandidates_(tau.signalTauChargedHadronCandidates()),
0021       signalPiZeroCandidates_(tau.signalPiZeroCandidates()),
0022       // Isolation cone
0023       selectedIsolationPFCands_(tau.isolationPFCands()),
0024       selectedIsolationPFChargedHadrCands_(tau.isolationPFChargedHadrCands()),
0025       selectedIsolationPFNeutrHadrCands_(tau.isolationPFNeutrHadrCands()),
0026       selectedIsolationPFGammaCands_(tau.isolationPFGammaCands()),
0027       isolationTauChargedHadronCandidates_(tau.isolationTauChargedHadronCandidates()),
0028       isolationPiZeroCandidates_(tau.isolationPiZeroCandidates()),
0029       isolationPFChargedHadrCandsPtSum_(tau.isolationPFChargedHadrCandsPtSum()),
0030       isolationPFGammaCandsEtSum_(tau.isolationPFGammaCandsEtSum()),
0031       // Other useful variables
0032       maximumHCALPFClusterEt_(tau.maximumHCALPFClusterEt()),
0033       emFraction_(tau.emFraction()),
0034       hcalTotOverPLead_(tau.hcalTotOverPLead()),
0035       hcalMaxOverPLead_(tau.hcalMaxOverPLead()),
0036       hcal3x3OverPLead_(tau.hcal3x3OverPLead()),
0037       ecalStripSumEOverPLead_(tau.ecalStripSumEOverPLead()),
0038       bremsRecoveryEOverPLead_(tau.bremsRecoveryEOverPLead()),
0039       // Electron rejection variables
0040       electronPreIDTrack_(tau.electronPreIDTrack()),
0041       electronPreIDOutput_(tau.electronPreIDOutput()),
0042       electronPreIDDecision_(tau.electronPreIDDecision()),
0043       // Muon rejection variables
0044       caloComp_(tau.caloComp()),
0045       segComp_(tau.segComp()),
0046       muonDecision_(tau.muonDecision()),
0047       // Variables specific to dynamic strip reconstruction
0048       bendCorrMass_(tau.bendCorrMass()),
0049       signalConeSize_(tau.signalConeSize()) {
0050   if (tau.jetRef().isAvailable() &&
0051       tau.jetRef().isNonnull()) {  // CV: add protection to ease transition to new CMSSW 4_2_x RecoTauTags
0052     reco::Jet::EtaPhiMoments etaPhiStatistics = tau.jetRef()->etaPhiStatistics();
0053     etaetaMoment_ = etaPhiStatistics.etaEtaMoment;
0054     phiphiMoment_ = etaPhiStatistics.phiPhiMoment;
0055     etaphiMoment_ = etaPhiStatistics.etaPhiMoment;
0056   }
0057 }