CMS 3D CMS Logo

reco::Conversion Class Reference

Author:
N.Marinelli University of Notre Dame, US
More...

#include <DataFormats/EgammaCandidates/interface/Conversion.h>

List of all members.

Public Member Functions

const std::vector
< reco::CaloClusterPtr > & 
bcMatchingWithTracks () const
reco::CaloClusterPtrVector caloCluster () const
 reference to a SuperCluster
Conversionclone () const
 returns a clone of the candidate
 Conversion (const reco::CaloClusterPtrVector clu, const std::vector< reco::TrackRef > tr, const std::vector< math::XYZPoint > trackPositionAtEcal, const reco::Vertex &convVtx, const std::vector< reco::CaloClusterPtr > &matchingBC)
 Conversion ()
const reco::VertexconversionVertex () const
 returns the reco conversion vertex
const std::vector
< math::XYZPoint > & 
ecalImpactPosition () const
 positions of the track extrapolation at the ECAL front face
double EoverP () const
 Super Cluster energy divided by track pair momentum if Standard seeing method.
bool isConverted () const
 Bool flagging objects having track size >0.
unsigned int nTracks () const
 Number of tracks= 0,1,2.
double pairCotThetaSeparation () const
 Delta cot(Theta) where Theta is the angle in the (y,z) plane between the two tracks.
double pairInvariantMass () const
 if nTracks=2 returns the pair invariant mass
GlobalVector pairMomentum () const
 Conversion tracks momentum.
std::vector< reco::TrackReftracks () const
 vector of references to tracks
double zOfPrimaryVertexFromTracks () const
 set primary event vertex used to define photon direction
virtual ~Conversion ()
 destructor

Private Attributes

reco::CaloClusterPtrVector caloCluster_
 vector pointer to a/multiple seed CaloCluster(s)
reco::Vertex theConversionVertex_
 Fitted Kalman conversion vertex.
std::vector< reco::CaloClusterPtrtheMatchingBCs_
 Clusters mathing the tracks (these are not the seeds).
std::vector< math::XYZPointthePositionAtEcal_
 position at the ECAl surface of the track extrapolation
std::vector< reco::TrackReftracks_
 reference to a vector Track references


Detailed Description

Author:
N.Marinelli University of Notre Dame, US

Version:
Id
Conversion.h,v 1.4 2008/05/08 19:42:45 nancy Exp

Definition at line 22 of file Conversion.h.


Constructor & Destructor Documentation

reco::Conversion::Conversion (  )  [inline]

Definition at line 26 of file Conversion.h.

Referenced by clone().

00026 {}

Conversion::Conversion ( const reco::CaloClusterPtrVector  clu,
const std::vector< reco::TrackRef tr,
const std::vector< math::XYZPoint trackPositionAtEcal,
const reco::Vertex convVtx,
const std::vector< reco::CaloClusterPtr > &  matchingBC 
)

Definition at line 8 of file Conversion.cc.

00012                                                                           :  
00013                          
00014 
00015   caloCluster_(sc), tracks_(tr), 
00016   thePositionAtEcal_(trackPositionAtEcal), 
00017   theConversionVertex_(convVtx), 
00018   theMatchingBCs_(matchingBC)  {
00019   
00020 }

Conversion::~Conversion (  )  [virtual]

destructor

Definition at line 23 of file Conversion.cc.

00023 { }


Member Function Documentation

const std::vector<reco::CaloClusterPtr>& reco::Conversion::bcMatchingWithTracks (  )  const [inline]

Definition at line 50 of file Conversion.h.

References theMatchingBCs_.

00050 { return theMatchingBCs_;}

reco::CaloClusterPtrVector Conversion::caloCluster (  )  const

reference to a SuperCluster

Definition at line 30 of file Conversion.cc.

References caloCluster_.

Referenced by EoverP().

00030                                                        {
00031   return caloCluster_;
00032 }

Conversion * Conversion::clone ( void   )  const

returns a clone of the candidate

Definition at line 26 of file Conversion.cc.

References Conversion().

00026                                      { 
00027   return new Conversion( * this ); 
00028 }

const reco::Vertex& reco::Conversion::conversionVertex (  )  const [inline]

returns the reco conversion vertex

Definition at line 46 of file Conversion.h.

References theConversionVertex_.

Referenced by ConvertedPhotonProducer::buildCollections(), and zOfPrimaryVertexFromTracks().

00046 { return theConversionVertex_ ; }

const std::vector<math::XYZPoint>& reco::Conversion::ecalImpactPosition (  )  const [inline]

positions of the track extrapolation at the ECAL front face

Definition at line 48 of file Conversion.h.

References thePositionAtEcal_.

00048 {return thePositionAtEcal_;}

double Conversion::EoverP (  )  const

Super Cluster energy divided by track pair momentum if Standard seeing method.

If a pointer to two (or more clusters) is stored in the conversion, this method returns the energy sum of clusters divided by the track pair momentum

Definition at line 122 of file Conversion.cc.

References caloCluster(), i, PV3DBase< T, PVType, FrameType >::mag(), nTracks(), pairMomentum(), edm::PtrVectorBase::size(), and size.

00122                                   {
00123 
00124 
00125   double ep=-99.;
00126 
00127   if ( nTracks() > 0  ) {
00128     unsigned int size= this->caloCluster().size();
00129     float etot=0.;
00130     for ( unsigned int i=0; i<size; i++) {
00131       etot+= caloCluster()[i]->energy();
00132     }
00133     ep= etot/this->pairMomentum().mag();
00134   }
00135 
00136 
00137 
00138   return ep;  
00139 
00140 }

bool Conversion::isConverted (  )  const

Bool flagging objects having track size >0.

Definition at line 42 of file Conversion.cc.

