]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - MUON/AliMUONTriggerLut.cxx
Updated list of MUON libraries
[u/mrichter/AliRoot.git] / MUON / AliMUONTriggerLut.cxx
index 5be553b7f6314d6b14d9a90e695c11b79c5789b6..2c6cee04b1719a09bd72000e668b3af761edaac7 100644 (file)
 
 /* $Id$ */
 
-/// \class AliMUONTriggerLut
-/// Local Trigger Look Up Table - reading interface
-/// LUT data is stored into TH3S histograms and readout 
-/// from the Local Trigger algorithm.
+/// -----------------------
+/// Class AliMUONTriggerLut
+/// -----------------------
+/// Local Trigger Look Up Table
+/// reading interface LUT data is stored into TH3S histograms and readout 
+/// from the Local Trigger algorithm
+/// Author: Philippe Crochet
 
 #include "AliMUONTriggerLut.h"
 
@@ -63,8 +66,8 @@ AliMUONTriggerLut::~AliMUONTriggerLut()
   delete fAptUnde;
 }
 
-void
-AliMUONTriggerLut::ReadFromFile(const char* filename)
+//----------------------------------------------------------------------
+void AliMUONTriggerLut::ReadFromFile(const char* filename)
 {
 /// Return output of LuT for corresponding TH3S  
 
@@ -75,16 +78,28 @@ AliMUONTriggerLut::ReadFromFile(const char* filename)
     AliFatal(Form("Could not open file %s",filename));
   }
   
-  fLptPlus = (TH3*)(f.Get("LptPlus")->Clone());  
-  fLptMinu = (TH3*)(f.Get("LptMinu")->Clone());
-  fLptUnde = (TH3*)(f.Get("LptUnde")->Clone());
-  fHptPlus = (TH3*)(f.Get("HptPlus")->Clone());  
-  fHptMinu = (TH3*)(f.Get("HptMinu")->Clone());
-  fHptUnde = (TH3*)(f.Get("HptUnde")->Clone());
-  fAptPlus = (TH3*)(f.Get("AptPlus")->Clone());  
-  fAptMinu = (TH3*)(f.Get("AptMinu")->Clone());
-  fAptUnde = (TH3*)(f.Get("AptUnde")->Clone());
-
+  AliDebug(1,Form("filename=%s",filename));
+  
+//  fLptPlus = (TH3*)(f.Get("LptPlus")->Clone());  
+//  fLptMinu = (TH3*)(f.Get("LptMinu")->Clone());
+//  fLptUnde = (TH3*)(f.Get("LptUnde")->Clone());
+//  fHptPlus = (TH3*)(f.Get("HptPlus")->Clone());  
+//  fHptMinu = (TH3*)(f.Get("HptMinu")->Clone());
+//  fHptUnde = (TH3*)(f.Get("HptUnde")->Clone());
+//  fAptPlus = (TH3*)(f.Get("AptPlus")->Clone());  
+//  fAptMinu = (TH3*)(f.Get("AptMinu")->Clone());
+//  fAptUnde = (TH3*)(f.Get("AptUnde")->Clone());
+
+  fLptPlus = (TH3*)(f.Get("LptPlus"));  
+  fLptMinu = (TH3*)(f.Get("LptMinu"));
+  fLptUnde = (TH3*)(f.Get("LptUnde"));
+  fHptPlus = (TH3*)(f.Get("HptPlus"));  
+  fHptMinu = (TH3*)(f.Get("HptMinu"));
+  fHptUnde = (TH3*)(f.Get("HptUnde"));
+  fAptPlus = (TH3*)(f.Get("AptPlus"));  
+  fAptMinu = (TH3*)(f.Get("AptMinu"));
+  fAptUnde = (TH3*)(f.Get("AptUnde"));
+  
   // insure we "detach" those histograms from file f
   fLptPlus->SetDirectory(0);
   fLptMinu->SetDirectory(0);
@@ -100,7 +115,7 @@ AliMUONTriggerLut::ReadFromFile(const char* filename)
 //----------------------------------------------------------------------
 void AliMUONTriggerLut::GetLutOutput(Int_t circuit, Int_t xstrip, Int_t idev,
                                     Int_t ystrip, Int_t lutLpt[2], 
-                                    Int_t lutHpt[2], Int_t lutApt[2])
+                                    Int_t lutHpt[2])
 {
 /// Return output of LuT for corresponding TH3S  
 
@@ -138,7 +153,7 @@ void AliMUONTriggerLut::GetLutOutput(Int_t circuit, Int_t xstrip, Int_t idev,
   bin    =          fHptUnde->GetBin(circuit,xstrip,idev);
   binc   = (Short_t)fHptUnde->GetBinContent(bin);
   if ((binc & mask)!=0) lutHpt[0]=lutHpt[1]=1;
-
+/*
   // All pts.............................................
   bin    =          fAptPlus->GetBin(circuit,xstrip,idev);
   binc   = (Short_t)fAptPlus->GetBinContent(bin);
@@ -151,7 +166,7 @@ void AliMUONTriggerLut::GetLutOutput(Int_t circuit, Int_t xstrip, Int_t idev,
   bin    =          fAptUnde->GetBin(circuit,xstrip,idev);
   binc   = (Short_t)fAptUnde->GetBinContent(bin);
   if ((binc & mask)!=0) lutApt[0]=lutApt[1]=1;
-
+*/
 }
 
 //----------------------------------------------------------------------
@@ -159,14 +174,7 @@ Int_t AliMUONTriggerLut::GetMask(Int_t ystrip)
 {
 /// Return the mask corresponding to ystrip
 
-  Int_t tabMask[16]={0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
-  Int_t mask=0;
-  tabMask[ystrip]=1;
-  for (Int_t i=0; i<16; i++) 
-  {          
-    mask += tabMask[i]<<i; 
-  }
-  return mask;
+    return (Int_t)(1<<ystrip);
 }