CMS 3D CMS Logo

List of all members | Public Member Functions | Private Types | Private Member Functions | Private Attributes
HLTTauRefProducer Class Reference

#include <HLTTauRefProducer.h>

Inheritance diagram for HLTTauRefProducer:
edm::global::EDProducer<> edm::global::EDProducerBase edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Member Functions

 HLTTauRefProducer (const edm::ParameterSet &)
 
void produce (edm::StreamID, edm::Event &, edm::EventSetup const &) const override
 
- Public Member Functions inherited from edm::global::EDProducer<>
 EDProducer ()=default
 
bool hasAbilityToProduceInLumis () const final
 
bool hasAbilityToProduceInRuns () const final
 
bool wantsGlobalLuminosityBlocks () const final
 
bool wantsGlobalRuns () const final
 
bool wantsStreamLuminosityBlocks () const final
 
bool wantsStreamRuns () const final
 
- Public Member Functions inherited from edm::global::EDProducerBase
 EDProducerBase ()
 
ModuleDescription const & moduleDescription () const
 
 ~EDProducerBase () override
 
- Public Member Functions inherited from edm::ProducerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
std::vector< edm::ProductResolverIndex > const & indiciesForPutProducts (BranchType iBranchType) const
 
 ProducerBase ()
 
std::vector< edm::ProductResolverIndex > const & putTokenIndexToProductResolverIndex () const
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
std::function< void(BranchDescription const &)> registrationCallback () const
 used by the fwk to register list of products More...
 
void resolvePutIndicies (BranchType iBranchType, ModuleToResolverIndicies const &iIndicies, std::string const &moduleLabel)
 
 ~ProducerBase () noexcept(false) override
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
void convertCurrentProcessAlias (std::string const &processName)
 Convert "@currentProcess" in InputTag process names to the actual current process name. More...
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
ESProxyIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector< ProductResolverIndexAndSkipBit > const & itemsToGetFrom (BranchType iType) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProxyIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

Private Types

using LorentzVector = math::XYZTLorentzVectorD
 
using LorentzVectorCollection = std::vector< LorentzVector >
 

Private Member Functions

void doElectrons (edm::Event &) const
 
void doJets (edm::Event &) const
 
void doMET (edm::Event &) const
 
void doMuons (edm::Event &) const
 
void doPFTaus (edm::Event &) const
 
void doPhotons (edm::Event &) const
 
void doTowers (edm::Event &) const
 

Private Attributes

bool doElecFromZ_
 
bool doElectrons_
 
bool doJets_
 
bool doMET_
 
bool doMuons_
 
bool doPFTaus_
 
bool doPhotons_
 
bool doTowers_
 
edm::EDGetTokenT< reco::TrackCollectione_ctfTrackCollection_
 
edm::InputTag e_ctfTrackCollectionSrc_
 
bool e_doID_
 
bool e_doTrackIso_
 
double e_FromZet_
 
double e_isoMaxSumPt_
 
double e_lipCut_
 
double e_maxIsoDR_
 
double e_minIsoDR_
 
double e_trackMinPt_
 
double e_zMmax_
 
double e_zMmin_
 
edm::EDGetTokenT< reco::GsfElectronCollectionElectrons_
 
double etaMax_
 
double etaMaxPFTau_
 
double etaMin_
 
double etaMinPFTau_
 
edm::EDGetTokenT< reco::CaloJetCollectionJets_
 
edm::EDGetTokenT< reco::CaloMETCollectionMET_
 
edm::EDGetTokenT< reco::MuonCollectionMuons_
 
std::vector< edm::EDGetTokenT< reco::PFTauDiscriminator > > PFTauDis_
 
edm::EDGetTokenT< reco::PFTauCollectionPFTaus_
 
double phiMax_
 
double phiMaxPFTau_
 
double phiMin_
 
double phiMinPFTau_
 
double photonEcalIso_
 
edm::EDGetTokenT< reco::PhotonCollectionPhotons_
 
double ptMinElectron_
 
double ptMinJet_
 
double ptMinMET_
 
double ptMinMuon_
 
double ptMinPFTau_
 
double ptMinPhoton_
 
double ptMinTower_
 
