]> git.uio.no Git - u/mrichter/AliRoot.git/blob - STEER/STEERBase/AliVVZERO.cxx
da030f45b11538ca659311ef1e38c46e743507d2
[u/mrichter/AliRoot.git] / STEER / STEERBase / AliVVZERO.cxx
1 /**************************************************************************
2  * Copyright(c) 1998-2007, 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 //     Base class for ESD and AOD VZERO data
18 //     Author: Cvetan Cheshkov
19 //     cvetan.cheshkov@cern.ch 2/02/2011
20 //-------------------------------------------------------------------------
21
22 #include "AliVVZERO.h"
23 #include "AliLog.h"
24
25 ClassImp(AliVVZERO)
26
27 //__________________________________________________________________________
28 AliVVZERO::AliVVZERO(const AliVVZERO& source) :
29   TObject(source) { } // Copy constructor
30
31 //__________________________________________________________________________
32 AliVVZERO& AliVVZERO::operator=(const AliVVZERO& source)
33 {
34   // Assignment operator
35   //
36   if (this!=&source) { 
37     TObject::operator=(source); 
38   }
39   
40   return *this; 
41 }
42
43 //__________________________________________________________________________
44 Bool_t AliVVZERO::OutOfRange(Int_t i, const char* s, Int_t upper) const
45 {
46   // checks if i is a valid index.
47   // s = name of calling method
48   if (i > upper || i < 0) {
49     AliInfo(Form("%s: Index %d out of range",s,i));
50     return kTRUE;
51   }
52   return kFALSE;
53 }
54
55 //__________________________________________________________________________
56 Float_t AliVVZERO::GetVZEROEtaMin(Int_t channel)
57 {
58   // The method returns
59   // the lower eta limit of a given channel
60   Float_t eta[8] = {-3.7,-3.2,-2.7,-2.2,2.8,3.4,3.9,4.5};
61   return eta[channel/8];
62 }
63
64 //__________________________________________________________________________
65 Float_t AliVVZERO::GetVZEROEtaMax(Int_t channel)
66 {
67   // The method returns
68   // the upper eta limit of a given channel
69   Float_t eta[8] = {-3.2,-2.7,-2.2,-1.7,3.4,3.9,4.5,5.1};
70   return eta[channel/8];
71 }