1 #ifndef CalibratedElectronProducerRun2_h
2 #define CalibratedElectronProducerRun2_h
40 theElectronToken(consumes<edm::
View<
T> >(conf.getParameter<edm::
InputTag>(
"electrons"))),
41 theGBRForestName(conf.getParameter<std::
string>(
"gbrForestName")),
42 theEpCombinationTool(),
43 theEnCorrectorRun2(theEpCombinationTool, conf.getParameter<bool>(
"isMC"), conf.getParameter<bool>(
"isSynchronization"), conf.getParameter<std::
string>(
"correctionFile"))
45 produces<std::vector<T> >();
58 theEpCombinationTool.init(theGBRForestHandle.product());
63 std::auto_ptr<std::vector<T> >
out(
new std::vector<T>());
64 out->reserve(in->size());
66 for (
const T &ele : *in) {
68 theEnCorrectorRun2.calibrate(out->back(), iEvent.
id().
run(), iEvent.
streamID());
CalibratedElectronProducerRun2T< reco::GsfElectron > CalibratedElectronProducerRun2
edm::EDGetTokenT< edm::View< T > > theElectronToken
CalibratedElectronProducerRun2T(const edm::ParameterSet &)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
#define DEFINE_FWK_MODULE(type)
edm::ESHandle< GBRForest > theGBRForestHandle
virtual ~CalibratedElectronProducerRun2T()
virtual void produce(edm::Event &, const edm::EventSetup &) override
EpCombinationTool theEpCombinationTool
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
CalibratedElectronProducerRun2T< pat::Electron > CalibratedPatElectronProducerRun2
StreamID streamID() const
std::string theGBRForestName
ElectronEnergyCalibratorRun2 theEnCorrectorRun2