LCOV - code coverage report
Current view: top level - EMCAL/EMCALraw - AliCaloRawAnalyzerFitter.cxx (source / functions) Hit Total Coverage
Test: coverage.info Lines: 13 22 59.1 %
Date: 2016-06-14 17:26:59 Functions: 2 5 40.0 %

          Line data    Source code
       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             :  **************************************************************************/
      20             : 
      21             : #include "AliCaloRawAnalyzerFitter.h"
      22             : #include "TF1.h"
      23             : #include <iostream>
      24             : 
      25             : using std::cout;
      26             : using std::endl;
      27             : 
      28             : 
      29          20 : AliCaloRawAnalyzerFitter::AliCaloRawAnalyzerFitter(const char *name, const char *nameshort ) :AliCaloRawAnalyzer( name, nameshort), 
      30          20 :                                                                                               fkEulerSquared(7.389056098930650227),
      31          20 :                                                                                               fTf1(0)
      32          60 : {
      33             :   // ctor
      34             :   
      35       40360 :   for(int i=0; i < ALTROMAXSAMPLES; i++)
      36             :     {
      37       20160 :       fXaxis[i] = i;
      38             :     }
      39             : 
      40          60 :   fTf1 = new TF1( "myformula", "[0]*((x - [1])/[2])^2*exp(-2*(x -[1])/[2])",  0, 30 ); 
      41             :  
      42          20 :   if (fFixTau)  // Declared in AliCaloRawAnalyzer
      43             :     {
      44          20 :       fTf1->FixParameter(2, fTau);
      45             :     }
      46             :   else 
      47             :     {
      48           0 :       fTf1->ReleaseParameter(2); // allow par. to vary
      49           0 :       fTf1->SetParameter(2, fTau);
      50             :     }
      51          20 : }
      52             : 
      53             : 
      54             : AliCaloRawAnalyzerFitter::~AliCaloRawAnalyzerFitter()
      55          20 : {
      56             :   // Dtor
      57             :   
      58          20 :   delete fTf1;
      59          10 : }
      60             : 
      61             : 
      62             : void 
      63             : AliCaloRawAnalyzerFitter::PrintFitResult(const TF1 *f) const
      64             : {
      65             :   // print fit results
      66             :   
      67           0 :   cout << endl;
      68           0 :   cout << __FILE__ << __LINE__ << "Using this samplerange we get" << endl;
      69           0 :   cout << __FILE__ << __LINE__ << "AMPLITUDE = " << f->GetParameter(0)/fkEulerSquared << ",.. !!!!" << endl;
      70           0 :   cout << __FILE__ << __LINE__ << "TOF = " << f->GetParameter(1) << ",.. !!!!" << endl;
      71           0 :   cout << __FILE__ << __LINE__ << "NDF = " << f->GetNDF() << ",.. !!!!" << endl;
      72           0 :   cout << endl << endl;
      73           0 : }
      74             : 
      75             : 

Generated by: LCOV version 1.11