StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StTofSlat.cxx
1 /***************************************************************************
2  *
3  * $Id: StTofSlat.cxx,v 2.7 2003/07/28 21:00:22 ullrich Exp $
4  *
5  * Author: Wei-Ming Zhang, Dec 2000
6  ***************************************************************************
7  *
8  * Description:
9  *
10  ***************************************************************************
11  *
12  * $Log: StTofSlat.cxx,v $
13  * Revision 2.7 2003/07/28 21:00:22 ullrich
14  * Revised version: new but not inheriting from StHit as before.
15  *
16  * Revision 2.6 2003/07/11 00:01:03 jeromel
17  * Re-adding preceeding revision
18  *
19  * Revision 2.3 2003/05/21 18:23:18 ullrich
20  * Major Revision of ToF classes (F. Geurts)
21  *
22  * Revision 2.2 2001/04/05 04:00:56 ullrich
23  * Replaced all (U)Long_t by (U)Int_t and all redundant ROOT typedefs.
24  *
25  * Revision 2.1 2000/12/21 23:52:22 ullrich
26  * Initial Revision.
27  *
28  **************************************************************************/
29 #include "StTofSlat.h"
30 #include "StTrack.h"
31 
32 static const char rcsid[] = "$Id: StTofSlat.cxx,v 2.7 2003/07/28 21:00:22 ullrich Exp $";
33 
34 ClassImp(StTofSlat)
35 
37  : mSlatIndex(0), mAdc(0), mTdc(0), mAssociatedTrack(0)
38 { /* noop */ }
39 
40 StTofSlat::StTofSlat(unsigned short slatId, unsigned short rawAdc,
41  unsigned short rawTdc, StTrack *track,
42  float zhit, unsigned short hitprof, unsigned short matchflag)
43  : mSlatIndex(slatId), mAdc(rawAdc), mTdc(rawTdc), mAssociatedTrack(track),
44  mZhit(zhit), mHitProf(hitprof), mMatchFlag(matchflag)
45 { /* noop */ }
46 
47 StTofSlat::~StTofSlat() { /* noop */ }
48 
49 void
50 StTofSlat::setAssociatedTrack(StTrack* val) {mAssociatedTrack = val;}
51 
52 StTrack*
53 StTofSlat::associatedTrack() {return mAssociatedTrack;}
54 
55 const StTrack*
56 StTofSlat::associatedTrack() const {return mAssociatedTrack;}
57 
58 void
59 StTofSlat::setPosition(const StThreeVectorF& p) {mPosition = p;}
60 
61 const StThreeVectorF&
62 StTofSlat::position() const {return mPosition;}
63 
64 
65 int
66 StTofSlat::operator==(const StTofSlat& p) const
67 {
68  return (p.mSlatIndex == mSlatIndex &&
69  p.mAdc == mAdc && p.mTdc == mTdc &&
70  p.mAssociatedTrack == mAssociatedTrack &&
71  p.mZhit == mZhit &&
72  p.mHitProf == mHitProf &&
73  p.mMatchFlag == mMatchFlag);
74 }
75 
76 int
77 StTofSlat::operator!=(const StTofSlat& p) const
78 {
79  return !(*this == p); // use operator==()
80 }
81