]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - TRD/AliTRDtrigger.cxx
Add the number of local boards
[u/mrichter/AliRoot.git] / TRD / AliTRDtrigger.cxx
index fbe8befcdf867f17e8e72e209b170e91fa689e3f..5f5bbec4fd3422d6cd1e0007f938404271ff73db 100644 (file)
@@ -45,6 +45,7 @@
 #include "AliTRDtrigParam.h"
 #include "AliTRDmcm.h"
 #include "AliTRDzmaps.h"
+#include "AliTRDCalibraFillHisto.h"
 #include "Cal/AliTRDCalPIDLQ.h"
 
 ClassImp(AliTRDtrigger)
@@ -229,20 +230,6 @@ Bool_t AliTRDtrigger::Open(const Char_t *name, Int_t nEvent)
     return kFALSE;
   }
 
-  // Open input
-  if (fRunLoader->GetAliRun() == 0x0) {
-    fRunLoader->LoadgAlice();
-  }
-  gAlice = fRunLoader->GetAliRun();
-  if (!(gAlice)) {
-    fRunLoader->LoadgAlice();
-    gAlice = fRunLoader->GetAliRun();
-    if (!(gAlice)) {
-      AliError("Could not find AliRun object.");
-      return kFALSE;
-    }
-  }
-
   // Import the Trees for the event nEvent in the file
   fRunLoader->GetEvent(nEvent);
 
@@ -587,6 +574,12 @@ Bool_t AliTRDtrigger::TestTracklet(Int_t det, Int_t row, Int_t seed, Int_t n)
 
   Int_t nTimeTotal  = fCalib->GetNumberOfTimeBins();
 
+  // Calibration fill 2D
+  AliTRDCalibraFillHisto *calibra = AliTRDCalibraFillHisto::Instance();
+  if (!calibra) {
+    AliInfo("Could not get Calibra instance\n");
+  }
+
   fTrkTest->Reset();
 
   fTrkTest->SetDetector(det);
@@ -643,9 +636,15 @@ Bool_t AliTRDtrigger::TestTracklet(Int_t det, Int_t row, Int_t seed, Int_t n)
   }
   */
   // LTU Pt cut
-    
   fTrkTest->MakeTrackletGraph(fGeo,fField);
+
+  // TRD Online calibration
+  if (calibra->GetMcmTracking()) {
+    calibra->UpdateHistogramcm(fTrkTest);
+  }
+
   fTrkTest->MakeClusAmpGraph();
+
   if (TMath::Abs(fTrkTest->GetPt()) < fTrigParam->GetLtuPtCut()) {
     return kFALSE;
   }