double towerIsol_
 
edm::EDGetTokenT< CaloTowerCollectionTowers_
 

Additional Inherited Members

- Public Types inherited from edm::global::EDProducerBase
typedef EDProducerBase ModuleType
 
- Public Types inherited from edm::ProducerBase
using ModuleToResolverIndicies = std::unordered_multimap< std::string, std::tuple< edm::TypeID const *, const char *, edm::ProductResolverIndex >>
 
typedef ProductRegistryHelper::TypeLabelList TypeLabelList
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from edm::global::EDProducerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 

Detailed Description

Definition at line 50 of file HLTTauRefProducer.h.

Member Typedef Documentation

Definition at line 59 of file HLTTauRefProducer.h.

Definition at line 60 of file HLTTauRefProducer.h.

Constructor & Destructor Documentation

HLTTauRefProducer::HLTTauRefProducer ( const edm::ParameterSet iConfig)
explicit

Definition at line 30 of file HLTTauRefProducer.cc.

References nano_cff::electrons, edm::ParameterSet::getUntrackedParameter(), fwrapper::jets, RazorAnalyzer::met, extraflags_cff::muons, nano_cff::photons, and GlobalPosition_Frontier_DevDB_cff::tag.

31 {
32  //One Parameter Set per Collection
33  {
34  auto const& pfTau = iConfig.getUntrackedParameter<edm::ParameterSet>("PFTaus");
35  PFTaus_ = consumes<reco::PFTauCollection>(pfTau.getUntrackedParameter<InputTag>("PFTauProducer"));
36  auto discs = pfTau.getUntrackedParameter<vector<InputTag>>("PFTauDiscriminators");
37  for (edm::InputTag& tag: discs) {
38  PFTauDis_.push_back(consumes<reco::PFTauDiscriminator>(tag));
39  }
40  doPFTaus_ = pfTau.getUntrackedParameter<bool>("doPFTaus",false);
41  ptMinPFTau_= pfTau.getUntrackedParameter<double>("ptMin",15.);
42  etaMinPFTau_= pfTau.getUntrackedParameter<double>("etaMin",-2.5);
43  etaMaxPFTau_= pfTau.getUntrackedParameter<double>("etaMax",2.5);
44  phiMinPFTau_= pfTau.getUntrackedParameter<double>("phiMin",-3.15);
45  phiMaxPFTau_= pfTau.getUntrackedParameter<double>("phiMax",3.15);
46  }
47 
48  {
49  auto const& electrons = iConfig.getUntrackedParameter<edm::ParameterSet>("Electrons");
50  Electrons_ = consumes<reco::GsfElectronCollection>(electrons.getUntrackedParameter<InputTag>("ElectronCollection"));
51  doElectrons_ = electrons.getUntrackedParameter<bool>("doElectrons",false);
52  e_ctfTrackCollectionSrc_ = electrons.getUntrackedParameter<InputTag>("TrackCollection");
53  e_ctfTrackCollection_ = consumes<reco::TrackCollection>(e_ctfTrackCollectionSrc_);
54  ptMinElectron_= electrons.getUntrackedParameter<double>("ptMin",15.);
55  e_doTrackIso_ = electrons.getUntrackedParameter<bool>("doTrackIso",false);
56  e_trackMinPt_= electrons.getUntrackedParameter<double>("ptMinTrack",1.5);
57  e_lipCut_= electrons.getUntrackedParameter<double>("lipMinTrack",1.5);
58  e_minIsoDR_= electrons.getUntrackedParameter<double>("InnerConeDR",0.02);
59  e_maxIsoDR_= electrons.getUntrackedParameter<double>("OuterConeDR",0.6);
60  e_isoMaxSumPt_= electrons.getUntrackedParameter<double>("MaxIsoVar",0.02);
61  }
62 
63  {
64  auto const& muons = iConfig.getUntrackedParameter<edm::ParameterSet>("Muons");
65  Muons_ = consumes<reco::MuonCollection>(muons.getUntrackedParameter<InputTag>("MuonCollection"));
66  doMuons_ = muons.getUntrackedParameter<bool>("doMuons",false);
67  ptMinMuon_= muons.getUntrackedParameter<double>("ptMin",15.);
68  }
69 
70  {
71  auto const& jets = iConfig.getUntrackedParameter<edm::ParameterSet>("Jets");
72  Jets_ = consumes<reco::CaloJetCollection>(jets.getUntrackedParameter<InputTag>("JetCollection"));
73  doJets_ = jets.getUntrackedParameter<bool>("doJets");
74  ptMinJet_= jets.getUntrackedParameter<double>("etMin");
75  }
76 
77  {
78  auto const& towers = iConfig.getUntrackedParameter<edm::ParameterSet>("Towers");
79  Towers_ = consumes<CaloTowerCollection>(towers.getUntrackedParameter<InputTag>("TowerCollection"));
80  doTowers_ = towers.getUntrackedParameter<bool>("doTowers");
81  ptMinTower_= towers.getUntrackedParameter<double>("etMin");
82  towerIsol_= towers.getUntrackedParameter<double>("towerIsolation");
83  }
84 
85  {
86  auto const& photons = iConfig.getUntrackedParameter<edm::ParameterSet>("Photons");
87  Photons_ = consumes<reco::PhotonCollection>(photons.getUntrackedParameter<InputTag>("PhotonCollection"));
88  doPhotons_ = photons.getUntrackedParameter<bool>("doPhotons");
89  ptMinPhoton_= photons.getUntrackedParameter<double>("etMin");
90  photonEcalIso_= photons.getUntrackedParameter<double>("ECALIso");
91  }
92 
93  {
94  auto const& met = iConfig.getUntrackedParameter<edm::ParameterSet>("MET");
95  MET_ = consumes<reco::CaloMETCollection>(met.getUntrackedParameter<InputTag>("METCollection"));
96  doMET_ = met.getUntrackedParameter<bool>("doMET",false);
97  ptMinMET_= met.getUntrackedParameter<double>("ptMin",15.);
98  }
99 
100  etaMin_ = iConfig.getUntrackedParameter<double>("EtaMin",-2.5);
101  etaMax_ = iConfig.getUntrackedParameter<double>("EtaMax",2.5);
102  phiMin_ = iConfig.getUntrackedParameter<double>("PhiMin",-3.15);
103  phiMax_ = iConfig.getUntrackedParameter<double>("PhiMax",3.15);
104 
105  //recoCollections
106  produces<LorentzVectorCollection>("PFTaus");
107  produces<LorentzVectorCollection>("Electrons");
108  produces<LorentzVectorCollection>("Muons");
109  produces<LorentzVectorCollection>("Jets");
110  produces<LorentzVectorCollection>("Photons");
111  produces<LorentzVectorCollection>("Towers");
112  produces<LorentzVectorCollection>("MET");
113 
114 }
T getUntrackedParameter(std::string const &, T const &) const
edm::EDGetTokenT< reco::MuonCollection > Muons_
edm::EDGetTokenT< reco::CaloMETCollection > MET_
edm::EDGetTokenT< reco::GsfElectronCollection > Electrons_
edm::EDGetTokenT< reco::TrackCollection > e_ctfTrackCollection_
vector< PseudoJet > jets
edm::EDGetTokenT< CaloTowerCollection > Towers_
edm::EDGetTokenT< reco::PhotonCollection > Photons_
edm::EDGetTokenT< reco::PFTauCollection > PFTaus_
std::vector< edm::EDGetTokenT< reco::PFTauDiscriminator > > PFTauDis_
edm::InputTag e_ctfTrackCollectionSrc_
met
===> hadronic RAZOR
edm::EDGetTokenT< reco::CaloJetCollection > Jets_

