File indexing completed on 2024-04-06 12:31:30
0001 #ifndef _TrackerReco_MultiTrajectoryStateAssembler_h_
0002 #define _TrackerReco_MultiTrajectoryStateAssembler_h_
0003
0004
0005 #include "TrackingTools/TrajectoryState/interface/TrajectoryStateOnSurface.h"
0006 #include <vector>
0007
0008
0009
0010
0011
0012
0013 class MultiTrajectoryStateAssembler {
0014 private:
0015 typedef TrajectoryStateOnSurface TSOS;
0016 typedef std::vector<TrajectoryStateOnSurface> MultiTSOS;
0017
0018 public:
0019
0020
0021
0022 MultiTrajectoryStateAssembler();
0023
0024
0025
0026
0027 void addState(const TrajectoryStateOnSurface);
0028
0029
0030 void addInvalidState(const double);
0031
0032
0033
0034
0035 TrajectoryStateOnSurface combinedState();
0036
0037
0038
0039 TrajectoryStateOnSurface combinedState(const float weight);
0040
0041 private:
0042
0043
0044
0045 void addStateVector(const MultiTSOS&);
0046
0047 inline bool invalidCombinedState() const {
0048
0049
0050
0051 return theStates.empty();
0052 }
0053
0054 bool prepareCombinedState();
0055
0056
0057
0058 TrajectoryStateOnSurface reweightedCombinedState(const double) const;
0059
0060
0061
0062 void removeSmallWeights();
0063
0064 void removeWrongPz();
0065
0066 private:
0067 bool sortStates;
0068 float minValidFraction;
0069 float minFractionalWeight;
0070
0071 bool combinationDone;
0072 bool thePzError;
0073
0074 double theValidWeightSum;
0075 double theInvalidWeightSum;
0076 MultiTSOS theStates;
0077
0078
0079
0080 };
0081
0082 #endif