CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
TrackBase.cc
Go to the documentation of this file.
1 #include "Rtypes.h"
4 #include <algorithm>
5 using namespace reco;
6 
7 // To be kept in synch with the enumerator definitions in TrackBase.h file
8 std::string const TrackBase::algoNames[] = { "undefAlgorithm", "ctf", "rs", "cosmics",
9  "iter0", "iter1", "iter2","iter3","iter4","iter5","iter6","iter7","iter8","iter9","iter10",
10  "outInEcalSeededConv","inOutEcalSeededConv",
11  "nuclInter",
12  "standAloneMuon","globalMuon","cosmicStandAloneMuon","cosmicGlobalMuon",
13  "iter1LargeD0","iter2LargeD0","iter3LargeD0","iter4LargeD0","iter5LargeD0",
14  "bTagGhostTracks",
15  "beamhalo" ,
16  "gsf" };
17 
18 std::string const TrackBase::qualityNames[] = { "loose", "tight", "highPurity", "confirmed", "goodIterative", "looseSetWithPV", "highPuritySetWithPV"};
19 
21  chi2_(0), vertex_(0,0,0), momentum_(0,0,0), ndof_(0), charge_(0), algorithm_(undefAlgorithm), quality_(0), nLoops_(0) {
22  index idx = 0;
23  for( index i = 0; i < dimension; ++ i )
24  for( index j = 0; j <= i; ++ j )
25  covariance_[ idx ++ ]=0;
26 }
27 
28 TrackBase::TrackBase( double chi2, double ndof, const Point & vertex, const Vector & momentum, int charge,
29  const CovarianceMatrix & cov,
30  TrackAlgorithm algorithm , TrackQuality quality,signed char nloops) :
31  chi2_( chi2 ), vertex_( vertex ), momentum_( momentum ), ndof_( ndof ), charge_( charge ), algorithm_(algorithm), quality_(0), nLoops_(nloops) {
32  index idx = 0;
33  for( index i = 0; i < dimension; ++ i )
34  for( index j = 0; j <= i; ++ j )
35  covariance_[ idx ++ ] = cov( i, j );
36  setQuality(quality);
37 }
38 
40 }
41 
43  return fillCovariance( v, covariance_ );
44 }
45 
49  if(index == size) return undefQuality; // better this or throw() ?
50 
51  // cast
52  return TrackQuality(index);
53 }
54 
57  int index = std::find(algoNames, algoNames+size, name)-algoNames;
58  if(index == size) return undefAlgorithm; // better this or throw() ?
59 
60  // cast
61  return TrackAlgorithm(index);
62 }
63 
64 
int i
Definition: DBlmapReader.cc:9
< trclass="colgroup">< tdclass="colgroup"colspan=5 > Ecal cluster collections</td ></tr >< tr >< td >< ahref="classreco_1_1BasicCluster.html"> reco::BasicCluster</a ></td >< td >< ahref="DataFormats_EgammaReco.html"> reco::BasicClusterCollection</a ></td >< td >< ahref="#"> hybridSuperClusters</a ></td >< tdclass="description"> Basic clusters reconstructed with hybrid algorithm(barrel only)</td >< td >S.Rahatlou</td ></tr >< tr >< td >< a href
unsigned int index
index type
Definition: TrackBase.h:78
TrackBase()
default constructor
Definition: TrackBase.cc:20
TrackQuality
track quality
Definition: TrackBase.h:93
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:7
double charge(const std::vector< uint8_t > &Ampls)
TrackAlgorithm
track algorithm
Definition: TrackBase.h:80
void setQuality(const TrackQuality, bool set=true)
Definition: TrackBase.h:391
static const std::string qualityNames[]
Definition: TrackBase.h:94
PerigeeCovarianceMatrix & fillCovariance(PerigeeCovarianceMatrix &v, const float *data)
int j
Definition: DBlmapReader.cc:9
math::XYZPoint Point
point in the space
Definition: TrackBase.h:74
static TrackQuality qualityByName(const std::string &name)
Definition: TrackBase.cc:46
virtual ~TrackBase()
virtual destructor
Definition: TrackBase.cc:39
tuple idx
DEBUGGING if hasattr(process,&quot;trackMonIterativeTracking2012&quot;): print &quot;trackMonIterativeTracking2012 D...
This class analyses the reconstruction quality for a given track.
Definition: TrackQuality.h:28
static const std::string algoNames[]
Definition: TrackBase.h:90
float covariance_[covarianceSize]
perigee 5x5 covariance matrix
Definition: TrackBase.h:302
CovarianceMatrix & fill(CovarianceMatrix &v) const
fill SMatrix
Definition: TrackBase.cc:42
static TrackAlgorithm algoByName(const std::string &name)
Definition: TrackBase.cc:55
math::XYZVector Vector
spatial vector
Definition: TrackBase.h:72
tuple size
Write out results.
math::Error< dimension >::type CovarianceMatrix
5 parameter covariance matrix
Definition: TrackBase.h:70