Member Function Documentation

void HLTTauRefProducer::doElectrons ( edm::Event iEvent) const
private

Definition at line 172 of file HLTTauRefProducer.cc.

References metsig::electron, nano_cff::electrons, edm::Event::getByToken(), mps_fire::i, btvTracks_cfi::lip, eostools::move(), edm::Event::put(), and mathSSE::sqrt().

173 {
174  auto product_Electrons = make_unique<LorentzVectorCollection>();
175 
177  if (!iEvent.getByToken(e_ctfTrackCollection_, pCtfTracks)) {
178  edm::LogInfo("") << "Error! Can't get " << e_ctfTrackCollectionSrc_.label() << " by label. ";
179  iEvent.put(move(product_Electrons),"Electrons");
180  return;
181  }
182 
184  if (iEvent.getByToken(Electrons_,electrons)) {
185  for (size_t i=0 ; i<electrons->size(); ++i) {
186  edm::Ref<reco::GsfElectronCollection> electronRef (electrons,i);
187  auto const& electron = (*electrons)[i];
188  if (electron.pt()>ptMinElectron_&&fabs(electron.eta())<etaMax_) {
189  if (e_doTrackIso_) {
190  double sum_of_pt_ele {};
191  for (auto const& tr : *pCtfTracks) {
192  double const lip {electron.gsfTrack()->dz() - tr.dz()};
193  if (tr.pt() > e_trackMinPt_ && fabs(lip) < e_lipCut_) {
194  double dphi {fabs(tr.phi()-electron.trackMomentumAtVtx().phi())};
195  if (dphi>acos(-1.)) {
196  dphi=2*acos(-1.)-dphi;
197  }
198  double const deta {fabs(tr.eta()-electron.trackMomentumAtVtx().eta())};
199  double const dr_ctf_ele {sqrt(deta*deta+dphi*dphi)};
200  if((dr_ctf_ele>e_minIsoDR_) && (dr_ctf_ele<e_maxIsoDR_)){
201  double const cft_pt_2 {tr.pt()*tr.pt()};
202  sum_of_pt_ele += cft_pt_2;
203  }
204  }
205  }
206  double const isolation_value_ele {sum_of_pt_ele/(electron.trackMomentumAtVtx().Rho()*electron.trackMomentumAtVtx().Rho())};
207  if (isolation_value_ele<e_isoMaxSumPt_) {
208  product_Electrons->emplace_back(electron.px(),electron.py(),electron.pz(),electron.energy());
209  }
210  }
211  else {
212  product_Electrons->emplace_back(electron.px(),electron.py(),electron.pz(),electron.energy());
213  }
214  }
215  }
216  }
217  iEvent.put(move(product_Electrons),"Electrons");
218 }
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
Definition: Event.h:125
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:517
edm::EDGetTokenT< reco::GsfElectronCollection > Electrons_
edm::EDGetTokenT< reco::TrackCollection > e_ctfTrackCollection_
T sqrt(T t)
Definition: SSEVec.h:18
edm::InputTag e_ctfTrackCollectionSrc_
std::string const & label() const
Definition: InputTag.h:36
def move(src, dest)
Definition: eostools.py:511
void HLTTauRefProducer::doJets ( edm::Event iEvent) const
private

