CMS 3D CMS Logo

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 
25 public:
26  // typedef std::vector<const TkSimTrack*> SimTrackCont;
27  typedef std::vector<reco::TransientTrack> TTrackCont;
28 
29  VertexFitterResult(const int maxTracks = 100, const MagneticField* = nullptr);
31 
32  void fill(const TransientVertex& recv,
33  const TrackingVertex* simv = nullptr,
34  reco::RecoToSimCollection* recSimColl = nullptr,
35  const float& time = 0);
36 
37  void fill(const TransientVertex& recVertex,
38  const TTrackCont& recTrackV,
39  const TrackingVertex* simv = nullptr,
40  reco::RecoToSimCollection* recSimColl = nullptr,
41  const float& time = 0);
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  if (i < 0 || i >= 5)
60  return nullptr;
61  return recPars[i];
62  }
63  const float* refParameters(const int i) const {
64  if (i < 0 || i >= 5)
65  return nullptr;
66  return refPars[i];
67  }
68  const float* simParameters(const int i) const {
69  if (i < 0 || i >= 5)
70  return nullptr;
71  return simPars[i];
72  }
73  const float* recErrors(const int i) const {
74  if (i < 0 || i >= 5)
75  return nullptr;
76  return recErrs[i];
77  }
78  const float* refErrors(const int i) const {
79  if (i < 0 || i >= 5)
80  return nullptr;
81  return refErrs[i];
82  }
83 
84 private:
85  // typedef std::vector<const TkSimTrack*> SimTrkCont;
86  //
87  void fillParameters(const reco::TrackBase::ParameterVector& perigee, float* params[5], int trackNumber);
88  // void fillErrors (const reco::TrackBase::CovarianceMatrix& perigeeCov, float* errors[5],
89  // int trackNumber);
90  void fillParameters(const PerigeeTrajectoryParameters& ptp, float* params[5], int trackNumber);
91  void fillErrors(const PerigeeTrajectoryError& pte, float* errors[5], int trackNumber);
92 
93 private:
94  // class RecTrackMatch{
95  // public:
96  // RecTrackMatch(const RecTrack & aRecTrack):theRecTrack(aRecTrack){}
97  // ~RecTrackMatch(){}
98  // bool operator() (const RecTrack & theRefTrack) {
99  // const RefittedRecTrack* refTa = dynamic_cast <const RefittedRecTrack*>(theRefTrack.tTrack());
100  // return ((refTa!=0) && theRecTrack.sameAddress(refTa->originalTrack()));
101  // // return theRecTrack.sameAddress(theRefTrack);
102  // // TrackAssociator * recTa = const_cast < TrackAssociator *> (vtxAssocFact.trackAssociator());
103  // // return theRecTrack.sameAddress(theRefTrack.originalTrack());
104  // }
105  // private:
106  // const RecTrack & theRecTrack;
107  // };
108 
109  // NumberOfSharedTracks numberOfSharedTracks;
110 
112 
113  float simPos[3];
114  float recPos[3];
115  float recErr[3];
116  float chi[3];
117  int tracks[3];
118  int vertex; // 0x1 is Sim, 0x10 is Rec
119  float fitTime;
120 
122  float* simPars[5];
123  float* recPars[5];
124  float* refPars[5];
125  float* recErrs[5];
126  float* refErrs[5];
128  float* trackWeight;
130 };
131 #endif
mps_fire.i
i
Definition: mps_fire.py:355
CalibrationSummaryClient_cfi.params
params
Definition: CalibrationSummaryClient_cfi.py:14
VertexFitterResult::refErrs
float * refErrs[5]
Definition: VertexFitterResult.h:126
VertexFitterResult::theMaxTracks
int theMaxTracks
Definition: VertexFitterResult.h:121
VertexFitterResult::numberRecTracks
const int * numberRecTracks()
Definition: VertexFitterResult.h:52
PerigeeTrajectoryParameters
Definition: PerigeeTrajectoryParameters.h:16
VertexFitterResult::~VertexFitterResult
~VertexFitterResult()
Definition: VertexFitterResult.cc:36
TrackAssociation.h
VertexFitterResult::recParameters
const float * recParameters(const int i) const
Definition: VertexFitterResult.h:58
VertexFitterResult::reset
void reset()
Definition: VertexFitterResult.cc:203
TrackingVertex.h
VertexFitterResult::recErrors
const float * recErrors(const int i) const
Definition: VertexFitterResult.h:73
TransientTrack.h
VertexFitterResult::VertexFitterResult
VertexFitterResult(const int maxTracks=100, const MagneticField *=nullptr)
Definition: VertexFitterResult.cc:9
PerigeeTrajectoryError
Definition: PerigeeTrajectoryError.h:14
VertexFitterResult::vertexPresent
const int * vertexPresent() const
Definition: VertexFitterResult.h:48
VertexFitterResult::tracks
int tracks[3]
Definition: VertexFitterResult.h:117
VertexFitterResult::vertex
int vertex
Definition: VertexFitterResult.h:118
errors
Definition: errors.py:1
VertexFitterResult::simTrack_recIndex
const int * simTrack_recIndex()
Definition: VertexFitterResult.h:54
VertexFitterResult::recErrs
float * recErrs[5]
Definition: VertexFitterResult.h:125
VertexFitterResult::refParameters
const float * refParameters(const int i) const
Definition: VertexFitterResult.h:63
VertexFitterResult::theMagField
const MagneticField * theMagField
Definition: VertexFitterResult.h:111
VertexFitterResult::simParameters
const float * simParameters(const int i) const
Definition: VertexFitterResult.h:68
reco::TrackBase::ParameterVector
math::Vector< dimension >::type ParameterVector
parameter vector
Definition: TrackBase.h:71
VertexFitterResult::recTrack_simIndex
const int * recTrack_simIndex()
Definition: VertexFitterResult.h:56
VertexFitterResult::trackWeight
float * trackWeight
Definition: VertexFitterResult.h:128
VertexFitterResult::simPars
float * simPars[5]
Definition: VertexFitterResult.h:122
Vertex.h
VertexFitterResult::time
const float * time() const
Definition: VertexFitterResult.h:49
VertexFitterResult::simIndex
int * simIndex
Definition: VertexFitterResult.h:129
VertexFitterResult::recIndex
int * recIndex
Definition: VertexFitterResult.h:129
edm::AssociationMap< edm::OneToManyWithQualityGeneric< edm::View< reco::Track >, TrackingParticleCollection, double > >
TrackingVertex
Definition: TrackingVertex.h:22
VertexFitterResult::recVertexPos
const float * recVertexPos() const
Definition: VertexFitterResult.h:44
VertexFitterResult::recErr
float recErr[3]
Definition: VertexFitterResult.h:115
VertexFitterResult::simVertexPos
const float * simVertexPos() const
Definition: VertexFitterResult.h:43
VertexFitterResult::recVertexErr
const float * recVertexErr() const
Definition: VertexFitterResult.h:45
VertexFitterResult::recTrackWeight
const float * recTrackWeight()
Definition: VertexFitterResult.h:57
MagneticField.h
TransientVertex
Definition: TransientVertex.h:18
VertexFitterResult::simPos
float simPos[3]
Definition: VertexFitterResult.h:113
VertexFitterResult::chi
float chi[3]
Definition: VertexFitterResult.h:116
VertexFitterResult::fillParameters
void fillParameters(const reco::TrackBase::ParameterVector &perigee, float *params[5], int trackNumber)
Definition: VertexFitterResult.cc:176
VertexFitterResult::numberOfRecTracks
int numberOfRecTracks
Definition: VertexFitterResult.h:127
VertexFitterResult::numberSimTracks
const int * numberSimTracks()
Definition: VertexFitterResult.h:51
TrackingParticle.h
TransientVertex.h
VertexFitterResult::fill
void fill(const TransientVertex &recv, const TrackingVertex *simv=nullptr, reco::RecoToSimCollection *recSimColl=nullptr, const float &time=0)
Definition: VertexFitterResult.cc:52
VertexFitterResult::TTrackCont
std::vector< reco::TransientTrack > TTrackCont
Definition: VertexFitterResult.h:27
VertexFitterResult::numberOfSimTracks
int numberOfSimTracks
Definition: VertexFitterResult.h:127
VertexFitterResult::refPars
float * refPars[5]
Definition: VertexFitterResult.h:124
VertexFitterResult::recPars
float * recPars[5]
Definition: VertexFitterResult.h:123
VertexFitterResult::trackInformation
const int * trackInformation() const
Definition: VertexFitterResult.h:46
VertexFitterResult::fillErrors
void fillErrors(const PerigeeTrajectoryError &pte, float *errors[5], int trackNumber)
Definition: VertexFitterResult.cc:195
VertexFitterResult::refErrors
const float * refErrors(const int i) const
Definition: VertexFitterResult.h:78
HLT_2018_cff.maxTracks
maxTracks
Definition: HLT_2018_cff.py:31798
MagneticField
Definition: MagneticField.h:19
VertexFitterResult::recPos
float recPos[3]
Definition: VertexFitterResult.h:114
VertexFitterResult
Definition: VertexFitterResult.h:24
VertexFitterResult::fitTime
float fitTime
Definition: VertexFitterResult.h:119
VertexFitterResult::chi2Information
const float * chi2Information() const
Definition: VertexFitterResult.h:47