--- /dev/null
+/**************************************************************************
+ * Copyright(c) 2007-2009, ALICE Experiment at CERN, All rights reserved. *
+ * *
+ * Author: The ALICE Off-line Project. *
+ * Contributors are mentioned in the code where appropriate. *
+ * *
+ * Permission to use, copy, modify and distribute this software and its *
+ * documentation strictly for non-commercial purposes is hereby granted *
+ * without fee, provided that the above copyright notice appears in all *
+ * copies and that both the copyright notice and this permission notice *
+ * appear in the supporting documentation. The authors make no claims *
+ * about the suitability of this software for any purpose. It is *
+ * provided "as is" without express or implied warranty. *
+ **************************************************************************/
+
+/* $Id: $ */
+
+///////////////////////////////////////////////////////////////////
+// //
+// Implementation of the base class for SDD map 2D corrections //
+// Origin: F.Prino, Torino, prino@to.infn.it //
+// //
+///////////////////////////////////////////////////////////////////
+
+#include "TH1F.h"
+#include "AliITSMapSDD.h"
+#include "AliITSMap1DSDD.h"
+
+ClassImp(AliITSMap1DSDD)
+//______________________________________________________________________
+AliITSMap1DSDD::AliITSMap1DSDD():
+AliITSMapSDD()
+{
+ // default constructor
+ ResetMap();
+ SetNBinsAnode(1);
+}
+//______________________________________________________________________
+AliITSMap1DSDD::AliITSMap1DSDD(Char_t *mapname):
+AliITSMapSDD(mapname)
+{
+ // standard constructor
+ ResetMap();
+ SetNBinsAnode(1);
+}
+//______________________________________________________________________
+AliITSMap1DSDD::AliITSMap1DSDD(Char_t *mapname, Int_t nbinsdr):
+AliITSMapSDD(mapname)
+{
+ ResetMap();
+ SetNBinsAnode(1);
+ SetNBinsDrift(nbinsdr);
+}
+//______________________________________________________________________
+void AliITSMap1DSDD::ResetMap(){
+ // Sets contents to zero
+ for(Int_t iDr=0;iDr<kMaxNDriftPts; iDr++){
+ fMap[iDr]=0;
+ }
+}
+//______________________________________________________________________
+void AliITSMap1DSDD::Set1DMap(TH1F* hmap){
+ // Fill map staring from 1D histo of rediduals vs. x
+ if(hmap->GetNbinsX()!=fNDriftPts){
+ AliError(Form("N. of histo bins (%d) not matching N. of map cells (%d)\n",hmap->GetNbinsX(),fNDriftPts));
+ return;
+ }
+ for(Int_t iDr=0;iDr<fNDriftPts; iDr++){
+ SetCellContent(0,iDr,hmap->GetBinContent(iDr+1));
+ }
+}
+
--- /dev/null
+#ifndef ALIITSMAP1DSDD_H
+#define ALIITSMAP1DSDD_H
+/* Copyright(c) 2007-2009, ALICE Experiment at CERN, All rights reserved. *
+ * See cxx source for full Copyright notice */
+
+/* $Id: $ */
+
+///////////////////////////////////////////////////////////////////
+// //
+// Class for SDD maps in 1D used to correct for //
+// voltage divider shape and doping fluctuations //
+// Origin: F.Prino, Torino, prino@to.infn.it //
+// //
+///////////////////////////////////////////////////////////////////
+
+#include "AliITSsegmentationSDD.h"
+#include<TNamed.h>
+#include "AliLog.h"
+class TH1F;
+
+class AliITSMap1DSDD : public AliITSMapSDD {
+
+ public:
+ AliITSMap1DSDD();
+ AliITSMap1DSDD(Char_t *mapname);
+ AliITSMap1DSDD(Char_t *mapname, Int_t nbinsdr);
+ virtual ~AliITSMap1DSDD(){};
+
+ virtual void ResetMap();
+ virtual void Set1DMap(TH1F* hmap);
+ virtual void SetCellContent(Int_t /*iAn*/, Int_t iTb, Float_t devMicron){
+ if(CheckDriftBounds(iTb)) fMap[iTb]=(Short_t)(devMicron*10.+0.5);
+ }
+
+ virtual Float_t GetCellContent(Int_t /*iAn*/, Int_t iTb) const {
+ if(CheckDriftBounds(iTb)) return (Float_t)fMap[iTb]/10.;
+ else return 0.;
+ }
+
+ protected:
+ Short_t fMap[kMaxNDriftPts]; // map of deviations
+ // stored as Short_t: integer
+ // values from -32000 to 32000
+ // in the range -3.2 - 3.2 mm
+
+ ClassDef(AliITSMap1DSDD,1);
+};
+#endif
--- /dev/null
+/**************************************************************************\r
+ * Copyright(c) 2007-2009, ALICE Experiment at CERN, All rights reserved. *\r
+ * *\r
+ * Author: The ALICE Off-line Project. *\r
+ * Contributors are mentioned in the code where appropriate. *\r
+ * *\r
+ * Permission to use, copy, modify and distribute this software and its *\r
+ * documentation strictly for non-commercial purposes is hereby granted *\r
+ * without fee, provided that the above copyright notice appears in all *\r
+ * copies and that both the copyright notice and this permission notice *\r
+ * appear in the supporting documentation. The authors make no claims *\r
+ * about the suitability of this software for any purpose. It is *\r
+ * provided "as is" without express or implied warranty. *\r
+ **************************************************************************/\r
+\r
+/* $Id: $ */\r
+\r
+///////////////////////////////////////////////////////////////////\r
+// //\r
+// Implementation of the base class for SDD map 2D corrections //\r
+// Origin: F.Prino, Torino, prino@to.infn.it //\r
+// //\r
+///////////////////////////////////////////////////////////////////\r
+\r
+#include "TH1F.h"\r
+#include "TH2F.h"\r
+#include "AliITSMapSDD.h"\r
+#include "AliITSMap2DSDD.h"\r
+\r
+ClassImp(AliITSMap2DSDD)\r
+//______________________________________________________________________\r
+AliITSMap2DSDD::AliITSMap2DSDD():\r
+AliITSMapSDD()\r
+{\r
+ // default constructor\r
+ ResetMap();\r
+}\r
+//______________________________________________________________________\r
+AliITSMap2DSDD::AliITSMap2DSDD(Char_t *mapname):\r
+AliITSMapSDD(mapname)\r
+{\r
+ // standard constructor\r
+ ResetMap();\r
+}\r
+//______________________________________________________________________\r
+AliITSMap2DSDD::AliITSMap2DSDD(Char_t *mapname, Int_t nbinsan, Int_t nbinsdr):\r
+AliITSMapSDD(mapname)\r
+{\r
+ // standard constructor\r
+ ResetMap();\r
+ SetNBinsAnode(nbinsan);\r
+ SetNBinsDrift(nbinsdr);\r
+}\r
+//______________________________________________________________________\r
+void AliITSMap2DSDD::ResetMap(){\r
+ // Sets contents to zero\r
+ for(Int_t iAn=0;iAn<kMaxNAnodePts; iAn++){\r
+ for(Int_t iDr=0;iDr<kMaxNDriftPts; iDr++){\r
+ fMap[iAn][iDr]=0;\r
+ }\r
+ }\r
+}\r
+\r
+//______________________________________________________________________\r
+void AliITSMap2DSDD::Set2DMap(TH2F* hmap){\r
+ // Fill map staring from 2D histo \r
+ // with anodes on x axis and drift dist. on y axis\r
+ if(hmap->GetNbinsX()!=fNAnodePts || hmap->GetNbinsY()!=fNDriftPts){ \r
+ AliError(Form("N. of histo bins (%dX%d) not matching N. of map cells (%dX%d)\n",hmap->GetNbinsX(),hmap->GetNbinsY(),fNAnodePts,fNDriftPts));\r
+ return;\r
+ }\r
+ for(Int_t iAn=0;iAn<fNAnodePts; iAn++){\r
+ for(Int_t iDr=0;iDr<fNDriftPts; iDr++){\r
+ SetCellContent(iAn,iDr,hmap->GetBinContent(iAn+1,iDr+1));\r
+ }\r
+ }\r
+}\r
--- /dev/null
+#ifndef ALIITSMAP2DSDD_H
+#define ALIITSMAP2DSDD_H
+/* Copyright(c) 2007-2009, ALICE Experiment at CERN, All rights reserved. *
+ * See cxx source for full Copyright notice */
+
+/* $Id: $ */
+
+///////////////////////////////////////////////////////////////////
+// //
+// Class for SDD maps in 2D used to correct for //
+// voltage divider shape and doping fluctuations //
+// Origin: F.Prino, Torino, prino@to.infn.it //
+// //
+///////////////////////////////////////////////////////////////////
+
+#include "AliITSsegmentationSDD.h"
+#include<TNamed.h>
+#include "AliLog.h"
+class TH1F;
+class TH2F;
+
+class AliITSMap2DSDD : public AliITSMapSDD {
+
+ public:
+ AliITSMap2DSDD();
+ AliITSMap2DSDD(Char_t *mapname);
+ AliITSMap2DSDD(Char_t *mapname, Int_t nbinsan, Int_t nbinsdr);
+ virtual ~AliITSMap2DSDD(){};
+
+ virtual void ResetMap();
+ virtual void Set2DMap(TH2F* hmap);
+ virtual void SetCellContent(Int_t iAn, Int_t iTb, Float_t devMicron){
+ if(CheckAnodeBounds(iAn) && CheckDriftBounds(iTb)) fMap[iAn][iTb]=(Short_t)(devMicron*10.+0.5);
+ }
+
+ virtual Float_t GetCellContent(Int_t iAn, Int_t iTb) const {
+ if(CheckAnodeBounds(iAn) && CheckDriftBounds(iTb)) return (Float_t)fMap[iAn][iTb]/10.;
+ else return 0.;
+ }
+
+ protected:
+ Short_t fMap[kMaxNAnodePts][kMaxNDriftPts]; // map of deviations
+ // stored as Short_t: integer
+ // values from -32000 to 32000
+ // in the range -3.2 - 3.2 mm
+
+ ClassDef(AliITSMap2DSDD,1);
+};
+#endif