AliPhysics  58f3d52 (58f3d52)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AliForwardCreateResponseMatrices.cxx
Go to the documentation of this file.
1 
12 #include <TH1D.h>
14 #include "AliAODForwardMult.h"
15 #include "AliAODCentralMult.h"
16 #include "AliAODEvent.h"
17 
18 
20 #if 0
21 ; // This is for Emacs - do not delete
22 #endif
23 //_____________________________________________________________________
26 {
27  return new Bin(l,h);
28 }
29 
30 //=====================================================================
32  Int_t max)
33 {
34  //
35  // Define eta bin output histos
36  //
38  TList* out = static_cast<TList*>(cont->FindObject(GetName()));
39  if (!out) return;
40 
41  fResponseMatrix = new TH2D("responseMatrix","Response Matrix;"
42  "MC_{truth};MC_{measured}",
43  max, -0.5, max-.5, max, -0.5, max-.5);
44  out->Add(fResponseMatrix);
45 }
46 
47 
48 //_____________________________________________________________________
49 void
51 Bin::Process(TH1D* dndetaForward,
52  TH1D* dndetaCentral,
53  TH1D* normForward,
54  TH1D* normCentral,
55  TH1D* mc,
56  Double_t ipZ,
57  Bool_t pileup,
58  Bool_t selectedTrigger,
59  Bool_t isMCNSD,
60  Bool_t isESDNSD,
61  const AliAODEvent& aodevent,
62  Double_t minIPz,
63  Double_t maxIPz)
64 {
65  //
66  // Process a single eta bin
67  //
68  // retreive MC particles from event
69  Printf("Bin %s - selected: %s IPz: %f (%f,%f)", GetName(),
70  selectedTrigger ? "yes" : " no", ipZ, minIPz, maxIPz);
71  if (pileup) return;
72  if (!selectedTrigger) return;
73  if (ipZ < minIPz || ipZ > maxIPz) return;
74 
75  Double_t mcMult, mcErr, statErr, sysErr;
76  Double_t mult = CalcMult(dndetaForward,
77  dndetaCentral,
78  normForward,
79  normCentral,
80  mc,
81  ipZ,
82  statErr,
83  sysErr,
84  mcMult,
85  mcErr);
86  fHist->Fill(mult);
87  fHistMC->Fill(mcMult);
88  fResponseMatrix->Fill(mcMult, mult);
89 }
90 
91 
92 
93 
94 //_____________________________________________________________________
95 //
96 //
97 // EOF
double Double_t
Definition: External.C:58
Task to make the reponse matrices used by the multiplicity distibution analysis.
Per-event per bin.
int Int_t
Definition: External.C:63
virtual void CreateOutputObjects(TList *cont, Int_t max)
AliBaseMultTask::Bin * MakeBin(Double_t etaLow, Double_t etaHigh)
Definition: External.C:228
Definition: External.C:212
virtual void Process(TH1D *dndetaForward, TH1D *dndetaCentral, TH1D *normForward, TH1D *normCentral, TH1D *mc, Double_t ipZ, Bool_t pileup, Bool_t selectedTrigger, Bool_t isMCNSDm, Bool_t isESDNSD, const AliAODEvent &aodevent, Double_t minIPz, Double_t maxIPz)
bool Bool_t
Definition: External.C:53
virtual void CreateOutputObjects(TList *cont, Int_t max)