Definition at line 238 of file HLTTauRefProducer.cc.

References edm::Event::getByToken(), metsig::jet, fwrapper::jets, eostools::move(), and edm::Event::put().

239 {
240  auto product_Jets = make_unique<LorentzVectorCollection>();
241 
243  if (iEvent.getByToken(Jets_,jets)) {
244  for (auto const& jet : *jets) {
245  if (jet.et()>ptMinJet_ && jet.eta()>etaMin_&&jet.eta()<etaMax_&&jet.phi()>phiMin_&&jet.phi()<phiMax_) {
246  product_Jets->emplace_back(jet.px(),jet.py(),jet.pz(),jet.energy());
247  }
248  }
249  }
250  iEvent.put(move(product_Jets),"Jets");
251 }
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
Definition: Event.h:125
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:517
vector< PseudoJet > jets
edm::EDGetTokenT< reco::CaloJetCollection > Jets_
def move(src, dest)
Definition: eostools.py:511
void HLTTauRefProducer::doMET ( edm::Event iEvent) const
private

Definition at line 298 of file HLTTauRefProducer.cc.

References edm::Event::getByToken(), RazorAnalyzer::met, eostools::move(), and edm::Event::put().

299 {
300  auto product_MET = make_unique<LorentzVectorCollection>();
301 
303  if(iEvent.getByToken(MET_,met) && !met->empty()){
304  auto const& metMom = met->front().p4();
305  product_MET->emplace_back(metMom.Px(), metMom.Py(), 0, metMom.Pt());
306  }
307  iEvent.put(move(product_MET),"MET");
308 }
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
Definition: Event.h:125
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:517
edm::EDGetTokenT< reco::CaloMETCollection > MET_
met
===> hadronic RAZOR
def move(src, dest)
Definition: eostools.py:511
void HLTTauRefProducer::doMuons ( edm::Event iEvent) const
private

