macro for testing geom matrices
authorloizides <loizides@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 12 Aug 2011 11:25:51 +0000 (11:25 +0000)
committerloizides <loizides@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 12 Aug 2011 11:25:51 +0000 (11:25 +0000)
EMCAL/macros/TestMatrices.C [new file with mode: 0644]

diff --git a/EMCAL/macros/TestMatrices.C b/EMCAL/macros/TestMatrices.C
new file mode 100644 (file)
index 0000000..a479620
--- /dev/null
@@ -0,0 +1,27 @@
+void TestMatrices(Bool_t test2011=1)
+{
+  AliLog::SetClassDebugLevel("AliCDBManager",1);
+
+  AliCDBManager* man = AliCDBManager::Instance();
+  man->SetDefaultStorage("alien://Folder=/alice/simulation/2008/v4-15-Release/Ideal/");
+  const char *geoname = "EMCAL_COMPLETEV1";
+  if (test2011) {
+    man->SetSpecificStorage("EMCAL/Align/Data",             "alien://folder=/alice/data/2011/OCDB");
+    man->SetRun(146805);
+  } else {
+    man->SetSpecificStorage("EMCAL/Align/Data",             "alien://folder=/alice/data/2010/OCDB");
+    man->SetRun(137366);
+    geoname = "EMCAL_FIRSTYEARV1";
+  }
+  AliGeomManager::LoadGeometry();
+  AliGeomManager::ApplyAlignObjsFromCDB("EMCAL");
+  AliEMCALGeometry *geo =  AliEMCALGeometry::GetInstance(geoname);
+  for (Int_t i=0;i<(geo->GetEMCGeometry())->GetNumberOfSuperModules();++i)
+    geo->GetMatrixForSuperModule(i)->Print();
+
+  AliEMCALEMCGeometry *emc = geo->GetEMCGeometry();
+  Double_t phimin = emc->GetArm1PhiMin();
+  Double_t phimax = emc->GetArm1PhiMax();
+  cout << phimin << " " << phimax << endl;
+  emc->PrintGeometry();
+}