1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
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 **************************************************************************/
18 Revision 0.1 2006/12/15 A.De Caro
22 //////////////////////////////////////////////////////
24 // This class provides the TOF raw data object //
26 //////////////////////////////////////////////////////
30 #include "AliTOFGeometry.h"
31 #include "AliTOFrawData.h"
33 ClassImp(AliTOFrawData)
35 //_____________________________________________________________________________
36 AliTOFrawData::AliTOFrawData() :
55 //_____________________________________________________________________________
56 AliTOFrawData::AliTOFrawData(Int_t a, Int_t b, Int_t c, Int_t d, Int_t e,
57 Int_t f, Int_t g, Int_t h, Int_t l) :
76 //_____________________________________________________________________________
77 AliTOFrawData::AliTOFrawData(Int_t a, Int_t b, Int_t c, Int_t d, Int_t e,
78 Int_t f, Float_t ee, Float_t ff, Int_t g, Int_t h, Int_t l) :
97 //_____________________________________________________________________________
98 AliTOFrawData::AliTOFrawData(const AliTOFrawData& r) :
113 // dummy copy constructor
115 fACQflag = r.fACQflag;
118 fTRMchain = r.fTRMchain;
120 fTDCchannel = r.fTDCchannel;
121 fLeading = r.fLeading;
122 fTrailing = r.fTrailing;
129 //_____________________________________________________________________________
130 AliTOFrawData& AliTOFrawData::operator=(const AliTOFrawData& r)
133 // dummy assignment operator
135 this->fACQflag = r.fACQflag;
136 this->fPSbit = r.fPSbit;
138 this->fTRMchain = r.fTRMchain;
140 this->fTDCchannel = r.fTDCchannel;
141 this->fLeading = r.fLeading;
142 this->fTrailing = r.fTrailing;
144 this->fTime = r.fTime;
145 this->fError = r.fError;
150 //_____________________________________________________________________________
151 void AliTOFrawData::Update(Float_t tof, Float_t tot, Float_t leading, Float_t trailing, Int_t psBit, Int_t acq, Int_t errorFlag)
154 // To update a raw data object:
155 // if there is just a leading edge measurement,
156 // this method adds the trailing edge measurement
157 // to evaluate the time-of-flight and time-over-threshold measurements
160 AliDebug(2,Form(" %10.0f %10.0f %10.0f %1i %1i %1i",tof, tot, leading, psBit, acq, errorFlag));
162 if (fLeading!=-1 && fTime==-1 && fToT==-1 && trailing!=-1) {
164 fTrailing = trailing;
166 fToT = Int_t((trailing - fLeading)*AliTOFGeometry::TdcBinWidth()/AliTOFGeometry::ToTBinWidth());
170 else if (fLeading!=-1 && fTime==-1 && fToT==-1 && leading==-1 && trailing!=-1) {
173 fToT = Int_t((trailing - fLeading)*AliTOFGeometry::TdcBinWidth()/AliTOFGeometry::ToTBinWidth());