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.13 by khahn, Mon May 21 22:30:16 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 144 | Line 153
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   );
164 < 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 176 | 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 184 | 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);
193 < // hacked version
194 < double muonPFIso04(ControlFlags &ctrl,
195 <                   const mithep::Muon * mu,
196 <                   const mithep::Vertex & vtx,
197 <                   const mithep::Array<mithep::PFCandidate> * fPFCandidates,
198 <                   float rho,  // the hack
199 <                   mithep::MuonTools::EMuonEffectiveAreaTarget EffectiveAreaVersion,
200 <                   vector<const mithep::Muon*> muonsToVeto,
201 <                   vector<const mithep::Electron*> electronsToVeto);
202 < //
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,
210 <                                          vector<const mithep::Electron*> electronsToVeto);
211 < // hacked version
212 < SelectionStatus muonReferenceIsoSelection(ControlFlags &ctrl,
213 <                                          const mithep::Muon * mu,
214 <                                          const mithep::Vertex & vtx,
215 <                                          const mithep::Array<mithep::PFCandidate> * fPFCandidates,
216 <                                          float,
217 <                                          mithep::MuonTools::EMuonEffectiveAreaTarget EffectiveAreaVersion,
218 <                                          vector<const mithep::Muon*> muonsToVeto,
219 <                                          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 230 | 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 242 | 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) ;
247 < // hacked version
248 < float electronPFIso04(ControlFlags &ctrl,
249 <                      const mithep::Electron * ele,
250 <                      const mithep::Vertex & vtx,
251 <                      const mithep::Array<mithep::PFCandidate> * fPFCandidates,
252 <                      float rho, // the hack
253 <                      mithep::ElectronTools::EElectronEffectiveAreaTarget EffectiveAreaVersion,
254 <                      vector<const mithep::Muon*> muonsToVeto,
255 <                      vector<const mithep::Electron*> electronsToVeto) ;
256 < //
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