--- UserCode/MitPhysics/Utils/interface/PhotonTools.h 2011/12/06 23:27:52 1.14 +++ UserCode/MitPhysics/Utils/interface/PhotonTools.h 2013/12/09 17:55:51 1.29 @@ -26,6 +26,8 @@ #include "MitAna/DataTree/interface/SuperClusterCol.h" #include "MitCommon/MathTools/interface/MathUtils.h" +#include "MitAna/DataTree/interface/PFCandidateCol.h" + class TRandom3; namespace mithep { @@ -78,7 +80,12 @@ namespace mithep { kEEhighEtaGold, kEEhighEtaBad }; - + + enum ShowerShapeScales { + kNoShowerShapeScaling = 0, + k2011ShowerShape, + k2012ShowerShape + }; static eScaleCats EScaleCat(const Photon *p); @@ -89,7 +96,14 @@ namespace mithep { static void ScalePhotonR9(Photon *p, Double_t scale); static void ScalePhotonError(Photon *p, Double_t scale); - static Bool_t PassSinglePhotonPresel(const Photon *p,const ElectronCol *els, const DecayParticleCol *conversions, const BaseVertex *v, const TrackCol* trackCol,double rho); + static void ScalePhotonShowerShapes(Photon *p, ShowerShapeScales scale); + + + 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); + 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); + 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); + 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); + 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); static Bool_t PassConversionId(const Photon *p, const DecayParticle *c); static Bool_t PassElectronVeto(const Photon *p, const ElectronCol *els); static Double_t ElectronVetoCiC(const Photon *p, const ElectronCol *els); @@ -111,13 +125,16 @@ namespace mithep { static const DecayParticle *MatchedCiCConversion(const Photon *p, const DecayParticleCol *conversions, Double_t dPhiMin=0.1, Double_t dEtaMin=0.1,Double_t dRMin=0.1, - bool print = false); + bool print = false, + int* numLegs = NULL, int* convIdx = NULL); // for debugging static const Electron *MatchedElectron(const Photon *p, const ElectronCol *els); static const Photon *MatchedPhoton(const Electron *e, const PhotonCol *phs); static const SuperCluster *MatchedSC(const SuperCluster *psc, const SuperClusterCol *scs, Double_t drMin=0.3); - + + static const SuperCluster *MatchedPFSC(const SuperCluster *psc, const PhotonCol *pfphos, const ElectronCol *eles, Double_t drMin=0.1); + static bool PassCiCSelection(const Photon* ph, const Vertex* vtx, const TrackCol* trackCol, @@ -127,7 +144,26 @@ namespace mithep { bool applyEleVeto = true, bool print = false, float* kin=NULL); - + static bool PassCiCPFIsoSelection(const Photon* ph, + const Vertex* vtx, + const PFCandidateCol* pfCol, + const VertexCol* vtxCol, + double rho, double ptmin, + std::vector* kin = NULL); + + static bool PassCiCPFIsoSelectionWithEleVeto(const Photon* ph, + const ElectronCol *els, + const DecayParticleCol *conversions, const BaseVertex *bs, + const Vertex* vtx, + const PFCandidateCol* pfCol, + const VertexCol* vtxCol, + double rho, double ptmin, + Bool_t applyElectronVeto, Bool_t invertElectronVeto, + std::vector* kin= NULL // store variables for debugging... + );// add for mono photon + + static bool PassVgamma2011Selection(const Photon* ph, double rho); + static const MCParticle *MatchMC(const Particle *ph, const MCParticleCol *c, Bool_t matchElectrons = kFALSE); ClassDef(PhotonTools, 0) // Muon tools };