- muonData->SetTreeAddress("D");
- muonData->GetDigits();
- Int_t idebug = 1;
- // Creating MUONTriggerDecision
- AliMUONTriggerDecision* decision = new AliMUONTriggerDecision(muonLoader ,idebug,muonData);
- AliMUONDigit * mDigit;
- Int_t tracks[10];
- Int_t charges[10];
- Int_t digits[7];
-
- for(Int_t ichamber=10; ichamber<14; ichamber++) {
- Int_t idigit, ndigits;
- ndigits = (Int_t) muonData->Digits(ichamber)->GetEntriesFast();
-// printf(">>> Chamber Cathode ndigits %d %d %d\n",ichamber,icathode,ndigits);
- for(idigit=0; idigit<ndigits; idigit++) {
- mDigit = static_cast<AliMUONDigit*>(muonData->Digits(ichamber)->At(idigit));
- digits[0] = mDigit->PadX();
- digits[1] = mDigit->PadY();
- digits[2] = mDigit->Cathode();
- digits[3] = mDigit->Signal();
- digits[4] = mDigit->Physics();
- digits[5] = mDigit->Hit();
- digits[6] = mDigit->DetElemId();
-
- Int_t digitindex = 0 ;
- // printf("ichamber ix iy %d %d %d \n",ichamber,mDigit->PadX(),mDigit->PadY());
-
- decision->AddDigit(ichamber, tracks, charges, digits, digitindex );
- } // loop on digits
- } // loop on chambers
- muonData->ResetDigits();
- decision->Trigger();
- decision->ClearDigits();
-
- // Set the trigger inputs = "global decision"
- Int_t singlePlus[3]; // tot num of single plus
- Int_t singleMinus[3]; // tot num of single minus
- Int_t singleUndef[3]; // tot num of single undefined
- Int_t pairUnlike[3]; // tot num of unlike-sign pairs
- Int_t pairLike[3]; // tot num of like-sign pairs
- decision->GetGlobalTrigger(singlePlus, singleMinus, singleUndef, pairUnlike, pairLike);
-
- if( singlePlus[0] ) SetInput("MUON_SPlus_LPt_L0");
- if( singlePlus[1] ) SetInput("MUON_SPlus_HPt_L0");
- if( singlePlus[2] ) SetInput("MUON_SPlus_All_L0");
-
- if( singleMinus[0] ) SetInput("MUON_SMinus_LPt_L0");
- if( singleMinus[1] ) SetInput("MUON_SMinus_HPt_L0");
- if( singleMinus[2] ) SetInput("MUON_SMinus_All_L0");
-
- if( singleUndef[0] ) SetInput("MUON_SUndef_LPt_L0");
- if( singleUndef[1] ) SetInput("MUON_SUndef_HPt_L0");
- if( singleUndef[2] ) SetInput("MUON_SUndef_All_L0");
+
+ // get global info
+ muonData->SetTreeAddress("GLT");
+ muonData->GetTriggerD();
+ globalTriggerArray = muonData->GlobalTrigger();
+ if (globalTriggerArray == 0x0) {
+ AliWarning("No Global Trigger Array available");
+ return;
+ }
+ globalTrigger = (AliMUONGlobalTrigger*)globalTriggerArray->UncheckedAt(0);
+
+ if (globalTrigger == 0x0) {
+ AliWarning("No Global Trigger available");
+ return;
+ }
+ // set CTP
+ if (globalTrigger->SingleLpt()) SetInput("MUON_Single_LPt_L0");
+ if (globalTrigger->SingleHpt()) SetInput("MUON_Single_HPt_L0");