]> git.uio.no Git - u/mrichter/AliRoot.git/blame - ITS/AliITSCorrMap2DSDD.cxx
Another histos for lumi
[u/mrichter/AliRoot.git] / ITS / AliITSCorrMap2DSDD.cxx
CommitLineData
0ec6d8a9 1/**************************************************************************\r
2 * Copyright(c) 2007-2009, ALICE Experiment at CERN, All rights reserved. *\r
3 * *\r
4 * Author: The ALICE Off-line Project. *\r
5 * Contributors are mentioned in the code where appropriate. *\r
6 * *\r
7 * Permission to use, copy, modify and distribute this software and its *\r
8 * documentation strictly for non-commercial purposes is hereby granted *\r
9 * without fee, provided that the above copyright notice appears in all *\r
10 * copies and that both the copyright notice and this permission notice *\r
11 * appear in the supporting documentation. The authors make no claims *\r
12 * about the suitability of this software for any purpose. It is *\r
13 * provided "as is" without express or implied warranty. *\r
14 **************************************************************************/\r
15\r
54af1add 16/* $Id$ */\r
0ec6d8a9 17\r
18///////////////////////////////////////////////////////////////////\r
19// //\r
20// Implementation of the base class for SDD map 2D corrections //\r
21// Origin: F.Prino, Torino, prino@to.infn.it //\r
22// //\r
23///////////////////////////////////////////////////////////////////\r
24\r
25#include "TH1F.h"\r
26#include "TH2F.h"\r
54af1add 27#include "AliITSCorrMapSDD.h"\r
28#include "AliITSCorrMap2DSDD.h"\r
f1b15b8d 29#include "AliLog.h"\r
cfe39822 30#include "AliITSsegmentationSDD.h"\r
0ec6d8a9 31\r
54af1add 32ClassImp(AliITSCorrMap2DSDD)\r
0ec6d8a9 33//______________________________________________________________________\r
54af1add 34AliITSCorrMap2DSDD::AliITSCorrMap2DSDD():\r
35AliITSCorrMapSDD()\r
0ec6d8a9 36{\r
37 // default constructor\r
38 ResetMap();\r
39}\r
40//______________________________________________________________________\r
54af1add 41AliITSCorrMap2DSDD::AliITSCorrMap2DSDD(Char_t *mapname):\r
42AliITSCorrMapSDD(mapname)\r
0ec6d8a9 43{\r
44 // standard constructor\r
45 ResetMap();\r
46}\r
47//______________________________________________________________________\r
54af1add 48AliITSCorrMap2DSDD::AliITSCorrMap2DSDD(Char_t *mapname, Int_t nbinsan, Int_t nbinsdr):\r
49AliITSCorrMapSDD(mapname)\r
0ec6d8a9 50{\r
51 // standard constructor\r
52 ResetMap();\r
53 SetNBinsAnode(nbinsan);\r
54 SetNBinsDrift(nbinsdr);\r
55}\r
56//______________________________________________________________________\r
54af1add 57void AliITSCorrMap2DSDD::ResetMap(){\r
0ec6d8a9 58 // Sets contents to zero\r
59 for(Int_t iAn=0;iAn<kMaxNAnodePts; iAn++){\r
60 for(Int_t iDr=0;iDr<kMaxNDriftPts; iDr++){\r
54af1add 61 fCorrMap[iAn][iDr]=0;\r
0ec6d8a9 62 }\r
63 }\r
64}\r
65\r
66//______________________________________________________________________\r
54af1add 67void AliITSCorrMap2DSDD::Set2DMap(TH2F* hmap){\r
0ec6d8a9 68 // Fill map staring from 2D histo \r
69 // with anodes on x axis and drift dist. on y axis\r
70 if(hmap->GetNbinsX()!=fNAnodePts || hmap->GetNbinsY()!=fNDriftPts){ \r
71 AliError(Form("N. of histo bins (%dX%d) not matching N. of map cells (%dX%d)\n",hmap->GetNbinsX(),hmap->GetNbinsY(),fNAnodePts,fNDriftPts));\r
72 return;\r
73 }\r
74 for(Int_t iAn=0;iAn<fNAnodePts; iAn++){\r
75 for(Int_t iDr=0;iDr<fNDriftPts; iDr++){\r
76 SetCellContent(iAn,iDr,hmap->GetBinContent(iAn+1,iDr+1));\r
77 }\r
78 }\r
79}\r