CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
VertexFitterResult.h
Go to the documentation of this file.
1 #ifndef VertexFitterResult_H
2 #define VertexFitterResult_H
3 
4 #include <string>
5 // #include "Vertex/VertexRecoAnalysis/interface/NumberOfSharedTracks.h"
6 // #include "CommonReco/PatternTools/interface/RefittedRecTrack.h"
14 
15 #include <vector>
16 
26 public:
27 
28 // typedef std::vector<const TkSimTrack*> SimTrackCont;
29  typedef std::vector<reco::TransientTrack> TTrackCont;
30 
31  VertexFitterResult(const int maxTracks = 100, const MagneticField* = 0);
33 
34  void fill(const TransientVertex & recv, const TrackingVertex * simv = 0,
35  reco::RecoToSimCollection *recSimColl = 0,
36  const float &time = 0);
37 
38  void fill(const TransientVertex & recVertex, const TTrackCont & recTrackV,
39  const TrackingVertex * simv = 0,
40  reco::RecoToSimCollection *recSimColl = 0, const float &time = 0);
41 
42 
43  const float* simVertexPos() const {return simPos;}
44  const float* recVertexPos() const {return recPos;}
45  const float* recVertexErr() const {return recErr;}
46  const int* trackInformation() const {return tracks;}
47  const float* chi2Information() const {return chi;}
48  const int* vertexPresent() const {return &vertex;}
49  const float* time() const {return &fitTime;}
50  void reset();
51  const int* numberSimTracks() {return &numberOfSimTracks;}
52  const int* numberRecTracks() {return &numberOfRecTracks;}
53 // This array contains, for each SimTrack, the index of the associated RecTrack
54  const int* simTrack_recIndex() {return recIndex;}
55 // This array contains, for each RecTrack, the index of the associated simTrack
56  const int* recTrack_simIndex() {return simIndex;}
57  const float* recTrackWeight() {return trackWeight;}
58  const float* recParameters (const int i) const
59  {
60  if ( i<0 || i>=5 ) return 0;
61  return recPars[i];
62  }
63  const float* refParameters (const int i) const
64  {
65  if ( i<0 || i>=5 ) return 0;
66  return refPars[i];
67  }
68  const float* simParameters (const int i) const
69  {
70  if ( i<0 || i>=5 ) return 0;
71  return simPars[i];
72  }
73  const float* recErrors (const int i) const
74  {
75  if ( i<0 || i>=5 ) return 0;
76  return recErrs[i];
77  }
78  const float* refErrors (const int i) const
79  {
80  if ( i<0 || i>=5 ) return 0;
81  return refErrs[i];
82  }
83 
84 private:
85 
86 // typedef std::vector<const TkSimTrack*> SimTrkCont;
87 //
88  void fillParameters (const reco::TrackBase::ParameterVector& perigee, float* params[5],
89  int trackNumber);
90 // void fillErrors (const reco::TrackBase::CovarianceMatrix& perigeeCov, float* errors[5],
91 // int trackNumber);
92  void fillParameters (const PerigeeTrajectoryParameters & ptp, float* params[5],
93  int trackNumber);
94  void fillErrors (const PerigeeTrajectoryError & pte, float* errors[5],
95  int trackNumber);
96 
97 private:
98 // class RecTrackMatch{
99 // public:
100 // RecTrackMatch(const RecTrack & aRecTrack):theRecTrack(aRecTrack){}
101 // ~RecTrackMatch(){}
102 // bool operator() (const RecTrack & theRefTrack) {
103 // const RefittedRecTrack* refTa = dynamic_cast <const RefittedRecTrack*>(theRefTrack.tTrack());
104 // return ((refTa!=0) && theRecTrack.sameAddress(refTa->originalTrack()));
105 // // return theRecTrack.sameAddress(theRefTrack);
106 // // TrackAssociator * recTa = const_cast < TrackAssociator *> (vtxAssocFact.trackAssociator());
107 // // return theRecTrack.sameAddress(theRefTrack.originalTrack());
108 // }
109 // private:
110 // const RecTrack & theRecTrack;
111 // };
112 
113  // NumberOfSharedTracks numberOfSharedTracks;
114 
116 
117  float simPos[3];
118  float recPos[3];
119  float recErr[3];
120  float chi[3];
121  int tracks[3];
122  int vertex; // 0x1 is Sim, 0x10 is Rec
123  float fitTime;
124 
126  float* simPars[5];
127  float* recPars[5];
128  float* refPars[5];
129  float* recErrs[5];
130  float* refErrs[5];
132  float* trackWeight;
134 
135 };
136 #endif
137 
int i
Definition: DBlmapReader.cc:9
const int * simTrack_recIndex()
const int * vertexPresent() const
const MagneticField * theMagField
void fillErrors(const PerigeeTrajectoryError &pte, float *errors[5], int trackNumber)
const int * recTrack_simIndex()
std::vector< reco::TransientTrack > TTrackCont
void fill(const TransientVertex &recv, const TrackingVertex *simv=0, reco::RecoToSimCollection *recSimColl=0, const float &time=0)
void fillParameters(const reco::TrackBase::ParameterVector &perigee, float *params[5], int trackNumber)
math::Vector< dimension >::type ParameterVector
parameter vector
Definition: TrackBase.h:74
const float * recTrackWeight()
const float * simVertexPos() const
const int * numberSimTracks()
const float * recVertexErr() const
const float * recParameters(const int i) const
const float * refParameters(const int i) const
const int * trackInformation() const
const int * numberRecTracks()
const float * recVertexPos() const
const float * simParameters(const int i) const
const float * chi2Information() const
const float * refErrors(const int i) const
const float * time() const
const float * recErrors(const int i) const
VertexFitterResult(const int maxTracks=100, const MagneticField *=0)