-//_____________________________________________________________________________
-void
-AliMUONDigitizerV3::ApplyResponseToTriggerDigit(const AliMUONVDigitStore& digitStore,
- AliMUONVDigit& digit)
-{
- /// \todo add comment
-
- if ( !fTriggerEfficiency ) return;
-
- if (digit.IsEfficiencyApplied()) return;
-
- AliMUONVDigit* correspondingDigit = FindCorrespondingDigit(digitStore,digit);
-
- if (!correspondingDigit) return; //reject bad correspondences
-
- Int_t detElemId = digit.DetElemId();
-
- AliMpSegmentation* segmentation = AliMpSegmentation::Instance();
- const AliMpVSegmentation* segment[2] =
- {
- segmentation->GetMpSegmentation(detElemId,AliMp::GetCathodType(digit.Cathode())),
- segmentation->GetMpSegmentation(detElemId,AliMp::GetCathodType(correspondingDigit->Cathode()))
- };
-
- AliMpPad pad[2] =
- {
- segment[0]->PadByIndices(AliMpIntPair(digit.PadX(),digit.PadY()),kTRUE),
- segment[1]->PadByIndices(AliMpIntPair(correspondingDigit->PadX(),correspondingDigit->PadY()),kTRUE)
- };
-
- Int_t p0(1);
- if (digit.Cathode()==0) p0=0;
-
- AliMpIntPair location = pad[p0].GetLocation(0);
- Int_t nboard = location.GetFirst();
-
- Bool_t isTrig[2];
-
- fTriggerEfficiency->IsTriggered(detElemId, nboard,
- isTrig[0], isTrig[1]);
- digit.EfficiencyApplied(kTRUE);
- correspondingDigit->EfficiencyApplied(kTRUE);
-
- if (!isTrig[digit.Cathode()])
- {
- digit.SetCharge(0);
- }
-
- if ( &digit != correspondingDigit )
- {
- if (!isTrig[correspondingDigit->Cathode()])
- {
- correspondingDigit->SetCharge(0);
- }
- }
-}
-