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
MuonRadiationFilter Class Reference

#include <MuonRadiationFilter.h>

Inheritance diagram for MuonRadiationFilter:
edm::EDFilter edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Member Functions

 MuonRadiationFilter (const edm::ParameterSet &)
 
 ~MuonRadiationFilter ()
 
- Public Member Functions inherited from edm::EDFilter
 EDFilter ()
 
ModuleDescription const & moduleDescription () const
 
virtual ~EDFilter ()
 
- 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 edm::View< edm::FwdPtr
< reco::PFCandidate > > 
PFView
 

Private Member Functions

bool checkMuonRadiation (const reco::Candidate::LorentzVector &, const reco::Candidate::LorentzVector *, double, const PFView &, const PFView &, const reco::Candidate &, const reco::Candidate &)
 
double compCaloEnECAL (const reco::Candidate::LorentzVector &, const PFView &)
 
double compPFIso_puCorr (const reco::Candidate::LorentzVector &, const PFView &, const PFView &, const reco::Candidate::LorentzVector &, const reco::Candidate::LorentzVector &)
 
void compPFIso_raw (const reco::Candidate::LorentzVector &, const PFView &, const reco::Candidate::LorentzVector &, const reco::Candidate::LorentzVector &, double &, double &, double &)
 
bool filter (edm::Event &, const edm::EventSetup &)
 

Private Attributes

bool addCaloEnECALhighPt_
 
bool addCaloEnECALlowPt_
 
bool applyMassWindowSelectionHighPt_
 
bool applyMassWindowSelectionLowPt_
 
double dRhighPt_
 
double dRisoCone_
 
double dRlowPt_
 
double dRvetoCone_
 
bool filter_
 
bool invert_
 
double maxMass_
 
double maxRelIso_
 
double minPtHigh_
 
double minPtLow_
 
edm::InputTag srcPFCandsNoPU_
 
edm::InputTag srcPFCandsPU_
 
edm::InputTag srcSelectedMuons_
 
int verbosity_
 

Additional Inherited Members

- Public Types inherited from edm::EDFilter
typedef EDFilter 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::EDFilter
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &)
 
- 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

Veto events in which a muon from Z –> mu+ mu- decay radiates a photon: muon -> muon + photon

Author
Christian Veelken, LLR (based on python code developed by Mike Bachtis)
Version
Revision:
1.3
Id:
MuonRadiationFilter.h,v 1.3 2012/11/25 15:43:13 veelken Exp

Definition at line 28 of file MuonRadiationFilter.h.

Member Typedef Documentation

Definition at line 37 of file MuonRadiationFilter.h.

Constructor & Destructor Documentation

MuonRadiationFilter::MuonRadiationFilter ( const edm::ParameterSet cfg)
explicit

Definition at line 18 of file MuonRadiationFilter.cc.

References addCaloEnECALhighPt_, addCaloEnECALlowPt_, applyMassWindowSelectionHighPt_, applyMassWindowSelectionLowPt_, dRhighPt_, dRisoCone_, dRlowPt_, dRvetoCone_, edm::ParameterSet::exists(), filter_, edm::ParameterSet::getParameter(), invert_, maxMass_, maxRelIso_, minPtHigh_, minPtLow_, srcPFCandsNoPU_, srcPFCandsPU_, srcSelectedMuons_, and verbosity_.