Definition at line 221 of file HLTTauRefProducer.cc.

References edm::Event::getByToken(), eostools::move(), extraflags_cff::muons, and edm::Event::put().

222 {
223  auto product_Muons = make_unique<LorentzVectorCollection>();
224 
226  if (iEvent.getByToken(Muons_,muons)) {
227  for (auto const& muon : *muons) {
228  if (muon.pt()>ptMinMuon_ && muon.eta()>etaMin_&&muon.eta()<etaMax_&&muon.phi()>phiMin_&&muon.phi()<phiMax_) {
229  product_Muons->emplace_back(muon.px(),muon.py(),muon.pz(),muon.energy());
230  }
231  }
232  }
233  iEvent.put(move(product_Muons),"Muons");
234 }
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
Definition: Event.h:125
edm::EDGetTokenT< reco::MuonCollection > Muons_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:517
def move(src, dest)
Definition: eostools.py:511
void HLTTauRefProducer::doPFTaus ( edm::Event iEvent) const
private

Definition at line 135 of file HLTTauRefProducer.cc.

References edm::Event::getByToken(), mps_fire::i, eostools::move(), and edm::Event::put().

136 {
137  auto product_PFTaus = make_unique<LorentzVectorCollection>();
138 
140  if (iEvent.getByToken(PFTaus_,pftaus)) {
141  for (unsigned int i=0; i<pftaus->size(); ++i) {
142  auto const& pftau = (*pftaus)[i];
143  if (pftau.pt()>ptMinPFTau_&&
144  pftau.eta()>etaMinPFTau_&&pftau.eta()<etaMaxPFTau_&&
145  pftau.phi()>phiMinPFTau_&&pftau.phi()<phiMaxPFTau_) {
146  reco::PFTauRef thePFTau {pftaus,i};
147  bool passAll {true};
150  if (iEvent.getByToken(token, pftaudis)) {
151  if ((*pftaudis)[thePFTau] < 0.5) {
152  passAll = false;
153  break;
154  }
155  }
156  else{
157  passAll = false;
158  break;
159  }
160  }
161  if (passAll) {
162  product_PFTaus->emplace_back(pftau.px(), pftau.py(), pftau.pz(), pftau.energy());
163  }
164  }
165  }
166  }
167  iEvent.put(move(product_PFTaus),"PFTaus");
168 }
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
Definition: Event.h:125
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:517
edm::EDGetTokenT< reco::PFTauCollection > PFTaus_
std::vector< edm::EDGetTokenT< reco::PFTauDiscriminator > > PFTauDis_
def move(src, dest)
Definition: eostools.py:511
void HLTTauRefProducer::doPhotons ( edm::Event iEvent) const
private

Definition at line 281 of file HLTTauRefProducer.cc.

References edm::Event::getByToken(), eostools::move(), muons2muons_cfi::photon, nano_cff::photons, and edm::Event::put().

282 {
283  auto product_Gammas = make_unique<LorentzVectorCollection>();
284 
286  if (iEvent.getByToken(Photons_,photons)) {
287  for (auto const& photon : *photons) {
288  if (photon.ecalRecHitSumEtConeDR04()<photonEcalIso_ &&
289  photon.et()>ptMinPhoton_ && photon.eta()>etaMin_&&photon.eta()<etaMax_&&photon.phi()>phiMin_&&photon.phi()<phiMax_) {
290  product_Gammas->emplace_back(photon.px(),photon.py(),photon.pz(),photon.energy());
291  }
292  }
293  }
294  iEvent.put(move(product_Gammas),"Photons");
295 }
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
Definition: Event.h:125
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:517
edm::EDGetTokenT< reco::PhotonCollection > Photons_
def move(src, dest)
Definition: eostools.py:511
void HLTTauRefProducer::doTowers ( edm::Event iEvent) const
private

