/* $Id$ */
+//-----------------------------------------------------------------------------
/// \class AliMUONTriggerLut
-/// Local Trigger Look Up Table - reading interface
-/// LUT data is stored into TH3S histograms and readout
-/// from the Local Trigger algorithm.
+///
+/// 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"
//----------------------------------------------------------------------
AliMUONTriggerLut::AliMUONTriggerLut()
- : TNamed()
+ : TNamed(),
+ fLptPlus(0),
+ fLptMinu(0),
+ fLptUnde(0),
+ fHptPlus(0),
+ fHptMinu(0),
+ fHptUnde(0),
+ fAptPlus(0),
+ fAptMinu(0),
+ fAptUnde(0)
{
-/// Default constructor
-
- fLptPlus = fLptMinu = fLptUnde = 0;
- fHptPlus = fHptMinu = fHptUnde = 0;
- fAptPlus = fAptMinu = fAptUnde = 0;
+/// ctor
}
+
//----------------------------------------------------------------------
AliMUONTriggerLut::~AliMUONTriggerLut()
{
delete fAptUnde;
}
-void
-AliMUONTriggerLut::ReadFromFile(const char* filename)
+//----------------------------------------------------------------------
+void AliMUONTriggerLut::ReadFromFile(const char* filename)
{
/// Return output of LuT for corresponding TH3S
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);
//----------------------------------------------------------------------
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
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);
bin = fAptUnde->GetBin(circuit,xstrip,idev);
binc = (Short_t)fAptUnde->GetBinContent(bin);
if ((binc & mask)!=0) lutApt[0]=lutApt[1]=1;
-
+*/
}
//----------------------------------------------------------------------
{
/// 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);
}