Beam test analysis
authorschutz <schutz@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 21 Oct 2002 16:50:00 +0000 (16:50 +0000)
committerschutz <schutz@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 21 Oct 2002 16:50:00 +0000 (16:50 +0000)
PHOS/macros/BeamTest/makeCalDB.C [new file with mode: 0644]
PHOS/macros/BeamTest/makecontDB.C [new file with mode: 0644]
PHOS/macros/BeamTest/raw2digits.C [new file with mode: 0644]

diff --git a/PHOS/macros/BeamTest/makeCalDB.C b/PHOS/macros/BeamTest/makeCalDB.C
new file mode 100644 (file)
index 0000000..8b13265
--- /dev/null
@@ -0,0 +1,15 @@
+void makeCalDB(void){
+  //Read Connection Table DB
+  TFile f("ConTableDB.root") ;
+  AliPHOSConTableDB * ctdb = (AliPHOSConTableDB *)f.Get("AliPHOSConTableDB") ;
+  f.Close() ;
+
+  AliPHOSCalibrationDB * c = new AliPHOSCalibrationDB("beamtest.root") ;
+  c->SetConTableDB(ctdb) ;
+  c->ReadCalibrationParameters("gains.dat","gains") ;
+  c->ReadCalibrationParameters("pedestals.dat","pedestals") ;
+  TFile g("beamtest.root","recreate") ;
+  g.cd() ;
+  c->Write(0) ;
+  g.Close() ;
+}
diff --git a/PHOS/macros/BeamTest/makecontDB.C b/PHOS/macros/BeamTest/makecontDB.C
new file mode 100644 (file)
index 0000000..84c5bfb
--- /dev/null
@@ -0,0 +1,11 @@
+void makecontDB(void){
+  AliPHOSConTableDB * c = new AliPHOSConTableDB("Beamtest2002") ;
+  c->SetNRaws(8) ;
+  c->SetNCols(8) ;
+  c->BuildDB() ;
+  TFile f("ConTableDB.root","recreate") ;
+  f.cd() ;
+  c->Write(0) ;
+  f.Close() ;
+
+}
diff --git a/PHOS/macros/BeamTest/raw2digits.C b/PHOS/macros/BeamTest/raw2digits.C
new file mode 100644 (file)
index 0000000..06b32f5
--- /dev/null
@@ -0,0 +1,21 @@
+void raw2digits(const char * inputfile = "RUN_4400.fz"){
+  //Read Connection table DB
+  TFile f("ConTableDB.root") ;
+  AliPHOSConTableDB * cdb = f.Get("AliPHOSConTableDB") ;
+  f.Close() ;
+
+  AliPHOSRaw2Digits * r = new AliPHOSRaw2Digits(inputfile) ;
+  //Set position of the target in the given run.
+  //The reference system is following
+  //Z axis along beam direction, from target to prototype (0-surface of prototype)
+  //X axis along columns of prototype (0-center of prototype)
+  //Y axis along raws of prototype    (0-center of prototype)
+  Double_t pos[3]={0,0,-452.} ;
+  r->SetTargetPosition(pos) ;
+  r->SetConTableDB(cdb) ;
+//   r->SetDebugLevel(1) ;
+  r->ExecuteTask() ;
+  r->Print("deb") ;
+       
+
+}