CMS 3D CMS Logo

reco::Pi0 Class Reference

reconstructed Pi0 candidates from either PFCandidate or BasicCluster More...

#include <RecoTauTag/Pi0Tau/interface/Pi0.h>

List of all members.

Public Types

enum  Pi0Type {
  UnDefined = 0, UnResolved = 1, Resolved = 2, Converted1 = 3,
  Converted2 = 4
}

Public Member Functions

double energy () const
const math::XYZTLorentzVectormomentum () const
math::XYZTLorentzVector momentum (const math::XYZPoint &vtx) const
 Pi0 (const Pi0 &other)
 Pi0 (int type, double e, math::XYZPoint pos, math::XYZTLorentzVector mon, reco::PFCandidateRefVector &source_candidates)
 Pi0 ()
const math::XYZPointposition () const
const reco::PFCandidateRefVectorsourceCandidates () const
int type () const

Private Attributes

double energy_
math::XYZTLorentzVector momentum_
math::XYZPoint position_
reco::PFCandidateRefVector sourceCandidates_
int type_

Friends

std::ostream & operator<< (std::ostream &out, const Pi0 &pi0)


Detailed Description

reconstructed Pi0 candidates from either PFCandidate or BasicCluster

Author:
Dongwook Jang
Date:
December 2006

Definition at line 20 of file Pi0.h.


Member Enumeration Documentation

enum reco::Pi0::Pi0Type

Enumerator:
UnDefined 
UnResolved 
Resolved 
Converted1 
Converted2 

Definition at line 24 of file Pi0.h.

00024                  { UnDefined = 0,
00025                    UnResolved = 1,
00026                    Resolved = 2,
00027                    Converted1 = 3,
00028                    Converted2 = 4 };


Constructor & Destructor Documentation

Pi0::Pi0 (  ) 

Definition at line 6 of file Pi0.cc.

References edm::RefVector< C, T, F >::clear(), energy_, momentum_, position_, sourceCandidates_, and type_.

00006         {
00007   type_ = 0;
00008   energy_ = 0.0;
00009   position_ *= 0;
00010   momentum_ *= 0;
00011   sourceCandidates_.clear();
00012 }

Pi0::Pi0 ( int  type,
double  e,
math::XYZPoint  pos,
math::XYZTLorentzVector  mon,
reco::PFCandidateRefVector source_candidates 
)

Definition at line 15 of file Pi0.cc.

References energy_, momentum_, position_, sourceCandidates_, and type_.

00015                                                                                                                     {
00016   type_ = type;
00017   energy_ = e;
00018   position_ = pos;
00019   momentum_ = mom;
00020   sourceCandidates_ = source_candidates;
00021 }

Pi0::Pi0 ( const Pi0 other  ) 

Definition at line 24 of file Pi0.cc.

References energy(), energy_, momentum(), momentum_, position(), position_, sourceCandidates(), sourceCandidates_, type(), and type_.

00024                         {
00025   type_ = other.type();
00026   energy_ = other.energy();
00027   position_ = other.position();
00028   momentum_ = other.momentum();
00029   sourceCandidates_ = other.sourceCandidates();
00030 }


Member Function Documentation

double reco::Pi0::energy (  )  const [inline]

Definition at line 42 of file Pi0.h.

References energy_.

Referenced by reco::operator<<(), and Pi0().

00042 { return energy_; }

const math::XYZTLorentzVector& reco::Pi0::momentum (  )  const [inline]

Definition at line 54 of file Pi0.h.

References momentum_.

00054 { return momentum_; };

math::XYZTLorentzVector Pi0::momentum ( const math::XYZPoint vtx  )  const

Definition at line 33 of file Pi0.cc.

References muonGeometry::mag(), momentum_, p3, p4, reco::PI0MASS, position_, and funct::sqrt().

Referenced by TauVariables::makeVariables(), and Pi0().

00033                                                                  {
00034 
00035   math::XYZTLorentzVector p4(0.0,0.0,0.0,0.0);
00036 
00037   double mag = momentum_.E();
00038   if(mag <= 0.0) return p4;
00039 
00040   if(mag > PI0MASS) mag = sqrt(mag*mag - PI0MASS*PI0MASS);
00041 
00042   math::XYZPoint p3(position_ - vtx);
00043   if(p3.R() == 0.0) return math::XYZTLorentzVector(0.0,0.0,0.0,0.0);
00044 
00045   p3 *= mag/p3.R();
00046   p4.SetCoordinates(p3.X(),p3.Y(),p3.Z(),momentum_.E());
00047 
00048   return p4;
00049 
00050 }

const math::XYZPoint& reco::Pi0::position ( void   )  const [inline]

Definition at line 45 of file Pi0.h.

References position_.

Referenced by reco::operator<<(), and Pi0().

00045 { return position_; }

const reco::PFCandidateRefVector& reco::Pi0::sourceCandidates (  )  const [inline]

Definition at line 48 of file Pi0.h.

References sourceCandidates_.

Referenced by Pi0().

00048 { return sourceCandidates_; }

int reco::Pi0::type ( void   )  const [inline]

Definition at line 39 of file Pi0.h.

References type_.

Referenced by Pi0().

00039 { return type_; }


Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  out,
const Pi0 pi0 
) [friend]

Definition at line 53 of file Pi0.cc.

00054                                                {  
00055   if (!out) return out;  
00056 
00057   out << "type : " << pi0.type_
00058       << ", energy : "<< pi0.energy()
00059       << ", position = (" << pi0.position().X()
00060       << "," << pi0.position().Y()
00061       << "," << pi0.position().Z()
00062       << ")" 
00063       << std::endl;
00064 
00065   return out;
00066 }


Member Data Documentation

double reco::Pi0::energy_ [private]

Definition at line 66 of file Pi0.h.

Referenced by energy(), and Pi0().

math::XYZTLorentzVector reco::Pi0::momentum_ [private]

Definition at line 72 of file Pi0.h.

Referenced by momentum(), and Pi0().

math::XYZPoint reco::Pi0::position_ [private]

Definition at line 69 of file Pi0.h.

Referenced by momentum(), Pi0(), and position().

reco::PFCandidateRefVector reco::Pi0::sourceCandidates_ [private]

Definition at line 75 of file Pi0.h.

Referenced by Pi0(), and sourceCandidates().

int reco::Pi0::type_ [private]

Definition at line 63 of file Pi0.h.

Referenced by reco::operator<<(), Pi0(), and type().


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:51:28 2009 for CMSSW by  doxygen 1.5.4