LCOV - code coverage report
Current view: top level - ITS/ITSbase - AliITSCorrMap2DSDD.cxx (source / functions) Hit Total Coverage
Test: coverage.info Lines: 9 26 34.6 %
Date: 2016-06-14 17:26:59 Functions: 4 9 44.4 %

          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 base class for SDD map 2D corrections   //
      21             : // Origin: F.Prino, Torino, prino@to.infn.it                     //
      22             : //                                                               //
      23             : ///////////////////////////////////////////////////////////////////
      24             : 
      25             : #include "TH1F.h"
      26             : #include "TH2F.h"
      27             : #include "AliITSCorrMapSDD.h"
      28             : #include "AliITSCorrMap2DSDD.h"
      29             : #include "AliLog.h"
      30             : #include "AliITSsegmentationSDD.h"
      31             : 
      32         118 : ClassImp(AliITSCorrMap2DSDD)
      33             : //______________________________________________________________________
      34             : AliITSCorrMap2DSDD::AliITSCorrMap2DSDD():
      35          12 : AliITSCorrMapSDD()
      36          60 : {
      37             :   // default constructor
      38          12 :   ResetMap();
      39          24 : }
      40             : //______________________________________________________________________
      41             : AliITSCorrMap2DSDD::AliITSCorrMap2DSDD(Char_t *mapname):
      42           0 : AliITSCorrMapSDD(mapname)
      43           0 : {
      44             :   // standard constructor
      45           0 :   ResetMap();
      46           0 : }
      47             : //______________________________________________________________________
      48             : AliITSCorrMap2DSDD::AliITSCorrMap2DSDD(Char_t *mapname, Int_t nbinsan, Int_t nbinsdr):
      49           0 : AliITSCorrMapSDD(mapname)
      50           0 : {
      51             :   // standard constructor
      52           0 :   ResetMap();
      53           0 :   SetNBinsAnode(nbinsan);
      54           0 :   SetNBinsDrift(nbinsdr);
      55           0 : }
      56             : //______________________________________________________________________
      57             : void AliITSCorrMap2DSDD::ResetMap(){
      58             :   // Sets contents to zero
      59        6180 :   for(Int_t iAn=0;iAn<kMaxNAnodePts; iAn++){
      60     1794048 :     for(Int_t iDr=0;iDr<kMaxNDriftPts; iDr++){
      61      893952 :       fCorrMap[iAn][iDr]=0;
      62             :     }
      63             :   }
      64          12 : }
      65             : 
      66             : //______________________________________________________________________
      67             : void AliITSCorrMap2DSDD::Set2DMap(TH2F* hmap){
      68             :   // Fill map staring from 2D histo 
      69             :   // with anodes on x axis and drift dist. on y axis
      70           0 :   if(hmap->GetNbinsX()!=fNAnodePts || hmap->GetNbinsY()!=fNDriftPts){ 
      71           0 :     AliError(Form("N. of histo bins (%dX%d) not matching N. of map cells (%dX%d)\n",hmap->GetNbinsX(),hmap->GetNbinsY(),fNAnodePts,fNDriftPts));
      72           0 :     return;
      73             :   }
      74           0 :   for(Int_t iAn=0;iAn<fNAnodePts; iAn++){
      75           0 :     for(Int_t iDr=0;iDr<fNDriftPts; iDr++){
      76           0 :       SetCellContent(iAn,iDr,hmap->GetBinContent(iAn+1,iDr+1));
      77             :     }
      78             :   }
      79           0 : }

Generated by: LCOV version 1.11