00001 #ifndef DQMOFFLINE_TRIGGER_EGHLTOFFHELPER 00002 #define DQMOFFLINE_TRIGGER_EGHLTOFFHELPER 00003 00004 //class: EgHLTOffHelper (Egamma HLT offline helper) 00005 // 00006 //author: Sam Harper (July 2008) 00007 // 00008 // 00009 //aim: to hide temporary place holder code away from the rest of the system 00010 // 00011 //implimentation: currently no isolation producers or electron selection cut meets my needs 00012 // while I would like to use a central tool, for now I'm cludging my own as 00013 // placeholders 00014 00015 #include "DataFormats/EgammaCandidates/interface/GsfElectron.h" 00016 #include "DataFormats/EgammaCandidates/interface/GsfElectronFwd.h" 00017 #include "DataFormats/EgammaReco/interface/ClusterShape.h" 00018 #include "DataFormats/EgammaReco/interface/ClusterShapeFwd.h" 00019 #include "DataFormats/Common/interface/Handle.h" 00020 #include "DataFormats/EgammaReco/interface/BasicCluster.h" 00021 #include "DataFormats/EgammaReco/interface/BasicClusterShapeAssociation.h" 00022 #include "DataFormats/EcalRecHit/interface/EcalRecHitCollections.h" 00023 #include "DataFormats/JetReco/interface/CaloJet.h" 00024 #include "DQMOffline/Trigger/interface/EgHLTOffEleSel.h" 00025 00026 #include "FWCore/ParameterSet/interface/InputTag.h" 00027 #include "FWCore/Framework/interface/Event.h" 00028 00029 class CaloGeometry; 00030 class CaloTopology; 00031 00032 00033 class EgHLTOffHelper { 00034 00035 private: 00036 EgHLTOffEleSel tagCuts_; //cuts applied to tags 00037 EgHLTOffEleSel probeCuts_; //cuts applied to probes 00038 EgHLTOffEleSel cuts_; //normal selection cuts 00039 00040 //needed for pre 2_1_X releases 00041 //edm::InputTag barrelShapeAssocProd_; 00042 //edm::InputTag endcapShapeAssocProd_; 00043 //edm::Handle<reco::BasicClusterShapeAssociationCollection> clusterShapeHandleBarrel_; 00044 // edm::Handle<reco::BasicClusterShapeAssociationCollection> clusterShapeHandleEndcap_; 00045 00046 //does anybody else think its ridicious that we need handles to the CaloGeometry and Topology as well as all the read out ecal barrel / endcap hits to calculated a standard id variable which to be perfectly honest should be accessible from the electron directly. 00047 //as you may have guessed the following six members are to enable us to calculate sigmaEtaEta, with the first two being the tags needed 00048 edm::InputTag ecalRecHitsEBTag_; 00049 edm::InputTag ecalRecHitsEETag_; 00050 edm::InputTag caloJetsTag_; 00051 const CaloGeometry* caloGeom_; 00052 const CaloTopology* caloTopology_; 00053 const EcalRecHitCollection* ebRecHits_; 00054 const EcalRecHitCollection* eeRecHits_; 00055 const std::vector<reco::CaloJet>* jets_; 00056 00057 00058 public: 00059 EgHLTOffHelper():tagCuts_(),probeCuts_(),cuts_(){} 00060 ~EgHLTOffHelper(){} 00061 00062 void setup(const edm::ParameterSet& conf); 00063 00064 void getHandles(const edm::Event& event,const edm::EventSetup& setup); 00065 00066 const std::vector<reco::CaloJet>* jets()const{return jets_;} 00067 00068 void fillEgHLTOffEleVec(edm::Handle<reco::GsfElectronCollection> gsfElectrons,std::vector<EgHLTOffEle>& egHLTOffEles); 00069 00070 //ripped of from the electronIDAlgo (there must be a better way, I *cannot* believe that there isnt a better way) 00071 //incidently they came up with a new way in 2_1_X, making this redundant. The new way is acutally worse... 00072 const reco::ClusterShape* getClusterShape(const reco::GsfElectron* electron); 00073 00074 00075 00076 00077 00078 00079 }; 00080 00081 #endif