19 {
20  srcSelectedMuons_ = cfg.getParameter<edm::InputTag>("srcSelectedMuons");
21  srcPFCandsNoPU_ = cfg.getParameter<edm::InputTag>("srcPFCandsNoPU");
22  srcPFCandsPU_ = cfg.getParameter<edm::InputTag>("srcPFCandsPU");
23 
24  minPtLow_ = cfg.getParameter<double>("minPtLow");
25  dRlowPt_ = cfg.getParameter<double>("dRlowPt");
26  addCaloEnECALlowPt_ = cfg.getParameter<bool>("addCaloEnECALlowPt");
27  applyMassWindowSelectionLowPt_ = cfg.getParameter<bool>("applyMassWindowSelectionLowPt");
28 
29  minPtHigh_ = cfg.getParameter<double>("minPtHigh");
30  dRhighPt_ = cfg.getParameter<double>("dRhighPt");
31  addCaloEnECALhighPt_ = cfg.getParameter<bool>("addCaloEnECALhighPt");
32  applyMassWindowSelectionHighPt_ = cfg.getParameter<bool>("applyMassWindowSelectionHighPt");
33 
34  dRvetoCone_ = cfg.getParameter<double>("dRvetoCone");
35  dRisoCone_ = cfg.getParameter<double>("dRisoCone");
36  maxRelIso_ = cfg.getParameter<double>("maxRelIso");
37 
38  maxMass_ = cfg.getParameter<double>("maxMass");
39 
40  invert_ = cfg.getParameter<bool>("invert");
41  filter_ = cfg.getParameter<bool>("filter");
42  if ( !filter_ ) {
43  produces<bool>();
44  }
45 
46  verbosity_ = ( cfg.exists("verbosity") ) ?
47  cfg.getParameter<int>("verbosity") : 0;
48 }
T getParameter(std::string const &) const
bool exists(std::string const &parameterName) const
checks if a parameter exists
edm::InputTag srcSelectedMuons_
edm::InputTag srcPFCandsNoPU_
edm::InputTag srcPFCandsPU_
MuonRadiationFilter::~MuonRadiationFilter ( )
inline

Definition at line 32 of file MuonRadiationFilter.h.

32 {}

Member Function Documentation

bool MuonRadiationFilter::checkMuonRadiation ( const reco::Candidate::LorentzVector photonP4,
const reco::Candidate::LorentzVector caloP4mu,
double  dR,
const PFView pfCandidatesNoPU,
const PFView pfCandidatesPU,
const reco::Candidate muPlus,
const reco::Candidate muMinus 
)
private

Definition at line 223 of file MuonRadiationFilter.cc.

References Abs(), addCaloEnECALhighPt_, addCaloEnECALlowPt_, applyMassWindowSelectionHighPt_, applyMassWindowSelectionLowPt_, compPFIso_puCorr(), gather_cfg::cout, dRhighPt_, dRlowPt_, maxMass_, maxRelIso_, minPtHigh_, minPtLow_, nomMassZ, reco::Candidate::p4(), and verbosity_.

Referenced by filter().

