CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Public Attributes | Private Attributes
HiPhotonType Class Reference

#include <HiPhotonType.h>

Public Member Functions

 HiPhotonType (edm::Handle< reco::GenParticleCollection > inputHandle)
 
bool IsIsolated (const reco::GenParticle &pp)
 
bool IsPrompt (const reco::GenParticle &pp)
 

Public Attributes

double PI
 

Private Attributes

HiGammaJetSignalDef mcisocut
 

Detailed Description

Definition at line 44 of file HiPhotonType.h.

Constructor & Destructor Documentation

HiPhotonType::HiPhotonType ( edm::Handle< reco::GenParticleCollection inputHandle)

Definition at line 16 of file HiPhotonType.cc.

References PI, and edm::Handle< T >::product().

17 {
18  using namespace std;
19 
20  const GenParticleCollection *collection1 = inputHandle.product();
21  mcisocut = HiGammaJetSignalDef(collection1);
22  PI = 3.141592653589793238462643383279502884197169399375105820974945;
23 
24 }
std::vector< GenParticle > GenParticleCollection
collection of GenParticles
T const * product() const
Definition: Handle.h:81
HiGammaJetSignalDef mcisocut
Definition: HiPhotonType.h:55

Member Function Documentation

bool HiPhotonType::IsIsolated ( const reco::GenParticle pp)

Definition at line 27 of file HiPhotonType.cc.

References dt_dqm_sourceclient_common_cff::reco.

28 {
29  using namespace std;
30  using namespace edm;
31  using namespace reco;
32  // Check if a given particle is isolated.
33 
34  return mcisocut.IsIsolatedPP(pp);
35 }
bool IsIsolatedPP(const reco::GenParticle &pp)
HiGammaJetSignalDef mcisocut
Definition: HiPhotonType.h:55
bool HiPhotonType::IsPrompt ( const reco::GenParticle pp)

Definition at line 39 of file HiPhotonType.cc.

References gather_cfg::cout, reco::CompositeRefCandidateT< D >::mother(), reco::Candidate::pdgId(), and reco::LeafCandidate::pdgId().

40 {
41  using namespace std;
42  if ( pp.pdgId() != 22)
43  return false;
44 
45  if ( pp.mother() ==0 )
46  {
47  // cout << "No mom for this particle.." << endl;
48  return false;
49  }
50  else
51  {
52  if (pp.mother()->pdgId() == 22)
53  {
54  cout << " found a prompt photon" << endl;
55  return true;
56  }
57  else
58  return false;
59  }
60 }
virtual int pdgId() const
PDG identifier.
virtual int pdgId() const =0
PDG identifier.
tuple cout
Definition: gather_cfg.py:121
virtual const Candidate * mother(size_type=0) const
return mother at a given position, i = 0, ... numberOfMothers() - 1 (read only mode) ...

Member Data Documentation

HiGammaJetSignalDef HiPhotonType::mcisocut
private

Definition at line 55 of file HiPhotonType.h.

double HiPhotonType::PI

Definition at line 52 of file HiPhotonType.h.