]> git.uio.no Git - u/mrichter/AliRoot.git/blame - EMCAL/AliCaloRawAnalyzerFitter.cxx
fix compilation warning
[u/mrichter/AliRoot.git] / EMCAL / AliCaloRawAnalyzerFitter.cxx
CommitLineData
9e9f5ff6 1// -*- mode: c++ -*-
2
3/**************************************************************************
4 * This file is property of and copyright by the Experimental Nuclear *
5 * Physics Group, Dep. of Physics *
6 * University of Oslo, Norway, 2007 *
7 * *
8 * Author: Per Thomas Hille <perthi@fys.uio.no> for the ALICE HLT Project.*
9 * Contributors are mentioned in the code where appropriate. *
10 * Please report bugs to perthi@fys.uio.no *
11 * *
12 * Permission to use, copy, modify and distribute this software and its *
13 * documentation strictly for non-commercial purposes is hereby granted *
14 * without fee, provided that the above copyright notice appears in all *
15 * copies and that both the copyright notice and this permission notice *
16 * appear in the supporting documentation. The authors make no claims *
17 * about the suitability of this software for any purpose. It is *
18 * provided "as is" without express or implied warranty. *
19 **************************************************************************/
7afee7f0 20
9e9f5ff6 21#include "AliCaloRawAnalyzerFitter.h"
22#include "TF1.h"
9e9f5ff6 23#include <iostream>
7afee7f0 24
9e9f5ff6 25using std::cout;
26using std::endl;
27
9e9f5ff6 28
29AliCaloRawAnalyzerFitter::AliCaloRawAnalyzerFitter(const char *name, const char *nameshort ) :AliCaloRawAnalyzer( name, nameshort),
30 fkEulerSquared(7.389056098930650227),
31 fTf1(0),
32 fFixTau(true)
33{
34 for(int i=0; i < ALTROMAXSAMPLES; i++)
35 {
36 fXaxis[i] = i;
37 }
38
9e9f5ff6 39 fTf1 = new TF1( "myformula", "[0]*((x - [1])/[2])^2*exp(-2*(x -[1])/[2])", 0, 30 );
40
41 if (fFixTau)
42 {
43 fTf1->FixParameter(2, fTau);
44 }
45 else
46 {
47 fTf1->ReleaseParameter(2); // allow par. to vary
48 fTf1->SetParameter(2, fTau);
49 }
50}
51
52
53AliCaloRawAnalyzerFitter::~AliCaloRawAnalyzerFitter()
54{
48b634ff 55 delete fTf1;
9e9f5ff6 56}
57
58
59void
60AliCaloRawAnalyzerFitter::PrintFitResult(const TF1 *f) const
61{
4074cc41 62 //shutting up the rule checker
9e9f5ff6 63 cout << endl;
64 cout << __FILE__ << __LINE__ << "Using this samplerange we get" << endl;
65 cout << __FILE__ << __LINE__ << "AMPLITUDE = " << f->GetParameter(0)/fkEulerSquared << ",.. !!!!" << endl;
66 cout << __FILE__ << __LINE__ << "TOF = " << f->GetParameter(1) << ",.. !!!!" << endl;
67 cout << __FILE__ << __LINE__ << "NDF = " << f->GetNDF() << ",.. !!!!" << endl;
9e9f5ff6 68 cout << endl << endl;
69}
70
4074cc41 71
72// Bool_t
73// AliCaloRawAnalyzerFitter::GetFixTau() const
74// {
75// return fFixTau;
76// };