226 {
227  bool isMuonRadiation = false;
228  if ( dR < dRlowPt_ || dR < dRhighPt_ ) {
229  reco::Candidate::LorentzVector muPlusP4_fromTrack = makeMuonP4(muPlus, verbosity_);
230  reco::Candidate::LorentzVector muMinusP4_fromTrack = makeMuonP4(muMinus, verbosity_);
231  double massWithoutPhoton = (muPlusP4_fromTrack + muMinusP4_fromTrack).mass();
232  reco::Candidate::LorentzVector photonP4sumLow = photonP4;
233  if ( addCaloEnECALlowPt_ && caloP4mu ) photonP4sumLow += (*caloP4mu);
234  if ( dR < dRlowPt_ && photonP4sumLow.pt() > minPtLow_ ) {
235  double massWithPhoton = (muPlusP4_fromTrack + muMinusP4_fromTrack + photonP4sumLow).mass();
236  if ( verbosity_ ) {
237  std::cout << "low photon Pt threshold:" << std::endl;
238  std::cout << " muon #1:" << "Pt = " << muPlusP4_fromTrack.pt() << ", eta = " << muPlusP4_fromTrack.eta() << ", phi = " << muPlusP4_fromTrack.phi() << std::endl;
239  std::cout << " muon #2:" << "Pt = " << muMinusP4_fromTrack.pt() << ", eta = " << muMinusP4_fromTrack.eta() << ", phi = " << muMinusP4_fromTrack.phi() << std::endl;
240  std::cout << " photon:" << "Pt = " << photonP4sumLow.pt() << ", eta = " << photonP4sumLow.eta() << ", phi = " << photonP4sumLow.phi() << " (dR = " << dR << ")" << std::endl;
241  std::cout << " M(mu+mu) = " << massWithoutPhoton << ", M(mu+mu+gamma) = " << massWithPhoton << std::endl;
242  }
243  if ( (TMath::Abs(massWithPhoton - nomMassZ) < TMath::Abs(massWithoutPhoton - nomMassZ) && massWithPhoton < maxMass_) || !applyMassWindowSelectionLowPt_ ) {
244  double pfIso = compPFIso_puCorr(photonP4sumLow, pfCandidatesNoPU, pfCandidatesPU, muPlus.p4(), muMinus.p4());
245  if ( pfIso < (maxRelIso_*photonP4sumLow.pt()) ) isMuonRadiation = true;
246  }
247  }
248  reco::Candidate::LorentzVector photonP4sumHigh = photonP4;
249  if ( addCaloEnECALhighPt_ && caloP4mu ) photonP4sumHigh += (*caloP4mu);
250  if ( dR < dRhighPt_ && photonP4sumHigh.pt() > minPtHigh_ ) {
251  double massWithPhoton = (muPlusP4_fromTrack + muMinusP4_fromTrack + photonP4sumHigh).mass();
252  if ( verbosity_ ) {
253  std::cout << "high photon Pt threshold:" << std::endl;
254  std::cout << " muon #1:" << "Pt = " << muPlusP4_fromTrack.pt() << ", eta = " << muPlusP4_fromTrack.eta() << ", phi = " << muPlusP4_fromTrack.phi() << std::endl;
255  std::cout << " muon #2:" << "Pt = " << muMinusP4_fromTrack.pt() << ", eta = " << muMinusP4_fromTrack.eta() << ", phi = " << muMinusP4_fromTrack.phi() << std::endl;
256  std::cout << " photon:" << "Pt = " << photonP4sumHigh.pt() << ", eta = " << photonP4sumHigh.eta() << ", phi = " << photonP4sumHigh.phi() << " (dR = " << dR << ")" << std::endl;
257  std::cout << " M(mu+mu) = " << massWithoutPhoton << ", M(mu+mu+gamma) = " << massWithPhoton << std::endl;
258  }
259  if ( (TMath::Abs(massWithPhoton - nomMassZ) < TMath::Abs(massWithoutPhoton - nomMassZ) && massWithPhoton < maxMass_) || !applyMassWindowSelectionHighPt_ ) {
260  double pfIso = compPFIso_puCorr(photonP4sumHigh, pfCandidatesNoPU, pfCandidatesPU, muPlus.p4(), muMinus.p4());
261  if ( pfIso < (maxRelIso_*photonP4sumHigh.pt()) ) isMuonRadiation = true;
262  }
263  }
264  }
265  return isMuonRadiation;
266 }
double compPFIso_puCorr(const reco::Candidate::LorentzVector &, const PFView &, const PFView &, const reco::Candidate::LorentzVector &, const reco::Candidate::LorentzVector &)
T Abs(T a)
Definition: MathUtil.h:49
const double nomMassZ
math::XYZTLorentzVector LorentzVector
Lorentz vector.
Definition: Candidate.h:37
tuple cout
Definition: gather_cfg.py:121
virtual const LorentzVector & p4() const =0
four-momentum Lorentz vector
double MuonRadiationFilter::compCaloEnECAL ( const reco::Candidate::LorentzVector refP4,
const PFView pfCandidates 
)
private

Definition at line 111 of file MuonRadiationFilter.cc.

References edm::View< T >::begin(), deltaR(), PFRecoTauDiscriminationAgainstElectronDeadECAL_cfi::dR, dRvetoCone_, and edm::View< T >::end().

Referenced by filter().

