ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitPhysics/Utils/interface/PhotonTools.h
(Generate patch)

Comparing UserCode/MitPhysics/Utils/interface/PhotonTools.h (file contents):
Revision 1.9 by bendavid, Wed Jul 27 15:17:37 2011 UTC vs.
Revision 1.29 by bendavid, Mon Dec 9 17:55:51 2013 UTC

# Line 12 | Line 12
12   #define MITPHYSICS_UTILS_PHOTONTOOLS_H
13  
14   #include "MitAna/DataTree/interface/Photon.h"
15 + #include "MitAna/DataTree/interface/PhotonCol.h"
16   #include "MitAna/DataTree/interface/TrackCol.h"
17   #include "MitAna/DataTree/interface/Electron.h"
18   #include "MitAna/DataTree/interface/ElectronCol.h"
# Line 21 | Line 22
22   #include "MitAna/DataTree/interface/BeamSpotCol.h"
23   #include "MitAna/DataTree/interface/TriggerObjectCol.h"
24   #include "MitAna/DataTree/interface/MCParticleCol.h"
25 + #include "MitAna/DataTree/interface/SuperCluster.h"
26 + #include "MitAna/DataTree/interface/SuperClusterCol.h"
27   #include "MitCommon/MathTools/interface/MathUtils.h"
28  
29 + #include "MitAna/DataTree/interface/PFCandidateCol.h"
30 +
31   class TRandom3;
32  
33   namespace mithep {
# Line 37 | Line 42 | namespace mithep {
42          kCat4        //barrel-endcap+endcap-endcap highr9/lowr9 + lowr9-lowr9
43        };
44        
45 +     enum DiphotonR9EtaPtCats {
46 +       kOctCat0,
47 +       kOctCat1,
48 +       kOctCat2,
49 +       kOctCat3,
50 +       kOctCat4,
51 +       kOctCat5,
52 +       kOctCat6,
53 +       kOctCat7
54 +     };
55 +      
56       enum DiphotonR9EtaConversionCats {
57          kNewCat1 = 0,       //barrel-barrel highr9/highr9
58          kNewCat2,             //barrel-barrel highr9/lowr9+lowr9/lowr9 one/two conversion
# Line 53 | Line 69 | namespace mithep {
69         kCiCCat3,
70         kCiCCat4
71       };    
72 +    
73 +     enum eScaleCats {
74 +       kEBlowEtaGold = 0,
75 +       kEBlowEtaBad,
76 +       kEBhighEtaGold,
77 +       kEBhighEtaBad,
78 +       kEElowEtaGold,
79 +       kEElowEtaBad,
80 +       kEEhighEtaGold,
81 +       kEEhighEtaBad
82 +     };
83 +      
84 +     enum ShowerShapeScales {
85 +       kNoShowerShapeScaling = 0,
86 +       k2011ShowerShape,
87 +       k2012ShowerShape
88 +     };
89 +
90 +    static eScaleCats EScaleCat(const Photon *p);
91  
92      // Methods for scaling/smearing Photons
93      static void ScalePhoton(Photon* p, Double_t scale);
94      static void SmearPhoton(Photon* p, TRandom3* rng, Double_t width, UInt_t iSeed);
95 +    static void SmearPhotonError(Photon* p, Double_t width);
96 +    static void ScalePhotonR9(Photon *p, Double_t scale);
97 +    static void ScalePhotonError(Photon *p, Double_t scale);
98 +
99 +    static void ScalePhotonShowerShapes(Photon *p, ShowerShapeScales scale);
100 +
101  
102 +    static Bool_t       PassSinglePhotonPresel(const Photon *p,const ElectronCol *els, const DecayParticleCol *conversions, const BaseVertex *bs, const TrackCol* trackCol, const Vertex *vtx, double rho, Bool_t applyElectronVeto = kTRUE, Bool_t invertElectronVeto = kFALSE);
103 +    static Bool_t       PassSinglePhotonPreselPFISO(const Photon *p,const ElectronCol *els, const DecayParticleCol *conversions, const BaseVertex *bs, const TrackCol* trackCol,const Vertex *vtx, double rho, const PFCandidateCol *fPFCands, Bool_t applyElectronVeto = kTRUE, Bool_t invertElectronVeto = kFALSE);
104 +    static Bool_t       PassSinglePhotonPreselPFISONoEcal(const Photon *p,const ElectronCol *els, const DecayParticleCol *conversions, const BaseVertex *bs, const TrackCol* trackCol,const Vertex *vtx, double rho, const PFCandidateCol *fPFCands, Bool_t applyElectronVeto = kTRUE, Bool_t invertElectronVeto = kFALSE);
105 +    static Bool_t       PassSinglePhotonPreselPFISONoEcalNoPFChargedIso(const Photon *p,const ElectronCol *els, const DecayParticleCol *conversions, const BaseVertex *bs, const TrackCol* trackCol,const Vertex *vtx, double rho, const PFCandidateCol *fPFCands, Bool_t applyElectronVeto = kTRUE, Bool_t invertElectronVeto = kFALSE);
106 +    static Bool_t       PassSinglePhotonPreselPFISO_NoTrigger(const Photon *p,const ElectronCol *els, const DecayParticleCol *conversions, const BaseVertex *bs, const TrackCol* trackCol,const Vertex *vtx, double rho, const PFCandidateCol *fPFCands, Bool_t applyElectronVeto = kTRUE, Bool_t invertElectronVeto = kFALSE);
107      static Bool_t       PassConversionId(const Photon *p, const DecayParticle *c);
108      static Bool_t       PassElectronVeto(const Photon *p, const ElectronCol *els);
109      static Double_t     ElectronVetoCiC(const Photon *p, const ElectronCol *els);
# Line 65 | Line 111 | namespace mithep {
111      static Bool_t       PassTriggerMatching(const Photon *p, const TriggerObjectCol *trigobjs);
112      static const DecayParticle *MatchedConversion(const Photon *p, const DecayParticleCol *conversions,
113                                                    const BaseVertex *vtx, Int_t nWrongHitsMax=1, Double_t probMin=1e-6,
114 <                                                  Double_t lxyMin = 2.0, Double_t dRMin = 0.1);
114 >                                                  Double_t lxyMin = 2.0, Double_t dRMin = 0.1);
115 >    static const DecayParticle *MatchedConversion(const SuperCluster *sc, const DecayParticleCol *conversions,
116 >                                                  const BaseVertex *vtx, Int_t nWrongHitsMax=1, Double_t probMin=1e-6,
117 >                                                  Double_t lxyMin = 2.0, Double_t dRMin = 0.1);                                                  
118      static const DecayParticle *MatchedConversion(const Track *t, const DecayParticleCol *conversions,
119                                                    const BaseVertex *vtx, Int_t nWrongHitsMax=1, Double_t probMin=1e-6,
120                                                    Double_t lxyMin = 2.0);                                              
121      static DiphotonR9EtaCats DiphotonR9EtaCat(const Photon *p1, const Photon *p2);
122 +    static DiphotonR9EtaPtCats DiphotonR9EtaPtCat(const Photon *p1, const Photon *p2);
123      static DiphotonR9EtaConversionCats DiphotonR9EtaConversionCat(const Photon *p1, const Photon *p2, const DecayParticleCol *conversions, const BaseVertex *v);
124      static CiCBaseLineCats CiCBaseLineCat(const Photon *p);
125      
126      static const DecayParticle *MatchedCiCConversion(const Photon *p, const DecayParticleCol *conversions,
127                                                       Double_t dPhiMin=0.1, Double_t dEtaMin=0.1,Double_t dRMin=0.1,
128 <                                                     bool print = false);
128 >                                                     bool print   = false,
129 >                                                     int* numLegs = NULL, int* convIdx = NULL);  // for debugging
130 >
131 >                                                    
132 >    static const Electron *MatchedElectron(const Photon *p, const ElectronCol *els);
133 >    static const Photon *MatchedPhoton(const Electron *e, const PhotonCol *phs);
134 >    static const SuperCluster *MatchedSC(const SuperCluster *psc, const SuperClusterCol *scs, Double_t drMin=0.3);
135 >
136 >    static const SuperCluster *MatchedPFSC(const SuperCluster *psc, const PhotonCol *pfphos, const ElectronCol *eles, Double_t drMin=0.1);
137      
138      static bool PassCiCSelection(const Photon* ph,
139                                   const Vertex* vtx,
# Line 86 | Line 144 | namespace mithep {
144                                   bool applyEleVeto = true,
145                                   bool print = false, float* kin=NULL);
146  
147 <
148 <    static bool PassCiCSelection(Photon* ph,
149 <                                 const Vertex* vtx,
150 <                                 const TrackCol*    trackCol,
151 <                                 const ElectronCol* eleCol,
152 <                                 const VertexCol*   vtxCol,
153 <                                 double rho, double ptmin,
154 <                                 bool applyEleVeto = true,
155 <                                 bool print = false, float* kin=NULL);
156 <                                
157 <    static const MCParticle *MatchMC(const Photon *ph, const MCParticleCol *c);
147 >    static bool PassCiCPFIsoSelection(const Photon* ph,
148 >                                      const Vertex* vtx,
149 >                                      const PFCandidateCol*    pfCol,
150 >                                      const VertexCol*   vtxCol,
151 >                                      double rho, double ptmin,
152 >                                      std::vector<double>* kin = NULL);
153 >
154 >    static bool PassCiCPFIsoSelectionWithEleVeto(const Photon* ph,
155 >                                                 const ElectronCol *els,
156 >                                                 const DecayParticleCol *conversions, const BaseVertex *bs,
157 >                                                 const Vertex* vtx,
158 >                                                 const PFCandidateCol*    pfCol,
159 >                                                 const VertexCol*   vtxCol,
160 >                                                 double rho, double ptmin,
161 >                                                 Bool_t applyElectronVeto, Bool_t invertElectronVeto,
162 >                                                 std::vector<double>* kin= NULL  // store variables for debugging...
163 >                                                 );// add for mono photon                                
164      
165 +    static bool PassVgamma2011Selection(const Photon* ph, double rho);
166 +
167 +    static const MCParticle *MatchMC(const Particle *ph, const MCParticleCol *c, Bool_t matchElectrons = kFALSE);
168      ClassDef(PhotonTools, 0) // Muon tools
169        };
170   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines