CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
GsfElectronCore.cc
Go to the documentation of this file.
1 
6 
7 #include <cmath>
8 
9 using namespace reco ;
10 
12  ()
13  : ctfGsfOverlap_(0.), isEcalDrivenSeed_(false), isTrackerDrivenSeed_(false)
14  {}
15 
17  ( const GsfTrackRef & gsfTrack )
18  : gsfTrack_(gsfTrack), ctfGsfOverlap_(0.), isEcalDrivenSeed_(false), isTrackerDrivenSeed_(false)
19  {
20  edm::RefToBase<TrajectorySeed> seed = gsfTrack_->extra()->seedRef() ;
21  if (seed.isNull())
22  { edm::LogError("GsfElectronCore")<<"The GsfTrack has no seed ?!" ; }
23  else
24  {
25  ElectronSeedRef elseed = seed.castTo<ElectronSeedRef>() ;
26  if (elseed.isNull())
27  { edm::LogError("GsfElectronCore")<<"The GsfTrack seed is not an ElectronSeed ?!" ; }
28  else
29  {
30  if (elseed->isEcalDriven()) isEcalDrivenSeed_ = true ;
31  if (elseed->isTrackerDriven()) isTrackerDrivenSeed_ = true ;
32  }
33  }
34  }
35 
37  { return new GsfElectronCore(*this) ; }
bool isNull() const
Checks for null.
Definition: RefToBase.h:270
bool isNull() const
Checks for null.
Definition: Ref.h:247
REF castTo() const
cast to a concrete type
Definition: RefToBase.h:241
GsfElectronCore * clone() const