55 #include <TLorentzVector.h>
70 virtual void endJob()
override ;
73 #ifdef THIS_IS_AN_EVENT_EXAMPLE
101 #ifdef THIS_IS_AN_EVENT_EXAMPLE
102 exampletoken(consumes<ExampleData>(edm::
InputTag(
"example"))),
104 jetname(iConfig.getUntrackedParameter<std::
string>(
"JetHandle",
"iterativeCone5CaloJets")),
106 tauCorrectortoken(consumes<
reco::
JetCorrector>(iConfig.getUntrackedParameter<std::
string>(
"tauCorrHandle",
"TauJetCorrectorIcone5"))),
136 #ifdef THIS_IS_AN_EVENT_EXAMPLE
141 #ifdef THIS_IS_AN_EVENTSETUP_EXAMPLE
143 iSetup.
get<SetupRecord>().
get(pSetup);
155 reco::IsolatedTauTagInfoCollection::const_iterator
tau=tauTagInfoHandle->begin();
160 std::cout <<
"starting tau loop" << std::endl;
161 for(
tau=tauTagInfoHandle->begin();
tau!=tauTagInfoHandle->end() &&
njets<10;++
tau) {
165 double pt =
tau->jet().get()->et();
168 double scale = taucorrector->correction(
tau->jet().get()->p4());
169 double ptcorr =
tau->jet().get()->et() *
scale;
171 std::cout <<
"Tau jet: Original Et = " << pt <<
" Corrected Et = " << ptcorr << std::endl;
bool getByToken(EDGetToken token, Handle< PROD > &result) const
#define DEFINE_FWK_MODULE(type)
virtual void analyze(const edm::Event &, const edm::EventSetup &) override
edm::EDGetTokenT< reco::JetCorrector > tauCorrectortoken
virtual void endJob() override
~TauJetCorrectorExample()
std::vector< IsolatedTauTagInfo > IsolatedTauTagInfoCollection
edm::EDGetTokenT< reco::IsolatedTauTagInfoCollection > tautoken
TauJetCorrectorExample(const edm::ParameterSet &)
virtual void beginJob() override