]> git.uio.no Git - u/mrichter/AliRoot.git/blob - MONITOR/AliMonitorV0s.cxx
corrections from Alberto
[u/mrichter/AliRoot.git] / MONITOR / AliMonitorV0s.cxx
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"
27 #include "AliESD.h"
28 #include "AliLog.h"
29 #include <TFolder.h>
30 #include <TPDGCode.h>
31
32
33 ClassImp(AliMonitorV0s) 
34
35
36 //_____________________________________________________________________________
37 AliMonitorV0s::AliMonitorV0s():
38   AliMonitor(),
39   fRadius(NULL),
40   fMassK0(NULL),
41   fMassLambda(NULL),
42   fMassAntiLambda(NULL)
43 {
44 // create a monitor object for V0s
45
46 }
47
48 //_____________________________________________________________________________
49 void AliMonitorV0s::CreateHistos(TFolder* folder)
50 {
51 // create the V0s monitor histograms
52
53   fFolder = folder->AddFolder("V0s", "V0s");
54
55   fRadius = CreateHisto1("Radius", "radius of V0 vertices", 
56                          90, 0., 3., "r_{xy} [cm]", 
57                          "#Delta N/N", AliMonitorHisto::kNormEvents);
58
59   fMassK0 = CreateHisto1("MassK0", "invariant mass of K^{0} candidates", 
60                          50, 0.4, 0.6, "m_{#pi^{+}#pi^{-}} [GeV/c^{2}]", 
61                          "#Delta N/N", AliMonitorHisto::kNormEvents);
62
63   fMassLambda = CreateHisto1("MassLambda", 
64                              "invariant mass of #Lambda candidates", 
65                              50, 1.0, 1.2, "m_{p#pi^{-}} [GeV/c^{2}]", 
66                              "#Delta N/N", AliMonitorHisto::kNormEvents);
67
68   fMassAntiLambda = CreateHisto1("MassAntiLambda", 
69                                  "invariant mass of #bar{#Lambda} candidates", 
70                                  50, 1.0, 1.2, 
71                                  "m_{#bar{p}#pi^{+}} [GeV/c^{2}]", 
72                                  "#Delta N/N", AliMonitorHisto::kNormEvents);
73 }
74
75
76 //_____________________________________________________________________________
77 void AliMonitorV0s::FillHistos(AliRunLoader* /*runLoader*/, 
78                                AliRawReader*, AliESD* esd)
79 {
80 // fill the V0s monitor histogrms
81
82   for (Int_t i = 0; i < esd->GetNumberOfV0s(); i++) {
83     AliESDv0* v0 = esd->GetV0(i);
84     if (!v0) continue;
85     Double_t x, y, z;
86     v0->GetXYZ(x, y, z);
87     fRadius->Fill(TMath::Sqrt(x*x + y*y));
88     v0->ChangeMassHypothesis(kK0Short); 
89     fMassK0->Fill(v0->GetEffMass());
90     v0->ChangeMassHypothesis(kLambda0); 
91     fMassLambda->Fill(v0->GetEffMass());
92     v0->ChangeMassHypothesis(kLambda0Bar); 
93     fMassAntiLambda->Fill(v0->GetEffMass());
94   }
95 }