9 combinationDone(
false),
11 theValidWeightSum(0.),
12 theInvalidWeightSum(0.)
41 <<
"MultiTrajectoryStateAssembler: trying to add states after combination";
46 throw cms::Exception(
"LogicError") <<
"MultiTrajectoryStateAssembler: trying to add invalid state";
61 <<
"MultiTrajectoryStateAssembler: trying to add states after combination";
67 double pzFirst =
theStates.empty() ? 0. :
theStates.front().localParameters().pzSign();
68 for ( MultiTSOS::const_iterator
i=states.begin();
69 i!=states.end();
i++ ) {
70 if ( !(
i->isValid()) )
72 <<
"MultiTrajectoryStateAssembler: trying to add invalid state";
77 pzFirst*
i->localParameters().pzSign()<0. )
thePzError =
true;
173 reweightedStates.reserve(
theStates.size());
174 for ( MultiTSOS::const_iterator
i=
theStates.begin();
176 double oldWeight =
i->weight();
180 &(
i->globalParameters().magneticField()),
184 return TSOS(
new BasicMultiTrajectoryState(reweightedStates));
194 if ( totalWeight == 0. ) {
204 for ( MultiTSOS::iterator
i=
theStates.begin();
226 for ( MultiTSOS::const_iterator is=
theStates.begin();
228 meanPz += is->weight()*is->localParameters().pzSign();
242 for ( MultiTSOS::const_iterator is=oldStates.begin();
243 is!=oldStates.end(); is++ ) {
244 if ( meanPz*is->localParameters().pzSign()>=0. ) {
void addState(const TrajectoryStateOnSurface)
double theInvalidWeightSum
void addStateVector(const MultiTSOS &)
void removeSmallWeights()
void removeWrongPz()
Removes states with local p_z != average p_z.
float minFractionalWeight
void addInvalidState(const double)
Adds (the weight of an) invalid state to the list.
TrajectoryStateOnSurface reweightedCombinedState(const double) const
TrajectoryStateOnSurface TSOS
MultiTrajectoryStateAssembler()
std::vector< TrajectoryStateOnSurface > MultiTSOS
bool prepareCombinedState()
Preparation of combined state (cleaning & sorting)
std::vector< TrajectoryStateOnSurface > components() const
TrajectoryStateOnSurface combinedState()
bool invalidCombinedState() const
Checks status of combined state.