StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StMuETofPidTraits.cxx
1 /***************************************************************************
2  *
3  * $Id: StMuETofPidTraits.cxx,v 1.1 2019/02/21 13:32:54 jdb Exp $
4  *
5  * Author: Florian Seck, November 2018
6  ***************************************************************************
7  *
8  * Description: Data class for storing eTOF PID information for tracks
9  * matched to eTOF hits
10  *
11  ***************************************************************************
12  *
13  * $Log: StMuETofPidTraits.cxx,v $
14  * Revision 1.1 2019/02/21 13:32:54 jdb
15  * Inclusion of ETOF MuDst code. This code adds support for the full set of ETOF data which includes EtofDigi, EtofHit, EtofHeader. The code essentially copies similar structures from StEvent and additionally rebuilds the maps between Digis and Hits. Accessor methods are added based on the pattern from BTOF to provide access to data at various levels. The code for accessing the PID traits provided by ETOF is also provided
16  *
17  *
18  ***************************************************************************/
19 #include "StETofPidTraits.h"
20 #include "StMuETofPidTraits.h"
21 
22 StMuETofPidTraits::StMuETofPidTraits()
23 {
24  mMatchFlag = 0;
25  mLocalX = -999.;
26  mLocalY = -999.;
27  mThetaLocal = -999.;
28  mPosition.set( 0., 0., 0. );
29  mDeltaX = -999.;
30  mDeltaY = -999.;
31  mTimeOfFlight = -999.;
32  mPathLength = -999.;
33  mBeta = -999.;
34 }
35 
36 StMuETofPidTraits::~StMuETofPidTraits()
37 { /* noop */
38 }
39 
40 void
42 {
43  if( !pid ) {
44  mMatchFlag = 0;
45  mLocalX = -999.;
46  mLocalY = -999.;
47  mThetaLocal = -999.;
48  mPosition.set( 0., 0., 0. );
49  mDeltaX = -999.;
50  mDeltaY = -999.;
51  mTimeOfFlight = -999.;
52  mPathLength = -999.;
53  mBeta = -999.;
54  }
55  else{
56  mMatchFlag = pid->matchFlag();
57  mLocalX = pid->localX();
58  mLocalY = pid->localY();
59  mThetaLocal = pid->thetaLocal();
60  mPosition = pid->position();
61  mDeltaX = pid->deltaX();
62  mDeltaY = pid->deltaY();
63  mTimeOfFlight = pid->timeOfFlight();
64  mPathLength = pid->pathLength();
65  mBeta = pid->beta();
66  }
67 }
68 
70 StMuETofPidTraits::createETofPidTraits() const
71 {
72  StETofPidTraits* traits = new StETofPidTraits();
73 
74  traits->setMatchFlag( mMatchFlag );
75  traits->setLocalX( mLocalX );
76  traits->setLocalY( mLocalY );
77  traits->setThetaLocal( mThetaLocal );
78  traits->setPosition( mPosition );
79  traits->setDeltaX( mDeltaX );
80  traits->setDeltaY( mDeltaY );
81  traits->setTimeOfFlight( mTimeOfFlight );
82  traits->setPathLength( mPathLength );
83  traits->setBeta( mBeta );
84 
85  return traits;
86 }
87 
89 StMuETofPidTraits::position() {
90  return mPosition;
91 }
92 
93 const StThreeVectorF&
94 StMuETofPidTraits::position() const {
95  return mPosition;
96 }
97 
98 void
99 StMuETofPidTraits::setPosition( const StThreeVectorF& pos ) {
100  mPosition = pos;
101 }
void setETofPidTraits(const StETofPidTraits *)
PID functions – to be added (?)
float timeOfFlight() const
timing for PID
unsigned short matchFlag() const
matching information