00001 #ifndef EventFilter_SiStripRawToDigi_SiStripRawToClustersRoI_H 00002 #define EventFilter_SiStripRawToDigi_SiStripRawToClustersRoI_H 00003 00004 #include "CalibFormats/SiStripObjects/interface/SiStripRegionCabling.h" 00005 #include "DataFormats/Common/interface/Handle.h" 00006 #include "DataFormats/Common/interface/RefGetter.h" 00007 #include "DataFormats/EgammaReco/interface/SuperCluster.h" 00008 #include "DataFormats/EgammaReco/interface/SuperClusterFwd.h" 00009 #include "DataFormats/JetReco/interface/CaloJetCollection.h" 00010 #include "DataFormats/JetReco/interface/CaloJet.h" 00011 #include "DataFormats/SiStripCluster/interface/SiStripCluster.h" 00012 #include "DataFormats/TrackReco/interface/Track.h" 00013 #include "DataFormats/TrackReco/interface/TrackFwd.h" 00014 #include "FWCore/Framework/interface/EDProducer.h" 00015 #include "FWCore/Framework/interface/ESHandle.h" 00016 #include "FWCore/Framework/interface/Event.h" 00017 #include "FWCore/Framework/interface/EventSetup.h" 00018 #include "FWCore/MessageLogger/interface/MessageLogger.h" 00019 #include "FWCore/ParameterSet/interface/ParameterSet.h" 00020 #include <string> 00021 #include <memory> 00022 #include "boost/bind.hpp" 00023 00030 class SiStripRawToClustersRoI : public edm::EDProducer { 00031 00032 public: 00033 00034 typedef edm::LazyGetter<SiStripCluster> LazyGetter; 00035 typedef edm::RefGetter<SiStripCluster> RefGetter; 00036 typedef SiStripRegionCabling::Position Position; 00037 typedef SiStripRegionCabling::SubDet SubDet; 00038 00039 SiStripRawToClustersRoI( const edm::ParameterSet& ); 00040 ~SiStripRawToClustersRoI(); 00041 00042 virtual void beginJob( const edm::EventSetup& ); 00043 virtual void beginRun( edm::Run&, const edm::EventSetup& ); 00044 virtual void produce( edm::Event&, const edm::EventSetup& ); 00045 00046 private: 00047 00048 void updateCabling( const edm::EventSetup& setup ); 00049 00051 bool physicalLayer( SubDet&, uint32_t& ) const; 00052 00054 void random(RefGetter&, edm::Handle<LazyGetter>&) const; 00055 00057 void electrons(const reco::SuperClusterCollection&, RefGetter&, edm::Handle<LazyGetter>&) const; 00058 00060 void muons(const reco::TrackCollection&, RefGetter&, edm::Handle<LazyGetter>&) const; 00061 00063 void taujets(const reco::CaloJetCollection&, RefGetter&, edm::Handle<LazyGetter>&) const; 00064 00066 void bjets(const reco::CaloJetCollection&, RefGetter&, edm::Handle<LazyGetter>&) const; 00067 00069 const SiStripRegionCabling* cabling_; 00070 00071 uint32_t cacheId_; 00072 00074 std::vector<uint32_t> allregions_; 00075 00077 int nlayers_; 00078 00080 bool global_; 00081 bool random_; 00082 bool electrons_; 00083 bool muons_; 00084 bool taujets_; 00085 bool bjets_; 00086 00088 edm::InputTag siStripLazyGetter_; 00089 edm::InputTag electronBarrelL2_; 00090 edm::InputTag electronEndcapL2_; 00091 edm::InputTag muonL2_; 00092 edm::InputTag taujetL2_; 00093 edm::InputTag bjetL2_; 00094 00096 double electrondeta_; 00097 double electrondphi_; 00098 double muondeta_; 00099 double muondphi_; 00100 double taujetdeta_; 00101 double taujetdphi_; 00102 double bjetdeta_; 00103 double bjetdphi_; 00104 }; 00105 00106 #endif 00107