112 {
113  double caloEnECAL = 0.;
114  for ( PFView::const_iterator pfCandidate = pfCandidates.begin();
115  pfCandidate != pfCandidates.end(); ++pfCandidate ) {
116  double dR = deltaR(refP4, (*pfCandidate)->p4());
117  if ( dR < dRvetoCone_ ) {
118  caloEnECAL += (*pfCandidate)->ecalEnergy();
119  }
120  }
121  return caloEnECAL;
122 }
std::vector< PFCandidatePtr > pfCandidates(const PFJet &jet, int particleId, bool sort=true)
double deltaR(double eta1, double eta2, double phi1, double phi2)
Definition: TreeUtility.cc:17
boost::indirect_iterator< typename seq_t::const_iterator > const_iterator
Definition: View.h:85
double MuonRadiationFilter::compPFIso_puCorr ( const reco::Candidate::LorentzVector refP4,
const PFView pfCandidatesNoPU,
const PFView pfCandidatesPU,
const reco::Candidate::LorentzVector muPlusP4,
const reco::Candidate::LorentzVector muMinusP4 
)
private

Definition at line 160 of file MuonRadiationFilter.cc.

References compPFIso_raw(), gather_cfg::cout, Max(), and verbosity_.

Referenced by checkMuonRadiation().

163 {
164  if ( verbosity_ ) std::cout << "computing isoSum(NoPU)" << std::endl;
165  double pfChargedCandIsoSumNoPU, pfGammaIsoSumNoPU, pfNeutralHadronIsoSumNoPU;
166  compPFIso_raw(refP4, pfCandidatesNoPU, muPlusP4, muMinusP4, pfChargedCandIsoSumNoPU, pfGammaIsoSumNoPU, pfNeutralHadronIsoSumNoPU);
167 
168  if ( verbosity_ ) std::cout << "computing isoSum(PU)" << std::endl;
169  double pfChargedCandIsoSumPU, pfGammaIsoSumPU, pfNeutralHadronIsoSumPU;
170  compPFIso_raw(refP4, pfCandidatesPU, muPlusP4, muMinusP4, pfChargedCandIsoSumPU, pfGammaIsoSumPU, pfNeutralHadronIsoSumPU);
171 
172  // apply delta-beta PU correction to isolation Pt sum
173  double pfIso = pfChargedCandIsoSumNoPU + TMath::Max(0., pfGammaIsoSumNoPU + pfNeutralHadronIsoSumNoPU - 0.5*pfChargedCandIsoSumPU);
174  if ( verbosity_ ) {
175  std::cout << " pfChargedCandIsoSumNoPU = " << pfChargedCandIsoSumNoPU << std::endl;
176  std::cout << " pfGammaIsoSumNoPU = " << pfGammaIsoSumNoPU << std::endl;
177  std::cout << " pfNeutralHadronIsoSumNoPU = " << pfNeutralHadronIsoSumNoPU << std::endl;
178  std::cout << " pfChargedCandIsoSumPU = " << pfChargedCandIsoSumPU << std::endl;
179  std::cout << "--> isolation of PFGamma = " << pfIso << std::endl;
180  }
181  return pfIso;
182 }
void compPFIso_raw(const reco::Candidate::LorentzVector &, const PFView &, const reco::Candidate::LorentzVector &, const reco::Candidate::LorentzVector &, double &, double &, double &)
T Max(T a, T b)
Definition: MathUtil.h:44
tuple cout
Definition: gather_cfg.py:121
void MuonRadiationFilter::compPFIso_raw ( const reco::Candidate::LorentzVector refP4,
const PFView pfCandidates,
const reco::Candidate::LorentzVector muPlusP4,
const reco::Candidate::LorentzVector muMinusP4,
double &  pfChargedCandIsoSum,
double &  pfGammaIsoSum,
double &  pfNeutralHadronIsoSum 
)
private

Definition at line 124 of file MuonRadiationFilter.cc.

References Abs(), edm::View< T >::begin(), gather_cfg::cout, deltaR(), PFRecoTauDiscriminationAgainstElectronDeadECAL_cfi::dR, dRisoCone_, dRvetoCone_, edm::View< T >::end(), reco::PFCandidate::gamma, reco::PFCandidate::h0, and verbosity_.

