LCOV - code coverage report
Current view: top level - ITS/ITSbase - AliITSDriftSpeedSDD.cxx (source / functions) Hit Total Coverage
Test: coverage.info Lines: 8 37 21.6 %
Date: 2016-06-14 17:26:59 Functions: 3 9 33.3 %

          Line data    Source code
       1             : /**************************************************************************
       2             :  * Copyright(c) 2007-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             : /* $Id$ */
      17             : 
      18             : ///////////////////////////////////////////////////////////////////
      19             : //                                                               //
      20             : // Implementation of the class for SDD drift speed               //
      21             : // Origin: F.Prino, Torino, prino@to.infn.it                     //
      22             : //                                                               //
      23             : ///////////////////////////////////////////////////////////////////
      24             : 
      25             : #include "AliITSDriftSpeedSDD.h"
      26             : #include "AliLog.h"
      27             : 
      28             : const Float_t AliITSDriftSpeedSDD::fgkDriftSpeedDefault = 7.3;
      29             : 
      30         118 : ClassImp(AliITSDriftSpeedSDD)
      31             : //______________________________________________________________________
      32             : AliITSDriftSpeedSDD::AliITSDriftSpeedSDD():
      33        7800 : TObject(),
      34        7800 : fEvNum(0),
      35        7800 : fTimestamp(0),
      36       46800 : fPolDeg(0){
      37             :   // default constructor
      38        7800 :   fDriftSpeedParam[0]=fgkDriftSpeedDefault;
      39       93600 :   for(Int_t i=1; i<fgkMaxPolDeg+1; i++) fDriftSpeedParam[i]=0;
      40       15600 : }
      41             : //______________________________________________________________________
      42             : AliITSDriftSpeedSDD::AliITSDriftSpeedSDD(Int_t ev, UInt_t timest, Int_t deg, Double_t *coeff):
      43           0 : TObject(),
      44           0 : fEvNum(ev),
      45           0 : fTimestamp(timest),
      46           0 : fPolDeg(deg){
      47             :   // standard constructor
      48           0 :   if(deg>fgkMaxPolDeg){
      49           0 :     fPolDeg=fgkMaxPolDeg;
      50           0 :     AliWarning(Form("Polynomial degree must be <%d. Drift speed parametrization limited to %dth degree poly.\n",fgkMaxPolDeg,fgkMaxPolDeg));
      51             :   }
      52           0 :   for(Int_t i=0; i<fPolDeg+1; i++) fDriftSpeedParam[i]=coeff[i];
      53           0 :   for(Int_t i=fPolDeg+1; i<fgkMaxPolDeg+1; i++) fDriftSpeedParam[i]=0;
      54           0 : }
      55             : //______________________________________________________________________
      56             : AliITSDriftSpeedSDD::AliITSDriftSpeedSDD(const AliITSDriftSpeedSDD& drSpeed):
      57           0 : TObject(),
      58           0 : fEvNum(drSpeed.fEvNum),
      59           0 : fTimestamp(drSpeed.fTimestamp),
      60           0 : fPolDeg(drSpeed.fPolDeg)
      61           0 : {
      62             :   // copy constructor
      63           0 :   for(Int_t i=0; i<fgkMaxPolDeg+1; i++) fDriftSpeedParam[i]=drSpeed.GetDriftSpeedParameter(i);
      64             :   
      65           0 : }
      66             : //_____________________________________________________________________________
      67             : AliITSDriftSpeedSDD& AliITSDriftSpeedSDD::operator=(const AliITSDriftSpeedSDD &drSpeed){
      68             :   // Assignment operator
      69           0 :  if(this==&drSpeed) return *this;
      70           0 :   ((TObject *)this)->operator=(drSpeed);
      71           0 :   fEvNum = drSpeed.fEvNum;
      72           0 :   fTimestamp = drSpeed.fTimestamp;
      73           0 :   fPolDeg = drSpeed.fPolDeg;
      74           0 :   for(Int_t i=0; i<fgkMaxPolDeg+1; i++) fDriftSpeedParam[i]=drSpeed.GetDriftSpeedParameter(i);
      75           0 :   return *this;
      76           0 : }
      77             : 
      78             : //______________________________________________________________________
      79             : void AliITSDriftSpeedSDD::PrintDriftSpeedParameters() const {
      80             :   // printout drift speed parametrization
      81           0 :   printf("Injector event #%d at time %d\n",fEvNum,fTimestamp);
      82           0 :   printf("Coefficients of %d degree poly fit:\n",fPolDeg);
      83           0 :   for(Int_t i=0; i<fgkMaxPolDeg+1; i++) printf("par[%d]=%G\n",i,fDriftSpeedParam[i]);
      84           0 : }

Generated by: LCOV version 1.11