]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - ITS/ITSSPDVertexDiamondda.cxx
New AliPoissonCalculator class
[u/mrichter/AliRoot.git] / ITS / ITSSPDVertexDiamondda.cxx
index a2ff1b1d0ec5f28b05f0eeaebfb33f275c4b0bec..c8dadd2c4b5704b90a3354edfb0a4a01b76a4328 100644 (file)
@@ -30,8 +30,10 @@ extern "C" {
 #include <TH1.h>
 #include <TH2.h>
 #include <TSystem.h>
+#include <TGeoGlobalMagField.h>
 
 #include "AliLog.h"
+#include "AliMagF.h"
 #include "AliRawReaderDate.h"
 #include "AliCDBManager.h"
 #include "AliITSMeanVertexer.h"
@@ -146,8 +148,18 @@ int main(int argc, char **argv) {
     printf("Failed to get spd trigger file (TRIGGER/SPD/PITConditions) from DAQdetDB, status=%d\n", status);
     return -1;
   }
+ status = daqDA_DB_getFile("mfchebKGI_sym.root","localOCDB/mfchebKGI_sym.root");
+  if (status) {
+    printf("Failed to get spd file (mfchebKGI_sym.root) from DAQdetDB, status=%d\n", status);
+    return -1;
+  }
 
   // Global initializations
+
+  // The B filed is required in AliITSClusterFinderV2SPD
+  // for the Lorentz angle correction. B set to 0.      
+  TGeoGlobalMagField::Instance()->SetField(new AliMagF("Maps","Maps", 0., 0., AliMagF::k5kGUniform,AliMagF::kBeamTypeAA,-1,2,15,"localOCDB/mfchebKGI_sym.root"));  
   AliLog::SetGlobalLogLevel(AliLog::kError);
   AliCDBManager *man = AliCDBManager::Instance();
   man->SetDefaultStorage("local://localOCDB");
@@ -209,6 +221,9 @@ int main(int argc, char **argv) {
 
       // Auto save
       if ((nevents_physics%N_EVENTS_AUTOSAVE) == 0) {
+
+       ((TH2F*)mv->GetVertexXY())->SetTitle(Form("%f events with vertex (%i out of %i processed events)",((Double_t)nevents_with_vertex)/((Double_t)nevents_physics),nevents_with_vertex,nevents_physics));
+
        mv->WriteVertices(OUTPUT_FILE);
 
 #ifdef ALI_AMORE
@@ -230,6 +245,7 @@ int main(int argc, char **argv) {
       break;
     }
   }
+  ((TH2F*)mv->GetVertexXY())->SetTitle(Form("%f events with vertex (%i out of %i processed events)",((Double_t)nevents_with_vertex)/((Double_t)nevents_physics),nevents_with_vertex,nevents_physics));
 
   mv->WriteVertices(OUTPUT_FILE);