CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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::EDProducer edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Member Functions

 HLTTauRefProducer (const edm::ParameterSet &)
 
virtual void produce (edm::Event &, const edm::EventSetup &)
 
 ~HLTTauRefProducer ()
 
- Public Member Functions inherited from edm::EDProducer
 EDProducer ()
 
ModuleDescription const & moduleDescription () const
 
virtual ~EDProducer ()
 
- Public Member Functions inherited from edm::ProducerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 ProducerBase ()
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
std::function< void(BranchDescription
const &)> 
registrationCallback () const
 used by the fwk to register list of products More...
 
virtual ~ProducerBase ()
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
 EDConsumerBase ()
 
ProductHolderIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
std::vector
< ProductHolderIndexAndSkipBit >
const & 
itemsToGetFromEvent () const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesDependentUpon (const std::string &iProcessName, std::vector< const char * > &oModuleLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
bool registeredToConsume (ProductHolderIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

Private Types

typedef math::XYZTLorentzVectorD LorentzVector
 
typedef std::vector
< LorentzVector
LorentzVectorCollection
 

Private Member Functions

void doElectrons (edm::Event &, const edm::EventSetup &)
 
void doElectronsFromZ (edm::Event &, const edm::EventSetup &, std::auto_ptr< LorentzVectorCollection > &)
 
void doJets (edm::Event &, const edm::EventSetup &)
 
void doMET (edm::Event &, const edm::EventSetup &)
 
void doMuons (edm::Event &, const edm::EventSetup &)
 
void doPFTaus (edm::Event &, const edm::EventSetup &)
 
void doPhotons (edm::Event &, const edm::EventSetup &)
 
void doTowers (edm::Event &, const edm::EventSetup &)
 
double ElectronTrkIsolation (const reco::TrackCollection *, const reco::GsfElectron &)
 

Private Attributes

bool doElecFromZ_
 
bool doElectrons_
 
bool doJets_
 
bool doMET_
 
bool doMuons_
 
bool doPFTaus_
 
bool doPhotons_
 
bool doTowers_
 
edm::EDGetTokenT
< reco::TrackCollection
e_ctfTrackCollection_
 
edm::InputTag e_ctfTrackCollectionSrc_
 
bool e_doID_
 
bool e_doTrackIso_
 
double e_FromZet_
 
edm::EDGetTokenT
< reco::ElectronIDAssociationCollection
e_idAssocProd_
 
double e_isoMaxSumPt_
 
double e_lipCut_
 
double e_maxIsoDR_
 
double e_minIsoDR_
 
double e_trackMinPt_
 
double e_zMmax_
 
double e_zMmin_
 
edm::EDGetTokenT
< reco::GsfElectronCollection
Electrons_
 
double etaMax
 
edm::EDGetTokenT
< reco::CaloJetCollection
Jets_
 
edm::EDGetTokenT
< reco::CaloMETCollection
MET_
 
edm::EDGetTokenT
< reco::MuonCollection
Muons_
 
std::vector< edm::EDGetTokenT
< reco::PFTauDiscriminator > > 
PFTauDis_
 
edm::EDGetTokenT
< reco::PFTauCollection
PFTaus_
 
double photonEcalIso_
 
edm::EDGetTokenT
< reco::PhotonCollection
Photons_
 
double ptMinElectron_
 
double ptMinJet_
 
double ptMinMET_
 
double ptMinMuon_
 
double ptMinPFTau_
 
double ptMinPhoton_
 
double ptMinTower_
 
double towerIsol_
 
edm::EDGetTokenT
< CaloTowerCollection
Towers_
 

Additional Inherited Members

- Public Types inherited from edm::EDProducer
typedef EDProducer ModuleType
 
- Public Types inherited from edm::ProducerBase
typedef
ProductRegistryHelper::TypeLabelList 
TypeLabelList
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from edm::EDProducer
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 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 52 of file HLTTauRefProducer.h.

Member Typedef Documentation

Definition at line 61 of file HLTTauRefProducer.h.

Definition at line 62 of file HLTTauRefProducer.h.

Constructor & Destructor Documentation

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

Definition at line 33 of file HLTTauRefProducer.cc.

References HLT_25ns14e33_v1_cff::etaMax, edm::ParameterSet::getUntrackedParameter(), fwrapper::jets, objects.METAnalyzer::met, patZpeak::muons, interactiveExample::photons, GlobalPosition_Frontier_DevDB_cff::tag, and HLT_25ns14e33_v1_cff::towers.

34 {
35 
36 
37  //One Parameter Set per Collection
38 
39  ParameterSet pfTau = iConfig.getUntrackedParameter<edm::ParameterSet>("PFTaus");
40  PFTaus_ = consumes<reco::PFTauCollection>(pfTau.getUntrackedParameter<InputTag>("PFTauProducer"));
41  auto discs = pfTau.getUntrackedParameter<std::vector<InputTag> >("PFTauDiscriminators");
42  for(edm::InputTag& tag: discs) {
43  PFTauDis_.push_back(consumes<reco::PFTauDiscriminator>(tag));
44  }
45  doPFTaus_ = pfTau.getUntrackedParameter<bool>("doPFTaus",false);
46  ptMinPFTau_= pfTau.getUntrackedParameter<double>("ptMin",15.);
47 
48  ParameterSet electrons = iConfig.getUntrackedParameter<edm::ParameterSet>("Electrons");
49  Electrons_ = consumes<reco::GsfElectronCollection>(electrons.getUntrackedParameter<InputTag>("ElectronCollection"));
50  doElectrons_ = electrons.getUntrackedParameter<bool>("doElectrons",false);
51  e_doID_ = electrons.getUntrackedParameter<bool>("doID",false);
52  if(e_doID_) {
53  e_idAssocProd_ = consumes<reco::ElectronIDAssociationCollection>(electrons.getUntrackedParameter<InputTag>("IdCollection"));
54  }
55  e_ctfTrackCollectionSrc_ = electrons.getUntrackedParameter<InputTag>("TrackCollection");
56  e_ctfTrackCollection_ = consumes<reco::TrackCollection>(e_ctfTrackCollectionSrc_);
57  ptMinElectron_= electrons.getUntrackedParameter<double>("ptMin",15.);
58  e_doTrackIso_ = electrons.getUntrackedParameter<bool>("doTrackIso",false);
59  e_trackMinPt_= electrons.getUntrackedParameter<double>("ptMinTrack",1.5);
60  e_lipCut_= electrons.getUntrackedParameter<double>("lipMinTrack",1.5);
61  e_minIsoDR_= electrons.getUntrackedParameter<double>("InnerConeDR",0.02);
62  e_maxIsoDR_= electrons.getUntrackedParameter<double>("OuterConeDR",0.6);
63  e_isoMaxSumPt_= electrons.getUntrackedParameter<double>("MaxIsoVar",0.02);
64 
66  Muons_ = consumes<reco::MuonCollection>(muons.getUntrackedParameter<InputTag>("MuonCollection"));
67  doMuons_ = muons.getUntrackedParameter<bool>("doMuons",false);
68  ptMinMuon_= muons.getUntrackedParameter<double>("ptMin",15.);
69 
71  Jets_ = consumes<reco::CaloJetCollection>(jets.getUntrackedParameter<InputTag>("JetCollection"));
72  doJets_ = jets.getUntrackedParameter<bool>("doJets");
73  ptMinJet_= jets.getUntrackedParameter<double>("etMin");
74 
76  Towers_ = consumes<CaloTowerCollection>(towers.getUntrackedParameter<InputTag>("TowerCollection"));
77  doTowers_ = towers.getUntrackedParameter<bool>("doTowers");
78  ptMinTower_= towers.getUntrackedParameter<double>("etMin");
79  towerIsol_= towers.getUntrackedParameter<double>("towerIsolation");
80 
82  Photons_ = consumes<reco::PhotonCollection>(photons.getUntrackedParameter<InputTag>("PhotonCollection"));
83  doPhotons_ = photons.getUntrackedParameter<bool>("doPhotons");
84  ptMinPhoton_= photons.getUntrackedParameter<double>("etMin");
85  photonEcalIso_= photons.getUntrackedParameter<double>("ECALIso");
86 
88  MET_ = consumes<reco::CaloMETCollection>(met.getUntrackedParameter<InputTag>("METCollection"));
89  doMET_ = met.getUntrackedParameter<bool>("doMET",false);
90  ptMinMET_= met.getUntrackedParameter<double>("ptMin",15.);
91 
92 
93  etaMax = iConfig.getUntrackedParameter<double>("EtaMax",2.5);
94 
95 
96  //recoCollections
97  produces<LorentzVectorCollection>("PFTaus");
98  produces<LorentzVectorCollection>("Electrons");
99  produces<LorentzVectorCollection>("Muons");
100  produces<LorentzVectorCollection>("Jets");
101  produces<LorentzVectorCollection>("Photons");
102  produces<LorentzVectorCollection>("Towers");
103  produces<LorentzVectorCollection>("MET");
104 
105 }
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_
edm::EDGetTokenT< reco::ElectronIDAssociationCollection > e_idAssocProd_
std::vector< edm::EDGetTokenT< reco::PFTauDiscriminator > > PFTauDis_
edm::InputTag e_ctfTrackCollectionSrc_
tuple muons
Definition: patZpeak.py:38
edm::EDGetTokenT< reco::CaloJetCollection > Jets_
HLTTauRefProducer::~HLTTauRefProducer ( )

Definition at line 107 of file HLTTauRefProducer.cc.

107 { }

Member Function Documentation

void HLTTauRefProducer::doElectrons ( edm::Event iEvent,
const edm::EventSetup iES 
)
private

Definition at line 160 of file HLTTauRefProducer.cc.

References edm::AssociationMap< edm::OneToOne< GsfElectronCollection, ElectronIDCollection > >::const_iterator, relval_parameters_module::energy, eta, HLT_25ns14e33_v1_cff::etaMax, edm::Event::getByToken(), i, xuti::id_tag(), edm::HandleBase::isValid(), HLT_25ns14e33_v1_cff::lip, edm::Handle< T >::product(), EnergyCorrector::pt, edm::Event::put(), and mathSSE::sqrt().

161 {
162  auto_ptr<LorentzVectorCollection> product_Electrons(new LorentzVectorCollection);
163  //Retrieve the collections
164 
166  if(e_doID_){//UGLY HACK UNTIL GET ELETRON ID WORKING IN 210
167 
168  iEvent.getByToken(e_idAssocProd_, pEleID);
169 
170  if (!pEleID.isValid()){
171  edm::LogInfo("")<< "Error! Can't get electronIDAssocProducer by label. ";
172  e_doID_ = false;
173  }
174  }
176  iEvent.getByToken(e_ctfTrackCollection_, pCtfTracks);
177  if (!pCtfTracks.isValid()) {
178  edm::LogInfo("")<< "Error! Can't get " << e_ctfTrackCollectionSrc_.label() << " by label. ";
179  iEvent.put(product_Electrons,"Electrons");
180  return;
181  }
182  const reco::TrackCollection * ctfTracks = pCtfTracks.product();
184  if(iEvent.getByToken(Electrons_,electrons))
185  for(size_t i=0;i<electrons->size();++i)
186  {
187  edm::Ref<reco::GsfElectronCollection> electronRef(electrons,i);
188  bool idDec=false;
189  if(e_doID_){
191  tagIDAssocItr = pEleID->find(electronRef);
192  const reco::ElectronIDRef& id_tag = tagIDAssocItr->val;
193  idDec=id_tag->cutBasedDecision();
194  }else idDec=true;
195  if((*electrons)[i].pt()>ptMinElectron_&&fabs((*electrons)[i].eta())<etaMax&&idDec)
196  {
197  if(e_doTrackIso_){
198  reco::TrackCollection::const_iterator tr = ctfTracks->begin();
199  double sum_of_pt_ele=0;
200  for(;tr != ctfTracks->end();++tr)
201  {
202  double lip = (*electrons)[i].gsfTrack()->dz() - tr->dz();
203  if(tr->pt() > e_trackMinPt_ && fabs(lip) < e_lipCut_){
204  double dphi=fabs(tr->phi()-(*electrons)[i].trackMomentumAtVtx().phi());
205  if(dphi>acos(-1.))dphi=2*acos(-1.)-dphi;
206  double deta=fabs(tr->eta()-(*electrons)[i].trackMomentumAtVtx().eta());
207  double dr_ctf_ele = sqrt(deta*deta+dphi*dphi);
208  if((dr_ctf_ele>e_minIsoDR_) && (dr_ctf_ele<e_maxIsoDR_)){
209  double cft_pt_2 = (tr->pt())*(tr->pt());
210  sum_of_pt_ele += cft_pt_2;
211  }
212  }
213  }
214  double isolation_value_ele = sum_of_pt_ele/((*electrons)[i].trackMomentumAtVtx().Rho()*(*electrons)[i].trackMomentumAtVtx().Rho());
215  if(isolation_value_ele<e_isoMaxSumPt_){
216  LorentzVector vec((*electrons)[i].px(),(*electrons)[i].py(),(*electrons)[i].pz(),(*electrons)[i].energy());
217  product_Electrons->push_back(vec);
218  }
219 
220  }
221  else{
222  LorentzVector vec((*electrons)[i].px(),(*electrons)[i].py(),(*electrons)[i].pz(),(*electrons)[i].energy());
223  product_Electrons->push_back(vec);
224  }
225  }
226  }
227 
228  iEvent.put(product_Electrons,"Electrons");
229 }
int i
Definition: DBlmapReader.cc:9
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:457
math::XYZTLorentzVector LorentzVector
const std::string id_tag("id")
std::vector< Track > TrackCollection
collection of Tracks
Definition: TrackFwd.h:13
edm::EDGetTokenT< reco::GsfElectronCollection > Electrons_
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
Definition: Event.h:115
edm::EDGetTokenT< reco::TrackCollection > e_ctfTrackCollection_
T sqrt(T t)
Definition: SSEVec.h:48
bool isValid() const
Definition: HandleBase.h:75
std::vector< LorentzVector > LorentzVectorCollection
edm::EDGetTokenT< reco::ElectronIDAssociationCollection > e_idAssocProd_
edm::InputTag e_ctfTrackCollectionSrc_
T const * product() const
Definition: Handle.h:81
std::string const & label() const
Definition: InputTag.h:43
void HLTTauRefProducer::doElectronsFromZ ( edm::Event ,
const edm::EventSetup ,
std::auto_ptr< LorentzVectorCollection > &   
)
private
void HLTTauRefProducer::doJets ( edm::Event iEvent,
const edm::EventSetup iES 
)
private

Definition at line 256 of file HLTTauRefProducer.cc.

References relval_parameters_module::energy, eta, HLT_25ns14e33_v1_cff::etaMax, edm::Event::getByToken(), i, fwrapper::jets, and edm::Event::put().

257 {
258  auto_ptr<LorentzVectorCollection> product_Jets(new LorentzVectorCollection);
259  //Retrieve the collection
261  if(iEvent.getByToken(Jets_,jets))
262  for(size_t i = 0 ;i<jets->size();++i)
263  {
264  if((*jets)[i].et()>ptMinJet_&&fabs((*jets)[i].eta())<etaMax)
265  {
266  LorentzVector vec((*jets)[i].px(),(*jets)[i].py(),(*jets)[i].pz(),(*jets)[i].energy());
267  product_Jets->push_back(vec);
268  }
269  }
270  iEvent.put(product_Jets,"Jets");
271 }
int i
Definition: DBlmapReader.cc:9
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:457
math::XYZTLorentzVector LorentzVector
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
Definition: Event.h:115
vector< PseudoJet > jets
std::vector< LorentzVector > LorentzVectorCollection
edm::EDGetTokenT< reco::CaloJetCollection > Jets_
void HLTTauRefProducer::doMET ( edm::Event iEvent,
const edm::EventSetup iES 
)
private

Definition at line 323 of file HLTTauRefProducer.cc.

References edm::Event::getByToken(), objects.METAnalyzer::met, EnergyCorrector::pt, and edm::Event::put().

324 {
325  auto_ptr<LorentzVectorCollection> product_MET(new LorentzVectorCollection);
326  //Retrieve the collection
328  if(iEvent.getByToken(MET_,met)){
329  double px = met->front().p4().Px();
330  double py = met->front().p4().Py();
331  double pt = met->front().p4().Pt();
332  LorentzVector vec(px,py,0,pt);
333  product_MET->push_back(vec);
334  }
335  iEvent.put(product_MET,"MET");
336 }
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:457
math::XYZTLorentzVector LorentzVector
edm::EDGetTokenT< reco::CaloMETCollection > MET_
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
Definition: Event.h:115
std::vector< LorentzVector > LorentzVectorCollection
void HLTTauRefProducer::doMuons ( edm::Event iEvent,
const edm::EventSetup iES 
)
private

Definition at line 232 of file HLTTauRefProducer.cc.

References relval_parameters_module::energy, eta, HLT_25ns14e33_v1_cff::etaMax, edm::Event::getByToken(), i, patZpeak::muons, and edm::Event::put().

233 {
234  auto_ptr<LorentzVectorCollection> product_Muons(new LorentzVectorCollection);
235  //Retrieve the collection
237  if(iEvent.getByToken(Muons_,muons))
238 
239  for(size_t i = 0 ;i<muons->size();++i)
240  {
241 
242  if((*muons)[i].pt()>ptMinMuon_&&fabs((*muons)[i].eta())<etaMax)
243  {
244  LorentzVector vec((*muons)[i].px(),(*muons)[i].py(),(*muons)[i].pz(),(*muons)[i].energy());
245  product_Muons->push_back(vec);
246  }
247  }
248 
249 
250  iEvent.put(product_Muons,"Muons");
251 
252 }
int i
Definition: DBlmapReader.cc:9
edm::EDGetTokenT< reco::MuonCollection > Muons_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:457
math::XYZTLorentzVector LorentzVector
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
Definition: Event.h:115
std::vector< LorentzVector > LorentzVectorCollection
tuple muons
Definition: patZpeak.py:38
void HLTTauRefProducer::doPFTaus ( edm::Event iEvent,
const edm::EventSetup iES 
)
private

Definition at line 128 of file HLTTauRefProducer.cc.

References relval_parameters_module::energy, eta, HLT_25ns14e33_v1_cff::etaMax, edm::Event::getByToken(), i, and edm::Event::put().

129 {
130  auto_ptr<LorentzVectorCollection> product_PFTaus(new LorentzVectorCollection);
131  //Retrieve the collection
133  if(iEvent.getByToken(PFTaus_,pftaus)) {
134  for(unsigned int i=0; i<pftaus->size(); ++i) {
135  if((*pftaus)[i].pt()>ptMinPFTau_&&fabs((*pftaus)[i].eta())<etaMax)
136  {
137  reco::PFTauRef thePFTau(pftaus,i);
138  bool passAll = true;
141  if(iEvent.getByToken(token, pftaudis)) {
142  if((*pftaudis)[thePFTau] < 0.5) {
143  passAll = false;
144  break;
145  }
146  }
147  }
148  if(passAll) {
149  LorentzVector vec((*pftaus)[i].px(),(*pftaus)[i].py(),(*pftaus)[i].pz(),(*pftaus)[i].energy());
150  product_PFTaus->push_back(vec);
151  }
152  }
153  }
154  }
155  iEvent.put(product_PFTaus,"PFTaus");
156 }
int i
Definition: DBlmapReader.cc:9
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:457
math::XYZTLorentzVector LorentzVector
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
Definition: Event.h:115
edm::EDGetTokenT< reco::PFTauCollection > PFTaus_
std::vector< LorentzVector > LorentzVectorCollection
std::vector< edm::EDGetTokenT< reco::PFTauDiscriminator > > PFTauDis_
void HLTTauRefProducer::doPhotons ( edm::Event iEvent,
const edm::EventSetup iES 
)
private

Definition at line 304 of file HLTTauRefProducer.cc.

References relval_parameters_module::energy, eta, HLT_25ns14e33_v1_cff::etaMax, edm::Event::getByToken(), i, interactiveExample::photons, and edm::Event::put().

305 {
306  auto_ptr<LorentzVectorCollection> product_Gammas(new LorentzVectorCollection);
307  //Retrieve the collection
309  if(iEvent.getByToken(Photons_,photons))
310  for(size_t i = 0 ;i<photons->size();++i)
311  if((*photons)[i].ecalRecHitSumEtConeDR04()<photonEcalIso_)
312  {
313  if((*photons)[i].et()>ptMinPhoton_&&fabs((*photons)[i].eta())<etaMax)
314  {
315  LorentzVector vec((*photons)[i].px(),(*photons)[i].py(),(*photons)[i].pz(),(*photons)[i].energy());
316  product_Gammas->push_back(vec);
317  }
318  }
319  iEvent.put(product_Gammas,"Photons");
320 }
int i
Definition: DBlmapReader.cc:9
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:457
math::XYZTLorentzVector LorentzVector
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
Definition: Event.h:115
edm::EDGetTokenT< reco::PhotonCollection > Photons_
std::vector< LorentzVector > LorentzVectorCollection
void HLTTauRefProducer::doTowers ( edm::Event iEvent,
const edm::EventSetup iES 
)
private

Definition at line 274 of file HLTTauRefProducer.cc.

References HLT_25ns14e33_v1_cff::DeltaR, relval_parameters_module::energy, eta, HLT_25ns14e33_v1_cff::etaMax, edm::Event::getByToken(), i, j, p4, edm::Event::put(), and HLT_25ns14e33_v1_cff::towers.

275 {
276  auto_ptr<LorentzVectorCollection> product_Towers(new LorentzVectorCollection);
277  //Retrieve the collection
279  if(iEvent.getByToken(Towers_,towers))
280  for(size_t i = 0 ;i<towers->size();++i)
281  {
282  if((*towers)[i].pt()>ptMinTower_&&fabs((*towers)[i].eta())<etaMax)
283  {
284  //calculate isolation
285  double isolET=0;
286  for(unsigned int j=0;j<towers->size();++j)
287  {
288  if(ROOT::Math::VectorUtil::DeltaR((*towers)[i].p4(),(*towers)[j].p4())<0.5)
289  isolET+=(*towers)[j].pt();
290  }
291  isolET-=(*towers)[i].pt();
292  if(isolET<towerIsol_)
293  {
294  LorentzVector vec((*towers)[i].px(),(*towers)[i].py(),(*towers)[i].pz(),(*towers)[i].energy());
295  product_Towers->push_back(vec);
296  }
297  }
298  }
299  iEvent.put(product_Towers,"Towers");
300 }
int i
Definition: DBlmapReader.cc:9
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:457
math::XYZTLorentzVector LorentzVector
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
Definition: Event.h:115
double p4[4]
Definition: TauolaWrapper.h:92
int j
Definition: DBlmapReader.cc:9
edm::EDGetTokenT< CaloTowerCollection > Towers_
std::vector< LorentzVector > LorentzVectorCollection
double HLTTauRefProducer::ElectronTrkIsolation ( const reco::TrackCollection ,
const reco::GsfElectron  
)
private
void HLTTauRefProducer::produce ( edm::Event iEvent,
const edm::EventSetup iES 
)
virtual

Implements edm::EDProducer.

Definition at line 109 of file HLTTauRefProducer.cc.

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

110 {
111  if(doPFTaus_)
112  doPFTaus(iEvent,iES);
113  if(doElectrons_)
114  doElectrons(iEvent,iES);
115  if(doMuons_)
116  doMuons(iEvent,iES);
117  if(doJets_)
118  doJets(iEvent,iES);
119  if(doPhotons_)
120  doPhotons(iEvent,iES);
121  if(doTowers_)
122  doTowers(iEvent,iES);
123  if(doMET_)
124  doMET(iEvent,iES);
125 }
void doPFTaus(edm::Event &, const edm::EventSetup &)
void doTowers(edm::Event &, const edm::EventSetup &)
void doJets(edm::Event &, const edm::EventSetup &)
void doMET(edm::Event &, const edm::EventSetup &)
void doMuons(edm::Event &, const edm::EventSetup &)
void doPhotons(edm::Event &, const edm::EventSetup &)
void doElectrons(edm::Event &, const edm::EventSetup &)

Member Data Documentation

bool HLTTauRefProducer::doElecFromZ_
private

Definition at line 83 of file HLTTauRefProducer.h.

bool HLTTauRefProducer::doElectrons_
private

Definition at line 71 of file HLTTauRefProducer.h.

bool HLTTauRefProducer::doJets_
private

Definition at line 99 of file HLTTauRefProducer.h.

bool HLTTauRefProducer::doMET_
private

Definition at line 108 of file HLTTauRefProducer.h.

bool HLTTauRefProducer::doMuons_
private

Definition at line 94 of file HLTTauRefProducer.h.

bool HLTTauRefProducer::doPFTaus_
private

Definition at line 66 of file HLTTauRefProducer.h.

bool HLTTauRefProducer::doPhotons_
private

Definition at line 88 of file HLTTauRefProducer.h.

bool HLTTauRefProducer::doTowers_
private

Definition at line 103 of file HLTTauRefProducer.h.

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

Definition at line 73 of file HLTTauRefProducer.h.

edm::InputTag HLTTauRefProducer::e_ctfTrackCollectionSrc_
private

Definition at line 74 of file HLTTauRefProducer.h.

bool HLTTauRefProducer::e_doID_
private

Definition at line 76 of file HLTTauRefProducer.h.

bool HLTTauRefProducer::e_doTrackIso_
private

Definition at line 77 of file HLTTauRefProducer.h.

double HLTTauRefProducer::e_FromZet_
private

Definition at line 85 of file HLTTauRefProducer.h.

edm::EDGetTokenT<reco::ElectronIDAssociationCollection> HLTTauRefProducer::e_idAssocProd_
private

Definition at line 72 of file HLTTauRefProducer.h.

double HLTTauRefProducer::e_isoMaxSumPt_
private

Definition at line 82 of file HLTTauRefProducer.h.

double HLTTauRefProducer::e_lipCut_
private

Definition at line 79 of file HLTTauRefProducer.h.

double HLTTauRefProducer::e_maxIsoDR_
private

Definition at line 81 of file HLTTauRefProducer.h.

double HLTTauRefProducer::e_minIsoDR_
private

Definition at line 80 of file HLTTauRefProducer.h.

double HLTTauRefProducer::e_trackMinPt_
private

Definition at line 78 of file HLTTauRefProducer.h.

double HLTTauRefProducer::e_zMmax_
private

Definition at line 84 of file HLTTauRefProducer.h.

double HLTTauRefProducer::e_zMmin_
private

Definition at line 84 of file HLTTauRefProducer.h.

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

Definition at line 70 of file HLTTauRefProducer.h.

double HLTTauRefProducer::etaMax
private

Definition at line 111 of file HLTTauRefProducer.h.

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

Definition at line 98 of file HLTTauRefProducer.h.

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

Definition at line 107 of file HLTTauRefProducer.h.

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

Definition at line 93 of file HLTTauRefProducer.h.

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

Definition at line 65 of file HLTTauRefProducer.h.

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

Definition at line 64 of file HLTTauRefProducer.h.

double HLTTauRefProducer::photonEcalIso_
private

Definition at line 89 of file HLTTauRefProducer.h.

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

Definition at line 87 of file HLTTauRefProducer.h.

double HLTTauRefProducer::ptMinElectron_
private

Definition at line 75 of file HLTTauRefProducer.h.

double HLTTauRefProducer::ptMinJet_
private

Definition at line 100 of file HLTTauRefProducer.h.

double HLTTauRefProducer::ptMinMET_
private

Definition at line 109 of file HLTTauRefProducer.h.

double HLTTauRefProducer::ptMinMuon_
private

Definition at line 95 of file HLTTauRefProducer.h.

double HLTTauRefProducer::ptMinPFTau_
private

Definition at line 67 of file HLTTauRefProducer.h.

double HLTTauRefProducer::ptMinPhoton_
private

Definition at line 90 of file HLTTauRefProducer.h.

double HLTTauRefProducer::ptMinTower_
private

Definition at line 104 of file HLTTauRefProducer.h.

double HLTTauRefProducer::towerIsol_
private

Definition at line 105 of file HLTTauRefProducer.h.

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

Definition at line 102 of file HLTTauRefProducer.h.