Corrected protection.
[u/mrichter/AliRoot.git] / STEER / AliESDCentrality.cxx
CommitLineData
2eec2a33 1/**************************************************************************\r
2 * Copyright(c) 1998-2008, ALICE Experiment at CERN, All rights reserved. *\r
3 * *\r
4 * Author: The ALICE Off-line Project. *\r
5 * Contributors are mentioned in the code where appropriate. *\r
6 * *\r
7 * Permission to use, copy, modify and distribute this software and its *\r
8 * documentation strictly for non-commercial purposes is hereby granted *\r
9 * without fee, provided that the above copyright notice appears in all *\r
10 * copies and that both the copyright notice and this permission notice *\r
11 * appear in the supporting documentation. The authors make no claims *\r
12 * about the suitability of this software for any purpose. It is *\r
13 * provided "as is" without express or implied warranty. *\r
14 **************************************************************************/\r
15\r
16//*****************************************************\r
17// Class AliCentralitySelectionTask\r
18// author: Alberica Toia\r
19//*****************************************************\r
20/// A container for the centrality stored in the ESD.\r
21 \r
22#include "AliESDCentrality.h"\r
23\r
24ClassImp(AliESDCentrality)\r
25\r
26AliESDCentrality::AliESDCentrality() : TNamed("ESDCentrality", "Centrality"),\r
27fCentrality(0)\r
28{\r
29 /// constructor\r
30}\r
31\r
32AliESDCentrality::AliESDCentrality(const AliESDCentrality& cnt) : \r
33 TNamed(cnt), fCentrality(cnt.fCentrality)\r
34{\r
35 /// Copy constructor\r
36}\r
37\r
38AliESDCentrality& AliESDCentrality::operator=(const AliESDCentrality& c)\r
39{\r
40 /// Assignment operator\r
41 if (this!=&c) {\r
42 TNamed::operator=(c);\r
43 fCentrality = c.fCentrality;\r
44 }\r
45\r
46 return *this;\r
47}\r
48\r
49AliESDCentrality::~AliESDCentrality()\r
50{\r
51 /// destructor\r
52}\r
53\r
54Float_t AliESDCentrality::GetCentralityPercentile()\r
55{\r
56 return fCentrality;\r
57}\r
58\r
59Int_t AliESDCentrality::GetCentralityClass10()\r
60{\r
61 return (Int_t) fCentrality / 10.0;\r
62}\r
63\r
64Int_t AliESDCentrality::GetCentralityClass5()\r
65{\r
66 return (Int_t) fCentrality / 5.0;\r
67}\r
68\r
69Bool_t AliESDCentrality::IsEventInCentralityClass(Float_t a, Float_t b)\r
70{\r
71 if (fCentrality >=a && fCentrality < b) return kTRUE;\r
72 else return kFALSE;\r
73}\r
74\r