]> git.uio.no Git - u/mrichter/AliRoot.git/blame - T0/AliT0RecPoint.cxx
Bug fix (G. Luparello)
[u/mrichter/AliRoot.git] / T0 / AliT0RecPoint.cxx
CommitLineData
dc7ca31d 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/* $Id$ */
17/////////////////////////////////////////////////////////////////////////
18// Class AliT0RecPoint for T0 time and ADC signals
c41ceaac 19// fTimeA - A side TOF signal
20// fTimeC - C side TOF signal
21// fTimeBestA - TOF first particle on the A side
22// TimeBestC - TOF first particle on the C side
23// fTimeAverage = (fTimeBestA + TimeBestLeft ) /2. T0 signal
dc7ca31d 24// fVertex - vertex position
25//
26///////////////////////////////////////////////////////////////////////
27
28
29
30
31#include "AliT0RecPoint.h"
8f8d0732 32#include "AliLog.h"
4fe1424e 33
dc7ca31d 34
35ClassImp(AliT0RecPoint)
36
37//------------------------------------
4fe1424e 38 AliT0RecPoint::AliT0RecPoint() : TObject(),
c2337900 39 fTimeAverage(99999),
40 fTimeOnlineMean(99999),
41 fVertexPosition(999999),
4fe1424e 42 fTimeBestA(0),fTimeBestC(0),
3c6a09a2 43 fMultC(0),fMultA(0),
adf36b9d 44 fT0clock(9999999),
b0e13b29 45 fT0trig(0),
46 fPileup(kFALSE),
47 fSattelite(kFALSE)
48
adf36b9d 49
dc7ca31d 50{
51 //ctor
c2337900 52 // fTimeAverage=99999;
c41ceaac 53 fTimeBestA=99999;
54 fTimeBestC=99999;
c2337900 55 // fVertexPosition=99999;
dc7ca31d 56 fMultA=0;
57 fMultC=0;
b0e13b29 58 for (Int_t i=0; i<24; i++) { fTime[i]=0; fADC[i]=0; fADCLED[i]=0;
59 for(Int_t iHit=0; iHit<5; iHit++) {
60 fTimeFull[i][iHit] = 0;
61 fOrA[iHit] = 0;
62 fOrC[iHit] = 0;
63 fTVDC[iHit] = 0;
64 }
65 }
dc7ca31d 66}
4fe1424e 67//_____________________________________________________________________________
68
69AliT0RecPoint::AliT0RecPoint(const AliT0RecPoint &r):TObject(),
c2337900 70 fTimeAverage(999999),
71 fTimeOnlineMean(999999),
72 fVertexPosition(999999),
73 fTimeBestA(0),fTimeBestC(0),
3c6a09a2 74 fMultC(0),fMultA(0),
adf36b9d 75 fT0clock(9999999),
b0e13b29 76 fT0trig(0),
77 fPileup(kFALSE),
78 fSattelite(kFALSE)
4fe1424e 79{
80 //
81 // AliT0RecPoint copy constructor
82 //
83
84 ((AliT0RecPoint &) r).Copy(*this);
85
86}
adf36b9d 87//_____________________________________________________________________________
88
89void AliT0RecPoint::SetT0Trig(Bool_t *tr)
90{
91 fT0trig=0;
b0e13b29 92 for (Int_t i=0; i<5; i++) fT0trig = fT0trig | (tr[i]?(1<<i):0);
adf36b9d 93}
94//_____________________________________________________________________________
95
96void AliT0RecPoint::PrintTriggerSignals(Int_t trig)
97{
98 Bool_t tr[5];
b0e13b29 99 for (Int_t i=0; i<5; i++) tr[i] = (trig&(1<<i))!=0;
adf36b9d 100
b0e13b29 101 AliInfo(Form("T0 triggers tvdc %d orA %d orC %d centr %d semicentral %d",tr[0],tr[1],tr[2],tr[3],tr[4]));
adf36b9d 102}