BOSS 6.6.4.p01
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 <math.h>
31#include <iostream>
32using std::endl;
33using std::ostream;
34
35Trajectory::Trajectory(double lowlim,double hilim)
36{
37 if (hilim < lowlim) {
38 std::cout<<"ErrMsg(error) " << "Invalid Trajectory range requested." << std::endl;
39 flightrange[0] = hilim;
40 flightrange[1] = lowlim;
41 }
42 flightrange[0] = lowlim;
43 flightrange[1] = hilim;
44}
45
47{
48}
49
50double
51Trajectory::distTo0thError(double , double tolerance, int) const
52{
53 return fabs(tolerance);
54}
55
56void
57Trajectory::setFlightRange(double newrange[2])
58{
59 if (newrange[1] >= newrange[0]) {
60 flightrange[0] = newrange[0];
61 flightrange[1] = newrange[1];
62 } else {
63 std::cout<<"ErrMsg(error) "<< "Invalid Trajectory range requested." << std::endl;
64 flightrange[0] = newrange[1];
65 flightrange[1] = newrange[0];
66 }
67}
68
69void
70Trajectory::print(ostream& os) const
71{
72 os << "Trajectory range from "
73 << flightrange[0] << " to "
74 << flightrange[1] << endl;
75}
76
77void
78Trajectory::printAll(ostream& os) const
79{
80 os << "Trajectory range from "
81 << flightrange[0] << " to "
82 << flightrange[1] << endl;
83}
84
87{
88 flightrange[0] = other.flightrange[0];
89 flightrange[1] = other.flightrange[1];
90 return *this;
91}
double flightrange[2]
Definition: Trajectory.h:83
double distTo0thError(double s, double tol, int pathDir) const
Definition: Trajectory.cxx:51
Trajectory(double lowlim, double hilim)
Definition: Trajectory.cxx:35
virtual void print(std::ostream &os) const
Definition: Trajectory.cxx:70
virtual void setFlightRange(double newrange[2])
Definition: Trajectory.cxx:57
virtual ~Trajectory()
Definition: Trajectory.cxx:46
virtual void printAll(std::ostream &os) const
Definition: Trajectory.cxx:78
Trajectory & operator=(const Trajectory &)
Definition: Trajectory.cxx:86