Definition at line 254 of file HLTTauRefProducer.cc.

References HiRegitMuonDetachedTripletStep_cff::DeltaR, edm::Event::getByToken(), eostools::move(), and edm::Event::put().

255 {
256  auto product_Towers = make_unique<LorentzVectorCollection>();
257 
259  if (iEvent.getByToken(Towers_,towers)) {
260  for (auto const& tower1 : *towers) {
261  if (tower1.pt()>ptMinTower_ && tower1.eta()>etaMin_&&tower1.eta()<etaMax_&&tower1.phi()>phiMin_&&tower1.phi()<phiMax_) {
262  //calculate isolation
263  double isolET {};
264  for (auto const& tower2 : *towers) {
265  if (ROOT::Math::VectorUtil::DeltaR(tower1.p4(),tower2.p4())<0.5) {
266  isolET+=tower2.pt();
267  }
268  isolET-=tower1.pt();
269  }
270  if (isolET<towerIsol_) {
271  product_Towers->emplace_back(tower1.px(),tower1.py(),tower1.pz(),tower1.energy());
272  }
273  }
274  }
275  }
276  iEvent.put(move(product_Towers),"Towers");
277 }
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
Definition: Event.h:125
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:517
edm::EDGetTokenT< CaloTowerCollection > Towers_
def move(src, dest)
Definition: eostools.py:511
void HLTTauRefProducer::produce ( edm::StreamID  ,
edm::Event iEvent,
edm::EventSetup const &   
) const
overridevirtual

Implements edm::global::EDProducerBase.

Definition at line 116 of file HLTTauRefProducer.cc.

Referenced by JSONExport.JsonExport::export(), HTMLExport.HTMLExport::export(), and HTMLExport.HTMLExportStatic::export().

117 {
118  if(doPFTaus_)
119  doPFTaus(iEvent);
120  if(doElectrons_)
121  doElectrons(iEvent);
122  if(doMuons_)
123  doMuons(iEvent);
124  if(doJets_)
125  doJets(iEvent);
126  if(doPhotons_)
127  doPhotons(iEvent);
128  if(doTowers_)
129  doTowers(iEvent);
130  if(doMET_)
131  doMET(iEvent);
132 }
void doElectrons(edm::Event &) const
void doMET(edm::Event &) const
void doTowers(edm::Event &) const
void doPFTaus(edm::Event &) const
void doMuons(edm::Event &) const
void doJets(edm::Event &) const
void doPhotons(edm::Event &) const

Member Data Documentation

bool HLTTauRefProducer::doElecFromZ_
private

Definition at line 79 of file HLTTauRefProducer.h.

bool HLTTauRefProducer::doElectrons_
private

Definition at line 68 of file HLTTauRefProducer.h.

bool HLTTauRefProducer::doJets_
private

Definition at line 94 of file HLTTauRefProducer.h.

bool HLTTauRefProducer::doMET_
private

Definition at line 103 of file HLTTauRefProducer.h.

bool HLTTauRefProducer::doMuons_
private

Definition at line 90 of file HLTTauRefProducer.h.

bool HLTTauRefProducer::doPFTaus_
private

Definition at line 64 of file HLTTauRefProducer.h.

bool HLTTauRefProducer::doPhotons_
private

Definition at line 85 of file HLTTauRefProducer.h.

bool HLTTauRefProducer::doTowers_
private

Definition at line 98 of file HLTTauRefProducer.h.

edm::EDGetTokenT<reco::TrackCollection> HLTTauRefProducer::e_ctfTrackCollection_
private

Definition at line 69 of file HLTTauRefProducer.h.

edm::InputTag HLTTauRefProducer::e_ctfTrackCollectionSrc_
private

Definition at line 70 of file HLTTauRefProducer.h.

bool HLTTauRefProducer::e_doID_
private

Definition at line 72 of file HLTTauRefProducer.h.

bool HLTTauRefProducer::e_doTrackIso_
private

Definition at line 73 of file HLTTauRefProducer.h.

double HLTTauRefProducer::e_FromZet_
private

Definition at line 82 of file HLTTauRefProducer.h.

