]>
Commit | Line | Data |
---|---|---|
0ec6d8a9 | 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 | ||
54af1add | 16 | /* $Id$ */ |
0ec6d8a9 | 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" | |
54af1add | 26 | #include "AliITSCorrMapSDD.h" |
27 | #include "AliITSCorrMap1DSDD.h" | |
0ec6d8a9 | 28 | |
54af1add | 29 | ClassImp(AliITSCorrMap1DSDD) |
0ec6d8a9 | 30 | //______________________________________________________________________ |
54af1add | 31 | AliITSCorrMap1DSDD::AliITSCorrMap1DSDD(): |
32 | AliITSCorrMapSDD() | |
0ec6d8a9 | 33 | { |
34 | // default constructor | |
35 | ResetMap(); | |
36 | SetNBinsAnode(1); | |
37 | } | |
38 | //______________________________________________________________________ | |
54af1add | 39 | AliITSCorrMap1DSDD::AliITSCorrMap1DSDD(Char_t *mapname): |
40 | AliITSCorrMapSDD(mapname) | |
0ec6d8a9 | 41 | { |
42 | // standard constructor | |
43 | ResetMap(); | |
44 | SetNBinsAnode(1); | |
45 | } | |
46 | //______________________________________________________________________ | |
54af1add | 47 | AliITSCorrMap1DSDD::AliITSCorrMap1DSDD(Char_t *mapname, Int_t nbinsdr): |
48 | AliITSCorrMapSDD(mapname) | |
0ec6d8a9 | 49 | { |
50 | ResetMap(); | |
51 | SetNBinsAnode(1); | |
52 | SetNBinsDrift(nbinsdr); | |
53 | } | |
54 | //______________________________________________________________________ | |
54af1add | 55 | void AliITSCorrMap1DSDD::ResetMap(){ |
0ec6d8a9 | 56 | // Sets contents to zero |
57 | for(Int_t iDr=0;iDr<kMaxNDriftPts; iDr++){ | |
54af1add | 58 | fCorrMap[iDr]=0; |
0ec6d8a9 | 59 | } |
60 | } | |
61 | //______________________________________________________________________ | |
54af1add | 62 | void AliITSCorrMap1DSDD::Set1DMap(TH1F* hmap){ |
0ec6d8a9 | 63 | // Fill map staring from 1D histo of rediduals vs. x |
64 | if(hmap->GetNbinsX()!=fNDriftPts){ | |
65 | AliError(Form("N. of histo bins (%d) not matching N. of map cells (%d)\n",hmap->GetNbinsX(),fNDriftPts)); | |
66 | return; | |
67 | } | |
68 | for(Int_t iDr=0;iDr<fNDriftPts; iDr++){ | |
69 | SetCellContent(0,iDr,hmap->GetBinContent(iDr+1)); | |
70 | } | |
71 | } | |
72 |