Updated macros for PHOS alignment calculation
[u/mrichter/AliRoot.git] / HLT / trigger / AliHLTEmcalElectronMonitor.cxx
CommitLineData
93654f63 1#include "AliHLTEmcalElectronMonitor.h"
2#include "AliHLTScalars.h"
3#include "TString.h"
4#include "TMath.h"
5
6
7ClassImp(AliHLTEmcalElectronMonitor);
8
9AliHLTEmcalElectronMonitor::AliHLTEmcalElectronMonitor():
10 hList(NULL),
11 hTracksPt(NULL),
12 hClusterEn(NULL),
13 hdEta(NULL),
14 hdPhi(NULL),
15 hdR(NULL),
16 hEoverP(NULL)
17{
18
19 // book histograms
20 hList = new TObjArray;
21
22 hTracksPt = new TH1F("hTracksPt","Tracks pT (GeV/c)", 500, 0, 100);
23 hList->Add(hTracksPt);
24
25 hClusterEn = new TH1F("hClusterEn","Cluster Energy (GeV)", 500, 0, 100);
26 hList->Add(hClusterEn);
27
28 hdEta = new TH1F("hdEta", "#Delta #eta (Cluster-Track)", 200,-.1,.1);
29 hList->Add(hdEta);
30
31 hdPhi = new TH1F("hdPhi", "#Delta #phi (Cluster-Track)", 200,-.1,.1);
32 hList->Add(hdPhi);
33
34 hdR = new TH1F("hdR","#Delta R (Track-Cluster);#Delta R(#sqrt{#Delta #eta ^{2} +#Delta #Phi ^{2}})",200,0.,.1);
35 hList->Add(hdR);
36
37 hEoverP=new TH1F("hEoverP","E/P for matched tracks;E/P",200,0.,10.);
38 hList->Add(hEoverP);
39
40}
41//___________________________________________________________________________________________________________________________________________________
42
43AliHLTEmcalElectronMonitor::~AliHLTEmcalElectronMonitor()
44{
45
46 // default destructor
47
48}
49//___________________________________________________________________________________________________________________________________________________
50
51TObjArray* AliHLTEmcalElectronMonitor::GetHistograms()
52{
53
54 // pointer to histogram objects
55
56 return hList;
57
58}
59//___________________________________________________________________________________________________________________________________________________
60
61Int_t AliHLTEmcalElectronMonitor::MakeHisto(AliHLTScalars *scalar)
62{
63
64 // make the histograms
65
66 hTracksPt->Fill( scalar->GetScalar("TracksPt").Value() );
67
68 hClusterEn->Fill( scalar->GetScalar("ClusterEn").Value() );
69
70 hdEta->Fill( scalar->GetScalar("dEta").Value() );
71
72 hdPhi->Fill( scalar->GetScalar("dPhi").Value() );
73
74 hdR->Fill( scalar->GetScalar("dR").Value() );
75
76 hEoverP->Fill( scalar->GetScalar("EoverP").Value() );
77
78
79 return 0;
80
81}
82