double HLTTauRefProducer::e_isoMaxSumPt_
private

Definition at line 78 of file HLTTauRefProducer.h.

double HLTTauRefProducer::e_lipCut_
private

Definition at line 75 of file HLTTauRefProducer.h.

double HLTTauRefProducer::e_maxIsoDR_
private

Definition at line 77 of file HLTTauRefProducer.h.

double HLTTauRefProducer::e_minIsoDR_
private

Definition at line 76 of file HLTTauRefProducer.h.

double HLTTauRefProducer::e_trackMinPt_
private

Definition at line 74 of file HLTTauRefProducer.h.

double HLTTauRefProducer::e_zMmax_
private

Definition at line 81 of file HLTTauRefProducer.h.

double HLTTauRefProducer::e_zMmin_
private

Definition at line 80 of file HLTTauRefProducer.h.

edm::EDGetTokenT<reco::GsfElectronCollection> HLTTauRefProducer::Electrons_
private

Definition at line 67 of file HLTTauRefProducer.h.

double HLTTauRefProducer::etaMax_
private

Definition at line 106 of file HLTTauRefProducer.h.

double HLTTauRefProducer::etaMaxPFTau_
private

Definition at line 65 of file HLTTauRefProducer.h.

double HLTTauRefProducer::etaMin_
private

Definition at line 106 of file HLTTauRefProducer.h.

double HLTTauRefProducer::etaMinPFTau_
private

Definition at line 65 of file HLTTauRefProducer.h.

edm::EDGetTokenT<reco::CaloJetCollection> HLTTauRefProducer::Jets_
private

Definition at line 93 of file HLTTauRefProducer.h.

edm::EDGetTokenT<reco::CaloMETCollection> HLTTauRefProducer::MET_
private

Definition at line 102 of file HLTTauRefProducer.h.

edm::EDGetTokenT<reco::MuonCollection> HLTTauRefProducer::Muons_
private

Definition at line 89 of file HLTTauRefProducer.h.

std::vector<edm::EDGetTokenT<reco::PFTauDiscriminator> > HLTTauRefProducer::PFTauDis_
private

Definition at line 63 of file HLTTauRefProducer.h.

edm::EDGetTokenT<reco::PFTauCollection> HLTTauRefProducer::PFTaus_
private

Definition at line 62 of file HLTTauRefProducer.h.

double HLTTauRefProducer::phiMax_
private

Definition at line 106 of file HLTTauRefProducer.h.

double HLTTauRefProducer::phiMaxPFTau_
private

Definition at line 65 of file HLTTauRefProducer.h.

double HLTTauRefProducer::phiMin_
private

Definition at line 106 of file HLTTauRefProducer.h.

double HLTTauRefProducer::phiMinPFTau_
private

Definition at line 65 of file HLTTauRefProducer.h.

double HLTTauRefProducer::photonEcalIso_
private

Definition at line 86 of file HLTTauRefProducer.h.

edm::EDGetTokenT<reco::PhotonCollection> HLTTauRefProducer::Photons_
private

Definition at line 84 of file HLTTauRefProducer.h.

double HLTTauRefProducer::ptMinElectron_
private

Definition at line 71 of file HLTTauRefProducer.h.

double HLTTauRefProducer::ptMinJet_
private

Definition at line 95 of file HLTTauRefProducer.h.

double HLTTauRefProducer::ptMinMET_
private

Definition at line 104 of file HLTTauRefProducer.h.

double HLTTauRefProducer::ptMinMuon_
private

Definition at line 91 of file HLTTauRefProducer.h.

double HLTTauRefProducer::ptMinPFTau_
private

Definition at line 65 of file HLTTauRefProducer.h.

double HLTTauRefProducer::ptMinPhoton_
private

Definition at line 87 of file HLTTauRefProducer.h.

double HLTTauRefProducer::ptMinTower_
private

Definition at line 99 of file HLTTauRefProducer.h.

double HLTTauRefProducer::towerIsol_
private

Definition at line 100 of file HLTTauRefProducer.h.

edm::EDGetTokenT<CaloTowerCollection> HLTTauRefProducer::Towers_
private

Definition at line 97 of file HLTTauRefProducer.h.