Referenced by compPFIso_puCorr().

128 {
129  pfChargedCandIsoSum = 0.;
130  pfGammaIsoSum = 0.;
131  pfNeutralHadronIsoSum = 0.;
132  for ( PFView::const_iterator pfCandidate = pfCandidates.begin();
133  pfCandidate != pfCandidates.end(); ++pfCandidate ) {
134  double dR = deltaR(refP4, (*pfCandidate)->p4());
135  if ( dR < dRisoCone_ ) {
136  bool isVeto = false;
137  if ( dR < dRvetoCone_ ) {
138  isVeto = true;
139  } else {
140  double dRmuPlus = deltaR(muPlusP4, (*pfCandidate)->p4());
141  if ( dRmuPlus < dRvetoCone_ ) isVeto = true;
142  double dRmuMinus = deltaR(muMinusP4, (*pfCandidate)->p4());
143  if ( dRmuMinus < dRvetoCone_ ) isVeto = true;
144  }
145  if ( isVeto ) continue;
146  if ( TMath::Abs((*pfCandidate)->charge()) > 0.5 ) {
147  if ( verbosity_ ) std::cout << " adding PFChargedCand: Pt = " << (*pfCandidate)->pt() << ", eta = " << (*pfCandidate)->eta() << ", phi = " << (*pfCandidate)->phi() << " (dR = " << dR << ")" << std::endl;
148  pfChargedCandIsoSum += (*pfCandidate)->pt();
149  } else if ( (*pfCandidate)->particleId() == reco::PFCandidate::gamma ) {
150  if ( verbosity_ ) std::cout << " adding PFGamma: Pt = " << (*pfCandidate)->pt() << ", eta = " << (*pfCandidate)->eta() << ", phi = " << (*pfCandidate)->phi() << " (dR = " << dR << ")" << std::endl;
151  pfGammaIsoSum += (*pfCandidate)->pt();
152  } else if ( (*pfCandidate)->particleId() == reco::PFCandidate::h0 ) {
153  if ( verbosity_ ) std::cout << " adding PFNeutralHadron: Pt = " << (*pfCandidate)->pt() << ", eta = " << (*pfCandidate)->eta() << ", phi = " << (*pfCandidate)->phi() << " (dR = " << dR << ")" << std::endl;
154  pfNeutralHadronIsoSum += (*pfCandidate)->pt();
155  }
156  }
157  }
158 }
std::vector< PFCandidatePtr > pfCandidates(const PFJet &jet, int particleId, bool sort=true)
T Abs(T a)
Definition: MathUtil.h:49
double deltaR(double eta1, double eta2, double phi1, double phi2)
Definition: TreeUtility.cc:17
boost::indirect_iterator< typename seq_t::const_iterator > const_iterator
Definition: View.h:85
tuple cout
Definition: gather_cfg.py:121
bool MuonRadiationFilter::filter ( edm::Event evt,
const edm::EventSetup es 
)
privatevirtual

Implements edm::EDFilter.

Definition at line 62 of file MuonRadiationFilter.cc.

References checkMuonRadiation(), compCaloEnECAL(), gather_cfg::cout, deltaR(), reco::PFCandidate::e, filter_, reco::PFCandidate::gamma, edm::Event::getByLabel(), getSelMuons(), getTheMuMinus(), getTheMuPlus(), invert_, edm::RefToBase< T >::isNull(), reco::Candidate::p4(), edm::Event::put(), srcPFCandsNoPU_, srcPFCandsPU_, srcSelectedMuons_, and verbosity_.

