Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:10:17

0001 #ifndef RegressionEnergyPatElectronProducer_h
0002 #define RegressionEnergyPatElectronProducer_h
0003 
0004 #include "DataFormats/Common/interface/Handle.h"
0005 #include "FWCore/Framework/interface/stream/EDProducer.h"
0006 #include "FWCore/Framework/interface/Event.h"
0007 #include "FWCore/Framework/interface/EventSetup.h"
0008 
0009 #include "Geometry/CaloTopology/interface/CaloSubdetectorTopology.h"
0010 #include "Geometry/CaloGeometry/interface/CaloGeometry.h"
0011 
0012 #include "EgammaAnalysis/ElectronTools/interface/ElectronEnergyRegressionEvaluate.h"
0013 
0014 #include "DataFormats/PatCandidates/interface/Electron.h"
0015 #include "DataFormats/VertexReco/interface/VertexFwd.h"
0016 #include "DataFormats/VertexReco/interface/Vertex.h"
0017 
0018 class CaloTopologyRecord;
0019 class CaloGeometryRecord;
0020 class RegressionEnergyPatElectronProducer : public edm::stream::EDProducer<> {
0021 public:
0022   explicit RegressionEnergyPatElectronProducer(const edm::ParameterSet &);
0023   ~RegressionEnergyPatElectronProducer() override;
0024   void produce(edm::Event &, const edm::EventSetup &) override;
0025 
0026 private:
0027   // input collections
0028   edm::EDGetTokenT<reco::GsfElectronCollection> inputGsfElectronsToken_;
0029   edm::EDGetTokenT<pat::ElectronCollection> inputPatElectronsToken_;
0030   edm::EDGetTokenT<double> rhoInputToken_;
0031   edm::EDGetTokenT<reco::VertexCollection> verticesInputToken_;
0032   edm::EDGetTokenT<EcalRecHitCollection> recHitCollectionEBToken_;
0033   edm::EDGetTokenT<EcalRecHitCollection> recHitCollectionEEToken_;
0034 
0035   edm::ESGetToken<CaloTopology, CaloTopologyRecord> ecalTopoToken_;
0036   edm::ESGetToken<CaloGeometry, CaloGeometryRecord> caloGeomToken_;
0037   //
0038   bool useReducedRecHits_;
0039 
0040   //output collection
0041   //  std::string outputCollection_;
0042   std::string nameEnergyReg_;
0043   std::string nameEnergyErrorReg_;
0044 
0045   uint32_t energyRegressionType_;
0046   uint32_t inputCollectionType_;
0047   std::string regressionInputFile_;
0048   bool debug_;
0049   ElectronEnergyRegressionEvaluate *regressionEvaluator_;
0050   bool geomInitialized_;
0051   bool producePatElectrons_;
0052   bool produceValueMaps_;
0053 
0054   const CaloTopology *ecalTopology_;
0055   const CaloGeometry *caloGeometry_;
0056   unsigned nElectrons_;
0057 };
0058 
0059 #endif