AliPhysics  e59a9ba (e59a9ba)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AliPicoJetHeader.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 "AliPicoJetHeader.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 // AliPicoJetHeader::AliPicoJetHeader
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 // AliPicoJetHeader::AliPicoJetHeader
58 //
59 
60  for (Int_t i=3; i--;) fVtx[i] = src.fVtx[i];
61 }
62 
63 //_____________________________________________________________________________
65 {
66 //
67 // AliPicoJetHeader::operator=
68 //
69 
70  if (&src==this) return *this;
71 
72  TNamed::operator=(src);
73 
76 
81 
83 
87 
91 
92  for (Int_t i=3; i--;) fVtx[i] = src.fVtx[i];
93 
94  return *this;
95 }
96 
97 //_____________________________________________________________________________
99 {
100 //
101 // AliPicoJetHeader::~AliPicoJetHeader
102 //
103 }
104 
105 //_____________________________________________________________________________
106 void AliPicoJetHeader::SetEventInfo(AliInputEventHandler* const pEH)
107 {
108 //
109 // AliPicoJetHeader::SetEventInfo
110 //
111 
112  AliVEvent *pEV = pEH->GetEvent();
113  AliAODEvent *pA = dynamic_cast<AliAODEvent*>(pEV);
114  AliESDEvent *pE = dynamic_cast<AliESDEvent*>(pEV);
115 
116  fPhysSelMask = pEH->IsEventSelected();
117  if (pA) fFiredTriggerClass = pA->GetFiredTriggerClasses();
118  if (pE) fFiredTriggerClass = pE->GetFiredTriggerClasses();
119 
120  const AliVVertex *pVtx = pEV->GetPrimaryVertex();
121  this->SetTitle(pVtx->GetTitle());
122  pVtx->GetXYZ(fVtx);
123 
124  AliCentrality *pCent = pEV->GetCentrality();
125  if (pCent) {
126  fCentralityV0M = pCent->GetCentralityPercentile("V0M");
127  fCentralityV0A = pCent->GetCentralityPercentile("V0A");
128  fCentralityCL1 = pCent->GetCentralityPercentile("CL1");
129  fCentralityZNA = pCent->GetCentralityPercentile("ZNA");
130  }
131 
132  AliEventplane *pEventPlane = pEV->GetEventplane();
133  if (pEventPlane) fEventPlane = pEventPlane->GetEventplane("Q");
134 
135  return;
136 }
137 
138 //_____________________________________________________________________________
139 Double_t AliPicoJetHeader::BackgroundRho(const TString sJet) const
140 {
141 //
142 // AliPicoJetHeader::BackgroundRho
143 //
144 
145  if (sJet.IsNull()) return 0.;
146 //=============================================================================
147 
148  if (sJet=="RD02") return fBackgroundRhoRD02;
149  if (sJet=="RD03") return fBackgroundRhoRD03;
150  if (sJet=="RD04") return fBackgroundRhoRD04;
151 
152  if (sJet=="MC02") return fBackgroundRhoMC02;
153  if (sJet=="MC03") return fBackgroundRhoMC03;
154  if (sJet=="MC04") return fBackgroundRhoMC04;
155 //=============================================================================
156 
157  return 0.;
158 }
159 
160 //_____________________________________________________________________________
162 {
163 //
164 // AliPicoJetHeader::Reset
165 //
166 
167  fPhysSelMask = 0,
168  fFiredTriggerClass = "";
169 
170  fCentralityV0M = -1.;
171  fCentralityV0A = -1.;
172  fCentralityCL1 = -1.;
173  fCentralityZNA = -1.;
174 
175  fEventPlane = 999.;
176 
177  fBackgroundRhoRD02 = 0.;
178  fBackgroundRhoRD03 = 0.;
179  fBackgroundRhoRD04 = 0.;
180 
181  fBackgroundRhoMC02 = 0.;
182  fBackgroundRhoMC03 = 0.;
183  fBackgroundRhoMC04 = 0.;
184 
185  for (Int_t i=3; i--;) fVtx[i] = 0.;
186 
187  return;
188 }
Double_t fBackgroundRhoMC03
Double_t fBackgroundRhoMC02
Double_t fBackgroundRhoRD02
Double_t fBackgroundRhoMC04
Double_t fBackgroundRhoRD04
Double32_t fEventPlane
void SetEventInfo(AliInputEventHandler *const pEH)
virtual ~AliPicoJetHeader()
Double_t fBackgroundRhoRD03
TString fFiredTriggerClass
Double_t BackgroundRho(const TString sJet) const
ClassImp(AliPicoJetHeader) AliPicoJetHeader
AliPicoJetHeader & operator=(const AliPicoJetHeader &src)