ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitHzz4l/LeptonSelection/interface/IsolationSelection.h
(Generate patch)

Comparing UserCode/MitHzz4l/LeptonSelection/interface/IsolationSelection.h (file contents):
Revision 1.11 by khahn, Sun May 20 19:08:58 2012 UTC vs.
Revision 1.18 by dkralph, Mon Dec 17 17:12:27 2012 UTC

# Line 1 | Line 1
1 + #ifndef ISOLATIONSELECTION
2 + #define ISOLATIONSELECTION
3 +
4 + #include "Array.h"
5   #include "Electron.h"
6   #include "Muon.h"
7   #include "Vertex.h"
# Line 5 | Line 9
9   #include "PFCandidateCol.h"
10   #include "PileupEnergyDensity.h"
11  
12 + #include "TLorentzVector.h"
13 +
14   #include "MuonTools.h"
15   #include "ElectronTools.h"
16  
# Line 12 | Line 18
18   #include "SelectionStatus.h"
19   #include "SimpleLepton.h"
20  
21 + using namespace std;
22 + using namespace mithep;
23 +
24   #define MUON_ISOMVA_CUT_BIN0  -0.615
25   #define MUON_ISOMVA_CUT_BIN1   0.235
26   #define MUON_ISOMVA_CUT_BIN2  -0.825
# Line 135 | Line 144
144   #define MUON_ISOMVA_LOOSE_FORPFID_CUT_OPT_BIN3  -0.78585
145   #define MUON_ISOMVA_LOOSE_FORPFID_CUT_OPT_BIN4  -0.99725
146   #define MUON_ISOMVA_LOOSE_FORPFID_CUT_OPT_BIN5  -0.99865
147 + #else
148 + #define MUON_ISOMVA_LOOSE_FORPFID_CUT_OPT_BIN0  -0.5934
149 + #define MUON_ISOMVA_LOOSE_FORPFID_CUT_OPT_BIN1  0.3374
150 + #define MUON_ISOMVA_LOOSE_FORPFID_CUT_OPT_BIN2  -0.7666
151 + #define MUON_ISOMVA_LOOSE_FORPFID_CUT_OPT_BIN3  0.4102
152 + #define MUON_ISOMVA_LOOSE_FORPFID_CUT_OPT_BIN4  -0.989
153 + #define MUON_ISOMVA_LOOSE_FORPFID_CUT_OPT_BIN5  -0.9946
154   #endif
155  
156 < /* #define ELECTRON_REFERENCE_PFISO_CUT  0.25  */
157 < /* #define MUON_REFERENCE_PFISO_CUT      0.25  */
158 < #define ELECTRON_REFERENCE_PFISO_CUT  0.4
159 < #define MUON_REFERENCE_PFISO_CUT      0.4
156 > /* #define ELECTRON_REFERENCE_PFISO_CUT  0.25 */
157 > /* #define MUON_REFERENCE_PFISO_CUT      0.25 */
158 > #define ELECTRON_REFERENCE_PFISO_CUT  0.4  
159 > #define MUON_REFERENCE_PFISO_CUT      0.4  
160  
161   Float_t computePFMuonIso(const mithep::Muon *muon,
162 <                         const mithep::Vertex & vtx,
162 >                         const mithep::Vertex * vtx,
163                           const mithep::Array<mithep::PFCandidate> * fPFCandidates,
164                           const Double_t dRMax);
165  
166   Float_t computePFEleIso(const mithep::Electron *electron,
167 <                        const mithep::Vertex & fVertex,
167 >                        const mithep::Vertex * fVertex,
168                          const mithep::Array<mithep::PFCandidate> * fPFCandidates,
169                          const Double_t dRMax);
170  
171   SelectionStatus electronIsoSelection(ControlFlags &, const mithep::Electron *, const mithep::Vertex &, const mithep::Array<mithep::PFCandidate> * fPFCandidateCol   );
172 < SelectionStatus muonIsoSelection(ControlFlags &, const mithep::Muon *, const mithep::Vertex &, const mithep::Array<mithep::PFCandidate> * fPFCandidateCol   );
157 < bool pairwiseIsoSelection( ControlFlags &, vector<SimpleLepton> &, float rho );
172 > SelectionStatus muonIsoSelection(ControlFlags &, const mithep::Muon *, const mithep::Vertex *, const mithep::Array<mithep::PFCandidate> * fPFCandidateCol   );
173   bool noIso(ControlFlags &, vector<SimpleLepton> &, float rho);
174  
175   void initMuonIsoMVA();
176   SelectionStatus muonIsoMVASelection(ControlFlags &ctrl,
177                                      const mithep::Muon * mu,
178 <                                    const mithep::Vertex & vtx,
178 >                                    const mithep::Vertex * vtx,
179                                      const mithep::Array<mithep::PFCandidate> * fPFCandidates,
180                                      const mithep::Array<mithep::PileupEnergyDensity> * fPUEnergyDensity,
181                                      mithep::MuonTools::EMuonEffectiveAreaTarget EffectiveAreaVersion,
# Line 169 | Line 184 | SelectionStatus muonIsoMVASelection(Cont
184   //hacked version
185   SelectionStatus muonIsoMVASelection(ControlFlags &ctrl,
186                                      const mithep::Muon * mu,
187 <                                    const mithep::Vertex & vtx,
187 >                                    const mithep::Vertex * vtx,
188                                      const mithep::Array<mithep::PFCandidate> * fPFCandidates,
189                                      float rho,
190                                      mithep::MuonTools::EMuonEffectiveAreaTarget EffectiveAreaVersion,
# Line 177 | Line 192 | SelectionStatus muonIsoMVASelection(Cont
192                                      vector<const mithep::Electron*> electronsToVeto);
193   double muonPFIso04(ControlFlags &ctrl,
194                     const mithep::Muon * mu,
195 <                   const mithep::Vertex & vtx,
195 >                   const mithep::Vertex * vtx,
196                     const mithep::Array<mithep::PFCandidate> * fPFCandidates,
197                     const mithep::Array<mithep::PileupEnergyDensity> * fPUEnergyDensity,
198                     mithep::MuonTools::EMuonEffectiveAreaTarget EffectiveAreaVersion,
199 <                   vector<const mithep::Muon*> muonsToVeto,
200 <                   vector<const mithep::Electron*> electronsToVeto);
186 < // hacked version
187 < double muonPFIso04(ControlFlags &ctrl,
188 <                   const mithep::Muon * mu,
189 <                   const mithep::Vertex & vtx,
190 <                   const mithep::Array<mithep::PFCandidate> * fPFCandidates,
191 <                   float rho,  // the hack
192 <                   mithep::MuonTools::EMuonEffectiveAreaTarget EffectiveAreaVersion,
193 <                   vector<const mithep::Muon*> muonsToVeto,
194 <                   vector<const mithep::Electron*> electronsToVeto);
195 < //
199 >                   vector<const mithep::PFCandidate*> photonsToVeto);
200 >
201   SelectionStatus muonReferenceIsoSelection(ControlFlags &ctrl,
202                                            const mithep::Muon * mu,
203 <                                          const mithep::Vertex & vtx,
203 >                                          const mithep::Vertex * vtx,
204                                            const mithep::Array<mithep::PFCandidate> * fPFCandidates,
205                                            const mithep::Array<mithep::PileupEnergyDensity> * fPUEnergyDensity,
206                                            mithep::MuonTools::EMuonEffectiveAreaTarget EffectiveAreaVersion,
207 <                                          vector<const mithep::Muon*> muonsToVeto,
203 <                                          vector<const mithep::Electron*> electronsToVeto);
204 < // hacked version
205 < SelectionStatus muonReferenceIsoSelection(ControlFlags &ctrl,
206 <                                          const mithep::Muon * mu,
207 <                                          const mithep::Vertex & vtx,
208 <                                          const mithep::Array<mithep::PFCandidate> * fPFCandidates,
209 <                                          float,
210 <                                          mithep::MuonTools::EMuonEffectiveAreaTarget EffectiveAreaVersion,
211 <                                          vector<const mithep::Muon*> muonsToVeto,
212 <                                          vector<const mithep::Electron*> electronsToVeto);
207 >                                          vector<const mithep::PFCandidate*> photonsToVeto);
208  
209   void initElectronIsoMVA();
210   SelectionStatus electronIsoMVASelection(ControlFlags &ctrl,
211                                      const mithep::Electron * ele,
212 <                                    const mithep::Vertex & vtx,
212 >                                    const mithep::Vertex * vtx,
213                                      const mithep::Array<mithep::PFCandidate> * fPFCandidates,
214                                      const mithep::Array<mithep::PileupEnergyDensity> * fPUEnergyDensity,
215                                      mithep::ElectronTools::EElectronEffectiveAreaTarget EffectiveAreaVersion,
# Line 223 | Line 218 | SelectionStatus electronIsoMVASelection(
218   //hacked version
219   SelectionStatus electronIsoMVASelection(ControlFlags &ctrl,
220                                      const mithep::Electron * ele,
221 <                                    const mithep::Vertex & vtx,
221 >                                    const mithep::Vertex * vtx,
222                                      const mithep::Array<mithep::PFCandidate> * fPFCandidates,
223                                          float rho,
224                                      mithep::ElectronTools::EElectronEffectiveAreaTarget EffectiveAreaVersion,
# Line 235 | Line 230 | float electronPFIso04(ControlFlags &ctrl
230                        const mithep::Array<mithep::PFCandidate> * fPFCandidates,
231                        const mithep::Array<mithep::PileupEnergyDensity> * fPUEnergyDensity,
232                        mithep::ElectronTools::EElectronEffectiveAreaTarget EffectiveAreaVersion,
233 <                      vector<const mithep::Muon*> muonsToVeto,
234 <                      vector<const mithep::Electron*> electronsToVeto) ;
240 < // hacked version
241 < float electronPFIso04(ControlFlags &ctrl,
242 <                      const mithep::Electron * ele,
243 <                      const mithep::Vertex & vtx,
244 <                      const mithep::Array<mithep::PFCandidate> * fPFCandidates,
245 <                      float rho, // the hack
246 <                      mithep::ElectronTools::EElectronEffectiveAreaTarget EffectiveAreaVersion,
247 <                      vector<const mithep::Muon*> muonsToVeto,
248 <                      vector<const mithep::Electron*> electronsToVeto) ;
249 < //
233 >                      vector<const mithep::PFCandidate*> photonsToVeto);                
234 >
235   SelectionStatus electronReferenceIsoSelection(ControlFlags &ctrl,
236                                                const mithep::Electron * ele,
237 <                                              const mithep::Vertex & vtx,
237 >                                              const mithep::Vertex * vtx,
238                                                const mithep::Array<mithep::PFCandidate> * fPFCandidates,
239                                                const mithep::Array<mithep::PileupEnergyDensity> * fPUEnergyDensity,
240                                                mithep::ElectronTools::EElectronEffectiveAreaTarget EffectiveAreaVersion,
241 <                                              vector<const mithep::Muon*> muonsToVeto,
242 <                                              vector<const mithep::Electron*> electronsToVeto);
243 < // hacked version
244 < SelectionStatus electronReferenceIsoSelection(ControlFlags &ctrl,
245 <                                              const mithep::Electron * ele,
246 <                                              const mithep::Vertex & vtx,
247 <                                              const mithep::Array<mithep::PFCandidate> * fPFCandidates,
248 <                                              float,
249 <                                              mithep::ElectronTools::EElectronEffectiveAreaTarget EffectiveAreaVersion,
250 <                                              vector<const mithep::Muon*> muonsToVeto,
251 <                                              vector<const mithep::Electron*> electronsToVeto);
241 >                                              vector<const mithep::PFCandidate*> photonsToVeto);
242 >
243 > double  dbetaCorrectedIsoDr03(ControlFlags & ctrl,
244 >                              const mithep::PFCandidate * photon,
245 >                              const mithep::ChargedParticle * lep, // need to veto              
246 >                              const mithep::Array<mithep::PFCandidate> * fPFCandidates);
247 >
248 > double  nonCorrectedIsoDr03(ControlFlags & ctrl,
249 >                            const mithep::PFCandidate * photon,
250 >                            const mithep::ChargedParticle *lep, // need to veto                
251 >                            const mithep::Array<mithep::PFCandidate> * fPFCandidates);
252 >
253 > double  isoDr03ForFsr(ControlFlags & ctrl,
254 >                      const PFCandidate * photon,
255 >                      const ChargedParticle * lep,
256 >                      const Array<PFCandidate> * fPFCandidates,
257 >                      bool doDBetaCorr=false);
258 > #endif

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines