AliPhysics  cdeda5a (cdeda5a)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AliPicoHeaderCJ.cxx
Go to the documentation of this file.
1 #include <TString.h>
2 
3 #include "AliVVertex.h"
4 #include "AliVEvent.h"
5 #include "AliAODEvent.h"
6 #include "AliESDEvent.h"
7 #include "AliCentrality.h"
8 #include "AliEventplane.h"
9 #include "AliInputEventHandler.h"
10 
11 #include "AliPicoHeaderCJ.h"
12 
14 
15 //_____________________________________________________________________________
17 TNamed(),
18 fPhysSelMask(0),
19 fFiredTriggerClass(""),
20 fCentralityV0M(-1.),
21 fCentralityV0A(-1.),
22 fCentralityCL1(-1.),
23 fCentralityZNA(-1.),
24 fEventPlane(999.),
25 fBackgroundRhoRD02(0.),
26 fBackgroundRhoRD03(0.),
27 fBackgroundRhoRD04(0.),
28 fBackgroundRhoMC02(0.),
29 fBackgroundRhoMC03(0.),
30 fBackgroundRhoMC04(0.)
31 {
32 //
33 // AliPicoHeaderCJ::AliPicoHeaderCJ
34 //
35 
36  for (Int_t i=3; i--;) fVtx[i] = 0.;
37 }
38 
39 //_____________________________________________________________________________
41 TNamed(src),
42 fPhysSelMask(src.fPhysSelMask),
43 fFiredTriggerClass(src.fFiredTriggerClass),
44 fCentralityV0M(src.fCentralityV0M),
45 fCentralityV0A(src.fCentralityV0A),
46 fCentralityCL1(src.fCentralityCL1),
47 fCentralityZNA(src.fCentralityZNA),
48 fEventPlane(src.fEventPlane),
49 fBackgroundRhoRD02(src.fBackgroundRhoRD02),
50 fBackgroundRhoRD03(src.fBackgroundRhoRD03),
51 fBackgroundRhoRD04(src.fBackgroundRhoRD04),
52 fBackgroundRhoMC02(src.fBackgroundRhoMC02),
53 fBackgroundRhoMC03(src.fBackgroundRhoMC03),
54 fBackgroundRhoMC04(src.fBackgroundRhoMC04)
55 {
56 //
57 // AliPicoHeaderCJ::AliPicoHeaderCJ
58 //
59 
60  for (Int_t i=3; i--;) fVtx[i] = src.fVtx[i];
61 }
62 
63 //_____________________________________________________________________________
65 {
66 //
67 // AliPicoHeaderCJ::operator=
68 //
69 
70  if (&src==this) return *this;
71 
72  TNamed::operator=(src);
73 
80 
82 
86 
90 
91  for (Int_t i=3; i--;) fVtx[i] = src.fVtx[i];
92 
93  return *this;
94 }
95 
96 //_____________________________________________________________________________
98 {
99 //
100 // AliPicoHeaderCJ::~AliPicoHeaderCJ
101 //
102 }
103 
104 //_____________________________________________________________________________
105 void AliPicoHeaderCJ::SetEventInfo(AliInputEventHandler* const pEH)
106 {
107 //
108 // AliPicoHeaderCJ::SetEventInfo
109 //
110 
111  AliVEvent *pEV = pEH->GetEvent();
112  AliAODEvent *pA = dynamic_cast<AliAODEvent*>(pEV);
113  AliESDEvent *pE = dynamic_cast<AliESDEvent*>(pEV);
114 
115  fPhysSelMask = pEH->IsEventSelected();
116  if (pA) fFiredTriggerClass = pA->GetFiredTriggerClasses();
117  if (pE) fFiredTriggerClass = pE->GetFiredTriggerClasses();
118 
119  const AliVVertex *pVtx = pEV->GetPrimaryVertex();
120  this->SetTitle(pVtx->GetTitle());
121  pVtx->GetXYZ(fVtx);
122 
123  AliCentrality *pCent = pEV->GetCentrality();
124  if (pCent) {
125  fCentralityV0M = pCent->GetCentralityPercentile("V0M");
126  fCentralityV0A = pCent->GetCentralityPercentile("V0A");
127  fCentralityCL1 = pCent->GetCentralityPercentile("CL1");
128  fCentralityZNA = pCent->GetCentralityPercentile("ZNA");
129  }
130 
131  AliEventplane *pEventPlane = pEV->GetEventplane();
132  if (pEventPlane) fEventPlane = pEventPlane->GetEventplane("Q");
133 
134  return;
135 }
136 
137 //_____________________________________________________________________________
139 {
140 //
141 // AliPicoHeaderCJ::BackgroundRho
142 //
143 
144  if (sJet.IsNull()) return 0.;
145 //=============================================================================
146 
147  if (sJet=="RD02") return fBackgroundRhoRD02;
148  if (sJet=="RD03") return fBackgroundRhoRD03;
149  if (sJet=="RD04") return fBackgroundRhoRD04;
150 
151  if (sJet=="MC02") return fBackgroundRhoMC02;
152  if (sJet=="MC03") return fBackgroundRhoMC03;
153  if (sJet=="MC04") return fBackgroundRhoMC04;
154 //=============================================================================
155 
156  return 0.;
157 }
158 
159 //_____________________________________________________________________________
161 {
162 //
163 // AliPicoHeaderCJ::Reset
164 //
165 
166  fPhysSelMask = 0,
167  fFiredTriggerClass = "";
168 
169  fCentralityV0M = -1.;
170  fCentralityV0A = -1.;
171  fCentralityCL1 = -1.;
172  fCentralityZNA = -1.;
173 
174  fEventPlane = 999.;
175 
176  fBackgroundRhoRD02 = 0.;
177  fBackgroundRhoRD03 = 0.;
178  fBackgroundRhoRD04 = 0.;
179 
180  fBackgroundRhoMC02 = 0.;
181  fBackgroundRhoMC03 = 0.;
182  fBackgroundRhoMC04 = 0.;
183 
184  for (Int_t i=3; i--;) fVtx[i] = 0.;
185 
186  return;
187 }
Double_t fVtx[3]
double Double_t
Definition: External.C:58
Double_t BackgroundRho(const TString sJet) const
Double_t fBackgroundRhoMC03
Double_t fBackgroundRhoMC04
ClassImp(AliPicoHeaderCJ) AliPicoHeaderCJ
Float_t fCentralityCL1
Float_t fCentralityZNA
int Int_t
Definition: External.C:63
Double32_t fEventPlane
Double_t fBackgroundRhoRD04
void SetEventInfo(AliInputEventHandler *const pEH)
Double_t fBackgroundRhoRD02
Float_t fCentralityV0A
Double_t fBackgroundRhoMC02
AliPicoHeaderCJ & operator=(const AliPicoHeaderCJ &src)
Float_t fCentralityV0M
TString fFiredTriggerClass
virtual ~AliPicoHeaderCJ()
Double_t fBackgroundRhoRD03