CMS 3D CMS Logo

L1AnalysisRecoTau.cc
Go to the documentation of this file.
2 
3 //#include "JetMETCorrections/Objects/interface/JetCorrector.h"
5 
6 using namespace std;
7 
9 
11 
13  const edm::EventSetup& setup,
22  edm::Handle<reco::PFTauDiscriminator> VLooseAntiElectron,
23  edm::Handle<reco::PFTauDiscriminator> LooseAntiElectron,
24  edm::Handle<reco::PFTauDiscriminator> TightAntiElectron,
25  unsigned maxTau) {
26  recoTau_.nTaus = 0;
27 
28  for (reco::PFTauCollection::const_iterator it = taus->begin(); it != taus->end() && recoTau_.nTaus < maxTau; ++it) {
29  recoTau_.e.push_back(it->energy());
30  recoTau_.pt.push_back(it->pt());
31  recoTau_.et.push_back(it->et());
32  recoTau_.eta.push_back(it->eta());
33  recoTau_.phi.push_back(it->phi());
34 
35  edm::Ref<reco::PFTauCollection> tauEdmRef(taus, recoTau_.nTaus);
36  recoTau_.TightIsoFlag.push_back((*TightIsoTaus)[tauEdmRef]);
37  recoTau_.RawIso.push_back((*TightRawIsoTaus)[tauEdmRef]);
38  recoTau_.LooseIsoFlag.push_back((*LooseIsoTaus)[tauEdmRef]);
39  recoTau_.LooseAntiMuonFlag.push_back((*LooseAntiMuon)[tauEdmRef]);
40  recoTau_.TightAntiMuonFlag.push_back((*TightAntiMuon)[tauEdmRef]);
41  recoTau_.VLooseAntiElectronFlag.push_back((*VLooseAntiElectron)[tauEdmRef]);
42  recoTau_.LooseAntiElectronFlag.push_back((*LooseAntiElectron)[tauEdmRef]);
43  recoTau_.TightAntiElectronFlag.push_back((*TightAntiElectron)[tauEdmRef]);
44  recoTau_.DMFindingOldDMs.push_back((*DMFindingOldTaus)[tauEdmRef]);
45  recoTau_.DMFindingNewDMs.push_back((*DMFindingTaus)[tauEdmRef]);
46  recoTau_.charge.push_back(it->charge());
47 
48  recoTau_.nTaus++;
49  }
50 }
51 
52 // void L1Analysis::L1AnalysisRecoTau::SetPFJet(const edm::Event& event,
53 // const edm::EventSetup& setup,
54 // edm::Handle<reco::PFJetCollection> taus,
55 // unsigned maxTau)
56 // {
57 
58 // recoPFJet_.nTaus=0;
59 
60 // for(reco::CaloJetCollection::const_iterator it=taus->begin();
61 // it!=taus->end() && recoTau_.nTaus < maxTau;
62 // ++it) {
63 
64 // recoTau_.et.push_back(it->et());
65 // // recoTau_.etCorr.push_back(it->et());// * scale);
66 // // recoTau_.corrFactor.push_back(1.);//scale);
67 // recoTau_.eta.push_back(it->eta());
68 // recoTau_.phi.push_back(it->phi());
69 // recoTau_.e.push_back(it->energy());
70 // // recoTau_.eEMF.push_back(it->emEnergyFraction());
71 // // recoTau_.eEmEB.push_back(it->emEnergyInEB());
72 // // recoTau_.eEmEE.push_back(it->emEnergyInEE());
73 // // recoTau_.eEmHF.push_back(it->emEnergyInHF());
74 // // recoTau_.eHadHB.push_back(it->hadEnergyInHB());
75 // // recoTau_.eHadHE.push_back(it->hadEnergyInHE());
76 // // recoTau_.eHadHO.push_back(it->hadEnergyInHO());
77 // // recoTau_.eHadHF.push_back(it->hadEnergyInHF());
78 // // recoTau_.eMaxEcalTow.push_back(it->maxEInEmTowers());
79 // // recoTau_.eMaxHcalTow.push_back(it->maxEInHadTowers());
80 // // recoTau_.towerArea.push_back(it->towersArea());
81 // // recoTau_.towerSize.push_back(static_cast<int>(it->getCaloConstituents().size()));
82 // // recoTau_.n60.push_back(it->n60());
83 // // recoTau_.n90.push_back(it->n90());
84 
85 // // recoTau_.n90hits.push_back(1.); //int((*jetsID)[jetRef].n90Hits));
86 // // recoTau_.fHPD.push_back(1.); //(*jetsID)[jetRef].fHPD);
87 // // recoTau_.fRBX.push_back(1.); //(*jetsID)[jetRef].fRBX);
88 
89 // recoTau_.nTaus++;
90 
91 // }
92 // }
L1Analysis::L1AnalysisRecoTau::SetTau
void SetTau(const edm::Event &event, const edm::EventSetup &setup, const edm::Handle< reco::PFTauCollection > taus, const edm::Handle< reco::PFTauDiscriminator > DMFindingOldTaus, const edm::Handle< reco::PFTauDiscriminator > DMFindingTaus, const edm::Handle< reco::PFTauDiscriminator > TightIsoTaus, const edm::Handle< reco::PFTauDiscriminator > TightRawIsoTaus, const edm::Handle< reco::PFTauDiscriminator > LooseIsoTaus, const edm::Handle< reco::PFTauDiscriminator > LooseAntiMuon, const edm::Handle< reco::PFTauDiscriminator > TightAntiMuon, const edm::Handle< reco::PFTauDiscriminator > VLooseAntiElectron, const edm::Handle< reco::PFTauDiscriminator > LooseAntiElectron, const edm::Handle< reco::PFTauDiscriminator > TightAntiElectron, unsigned maxTau)
Definition: L1AnalysisRecoTau.cc:12
Tau3MuMonitor_cff.taus
taus
Definition: Tau3MuMonitor_cff.py:7
edm::Handle
Definition: AssociativeIterator.h:50
L1Analysis::L1AnalysisRecoTau::~L1AnalysisRecoTau
~L1AnalysisRecoTau()
Definition: L1AnalysisRecoTau.cc:10
singleTopDQM_cfi.setup
setup
Definition: singleTopDQM_cfi.py:37
l1TauRecoTree_2015_cfi.maxTau
maxTau
Definition: l1TauRecoTree_2015_cfi.py:5
edm::Ref
Definition: AssociativeIterator.h:58
JetCorrector.h
L1AnalysisRecoTau.h
edm::EventSetup
Definition: EventSetup.h:58
L1Analysis::L1AnalysisRecoTau::L1AnalysisRecoTau
L1AnalysisRecoTau()
Definition: L1AnalysisRecoTau.cc:8
std
Definition: JetResolutionObject.h:76
event
Definition: event.py:1
edm::Event
Definition: Event.h:73