BOSS 8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
Reconstruction/MdcPatRec/TrkBase/include/TrkBase/TrkFitStatus.h
Go to the documentation of this file.
1//--------------------------------------------------------------------------
2// File and Version Information:
3// $Id: TrkFitStatus.h,v 1.1.1.1 2005/04/21 06:01:42 zhangy Exp $
4//
5// Description:
6// Describes the status of a track fit. Designed to be inherited by
7// TrkReps, and can be used to present one facet of them to Trk users.
8//
9// Environment:
10// Software developed for the BaBar Detector at the SLAC B-Factory.
11//
12// Author(s): Steve Schaffner
13//
14//------------------------------------------------------------------------
15
16#ifndef TRKFITSTATUS_HH
17#define TRKFITSTATUS_HH
18
19#include "TrkBase/TrkHistory.h"
20#include <functional>
21#include <iostream>
22#include <utility>
23#include <vector>
24
25// Class interface //
26class TrkFitStatus {
27 typedef std::vector<TrkHistory>::const_iterator history_iterator;
28 typedef std::vector<TrkHistory>::const_reverse_iterator history_riterator;
29
30public:
31 typedef std::unary_function<TrkFitStatus, bool> predicate_type;
32 bool is2d() const { return _is2d; }
33 bool fitCurrent() const { return _fitCurrent; }
34 bool fitValid() const { return _fitValid; }
35 bool multScat() const { return _multScat; }
36 std::ostream& printStatus( std::ostream& os = std::cout ) const;
37
38 void setValid( bool v );
39 void setCurrent( bool c ) { _fitCurrent = c; }
40 void set2d( bool d ) { _is2d = d; };
41 void setMultScat( bool m ) { _multScat = m; };
42 // here's the error code returned by the most recent fit
43 const TrkErrCode& fitStatus() const { return _history.back().status(); }
44 // a complete history of how the track was created/modified
45 //
46 history_iterator beginHistory() const { return _history.begin(); }
47 history_iterator endHistory() const { return _history.end(); }
48 history_riterator reverseBeginHistory() const { return _history.rbegin(); }
49 history_riterator reverseEndHistory() const { return _history.rend(); }
50 std::pair<history_iterator, history_iterator> history() const {
51 return std::pair<history_iterator, history_iterator>( beginHistory(), endHistory() );
52 }
53 const std::vector<TrkHistory>& historyVector() const { return _history; }
54 // add to the tracks history. Provide the module name, please!
55 virtual void addHistory( const TrkErrCode& status, const char* modulename );
56 template <class T> void addHistory( T begin, T end ) {
57 _history.insert( _history.end(), begin, end );
58 }
59 template <class T> void addHistory( std::pair<T, T> p ) { addHistory( p.first, p.second ); }
60 std::ostream& printHistory( std::ostream& os = std::cout ) const;
61
62protected:
63 virtual ~TrkFitStatus();
67
68private:
69 std::vector<TrkHistory> _history;
70 bool _fitValid;
71 bool _fitCurrent;
72 bool _is2d;
73 bool _multScat;
74};
75
76std::ostream& operator<<( std::ostream& os, const TrkFitStatus& s );
77
78#endif
XmlRpcServer s
**********Class see also m_nmax DOUBLE PRECISION m_amel DOUBLE PRECISION m_x2 DOUBLE PRECISION m_alfinv DOUBLE PRECISION m_Xenph INTEGER m_KeyWtm INTEGER m_idyfs DOUBLE PRECISION m_zini DOUBLE PRECISION m_q2 DOUBLE PRECISION m_Wt_KF DOUBLE PRECISION m_WtCut INTEGER m_KFfin *COMMON c_KarLud $ !Input CMS energy[GeV] $ !CMS energy after beam spread beam strahlung[GeV] $ !Beam energy spread[GeV] $ !z boost due to beam spread $ !electron beam mass *ff pair spectrum $ !minimum v
Definition KarLud.h:35
std::ostream & operator<<(std::ostream &os, const TrkFitStatus &s)
void setValid(bool v)
std::ostream & printStatus(std::ostream &os=std::cout) const
TrkFitStatus(const TrkFitStatus &)
std::unary_function< TrkFitStatus, bool > predicate_type
TrkFitStatus & operator=(const TrkFitStatus &)
std::pair< history_iterator, history_iterator > history() const
const std::vector< TrkHistory > & historyVector() const
virtual void addHistory(const TrkErrCode &status, const char *modulename)
std::ostream & printHistory(std::ostream &os=std::cout) const
virtual ~TrkFitStatus()