00042                                    {
00043   
00044   if ( this->nTracks() > 0) 
00045     return true;
00046   else
00047     return false;
00048 }

unsigned int reco::Conversion::nTracks (  )  const [inline]

Number of tracks= 0,1,2.

Definition at line 54 of file Conversion.h.

References tracks().

Referenced by EoverP(), pairCotThetaSeparation(), pairInvariantMass(), and pairMomentum().

00054 {return  tracks().size(); }

double Conversion::pairCotThetaSeparation (  )  const

Delta cot(Theta) where Theta is the angle in the (y,z) plane between the two tracks.

Definition at line 83 of file Conversion.cc.

References nTracks(), funct::tan(), and tracks().

00083                                                   {
00084   double dCotTheta=-99.;
00085   
00086   if ( nTracks()==2 ) {
00087     double theta1=tracks()[0]->innerMomentum().Theta();
00088     double theta2=tracks()[1]->innerMomentum().Theta();
00089     dCotTheta =  1./tan(theta1) - 1./tan(theta2) ;
00090   }
00091 
00092   return dCotTheta;
00093 
00094 }

double Conversion::pairInvariantMass (  )  const

if nTracks=2 returns the pair invariant mass

Definition at line 67 of file Conversion.cc.

References e, nTracks(), funct::sqrt(), and tracks().

00067                                           {
00068   double invMass=-99.;
00069   const float mElec= 0.000511;
00070   if ( nTracks()==2 ) {
00071     double px= tracks()[0]->innerMomentum().x() + tracks()[1]->innerMomentum().x();
00072     double py= tracks()[0]->innerMomentum().y() + tracks()[1]->innerMomentum().y();
00073     double pz= tracks()[0]->innerMomentum().z() + tracks()[1]->innerMomentum().z();
00074     double mom1=tracks()[0]->innerMomentum().Mag2() ;
00075     double mom2=tracks()[1]->innerMomentum().Mag2() ;
00076     double e = sqrt( mom1+ mElec*mElec ) + sqrt( mom2 + mElec*mElec );
00077     invMass= ( e*e - px*px -py*py - pz*pz);
00078   }
00079   
00080   return invMass;
00081 }

GlobalVector Conversion::pairMomentum (  )  const

Conversion tracks momentum.

Definition at line 96 of file Conversion.cc.

References nTracks(), and tracks().

Referenced by EoverP(), and zOfPrimaryVertexFromTracks().

00096                                               {
00097 
00098   double px=0.;
00099   double py=0.;
00100   double pz=0.;
00101   
00102   if ( nTracks()==2 ) {
00103     px= tracks()[0]->innerMomentum().x() + tracks()[1]->innerMomentum().x();
00104     py= tracks()[0]->innerMomentum().y() + tracks()[1]->innerMomentum().y();
00105     pz= tracks()[0]->innerMomentum().z() + tracks()[1]->innerMomentum().z();
00106 
00107   } else if (  nTracks()==1 ) {
00108     px= tracks()[0]->innerMomentum().x() ;
00109     py= tracks()[0]->innerMomentum().y() ;
00110     pz= tracks()[0]->innerMomentum().z() ;
00111   }
00112 
00113   GlobalVector momTracks(px,py,pz);
00114   return momTracks;
00115 
00116 
00117 }

std::vector< reco::TrackRef > Conversion::tracks ( void   )  const

vector of references to tracks

Definition at line 36 of file Conversion.cc.

References tracks_.

Referenced by SoftConversionProducer::NotAlreadyIn(), nTracks(), pairCotThetaSeparation(), pairInvariantMass(), and pairMomentum().

00036                                                   { 
00037    return tracks_;
00038 }

double Conversion::zOfPrimaryVertexFromTracks (  )  const

set primary event vertex used to define photon direction

Definition at line 51 of file Conversion.cc.

References conversionVertex(), PV3DBase< T, PVType, FrameType >::mag(), pairMomentum(), reco::Vertex::position(), funct::sqrt(), funct::tan(), and theta.

00051                                                        {
00052   double theZOfPrimaryVertexFromTracks=-9999.;
00053 
00054   float pTrkMag=this->pairMomentum().mag();
00055   
00056   if ( pTrkMag>0 && sqrt(this->conversionVertex().position().perp2()) !=0 ) {
00057     float theta=acos(this->pairMomentum().z() /pTrkMag);
00058     theZOfPrimaryVertexFromTracks = this->conversionVertex().position().z()  - sqrt(this->conversionVertex().position().perp2())*(1./tan(theta));
00059     
00060   }
00061 
00062   return  theZOfPrimaryVertexFromTracks;
00063 
00064 }


Member Data Documentation

reco::CaloClusterPtrVector reco::Conversion::caloCluster_ [private]

vector pointer to a/multiple seed CaloCluster(s)

Definition at line 73 of file Conversion.h.

Referenced by caloCluster().

reco::Vertex reco::Conversion::theConversionVertex_ [private]

Fitted Kalman conversion vertex.

Definition at line 79 of file Conversion.h.

Referenced by conversionVertex().

std::vector<reco::CaloClusterPtr> reco::Conversion::theMatchingBCs_ [private]

Clusters mathing the tracks (these are not the seeds).

Definition at line 81 of file Conversion.h.

Referenced by bcMatchingWithTracks().

std::vector<math::XYZPoint> reco::Conversion::thePositionAtEcal_ [private]

position at the ECAl surface of the track extrapolation

Definition at line 77 of file Conversion.h.

Referenced by ecalImpactPosition().

std::vector<reco::TrackRef> reco::Conversion::tracks_ [private]

reference to a vector Track references

Definition at line 75 of file Conversion.h.

Referenced by tracks().


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