1 /**************************************************************************
2 * Copyright(c) 2007-2009, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
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 **************************************************************************/
18 ///////////////////////////////////////////////////////////////////
20 // Implementation of the base class for SDD map corrections //
21 // Origin: F.Prino, Torino, prino@to.infn.it //
23 ///////////////////////////////////////////////////////////////////
27 #include "AliITSMapSDD.h"
29 ClassImp(AliITSMapSDD)
30 //______________________________________________________________________
31 AliITSMapSDD::AliITSMapSDD():TNamed("defaultmap","")
33 // default constructor
34 for(Int_t iAn=0;iAn<fgkNAnodPts; iAn++){
35 for(Int_t iDr=0;iDr<fgkNDrifPts; iDr++){
40 //______________________________________________________________________
41 AliITSMapSDD::AliITSMapSDD(Char_t *mapname):TNamed(mapname,"")
43 // standard constructor
44 for(Int_t iAn=0;iAn<fgkNAnodPts; iAn++){
45 for(Int_t iDr=0;iDr<fgkNDrifPts; iDr++){
51 //______________________________________________________________________
52 void AliITSMapSDD::SetMap(TH2F* hmap){
53 // Fill map staring from 2D histo
54 // with anodes on x axis and drift dist. on y axis
55 for(Int_t iAn=0;iAn<fgkNAnodPts; iAn++){
56 for(Int_t iDr=0;iDr<fgkNDrifPts; iDr++){
57 fMap[iAn][iDr]=hmap->GetBinContent(iAn+1,iDr+1);
61 //______________________________________________________________________
62 TH2F* AliITSMapSDD::GetMapHisto() const{
63 // Returns a TH2F histogram with map of residuals
65 sprintf(hname,"h%s",GetName());
66 TH2F* hmap=new TH2F(hname,"",fgkNAnodPts,-0.5,255.5,fgkNDrifPts,0.,35.);
67 for(Int_t iAn=0;iAn<fgkNAnodPts; iAn++){
68 for(Int_t iDr=0;iDr<fgkNDrifPts; iDr++){
69 hmap->SetBinContent(iAn+1,iDr+1,fMap[iAn][iDr]);
74 //______________________________________________________________________
75 TH1F* AliITSMapSDD::GetResidualDistr(Float_t dmin, Float_t dmax) const{
76 // Returns a TH1F histogram with distribution of residual
78 sprintf(hname,"hd%s",GetName());
79 TH1F* hd=new TH1F(hname,"",100,dmin,dmax);
80 for(Int_t iAn=0;iAn<fgkNAnodPts; iAn++){
81 for(Int_t iDr=0;iDr<fgkNDrifPts; iDr++){
82 hd->Fill(fMap[iAn][iDr]);