Go to the documentation of this file.00001 #ifndef VertexFitterResult_H
00002 #define VertexFitterResult_H
00003
00004 #include <string>
00005
00006
00007 #include "DataFormats/VertexReco/interface/Vertex.h"
00008 #include "RecoVertex/VertexPrimitives/interface/TransientVertex.h"
00009 #include "TrackingTools/TransientTrack/interface/TransientTrack.h"
00010 #include "SimDataFormats/TrackingAnalysis/interface/TrackingParticle.h"
00011 #include "SimDataFormats/TrackingAnalysis/interface/TrackingVertex.h"
00012 #include "SimTracker/TrackAssociation/interface/TrackAssociatorByChi2.h"
00013
00014 #include <vector>
00015
00024 class VertexFitterResult {
00025 public:
00026
00027
00028 typedef std::vector<reco::TransientTrack> TTrackCont;
00029
00030 VertexFitterResult(const int maxTracks = 100, TrackAssociatorByChi2 *associator = 0);
00031 ~VertexFitterResult();
00032
00033 void fill(const TransientVertex & recv, const TrackingVertex * simv = 0,
00034 reco::RecoToSimCollection *recSimColl = 0,
00035 const float &time = 0);
00036
00037 void fill(const TransientVertex & recVertex, const TTrackCont & recTrackV,
00038 const TrackingVertex * simv = 0,
00039 reco::RecoToSimCollection *recSimColl = 0, const float &time = 0);
00040
00041
00042 const float* simVertexPos() const {return simPos;}
00043 const float* recVertexPos() const {return recPos;}
00044 const float* recVertexErr() const {return recErr;}
00045 const int* trackInformation() const {return tracks;}
00046 const float* chi2Information() const {return chi;}
00047 const int* vertexPresent() const {return &vertex;}
00048 const float* time() const {return &fitTime;}
00049 void reset();
00050 const int* numberSimTracks() {return &numberOfSimTracks;}
00051 const int* numberRecTracks() {return &numberOfRecTracks;}
00052
00053 const int* simTrack_recIndex() {return recIndex;}
00054
00055 const int* recTrack_simIndex() {return simIndex;}
00056 const float* recTrackWeight() {return trackWeight;}
00057 const float* recParameters (const int i) const
00058 {
00059 if ( i<0 || i>=5 ) return 0;
00060 return recPars[i];
00061 }
00062 const float* refParameters (const int i) const
00063 {
00064 if ( i<0 || i>=5 ) return 0;
00065 return refPars[i];
00066 }
00067 const float* simParameters (const int i) const
00068 {
00069 if ( i<0 || i>=5 ) return 0;
00070 return simPars[i];
00071 }
00072 const float* recErrors (const int i) const
00073 {
00074 if ( i<0 || i>=5 ) return 0;
00075 return recErrs[i];
00076 }
00077 const float* refErrors (const int i) const
00078 {
00079 if ( i<0 || i>=5 ) return 0;
00080 return refErrs[i];
00081 }
00082
00083 private:
00084
00085
00086
00087 void fillParameters (const reco::TrackBase::ParameterVector& perigee, float* params[5],
00088 int trackNumber);
00089
00090
00091 void fillParameters (const PerigeeTrajectoryParameters & ptp, float* params[5],
00092 int trackNumber);
00093 void fillErrors (const PerigeeTrajectoryError & pte, float* errors[5],
00094 int trackNumber);
00095
00096 private:
00097
00098
00099
00100
00101
00102
00103
00104
00105
00106
00107
00108
00109
00110
00111
00112
00113
00114 TrackAssociatorByChi2 * associatorForParamAtPca;
00115
00116 float simPos[3];
00117 float recPos[3];
00118 float recErr[3];
00119 float chi[3];
00120 int tracks[3];
00121 int vertex;
00122 float fitTime;
00123
00124 int theMaxTracks;
00125 float* simPars[5];
00126 float* recPars[5];
00127 float* refPars[5];
00128 float* recErrs[5];
00129 float* refErrs[5];
00130 int numberOfRecTracks, numberOfSimTracks;
00131 float* trackWeight;
00132 int *simIndex, *recIndex;
00133
00134 };
00135 #endif
00136