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.3 by fabstoec, Wed Jun 1 18:11:52 2011 UTC vs.
Revision 1.11 by bendavid, Thu Sep 8 15:51:23 2011 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"
19   #include "MitAna/DataTree/interface/BaseVertex.h"
# Line 19 | Line 21
21   #include "MitAna/DataTree/interface/VertexCol.h"
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 + class TRandom3;
30 +
31   namespace mithep {
32    class PhotonTools {
33      public:
# Line 33 | Line 40 | namespace mithep {
40          kCat4        //barrel-endcap+endcap-endcap highr9/lowr9 + lowr9-lowr9
41        };
42        
43 +     enum DiphotonR9EtaPtCats {
44 +       kOctCat0,
45 +       kOctCat1,
46 +       kOctCat2,
47 +       kOctCat3,
48 +       kOctCat4,
49 +       kOctCat5,
50 +       kOctCat6,
51 +       kOctCat7
52 +     };
53 +      
54       enum DiphotonR9EtaConversionCats {
55          kNewCat1 = 0,       //barrel-barrel highr9/highr9
56          kNewCat2,             //barrel-barrel highr9/lowr9+lowr9/lowr9 one/two conversion
# Line 43 | Line 61 | namespace mithep {
61        };      
62        
63       enum CiCBaseLineCats {
64 <       kCiCCat1 = 0,
64 >       kCiCNoCat = 0,
65 >       kCiCCat1,
66         kCiCCat2,
67         kCiCCat3,
68         kCiCCat4
69       };    
70  
71 <      static Bool_t       PassConversionId(const Photon *p, const DecayParticle *c);
72 <      static Bool_t       PassElectronVeto(const Photon *p, const ElectronCol *els);
73 <      static Double_t       ElectronVetoCiC(const Photon *p, const ElectronCol *els);
74 <      static Bool_t       PassElectronVetoConvRecovery(const Photon *p, const ElectronCol *els, const DecayParticleCol *conversions, const BaseVertex *v);
75 <      static Bool_t       PassTriggerMatching(const Photon *p, const TriggerObjectCol *trigobjs);
76 <      static const DecayParticle *MatchedConversion(const Photon *p, const DecayParticleCol *conversions,
77 <                                               const BaseVertex *vtx, Int_t nWrongHitsMax=1, Double_t probMin=1e-6,
78 <                                               Double_t lxyMin = 2.0, Double_t dRMin = 0.1);
79 <      static const DecayParticle *MatchedConversion(const Track *t, const DecayParticleCol *conversions,
80 <                                               const BaseVertex *vtx, Int_t nWrongHitsMax=1, Double_t probMin=1e-6,
81 <                                               Double_t lxyMin = 2.0);                                              
82 <      static DiphotonR9EtaCats DiphotonR9EtaCat(const Photon *p1, const Photon *p2);
83 <      static DiphotonR9EtaConversionCats DiphotonR9EtaConversionCat(const Photon *p1, const Photon *p2, const DecayParticleCol *conversions, const BaseVertex *v);
84 <      static CiCBaseLineCats CiCBaseLineCat(const Photon *p);
71 >    // Methods for scaling/smearing Photons
72 >    static void ScalePhoton(Photon* p, Double_t scale);
73 >    static void SmearPhoton(Photon* p, TRandom3* rng, Double_t width, UInt_t iSeed);
74 >    static void SmearPhotonError(Photon* p, Double_t width);
75 >
76 >    
77 >    static Bool_t       PassConversionId(const Photon *p, const DecayParticle *c);
78 >    static Bool_t       PassElectronVeto(const Photon *p, const ElectronCol *els);
79 >    static Double_t     ElectronVetoCiC(const Photon *p, const ElectronCol *els);
80 >    static Bool_t       PassElectronVetoConvRecovery(const Photon *p, const ElectronCol *els, const DecayParticleCol *conversions, const BaseVertex *v);
81 >    static Bool_t       PassTriggerMatching(const Photon *p, const TriggerObjectCol *trigobjs);
82 >    static const DecayParticle *MatchedConversion(const Photon *p, const DecayParticleCol *conversions,
83 >                                                  const BaseVertex *vtx, Int_t nWrongHitsMax=1, Double_t probMin=1e-6,
84 >                                                  Double_t lxyMin = 2.0, Double_t dRMin = 0.1);
85 >    static const DecayParticle *MatchedConversion(const SuperCluster *sc, const DecayParticleCol *conversions,
86 >                                                  const BaseVertex *vtx, Int_t nWrongHitsMax=1, Double_t probMin=1e-6,
87 >                                                  Double_t lxyMin = 2.0, Double_t dRMin = 0.1);                                                  
88 >    static const DecayParticle *MatchedConversion(const Track *t, const DecayParticleCol *conversions,
89 >                                                  const BaseVertex *vtx, Int_t nWrongHitsMax=1, Double_t probMin=1e-6,
90 >                                                  Double_t lxyMin = 2.0);                                              
91 >    static DiphotonR9EtaCats DiphotonR9EtaCat(const Photon *p1, const Photon *p2);
92 >    static DiphotonR9EtaPtCats DiphotonR9EtaPtCat(const Photon *p1, const Photon *p2);
93 >    static DiphotonR9EtaConversionCats DiphotonR9EtaConversionCat(const Photon *p1, const Photon *p2, const DecayParticleCol *conversions, const BaseVertex *v);
94 >    static CiCBaseLineCats CiCBaseLineCat(const Photon *p);
95 >    
96 >    static const DecayParticle *MatchedCiCConversion(const Photon *p, const DecayParticleCol *conversions,
97 >                                                     Double_t dPhiMin=0.1, Double_t dEtaMin=0.1,Double_t dRMin=0.1,
98 >                                                     bool print = false);
99  
100 +                                                    
101 +    static const Electron *MatchedElectron(const Photon *p, const ElectronCol *els);
102 +    static const Photon *MatchedPhoton(const Electron *e, const PhotonCol *phs);
103 +    static const SuperCluster *MatchedSC(const SuperCluster *psc, const SuperClusterCol *scs, Double_t drMin=0.3);
104 +                                                    
105 +    static bool PassCiCSelection(const Photon* ph,
106 +                                 const Vertex* vtx,
107 +                                 const TrackCol*    trackCol,
108 +                                 const ElectronCol* eleCol,
109 +                                 const VertexCol*   vtxCol,
110 +                                 double rho, double ptmin,
111 +                                 bool applyEleVeto = true,
112 +                                 bool print = false, float* kin=NULL);
113 +
114 +                                
115 +    static const MCParticle *MatchMC(const Particle *ph, const MCParticleCol *c, Bool_t matchElectrons = kFALSE);
116 +    
117      ClassDef(PhotonTools, 0) // Muon tools
118 <  };
118 >      };
119   }
120  
121   #endif

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines