]>
Commit | Line | Data |
---|---|---|
04fa961a | 1 | /************************************************************************** |
2 | * Copyright(c) 1998-1999, 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 | /* $Id$ */ | |
17 | ||
18 | /////////////////////////////////////////////////////////////////////////////// | |
19 | // // | |
20 | // This class creates and fills the monitor histograms for V0s // | |
21 | // // | |
22 | /////////////////////////////////////////////////////////////////////////////// | |
23 | ||
24 | ||
25 | #include "AliMonitorV0s.h" | |
26 | #include "AliMonitorHisto.h" | |
b6a3610d | 27 | #include "AliESD.h" |
c4bd737c | 28 | #include <TFolder.h> |
04fa961a | 29 | #include <TPDGCode.h> |
30 | ||
31 | ||
32 | ClassImp(AliMonitorV0s) | |
33 | ||
34 | ||
35 | //_____________________________________________________________________________ | |
36 | AliMonitorV0s::AliMonitorV0s() | |
37 | { | |
38 | // create a monitor object for V0s | |
39 | ||
40 | } | |
41 | ||
c4bd737c | 42 | //_____________________________________________________________________________ |
43 | AliMonitorV0s::AliMonitorV0s(const AliMonitorV0s& monitor) : | |
44 | AliMonitor(monitor) | |
45 | { | |
46 | Fatal("AliMonitorV0s", "copy constructor not implemented"); | |
47 | } | |
48 | ||
49 | //_____________________________________________________________________________ | |
50 | AliMonitorV0s& AliMonitorV0s::operator = (const AliMonitorV0s& /*monitor*/) | |
51 | { | |
52 | Fatal("operator =", "assignment operator not implemented"); | |
53 | return *this; | |
54 | } | |
55 | ||
04fa961a | 56 | |
57 | //_____________________________________________________________________________ | |
58 | void AliMonitorV0s::CreateHistos(TFolder* folder) | |
59 | { | |
60 | // create the V0s monitor histograms | |
61 | ||
62 | fFolder = folder->AddFolder("V0s", "V0s"); | |
63 | ||
64 | fRadius = CreateHisto1("Radius", "radius of V0 vertices", | |
65 | 90, 0., 3., "r_{xy} [cm]", | |
66 | "#Delta N/N", AliMonitorHisto::kNormEvents); | |
67 | ||
68 | fMassK0 = CreateHisto1("MassK0", "invariant mass of K^{0} candidates", | |
69 | 50, 0.4, 0.6, "m_{#pi^{+}#pi^{-}} [GeV/c^{2}]", | |
70 | "#Delta N/N", AliMonitorHisto::kNormEvents); | |
71 | ||
72 | fMassLambda = CreateHisto1("MassLambda", | |
73 | "invariant mass of #Lambda candidates", | |
74 | 50, 1.0, 1.2, "m_{p#pi^{-}} [GeV/c^{2}]", | |
75 | "#Delta N/N", AliMonitorHisto::kNormEvents); | |
76 | ||
77 | fMassAntiLambda = CreateHisto1("MassAntiLambda", | |
78 | "invariant mass of #bar{#Lambda} candidates", | |
79 | 50, 1.0, 1.2, | |
80 | "m_{#bar{p}#pi^{+}} [GeV/c^{2}]", | |
81 | "#Delta N/N", AliMonitorHisto::kNormEvents); | |
82 | } | |
83 | ||
84 | ||
85 | //_____________________________________________________________________________ | |
b6a3610d | 86 | void AliMonitorV0s::FillHistos(AliRunLoader* /*runLoader*/, |
87 | AliRawReader*, AliESD* esd) | |
04fa961a | 88 | { |
b6a3610d | 89 | // fill the V0s monitor histogrms |
04fa961a | 90 | |
b6a3610d | 91 | for (Int_t i = 0; i < esd->GetNumberOfV0s(); i++) { |
92 | AliESDv0* v0 = esd->GetV0(i); | |
93 | if (!v0) continue; | |
04fa961a | 94 | Double_t x, y, z; |
b6a3610d | 95 | v0->GetXYZ(x, y, z); |
04fa961a | 96 | fRadius->Fill(TMath::Sqrt(x*x + y*y)); |
b6a3610d | 97 | v0->ChangeMassHypothesis(kK0Short); |
98 | fMassK0->Fill(v0->GetEffMass()); | |
99 | v0->ChangeMassHypothesis(kLambda0); | |
100 | fMassLambda->Fill(v0->GetEffMass()); | |
101 | v0->ChangeMassHypothesis(kLambda0Bar); | |
102 | fMassAntiLambda->Fill(v0->GetEffMass()); | |
04fa961a | 103 | } |
04fa961a | 104 | } |