]> git.uio.no Git - u/mrichter/AliRoot.git/blame - T0/AliT0TriggerParameters.cxx
reco i trigger parameters for T0
[u/mrichter/AliRoot.git] / T0 / AliT0TriggerParameters.cxx
CommitLineData
0f786b96 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: AliT0TriggerParameters.cxx 28275 2008-08-28 06:09:21Z alla $ */
17
18///////////////////////////////////////////////////////////////////////////////
19// //
20// class for T0 calibration TM-AC-AM_6-02-2006
21// equalize time shift for each time CFD channel
22// //
23///////////////////////////////////////////////////////////////////////////////
24
25#include "AliT0TriggerParameters.h"
26#include "AliLog.h"
27
28#include "Riostream.h"
29
30ClassImp(AliT0TriggerParameters)
31
32//________________________________________________________________
33 AliT0TriggerParameters::AliT0TriggerParameters():TObject(),
34 fSwtPmt(0),
35 fAmpCentr(5),
36 fAmpSemiCentr(1),
37 fTimeWindowLow(0),
38 fTimeWindowHigh(1)
39
40{
41 //
42
43}
44//_____________________________________________________________________________
45
46AliT0TriggerParameters::AliT0TriggerParameters(const AliT0TriggerParameters &r):
47 TObject(),
48 fSwtPmt(0),
49 fAmpCentr(5),
50 fAmpSemiCentr(1),
51 fTimeWindowLow(0),
52 fTimeWindowHigh(1)
53{
54
55 //copy constructor
56 ((AliT0TriggerParameters &) r).Copy(*this);
57
58}
59
60//_____________________________________________________________________________
61
62AliT0TriggerParameters& AliT0TriggerParameters:: operator=(const AliT0TriggerParameters &p)
63{
64 //
65 // assign. operator
66 //
67
68 if (this == &p)
69 return *this;
70
71}
72
73//________________________________________________________________
74AliT0TriggerParameters::~AliT0TriggerParameters()
75{
76 //
77 // destrictor
78}
79//________________________________________________________________
80void AliT0TriggerParameters::Reset()
81{
82 //reset values
83
84 memset(fThreshold,0,24*sizeof(Int_t));
85
86}
87
88
89//________________________________________________________________
90void AliT0TriggerParameters::Print(Option_t*) const
91{
92 // print time values
93
94 printf("\n ---- Threshold ----\n\n");
95 printf(" Switched on/off\n");
96 for (Int_t i=0; i<24; i++) {
97 printf(" Threshold %i status %i ", fThreshold[i], GetPMTstatus(i));
98 }
99 AliInfo(Form(" Time window around vertex : %f %f",fTimeWindowLow, fTimeWindowHigh ));
100 AliInfo(Form(" Amplitude threshold: central %i semi-central %i", fAmpCentr,fAmpSemiCentr));
101
102}
103
104
105//________________________________________________________________
106void AliT0TriggerParameters::SetPMTstatus(Int_t i, Int_t val)
107{
108 if(val)fSwtPmt |= 1<<i;
109 else fSwtPmt &= ~(1<<i);
110
111}
112//________________________________________________________________
113Int_t AliT0TriggerParameters::GetPMTstatus(Int_t i) const
114{
115
116 return (1<<i)&fSwtPmt;
117
118}
119
120