Macro to calculate the needed HV values as a function of the required MIP signal.
authorcvetan <cvetan@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 3 Nov 2011 15:48:14 +0000 (15:48 +0000)
committercvetan <cvetan@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 3 Nov 2011 15:48:14 +0000 (15:48 +0000)
VZERO/CalculateHVs.C [new file with mode: 0644]

diff --git a/VZERO/CalculateHVs.C b/VZERO/CalculateHVs.C
new file mode 100644 (file)
index 0000000..5d30dd6
--- /dev/null
@@ -0,0 +1,19 @@
+void CalculateHVs(Float_t requiredADCperMIP = 2.6, Int_t run = 137366)
+{
+  AliCDBManager *man = AliCDBManager::Instance();
+  man->SetDefaultStorage("raw://");
+  man->SetSpecificStorage("VZERO/Calib/PMGains","local://$ALICE_ROOT/OCDB");
+  man->SetSpecificStorage("VZERO/Calib/LightYields","local://$ALICE_ROOT/OCDB");
+  man->SetRun(run);
+
+  AliCDBEntry *ent = man->Get("VZERO/Calib/Data");
+  AliVZEROCalibData *calData = (AliVZEROCalibData*)ent->GetObject();
+  for(Int_t i = 0; i < 64; ++i) {
+    printf("%d %.0f (%.0f) S%d R%d\n",
+          i,
+          calData->GetHV(i,requiredADCperMIP),
+          calData->GetMeanHV(i),
+          i%8,
+          (i<32) ? i/8 : (i-32)/8);
+  }
+}