63 {
64  if ( verbosity_ ) std::cout << "<MuonRadiationFilter::filter>:" << std::endl;
65 
66  std::vector<reco::CandidateBaseRef> selMuons = getSelMuons(evt, srcSelectedMuons_);
67  const reco::CandidateBaseRef muPlus = getTheMuPlus(selMuons);
68  const reco::CandidateBaseRef muMinus = getTheMuMinus(selMuons);
69 
70  if ( muPlus.isNull() || muMinus.isNull() ) return false; // not selected Z --> mu+ mu- event: reject event
71 
72  edm::Handle<PFView> pfCandidatesNoPU;
73  evt.getByLabel(srcPFCandsNoPU_, pfCandidatesNoPU);
74  edm::Handle<PFView> pfCandidatesPU;
75  evt.getByLabel(srcPFCandsPU_, pfCandidatesPU);
76 
77  double muPlusCaloEnECAL = compCaloEnECAL(muPlus->p4(), *pfCandidatesNoPU);
78  if ( verbosity_ ) std::cout << "muPlusCaloEnECAL = " << muPlusCaloEnECAL << std::endl;
79  reco::Candidate::LorentzVector caloP4muPlus = makeCaloEnP4(muPlus->p4(), muPlusCaloEnECAL);
80  double muMinusCaloEnECAL = compCaloEnECAL(muMinus->p4(), *pfCandidatesNoPU);
81  if ( verbosity_ ) std::cout << "muMinusCaloEnECAL = " << muMinusCaloEnECAL << std::endl;
82  reco::Candidate::LorentzVector caloP4muMinus = makeCaloEnP4(muMinus->p4(), muMinusCaloEnECAL);
83 
84  bool isMuonRadiation = false;
85 
86  for ( PFView::const_iterator pfCandidate = pfCandidatesNoPU->begin();
87  pfCandidate != pfCandidatesNoPU->end(); ++pfCandidate ) {
88  if ( (*pfCandidate)->particleId() == reco::PFCandidate::gamma || (*pfCandidate)->particleId() == reco::PFCandidate::e ) { // CV: include converted photons
89  double dRmuPlus = deltaR((*pfCandidate)->p4(), muPlus->p4());
90  if ( checkMuonRadiation((*pfCandidate)->p4(), &caloP4muPlus, dRmuPlus, *pfCandidatesNoPU, *pfCandidatesPU, *muPlus, *muMinus) ) isMuonRadiation = true;
91  double dRmuMinus = deltaR((*pfCandidate)->p4(), muMinus->p4());
92  if ( checkMuonRadiation((*pfCandidate)->p4(), &caloP4muMinus, dRmuMinus, *pfCandidatesNoPU, *pfCandidatesPU, *muPlus, *muMinus) ) isMuonRadiation = true;
93  }
94  }
95 
96  if ( checkMuonRadiation(caloP4muPlus, 0, 0., *pfCandidatesNoPU, *pfCandidatesPU, *muPlus, *muMinus) ) isMuonRadiation = true;
97  if ( checkMuonRadiation(caloP4muMinus, 0, 0., *pfCandidatesNoPU, *pfCandidatesPU, *muPlus, *muMinus) ) isMuonRadiation = true;
98 
99  if ( verbosity_ ) std::cout << "isMuonRadiation = " << isMuonRadiation << std::endl;
100 
101  if ( filter_ ) {
102  if ( invert_ != isMuonRadiation ) return false; // reject events with muon -> muon + photon radiation
103  else return true;
104  } else {
105  std::auto_ptr<bool> filter_result(new bool(invert_ != !isMuonRadiation));
106  evt.put(filter_result);
107  return true;
108  }
109 }
reco::CandidateBaseRef getTheMuMinus(const std::vector< reco::CandidateBaseRef > &)
bool checkMuonRadiation(const reco::Candidate::LorentzVector &, const reco::Candidate::LorentzVector *, double, const PFView &, const PFView &, const reco::Candidate &, const reco::Candidate &)
double compCaloEnECAL(const reco::Candidate::LorentzVector &, const PFView &)
edm::InputTag srcSelectedMuons_
edm::InputTag srcPFCandsNoPU_
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
Definition: Event.h:120
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:420
double deltaR(double eta1, double eta2, double phi1, double phi2)
Definition: TreeUtility.cc:17
bool isNull() const
Checks for null.
Definition: RefToBase.h:321
math::XYZTLorentzVector LorentzVector
Lorentz vector.
Definition: Candidate.h:37
boost::indirect_iterator< typename seq_t::const_iterator > const_iterator
Definition: View.h:85
tuple cout
Definition: gather_cfg.py:121
std::vector< reco::CandidateBaseRef > getSelMuons(const edm::Event &, const edm::InputTag &)
edm::InputTag srcPFCandsPU_
reco::CandidateBaseRef getTheMuPlus(const std::vector< reco::CandidateBaseRef > &)
virtual const LorentzVector & p4() const =0
four-momentum Lorentz vector

