]>
Commit | Line | Data |
---|---|---|
621688e4 | 1 | /************************************************************************* |
2 | * Copyright(c) 1998-2048, ALICE Experiment at CERN, All rights reserved. * | |
3 | * * | |
4 | * Author: The ALICE Off-line Project. * | |
5 | * Contributors are mentioned in the code where appropriate. * | |
6 | * * | |
7 | * Permission to use, copy, modify and distribute this software and its * | |
8 | * documentation strictly for non-commercial purposes is hereby granted * | |
9 | * without fee, provided that the above copyright notice appears in all * | |
10 | * copies and that both the copyright notice and this permission notice * | |
11 | * appear in the supporting documentation. The authors make no claims * | |
12 | * about the suitability of this software for any purpose. It is * | |
13 | * provided "as is" without express or implied warranty. * | |
14 | **************************************************************************/ | |
15 | ||
16 | // Author: Dariusz Miskowiec <mailto:d.miskowiec@gsi.de> 2007 | |
17 | ||
18 | //============================================================================= | |
19 | // event global variable analyzer | |
20 | // Histogram the event variables like multiplicity, flow vector, vertex z, | |
21 | // etc. | |
22 | //============================================================================= | |
23 | ||
24 | #include <TROOT.h> | |
25 | #include <TH1.h> | |
26 | #include <TH2.h> | |
27 | #include "AliUnicorEvent.h" | |
28 | #include "AliUnicorAnalGlobal.h" | |
29 | ||
621688e4 | 30 | class TH2; |
31 | ClassImp(AliUnicorAnalGlobal) | |
32 | ||
33 | //============================================================================= | |
61e4657c | 34 | AliUnicorAnalGlobal::AliUnicorAnalGlobal(const char *nam) : AliUnicorAnal(nam) |
621688e4 | 35 | { |
36 | // constructor | |
37 | ||
38 | TH1D *mult = new TH1D("mult","mult",5000,-0.5,4999.5); | |
39 | mult->SetXTitle("multiplicity"); | |
40 | TH1D *cent = new TH1D("cent","cent",100,0,1); | |
41 | cent->SetXTitle("centrality"); | |
76d78859 | 42 | TH2D *cemu = new TH2D("cemu","cemu",100,0,1,5000,-0.5,4999.5); |
43 | cemu->SetXTitle("centrality"); | |
44 | cemu->SetYTitle("Nch"); | |
45 | TH2D *dire = new TH2D("dire","dire",160,-40,40,160,-40,40); | |
621688e4 | 46 | dire->SetXTitle("Qx (GeV)"); |
47 | dire->SetYTitle("Qy (GeV)"); | |
48 | TH1D *zver = new TH1D("zver","zver",120,-1.2,1.2); | |
49 | zver->SetXTitle("normalized z-vertex"); | |
50 | fHistos.Add(mult); | |
51 | fHistos.Add(cent); | |
76d78859 | 52 | fHistos.Add(cemu); |
621688e4 | 53 | fHistos.Add(dire); |
54 | fHistos.Add(zver); | |
55 | gROOT->cd(); | |
621688e4 | 56 | } |
57 | //============================================================================= | |
58 | void AliUnicorAnalGlobal::Process(AliUnicorEvent *ev) const | |
59 | { | |
60 | // fill event variable histograms | |
61 | ||
62 | TH1D *mult = (TH1D*) fHistos.At(0); | |
63 | TH1D *cent = (TH1D*) fHistos.At(1); | |
76d78859 | 64 | TH2D *cemu = (TH2D*) fHistos.At(2); |
65 | TH2D *dire = (TH2D*) fHistos.At(3); | |
66 | TH1D *zver = (TH1D*) fHistos.At(4); | |
621688e4 | 67 | |
28eee19b | 68 | double n = ev->NGoodParticles(); |
69 | mult->Fill(n,1.0); | |
621688e4 | 70 | cent->Fill(ev->Centrality(),1.0); |
28eee19b | 71 | cemu->Fill(ev->Centrality(),n); |
61e4657c | 72 | Double_t qx=0,qy=0; |
621688e4 | 73 | ev->RP(qx,qy); |
74 | dire->Fill(qx,qy,1.0); | |
75 | zver->Fill(ev->Zver(),1.0); | |
76 | } | |
77 | //============================================================================= |