BOSS 7.0.2
BESIII Offline Software System
Loading...
Searching...
No Matches
InstallArea/include/TrkBase/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 <vector>
21#include <utility>
22#include <functional>
23#include <iostream>
24
25// Class interface //
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>
57 void addHistory(T begin, T end) { _history.insert(_history.end(),begin,end); }
58 template <class T>
59 void addHistory(std::pair<T,T> p) { addHistory(p.first,p.second); }
60 std::ostream& printHistory(std::ostream& os=std::cout) const;
61protected:
62 virtual ~TrkFitStatus();
66private:
67 std::vector<TrkHistory> _history;
68 bool _fitValid;
69 bool _fitCurrent;
70 bool _is2d;
71 bool _multScat;
72};
73
74std::ostream& operator<<( std::ostream& os, const TrkFitStatus& s );
75
76
77#endif
78
XmlRpcServer s
Definition: HelloServer.cpp:11
std::ostream & operator<<(std::ostream &os, const TrkFitStatus &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
void setValid(bool v)
std::ostream & printStatus(std::ostream &os=std::cout) const
virtual ~TrkFitStatus()
TrkFitStatus & operator=(const TrkFitStatus &)
std::pair< history_iterator, history_iterator > history() const
virtual void addHistory(const TrkErrCode &status, const char *modulename)
const std::vector< TrkHistory > & historyVector() const
std::ostream & printHistory(std::ostream &os=std::cout) const
std::unary_function< TrkFitStatus, bool > predicate_type