Member Data Documentation

bool MuonRadiationFilter::addCaloEnECALhighPt_
private

Definition at line 59 of file MuonRadiationFilter.h.

Referenced by checkMuonRadiation(), and MuonRadiationFilter().

bool MuonRadiationFilter::addCaloEnECALlowPt_
private

Definition at line 54 of file MuonRadiationFilter.h.

Referenced by checkMuonRadiation(), and MuonRadiationFilter().

bool MuonRadiationFilter::applyMassWindowSelectionHighPt_
private

Definition at line 60 of file MuonRadiationFilter.h.

Referenced by checkMuonRadiation(), and MuonRadiationFilter().

bool MuonRadiationFilter::applyMassWindowSelectionLowPt_
private

Definition at line 55 of file MuonRadiationFilter.h.

Referenced by checkMuonRadiation(), and MuonRadiationFilter().

double MuonRadiationFilter::dRhighPt_
private

Definition at line 58 of file MuonRadiationFilter.h.

Referenced by checkMuonRadiation(), and MuonRadiationFilter().

double MuonRadiationFilter::dRisoCone_
private

Definition at line 63 of file MuonRadiationFilter.h.

Referenced by compPFIso_raw(), and MuonRadiationFilter().

double MuonRadiationFilter::dRlowPt_
private

Definition at line 53 of file MuonRadiationFilter.h.

Referenced by checkMuonRadiation(), and MuonRadiationFilter().

double MuonRadiationFilter::dRvetoCone_
private

Definition at line 62 of file MuonRadiationFilter.h.

Referenced by compCaloEnECAL(), compPFIso_raw(), and MuonRadiationFilter().

bool MuonRadiationFilter::filter_
private

Definition at line 69 of file MuonRadiationFilter.h.

Referenced by filter(), and MuonRadiationFilter().

bool MuonRadiationFilter::invert_
private

Definition at line 68 of file MuonRadiationFilter.h.

Referenced by filter(), and MuonRadiationFilter().

double MuonRadiationFilter::maxMass_
private

Definition at line 66 of file MuonRadiationFilter.h.

Referenced by checkMuonRadiation(), and MuonRadiationFilter().

double MuonRadiationFilter::maxRelIso_
private

Definition at line 64 of file MuonRadiationFilter.h.

Referenced by checkMuonRadiation(), and MuonRadiationFilter().

double MuonRadiationFilter::minPtHigh_
private

Definition at line 57 of file MuonRadiationFilter.h.

Referenced by checkMuonRadiation(), and MuonRadiationFilter().

double MuonRadiationFilter::minPtLow_
private

Definition at line 52 of file MuonRadiationFilter.h.

Referenced by checkMuonRadiation(), and MuonRadiationFilter().

edm::InputTag MuonRadiationFilter::srcPFCandsNoPU_
private

Definition at line 49 of file MuonRadiationFilter.h.

Referenced by filter(), and MuonRadiationFilter().

edm::InputTag MuonRadiationFilter::srcPFCandsPU_
private

Definition at line 50 of file MuonRadiationFilter.h.

Referenced by filter(), and MuonRadiationFilter().

edm::InputTag MuonRadiationFilter::srcSelectedMuons_
private

Definition at line 48 of file MuonRadiationFilter.h.

Referenced by filter(), and MuonRadiationFilter().

int MuonRadiationFilter::verbosity_
private