CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
L1AnalysisRecoTau.cc
Go to the documentation of this file.
2 
3 //#include "JetMETCorrections/Objects/interface/JetCorrector.h"
5 
6 using namespace std;
7 
9 {
10 }
11 
12 
14 {
15 }
16 
17 
19  const edm::EventSetup& setup,
21 {
22  unsigned int nTausTightIso=0;
23 
24  for(reco::PFTauDiscriminator::const_iterator it=TightIsoTaus->begin();
25  it!=TightIsoTaus->end() && nTausTightIso < maxTau;
26  ++it) {
27 
28  recoTau_.TightIsoFlag.push_back((*it).second);
29  nTausTightIso++;
30  }
31 
32  unsigned int nTausLooseIso=0;
33 
34  for(reco::PFTauDiscriminator::const_iterator it=LooseIsoTaus->begin();
35  it!=LooseIsoTaus->end() && nTausLooseIso < maxTau;
36  ++it) {
37 
38  recoTau_.LooseIsoFlag.push_back((*it).second);
39  nTausLooseIso++;
40  }
41 
42  unsigned int nTausLooseAntiMuon=0;
43 
44  for(reco::PFTauDiscriminator::const_iterator it=LooseAntiMuon->begin();
45  it!=LooseAntiMuon->end() && nTausLooseAntiMuon < maxTau;
46  ++it) {
47 
48  recoTau_.LooseAntiMuonFlag.push_back((*it).second);
49  nTausLooseAntiMuon++;
50  }
51 
52  unsigned int nTausTightAntiMuon=0;
53 
54  for(reco::PFTauDiscriminator::const_iterator it=TightAntiMuon->begin();
55  it!=TightAntiMuon->end() && nTausTightAntiMuon < maxTau;
56  ++it) {
57 
58  recoTau_.TightAntiMuonFlag.push_back((*it).second);
59  nTausTightAntiMuon++;
60  }
61 
62  unsigned int nTausVLooseAntiElectron=0;
63 
64  for(reco::PFTauDiscriminator::const_iterator it=VLooseAntiElectron->begin();
65  it!=VLooseAntiElectron->end() && nTausVLooseAntiElectron < maxTau;
66  ++it) {
67 
68  recoTau_.VLooseAntiElectronFlag.push_back((*it).second);
69  nTausVLooseAntiElectron++;
70  }
71 
72  unsigned int nTausLooseAntiElectron=0;
73 
74  for(reco::PFTauDiscriminator::const_iterator it=LooseAntiElectron->begin();
75  it!=LooseAntiElectron->end() && nTausLooseAntiElectron < maxTau;
76  ++it) {
77 
78  recoTau_.LooseAntiElectronFlag.push_back((*it).second);
79  nTausLooseAntiElectron++;
80  }
81 
82  unsigned int nTausTightAntiElectron=0;
83 
84  for(reco::PFTauDiscriminator::const_iterator it=TightAntiElectron->begin();
85  it!=TightAntiElectron->end() && nTausTightAntiElectron < maxTau;
86  ++it) {
87 
88  recoTau_.TightAntiElectronFlag.push_back((*it).second);
89  nTausTightAntiElectron++;
90  }
91 
92  unsigned int nTausDMFindingOld=0;
93 
94  for(reco::PFTauDiscriminator::const_iterator it=DMFindingOldTaus->begin();
95  it!=DMFindingOldTaus->end() && nTausDMFindingOld < maxTau;
96  ++it) {
97 
98  recoTau_.DMFindingOldDMs.push_back((*it).second);
99  nTausDMFindingOld++;
100  }
101 
102  unsigned int nTausDMFinding=0;
103 
104  for(reco::PFTauDiscriminator::const_iterator it=DMFindingTaus->begin();
105  it!=DMFindingTaus->end() && nTausDMFinding < maxTau;
106  ++it) {
107 
108  recoTau_.DMFindingNewDMs.push_back((*it).second);
109  nTausDMFinding++;
110  }
111 
112  recoTau_.nTaus=0;
113 
114  for(reco::PFTauCollection::const_iterator it=taus->begin();
115  it!=taus->end() && recoTau_.nTaus < maxTau;
116  ++it) {
117 
118  recoTau_.e.push_back(it->energy());
119  recoTau_.pt.push_back(it->pt());
120  recoTau_.et.push_back(it->et());
121  recoTau_.eta.push_back(it->eta());
122  recoTau_.phi.push_back(it->phi());
123 
124  recoTau_.nTaus++;
125 
126  }
127 }
128 
129 
130 // void L1Analysis::L1AnalysisRecoTau::SetPFJet(const edm::Event& event,
131 // const edm::EventSetup& setup,
132 // edm::Handle<reco::PFJetCollection> taus,
133 // unsigned maxTau)
134 // {
135 
136 // recoPFJet_.nTaus=0;
137 
138 // for(reco::CaloJetCollection::const_iterator it=taus->begin();
139 // it!=taus->end() && recoTau_.nTaus < maxTau;
140 // ++it) {
141 
142 // recoTau_.et.push_back(it->et());
143 // // recoTau_.etCorr.push_back(it->et());// * scale);
144 // // recoTau_.corrFactor.push_back(1.);//scale);
145 // recoTau_.eta.push_back(it->eta());
146 // recoTau_.phi.push_back(it->phi());
147 // recoTau_.e.push_back(it->energy());
148 // // recoTau_.eEMF.push_back(it->emEnergyFraction());
149 // // recoTau_.eEmEB.push_back(it->emEnergyInEB());
150 // // recoTau_.eEmEE.push_back(it->emEnergyInEE());
151 // // recoTau_.eEmHF.push_back(it->emEnergyInHF());
152 // // recoTau_.eHadHB.push_back(it->hadEnergyInHB());
153 // // recoTau_.eHadHE.push_back(it->hadEnergyInHE());
154 // // recoTau_.eHadHO.push_back(it->hadEnergyInHO());
155 // // recoTau_.eHadHF.push_back(it->hadEnergyInHF());
156 // // recoTau_.eMaxEcalTow.push_back(it->maxEInEmTowers());
157 // // recoTau_.eMaxHcalTow.push_back(it->maxEInHadTowers());
158 // // recoTau_.towerArea.push_back(it->towersArea());
159 // // recoTau_.towerSize.push_back(static_cast<int>(it->getCaloConstituents().size()));
160 // // recoTau_.n60.push_back(it->n60());
161 // // recoTau_.n90.push_back(it->n90());
162 
163 // // recoTau_.n90hits.push_back(1.); //int((*jetsID)[jetRef].n90Hits));
164 // // recoTau_.fHPD.push_back(1.); //(*jetsID)[jetRef].fHPD);
165 // // recoTau_.fRBX.push_back(1.); //(*jetsID)[jetRef].fRBX);
166 
167 // recoTau_.nTaus++;
168 
169 // }
170 // }
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger but the state exists so we define the behavior If all triggers are the negative crieriion will lead to accepting the event(this again matches the behavior of"!*"before the partial wildcard feature was incorporated).The per-event"cost"of each negative criterion with multiple relevant triggers is about the same as!*was in the past
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 > 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)
void setup(std::vector< TH2F > &depth, std::string name, std::string units="")