]> git.uio.no Git - u/mrichter/AliRoot.git/blame - TOF/AliTOFTDCHit.cxx
Add option to run on some local files with test mode using the alien plugin
[u/mrichter/AliRoot.git] / TOF / AliTOFTDCHit.cxx
CommitLineData
5b4ed716 1/**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
3 * *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
6 * *
7 * Permission to use, copy, modify and distribute this software and its *
8 * documentation strictly for non-commercial purposes is hereby granted *
9 * without fee, provided that the above copyright notice appears in all *
10 * copies and that both the copyright notice and this permission notice *
11 * appear in the supporting documentation. The authors make no claims *
12 * about the suitability of this software for any purpose. It is *
13 * provided "as is" without express or implied warranty. *
14***************************************************************************/
15
16/*
17 author: Roberto Preghenella (R+), preghenella@bo.infn.it
18*/
19
20
21//////////////////////////////////////////////////////////////////////
22// //
23// //
24// This class provides a definition for TDC hits. //
25// //
26// //
27//////////////////////////////////////////////////////////////////////
28
29#include "AliTOFTDCHit.h"
30#define TIME_BIN_WIDTH 24.4e-3//ns
31#define TOT_BIN_WIDTH 48.8e-3//ns
32#define TIME_TO_TOT_BIN_WIDTH ( TIME_BIN_WIDTH / TOT_BIN_WIDTH )
33#define TOT_TO_TIME_BIN_WIDTH ( TOT_BIN_WIDTH / TIME_BIN_WIDTH )
34
35ClassImp(AliTOFTDCHit)
36
37AliTOFTDCHit::AliTOFTDCHit() :
38 TObject(),
39 fHitTime(0),
40 fTOTWidth(0),
41 fChan(0),
42 fTDCID(0),
43 fEBit(0),
44 fPSBits(0)
45{
46 /* default constructor */
47}
48
49//_________________________________________________________________
50
51AliTOFTDCHit::AliTOFTDCHit(const AliTOFTDCHit &source) :
52 TObject(),
53 fHitTime(source.fHitTime),
54 fTOTWidth(source.fTOTWidth),
55 fChan(source.fChan),
56 fTDCID(source.fTDCID),
57 fEBit(source.fEBit),
58 fPSBits(source.fPSBits)
59{
60 /* copy constructor */
61}
62
63//_________________________________________________________________
64
65AliTOFTDCHit &
66AliTOFTDCHit::operator = (const AliTOFTDCHit &source)
67{
68 /* operator = */
a44583b8 69 if (this == &source) return *this;
70 TObject::operator=(source);
5b4ed716 71 fHitTime = source.fHitTime;
72 fTOTWidth = source.fTOTWidth;
73 fChan = source.fChan;
74 fTDCID = source.fTDCID;
75 fEBit = source.fEBit;
76 fPSBits = source.fPSBits;
77 return *this;
78}
79
80#if 0
81//_________________________________________________________________
82
83AliTOFTDCHit &
84AliTOFTDCHit::operator - (const AliTOFTDCHit &source)
85{
86 /* operator - */
87 fHitTime = fHitTime - source.fHitTime;
88 return *this;
89}
90#endif
91
92//_________________________________________________________________
93
94AliTOFTDCHit &
95AliTOFTDCHit::operator -= (const AliTOFTDCHit &source)
96{
97 /* operator -= */
98 fHitTime -= source.fHitTime;
99 return *this;
100}
101
102//_________________________________________________________________
103
104AliTOFTDCHit &
105AliTOFTDCHit::operator << (const AliTOFTDCHit &source)
106{
107 /* operator << */
108 /* build packed hit */
109 fTOTWidth = source.fHitTime - fHitTime; /* compute TOT width */
110 fTOTWidth = (UShort_t)(fTOTWidth * TIME_TO_TOT_BIN_WIDTH); /* convert into 48.8 ps bins */
111 fEBit = fEBit | source.fEBit; /* set E bit as or */
112 fPSBits = 0; /* set PB bits as packed hit */
113 return *this;
114}
115
116//_________________________________________________________________
117
118AliTOFTDCHit::~AliTOFTDCHit()
119{
120 /* destructor */
121}