BOSS 8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
Trajectory.cxx
Go to the documentation of this file.
1//--------------------------------------------------------------------------
2// File and Version Information:
3// $Id: Trajectory.cxx,v 1.2 2009/12/17 00:38:40 zhangy Exp $
4//
5// Description:
6// Trajectory Virtual Base Class
7//
8// Environment:
9// Software developed for the BaBar Detector at the SLAC B-Factory.
10//
11// Author List:
12// David N Brown - Lawrence Berkeley Lab
13// Gautier Hamel de Monchenault - CEN Saclay & Lawrence Berkeley Lab
14// Steve Schaffner - SLAC
15//
16// Copyright Information:
17// Copyright (C) 1996 Lawrence Berkeley Laboratory
18//
19// History:
20// Migration for BESIII MDC
21// Copyright (C) 1996 CEA - Centre d'Etude de Saclay
22//
23// History:
24// Migration for BESIII MDC
25//
26//------------------------------------------------------------------------
27// #include "BaBar/BaBar.hh"
28#include "MdcGeom/Trajectory.h"
29// #include "ErrLogger/ErrLog.hh"
30#include <iostream>
31#include <math.h>
32using std::endl;
33using std::ostream;
34
35Trajectory::Trajectory( double lowlim, double hilim ) {
36 if ( hilim < lowlim )
37 {
38 std::cout << "ErrMsg(error) "
39 << "Invalid Trajectory range requested." << std::endl;
40 flightrange[0] = hilim;
41 flightrange[1] = lowlim;
42 }
43 flightrange[0] = lowlim;
44 flightrange[1] = hilim;
45}
46
48
49double Trajectory::distTo0thError( double, double tolerance, int ) const {
50 return fabs( tolerance );
51}
52
53void Trajectory::setFlightRange( double newrange[2] ) {
54 if ( newrange[1] >= newrange[0] )
55 {
56 flightrange[0] = newrange[0];
57 flightrange[1] = newrange[1];
58 }
59 else
60 {
61 std::cout << "ErrMsg(error) "
62 << "Invalid Trajectory range requested." << std::endl;
63 flightrange[0] = newrange[1];
64 flightrange[1] = newrange[0];
65 }
66}
67
68void Trajectory::print( ostream& os ) const {
69 os << "Trajectory range from " << flightrange[0] << " to " << flightrange[1] << endl;
70}
71
72void Trajectory::printAll( ostream& os ) const {
73 os << "Trajectory range from " << flightrange[0] << " to " << flightrange[1] << endl;
74}
75
77 flightrange[0] = other.flightrange[0];
78 flightrange[1] = other.flightrange[1];
79 return *this;
80}
double distTo0thError(double s, double tol, int pathDir) const
virtual void print(std::ostream &os) const
Trajectory(double lowlim, double hilim)
virtual void setFlightRange(double newrange[2])
virtual ~Trajectory()
virtual void printAll(std::ostream &os) const
Trajectory & operator=(const Trajectory &)