StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StSvtLocalCoordinate.cc
1 /***********************************************************************
2  *
3  * $Id: StSvtLocalCoordinate.cc,v 1.3 2000/08/21 16:16:26 calderon Exp $
4  *
5  * Author: Helen C
6  *
7  ************************************************************************
8  *
9  * Description: Svt Local Coordinate
10  *
11  ************************************************************************
12  *
13  * $Log: StSvtLocalCoordinate.cc,v $
14  * Revision 1.3 2000/08/21 16:16:26 calderon
15  * Helen's first version of Svt Coordinate classes.
16  *
17  * Revision 1.2 2000/02/02 23:01:38 calderon
18  * Changes for CC5
19  * Tests withs StTpcDb still going.
20  *
21  * Revision 1.1 1999/11/19 19:01:08 calderon
22  * First version of files for StDbUtilities.
23  * Note: this package uses StTpcDb.
24  * There are some parameters
25  * that are not yet kept in StTpcDb. When StTpcDb has them, the code
26  * will be changed to use them from StTpcDb.
27  * There are no Ftpc or Svt Coordinate transformations in here yet.
28  *
29  *
30  ***********************************************************************/
31 #include "StSvtLocalCoordinate.hh"
32 
33 static const char rcsid[] = "$Id: StSvtLocalCoordinate.cc,v 1.3 2000/08/21 16:16:26 calderon Exp $";
34 
35 
36 StSvtLocalCoordinate::StSvtLocalCoordinate() {}
37 
38 StSvtLocalCoordinate::StSvtLocalCoordinate(const double x, const double y, const double z)
39  : mPosition(x,y,z) { /* nopt */}
40 
41 StSvtLocalCoordinate::StSvtLocalCoordinate(const StThreeVector<double>& position)
42  : mPosition(position) { /* nopt */ }
43 
44 StSvtLocalCoordinate::~StSvtLocalCoordinate() {}
45 
46 int
47 StSvtLocalCoordinate::operator==(const StSvtLocalCoordinate& p) const
48 {
49  return p.mPosition == mPosition;
50 }
51 
52 int
53 StSvtLocalCoordinate::operator!=(const StSvtLocalCoordinate& p) const
54 {
55  return !(*this == p); // use operator==()
56 }
57 
58 
59 // Non-member Functions
60 ostream& operator<<(ostream& os, const StSvtLocalCoordinate& a)
61 {
62  return os << "SVT_Local( "
63  << a.position().x() << ", "
64  << a.position().y() << ", "
65  << a.position().z() << ")";
66 }