Go to the documentation of this file.00001 #ifndef DQMOFFLINE_TRIGGER_EGHLTOFFPHO
00002 #define DQMOFFLINE_TRIGGER_EGHLTOFFPHO
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #include "DataFormats/EgammaCandidates/interface/PhotonFwd.h"
00021 #include "DataFormats/EgammaCandidates/interface/Photon.h"
00022
00023 #include "DQMOffline/Trigger/interface/EgHLTEgCutCodes.h"
00024 #include "DQMOffline/Trigger/interface/EgHLTTrigCodes.h"
00025
00026 namespace egHLT {
00027 class OffPho {
00028
00029 public:
00030
00031 struct IsolData {
00032 int nrTrks;
00033 float ptTrks;
00034 float em;
00035 float had;
00036 float hltHad;
00037 float hltTrks;
00038 float hltEm;
00039 };
00040
00041 public:
00042
00043 struct ClusShapeData {
00044 float sigmaEtaEta;
00045 float sigmaIEtaIEta;
00046 float e2x5MaxOver5x5;
00047 float e1x5Over5x5;
00048 float sigmaPhiPhi;
00049 float sigmaIPhiIPhi;
00050 float r9;
00051 };
00052
00053 public:
00054
00055 struct HLTData {
00056
00057 float HLTeta;
00058 float HLTphi;
00059 float HLTenergy;
00060 };
00061
00062
00063 private:
00064 const reco::Photon* pho_;
00065
00066 ClusShapeData clusShapeData_;
00067 IsolData isolData_;
00068 HLTData hltData_;
00069
00070
00071 int cutCode_;
00072 int looseCutCode_;
00073
00074
00075
00076 std::vector<std::pair<TrigCodes::TrigBitSet,int> > trigCutsCutCodes_;
00077
00078
00079
00080
00081 TrigCodes::TrigBitSet trigBits_;
00082
00083 public:
00084
00085 OffPho(const reco::Photon& pho,const ClusShapeData& shapeData,const IsolData& isolData,const HLTData& hltData):
00086 pho_(&pho),clusShapeData_(shapeData),isolData_(isolData),hltData_(hltData),
00087 cutCode_(int(EgCutCodes::INVALID)),looseCutCode_(int(EgCutCodes::INVALID)){}
00088 ~OffPho(){}
00089
00090
00091 void setCutCode(int code){cutCode_=code;}
00092 void setLooseCutCode(int code){looseCutCode_=code;}
00093
00094
00095 void setTrigCutsCutCodes(const std::vector<std::pair<TrigCodes::TrigBitSet,int> > trigCutsCutCodes){trigCutsCutCodes_=trigCutsCutCodes;}
00096 void setTrigBits(TrigCodes::TrigBitSet bits){trigBits_=bits;}
00097
00098 const reco::Photon* recoPho()const{return pho_;}
00099
00100
00101 float et()const{return pho_->et();}
00102 float pt()const{return pho_->pt();}
00103 float energy()const{return pho_->energy();}
00104 float eta()const{return pho_->eta();}
00105 float phi()const{return pho_->phi();}
00106 float etSC()const{return pho_->superCluster()->position().rho()/pho_->superCluster()->position().r()*energy();}
00107 float etaSC()const{return pho_->superCluster()->eta();}
00108 float detEta()const{return etaSC();}
00109 float phiSC()const{return pho_->superCluster()->phi();}
00110 float zVtx()const{return pho_->vz();}
00111 const math::XYZTLorentzVector& p4()const{return pho_->p4();}
00112
00113 bool isGap()const{return pho_->isEBGap() || pho_->isEEGap() || pho_->isEBEEGap();}
00114
00115
00116 float hOverE()const{return pho_->hadronicOverEm();}
00117
00118
00119
00120 float sigmaEtaEta()const;
00121 float sigmaEtaEtaUnCorr()const{return clusShapeData_.sigmaEtaEta;}
00122 float sigmaIEtaIEta()const{return clusShapeData_.sigmaIEtaIEta;}
00123 float sigmaPhiPhi()const{return clusShapeData_.sigmaPhiPhi;}
00124 float sigmaIPhiIPhi()const{return clusShapeData_.sigmaIPhiIPhi;}
00125 float e2x5MaxOver5x5()const{return clusShapeData_.e2x5MaxOver5x5;}
00126 float e1x5Over5x5()const{return clusShapeData_.e1x5Over5x5;}
00127 float r9()const{return clusShapeData_.r9;}
00128
00129
00130 float isolEm()const{return isolData_.em;}
00131 float isolHad()const{return isolData_.had;}
00132 int isolNrTrks()const{return isolData_.nrTrks;}
00133 float isolPtTrks()const{return isolData_.ptTrks;}
00134 float hltIsolHad()const{return isolData_.hltHad;}
00135 float hltIsolTrks()const{return isolData_.hltTrks;}
00136 float hltIsolEm()const{return isolData_.hltEm;}
00137
00138
00139
00140 float hltPhi()const{return hltData_.HLTphi;}
00141 float hltEta()const{return hltData_.HLTeta;}
00142 float hltEnergy()const{return hltData_.HLTenergy;}
00143
00144 float DeltaE()const{return (hltEnergy() - energy());}
00145
00146
00147 int cutCode()const{return cutCode_;}
00148 int looseCutCode()const{return looseCutCode_;}
00149
00150
00151
00152 int trigCutsCutCode(const TrigCodes::TrigBitSet& trigger)const;
00153
00154
00155 TrigCodes::TrigBitSet trigBits()const{return trigBits_;}
00156
00157 };
00158 }
00159
00160 #endif