]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWG3/dielectron/AliDielectronSignalBase.cxx
new SPD geometry - sector profile closer to reality (M. Lunardon, R. Grosso)
[u/mrichter/AliRoot.git] / PWG3 / dielectron / AliDielectronSignalBase.cxx
CommitLineData
572b0139 1/*************************************************************************
2* Copyright(c) 1998-2009, 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///////////////////////////////////////////////////////////////////////////
17// Dielectron SignalBase //
18// //
19// //
20/*
21Base class for signal extraction from a histogram or an array of histograms
22The histogram is assumed to be an inv. mass spectrum,
23the array of histograms is assumed to be an array with inv. mass histograms
24resulting from single and mixed events, as defined in AliDielectron.cxx
25
26*/
27// //
28///////////////////////////////////////////////////////////////////////////
29
30
31#include "TPaveText.h"
32#include "AliDielectronSignalBase.h"
33
34ClassImp(AliDielectronSignalBase)
35
36AliDielectronSignalBase::AliDielectronSignalBase() :
37 TNamed(),
8df8e382 38 fValues(6),
39 fErrors(6),
40 fIntMin(3.01),
572b0139 41 fIntMax(3.19)
42{
43 //
44 // Default Constructor
45 //
46
47}
48
49//______________________________________________
50AliDielectronSignalBase::AliDielectronSignalBase(const char* name, const char* title) :
51 TNamed(name, title),
8df8e382 52 fValues(6),
53 fErrors(6),
54 fIntMin(3.01),
572b0139 55 fIntMax(3.19)
56{
57 //
58 // Named Constructor
59 //
60}
61
62//______________________________________________
63AliDielectronSignalBase::~AliDielectronSignalBase()
64{
65 //
66 // Default Destructor
67 //
68
69}
70
71//______________________________________________
72TPaveText* AliDielectronSignalBase::DrawStats(Double_t x1/*=0.*/, Double_t y1/*=0.*/, Double_t x2/*=0.*/, Double_t y2/*=0.*/)
73{
74 //
75 // Draw extracted values in a TPaveText
76 // with the corners x1,y2,x2,y2
77 //
78 if (TMath::Abs(x1)<1e-20&&TMath::Abs(x2)<1e-20){
79 x1=.6;
80 x2=.9;
81 y1=.7;
82 y2=.9;
83 }
84 TPaveText *t=new TPaveText(x1,y1,x2,y2,"brNDC");
85 t->SetFillColor(kWhite);
86 t->SetBorderSize(1);
87 t->SetTextAlign(12);
8df8e382 88 t->AddText(Form("Signal : %.5g #pm %.5g",GetSignal(),GetSignalError()));
89 t->AddText(Form("Backgnd: %.5g #pm %.5g",GetBackground(),GetBackgroundError()));
90 t->AddText(Form("Signif.: %.5g #pm %.5g",GetSignificance(),GetSignificanceError()));
91 t->AddText(Form("SoB : %.5g #pm %.5g",GetSignalOverBackground(),GetSignalOverBackgroundError()));
92 if (GetMass()>0){
93 t->AddText(Form("Mass: %.5g #pm %.5g", GetMass(), GetMassError()));
94 t->AddText(Form("Mass res.: %.5g #pm %.5g", GetMassWidth(), GetMassWidthError()));
95 }
572b0139 96 t->Draw();
97
98 return t;
99}
100
9143d69f 101//______________________________________________
102void AliDielectronSignalBase::Print(Option_t */*option*/) const
103{
104 //
105 // Print the statistics
106 //
107 printf("Signal : %.5g #pm %.5g\n",GetSignal(),GetSignalError());
108 printf("Backgnd: %.5g #pm %.5g\n",GetBackground(),GetBackgroundError());
109 printf("Signif.: %.5g #pm %.5g\n",GetSignificance(),GetSignificanceError());
110 printf("SoB : %.5g #pm %.5g\n",GetSignalOverBackground(),GetSignalOverBackgroundError());
111 if (GetMass()>0){
112 printf("Mass: %.5g #pm %.5g\n", GetMass(), GetMassError());
113 printf("Mass res.: %.5g #pm %.5g\n", GetMassWidth(), GetMassWidthError());
114 }
115}
116
117
118
119