New class to apply SDD correction maps after reconstruction (for alignment purposes...
authorprino <prino@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 17 Aug 2009 12:58:31 +0000 (12:58 +0000)
committerprino <prino@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 17 Aug 2009 12:58:31 +0000 (12:58 +0000)
ITS/AliITSCorrectSDDPoints.cxx [new file with mode: 0644]
ITS/AliITSCorrectSDDPoints.h [new file with mode: 0644]
ITS/CMake_libITSrec.txt
ITS/ITSrecLinkDef.h
ITS/libITSrec.pkg

diff --git a/ITS/AliITSCorrectSDDPoints.cxx b/ITS/AliITSCorrectSDDPoints.cxx
new file mode 100644 (file)
index 0000000..1a3ba6e
--- /dev/null
@@ -0,0 +1,79 @@
+/**************************************************************************
+ * 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 class to apply SDD map corrections      //
+// Origin: F.Prino, Torino, prino@to.infn.it                     //
+//                                                               //
+///////////////////////////////////////////////////////////////////
+
+#include "TString.h"
+#include "TFile.h"
+#include "AliLog.h"
+#include "AliCDBEntry.h"
+#include "AliITSCorrMapSDD.h"
+#include "AliITSCorrectSDDPoints.h"
+
+ClassImp(AliITSCorrectSDDPoints)
+//______________________________________________________________________
+AliITSCorrectSDDPoints::AliITSCorrectSDDPoints():
+  TObject(),
+  fArrayOfMaps(0),
+  fSegmentationSDD(0)
+{
+  // default constructor
+  TFile* fil=new TFile("$ALICE_ROOT/OCDB/ITS/Calib/MapsTimeSDD/Run0_9999999_v0_s0.root");
+  AliCDBEntry* e=(AliCDBEntry*)fil->Get("AliCDBEntry");
+  fArrayOfMaps=(TObjArray*)e->GetObject();
+  e->SetOwner(kTRUE);
+  fil->Close();
+  AliInfo(Form("%d AliITSCorrMapSDD objects in file %s",fArrayOfMaps->GetEntries(),fil->GetName()));
+  fSegmentationSDD=new AliITSsegmentationSDD();
+}
+//______________________________________________________________________
+AliITSCorrectSDDPoints::AliITSCorrectSDDPoints(TString filname):
+  TObject(),
+  fArrayOfMaps(0),
+  fSegmentationSDD(0)
+{
+  // standard constructor
+  TFile* fil=new TFile(filname.Data());
+  AliCDBEntry* e=(AliCDBEntry*)fil->Get("AliCDBEntry");
+  fArrayOfMaps=(TObjArray*)e->GetObject();
+  e->SetOwner(kTRUE);
+  fil->Close();
+  AliInfo(Form("%d AliITSCorrMapSDD objects in file %s",fArrayOfMaps->GetEntries(),fil->GetName()));
+  fSegmentationSDD=new AliITSsegmentationSDD();
+}
+//______________________________________________________________________
+AliITSCorrectSDDPoints::~AliITSCorrectSDDPoints(){
+  //
+  if(fArrayOfMaps) delete fArrayOfMaps;
+}
+//______________________________________________________________________
+Float_t AliITSCorrectSDDPoints::GetCorrection(Int_t modId, Float_t zloc, Float_t xloc) const{
+  // returns correction to SDD drift corrdinate in cm
+  Int_t nSide=fSegmentationSDD->GetSideFromLocalX(xloc);
+  Int_t iSide=2*(modId-240)+nSide;
+  if(iSide<0 || iSide >= 520){ 
+    AliError(Form("Side out of range %d",iSide));
+    return 0.;
+  }
+  AliITSCorrMapSDD* m=(AliITSCorrMapSDD*)fArrayOfMaps->At(iSide);
+  return m->GetCorrection(zloc,xloc,fSegmentationSDD);
+}
diff --git a/ITS/AliITSCorrectSDDPoints.h b/ITS/AliITSCorrectSDDPoints.h
new file mode 100644 (file)
index 0000000..04e5c09
--- /dev/null
@@ -0,0 +1,34 @@
+#ifndef ALIITSCORRECTSDDPOINTS_H
+#define ALIITSCORRECTSDDPOINTS_H
+/* Copyright(c) 2007-2009, ALICE Experiment at CERN, All rights reserved. *
+ * See cxx source for full Copyright notice                               */
+
+/* $Id$ */
+
+///////////////////////////////////////////////////////////////////
+//                                                               //
+// Class to apply SDD map corrections                            //
+// for voltage divider shape and doping fluctuations             //
+// Origin: F.Prino, Torino, prino@to.infn.it                     //
+//                                                               //
+///////////////////////////////////////////////////////////////////
+
+#include "AliITSsegmentationSDD.h"
+#include "TObjArray.h"
+
+class AliITSCorrectSDDPoints : public TObject {
+ public:
+  AliITSCorrectSDDPoints();
+  AliITSCorrectSDDPoints(TString filname);
+  ~AliITSCorrectSDDPoints();
+  Float_t GetCorrection(Int_t modId, Float_t zloc, Float_t xloc) const;
+  Float_t GetCorrectedXloc(Int_t modId, Float_t zloc, Float_t xloc) const{
+    Float_t dx=GetCorrection(modId,zloc,xloc);
+    return xloc-dx;
+  }
+ protected:
+  TObjArray* fArrayOfMaps;                 // 520 AliITSCorrMapSDD objects
+  AliITSsegmentationSDD* fSegmentationSDD; // SDD segmentation
+  ClassDef(AliITSCorrectSDDPoints,0);
+};
+#endif
index c38d460..056a5eb 100644 (file)
@@ -7,6 +7,7 @@ set(SRCS
                AliITSClusterFinderV2SPD.cxx 
                AliITSClusterFinderV2SSD.cxx 
                AliITSClusterParam.cxx 
+               AliITSCorrectSDDPoints.cxx
                AliITSclustererV2.cxx 
                AliITSclusterSSD.cxx 
                AliITSpackageSSD.cxx 
index 56cea4c..5cd860d 100644 (file)
@@ -58,6 +58,7 @@
 #pragma link C++ class AliITSClusterFinderV2SDD+;
 #pragma link C++ class AliITSClusterFinderV2SPD+;
 #pragma link C++ class AliITSClusterFinderV2SSD+;
+#pragma link C++ class AliITSCorrectSDDPoints+;
 
 // Classes for PID
 #pragma link C++ class  AliITSPid+;
index fd513ec..9b8ab5b 100644 (file)
@@ -6,6 +6,7 @@ SRCS =  AliITSDetTypeRec.cxx \
                AliITSClusterFinderV2SPD.cxx \
                AliITSClusterFinderV2SSD.cxx \
                AliITSClusterParam.cxx \
+               AliITSCorrectSDDPoints.cxx \
                AliITSclustererV2.cxx \
                AliITSclusterSSD.cxx \
                AliITSpackageSSD.cxx \