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