CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_6_1_1/src/DataFormats/PatCandidates/src/TauPFSpecific.cc

Go to the documentation of this file.
00001 #include "DataFormats/PatCandidates/interface/TauPFSpecific.h"
00002 
00003 #include "DataFormats/JetReco/interface/Jet.h"
00004 
00005 pat::tau::TauPFSpecific::TauPFSpecific(const reco::PFTau& tau) :
00006     // reference to PFJet from which PFTau was made
00007     pfJetRef_(tau.jetRef()),
00008     // Leading track/charged candidate
00009     leadPFChargedHadrCand_(tau.leadPFChargedHadrCand()),    
00010     leadPFChargedHadrCandsignedSipt_(tau.leadPFChargedHadrCandsignedSipt()),
00011     // Leading neutral candidate
00012     leadPFNeutralCand_(tau.leadPFNeutralCand()), 
00013     // Leading charged or neutral candidate
00014     leadPFCand_(tau.leadPFCand()), 
00015     // Signal cone
00016     selectedSignalPFCands_(tau.signalPFCands()), 
00017     selectedSignalPFChargedHadrCands_(tau.signalPFChargedHadrCands()), 
00018     selectedSignalPFNeutrHadrCands_(tau.signalPFNeutrHadrCands()), 
00019     selectedSignalPFGammaCands_(tau.signalPFGammaCands()),
00020     signalPiZeroCandidates_(tau.signalPiZeroCandidates()),
00021     // Isolation cone
00022     selectedIsolationPFCands_(tau.isolationPFCands()), 
00023     selectedIsolationPFChargedHadrCands_(tau.isolationPFChargedHadrCands()), 
00024     selectedIsolationPFNeutrHadrCands_(tau.isolationPFNeutrHadrCands()), 
00025     selectedIsolationPFGammaCands_(tau.isolationPFGammaCands()),
00026     isolationPiZeroCandidates_(tau.isolationPiZeroCandidates()),
00027     isolationPFChargedHadrCandsPtSum_(tau.isolationPFChargedHadrCandsPtSum()),
00028     isolationPFGammaCandsEtSum_(tau.isolationPFGammaCandsEtSum()),
00029     // Other useful variables 
00030     maximumHCALPFClusterEt_(tau.maximumHCALPFClusterEt()),
00031     emFraction_(tau.emFraction()),
00032     hcalTotOverPLead_(tau.hcalTotOverPLead()),
00033     hcalMaxOverPLead_(tau.hcalMaxOverPLead()),
00034     hcal3x3OverPLead_(tau.hcal3x3OverPLead()),
00035     ecalStripSumEOverPLead_(tau.ecalStripSumEOverPLead()),
00036     bremsRecoveryEOverPLead_(tau.bremsRecoveryEOverPLead()),
00037     // Electron rejection variables
00038     electronPreIDTrack_(tau.electronPreIDTrack()),
00039     electronPreIDOutput_(tau.electronPreIDOutput()),
00040     electronPreIDDecision_(tau.electronPreIDDecision()),
00041     // Muon rejection variables
00042     caloComp_(tau.caloComp()),
00043     segComp_(tau.segComp()),
00044     muonDecision_(tau.muonDecision())
00045 {
00046   if ( tau.jetRef().isAvailable() && tau.jetRef().isNonnull() ) { // CV: add protection to ease transition to new CMSSW 4_2_x RecoTauTags
00047     p4Jet_ = tau.jetRef()->p4();
00048     reco::Jet::EtaPhiMoments etaPhiStatistics = tau.jetRef()->etaPhiStatistics();
00049     etaetaMoment_ = etaPhiStatistics.etaEtaMoment;
00050     phiphiMoment_ = etaPhiStatistics.phiPhiMoment;
00051     etaphiMoment_ = etaPhiStatistics.etaPhiMoment;
00052   }
00053 }