,fJetTh(0)
,fDCSConfig(0x0)
{
- //
+ // Ctor
}
//_______________
,fJetTh(0)
,fDCSConfig(dcsConf)
{
- //
+ // Ctor
}
//_______________
AliEMCALTriggerSTU::~AliEMCALTriggerSTU()
{
- //
-}
-
-//_______________
-Int_t AliEMCALTriggerSTU::GetRawData() const
-{
- //
- return fDCSConfig->GetRawData();
+ // Dtor
}
//_______________
void AliEMCALTriggerSTU::Build( TString& str, Int_t iTRU, Int_t** M, const TVector2* rSize )
{
- //
+ // Build
+
str.ToLower();
Int_t ix = (iTRU % 2) ? 24 : 0;
//_______________
void AliEMCALTriggerSTU::L1(TriggerType_t type)
{
- //
+ // L1
+
TVector2 s1, s2, s3, s4;
fDCSConfig->GetSegmentation(s1, s2, s3, s4);
//________________
void AliEMCALTriggerSTU::PrintADC( TriggerType_t type, TVector2& pos, TVector2& idx )
{
- //
+ // Dump
+
Int_t ix = (Int_t) (( pos.X() + fPatchSize->X() ) * fSubRegionSize->X());
Int_t iy = (Int_t) (( pos.Y() + fPatchSize->Y() ) * fSubRegionSize->Y());
//___________
void AliEMCALTriggerSTU::PatchGenerator(const TClonesArray* lpos, Int_t val)
{
+ // Patch generator
+
ZeroRegion();
Int_t vTRU[32][24][4] ;//= {0};
}
//___________
-void AliEMCALTriggerSTU::ComputeThFromV0(const Int_t M[])
+void AliEMCALTriggerSTU::ComputeThFromV0(TriggerType_t type, const Int_t M[])
{
- //
- if (!(M[0] + M[1])) AliWarning("V0A + V0C is null!"); // 0/1: V0C/V0A
-
+ // Compute threshold from V0
+
+ Short_t P[3] = {0};
+
+ switch (type)
+ {
+ case kL1Gamma:
+ P[0] = fDCSConfig->GetGA();
+ P[1] = fDCSConfig->GetGB();
+ P[2] = fDCSConfig->GetGC();
+ break;
+ case kL1Jet:
+ P[0] = fDCSConfig->GetJA();
+ P[1] = fDCSConfig->GetJB();
+ P[2] = fDCSConfig->GetJC();
+ break;
+ default:
+ AliError("AliEMCALTriggerSTU::ComputeThFromV0(): Undefined trigger type, pls check!");
+ return;
+ }
- fGammaTh = fDCSConfig->GetGA()*(M[0] + M[1])*(M[0] + M[1]) + fDCSConfig->GetGB()*(M[0] + M[1]) + fDCSConfig->GetGC();
+ ULong64_t v0sum = M[0] + M[1];
- fJetTh = fDCSConfig->GetJA()*(M[0] + M[1])*(M[0] + M[1]) + fDCSConfig->GetJB()*(M[0] + M[1]) + fDCSConfig->GetJC();
+ ULong64_t sqrV0 = v0sum * v0sum;
+
+ sqrV0 *= P[0];
+ sqrV0 >>= 32;
+
+ v0sum *= P[1];
+
+ v0sum >>= 16;
+
+ SetThreshold(type, (UShort_t)(sqrV0 + v0sum + P[2]));
}
//___________
void AliEMCALTriggerSTU::SetThreshold(TriggerType_t type, Int_t v)
{
+ // Set threshold
+
switch (type)
{
case kL1Gamma:
//__________
void AliEMCALTriggerSTU::Reset()
{
+ // Reset
+
fPatches->Delete();
}