StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StMuBTofHit.cxx
1 /***************************************************************************
2  *
3  * $Id: StMuBTofHit.cxx,v 1.1 2009/02/20 17:05:59 tone421 Exp $
4  *
5  * Author: Xin Dong, Feb. 2009
6  *
7  ***************************************************************************
8  *
9  * Description: Tof Hit structure in MuDst
10  *
11  ***************************************************************************
12  *
13  * $Log: StMuBTofHit.cxx,v $
14  * Revision 1.1 2009/02/20 17:05:59 tone421
15  * *** empty log message ***
16  *
17  *
18  ***************************************************************************/
19 #include "StTrack.h"
20 #include "StBTofHit.h"
21 #include "StMuBTofHit.h"
22 
23 ClassImp(StMuBTofHit)
24 
27 {
28  mTray = 0;
29  mModule = 0;
30  mCell = 0;
31 
32  mLeadingEdgeTime = 0.0;
33  mTrailingEdgeTime = 0.0;
34  mAssociatedTrackId = -1;
35  mIndex2Primary = -1;
36  mIndex2Global = -1;
37  mIdTruth = 0;
38  mQuality = 0;
39 }
40 
43 {
44  mTray = tofHit->tray();
45  mModule = tofHit->module();
46  mCell = tofHit->cell();
47 
48  mLeadingEdgeTime = tofHit->leadingEdgeTime();
49  mTrailingEdgeTime = tofHit->trailingEdgeTime();;
50  mAssociatedTrackId = (tofHit->associatedTrack()) ? tofHit->associatedTrack()->key() : -1;
51  mIndex2Primary = -1;
52  mIndex2Global = -1;
53  mIdTruth = tofHit->idTruth();
54  mQuality = tofHit->qaTruth();
55 }
56 
57 StMuBTofHit::~StMuBTofHit()
58 {}
59 
60 void
61 StMuBTofHit::setIdTruth(int idtru,int qatru)
62 {
63  if (qatru==0) qatru = (idtru>>16);
64  idtru = idtru&((1<<16)-1);
65  mIdTruth = static_cast<UShort_t>(idtru);
66  mQuality = static_cast<UShort_t>(qatru);
67 }
StMuBTofHit()
constructor
Definition: StMuBTofHit.cxx:26