AliPhysics  5eaf189 (5eaf189)
AliEMCalTriggerAnaTriggerClass.cxx
Go to the documentation of this file.
1 /**************************************************************************
2  * Copyright(c) 1998-2015, ALICE Experiment at CERN, All rights reserved. *
3  * *
4  * Author: The ALICE Off-line Project. *
5  * Contributors are mentioned in the code where appropriate. *
6  * *
7  * Permission to use, copy, modify and distribute this software and its *
8  * documentation strictly for non-commercial purposes is hereby granted *
9  * without fee, provided that the above copyright notice appears in all *
10  * copies and that both the copyright notice and this permission notice *
11  * appear in the supporting documentation. The authors make no claims *
12  * about the suitability of this software for any purpose. It is *
13  * provided "as is" without express or implied warranty. *
14  **************************************************************************/
15 #include "AliLog.h"
16 #include "AliVEvent.h"
20 
23 ClassImp(EMCalTriggerPtAnalysis::AliEMCalTriggerAnaPatternObject)
24 ClassImp(EMCalTriggerPtAnalysis::AliEMCalTriggerAnaPatternContainer)
25 ClassImp(EMCalTriggerPtAnalysis::AliEMCalTriggerAnaTriggerPatchTypeObject)
27 
28 namespace EMCalTriggerPtAnalysis {
29 
33 AliEMCalTriggerAnaTriggerClass::AliEMCalTriggerAnaTriggerClass() :
34  TNamed(),
35  fDecisionFromTriggerBits(kFALSE),
36  fDecisionFromTriggerString(kFALSE),
37  fDecisionFromTriggerPatches(kFALSE),
38  fTriggerBits(0),
39  fIsMinBiasTrigger(kFALSE),
40  fTriggerStringPattern(),
41  fEmcalTriggerHandler(NULL)
42 {
43 }
44 
51  TNamed(name, title),
55  fTriggerBits(0),
56  fIsMinBiasTrigger(kFALSE),
60 {
61  fTriggerPatchTypes.SetOwner(kTRUE);
62 }
63 
68 
79  throw TriggerMethodUndefinedException(this->GetName());
80  bool result = kTRUE;
81 
83  result = result && (triggerevent->GetTriggerBitSelection() & fTriggerBits);
84  }
85  if(!result) return kFALSE;
86 
88  if(!triggerevent->GetRecEvent())
89  throw EventCorruptionException(this->GetName(), "Reconstructed event missing");
90  result = result && fTriggerStringPattern.CheckTriggerString(triggerevent->GetRecEvent()->GetFiredTriggerClasses().Data());
91  }
92  if(!result) return kFALSE;
93 
96  if(triggerevent->GetTriggerPatchContainer())
97  throw EventCorruptionException(this->GetName(), "Trigger patch container missing");
98  for(TIter typeiter = TIter(&fTriggerPatchTypes).Begin(); typeiter != TIter::End(); ++typeiter){
100  result = result && fEmcalTriggerHandler->IsTriggered(patchtype->GetTriggerType(), kTriggerPatches);
101  }
102  } else
103  throw PatchHandlerMissingException(this->GetName());
104  }
105 
106  return result;
107 }
108 
115  Bool_t patternmatch = TString(triggerstring).Contains(fPattern);
116  return fInString ? patternmatch : !patternmatch;
117 }
118 
125  Bool_t result = kTRUE;
126 
127  for(TIter piter = TIter(&fPatterns).Begin(); piter != TIter::End(); ++piter){
128  const AliEMCalTriggerAnaPatternObject *toCheck = static_cast<const AliEMCalTriggerAnaPatternObject *>(*piter);
129  result = result && toCheck->MatchTriggerString(triggerstring);
130  }
131  return result;
132 }
133 
134 } /* namespace EMCalTriggerPtAnalysis */
Declaration of class AliEMCalTriggerAnaTriggerDecision, a container for trigger decision in EMCAL-tri...
const char * title
Definition: MakeQAPdf.C:27
Bool_t fIsMinBiasTrigger
Flag class as min. bias trigger class.
Exception class for events trigger classes which do not have a method for event selection defined...
Bool_t fDecisionFromTriggerString
Switch for using the trigger string for event selection.
Bool_t IsTriggered(ETATriggerType trigger, ETriggerMethod_t method=kTriggerString) const
Bool_t fDecisionFromTriggerBits
Switch for using trigger bits for event selection.
Bool_t fDecisionFromTriggerPatches
Switch for using reconstructed trigger patches for event selection.
TObjArray fTriggerPatchTypes
Trigger patch types used for the selection.
AliEMCalTriggerAnaTriggerDecision * fEmcalTriggerHandler
Handling of trigger patch selection.
Helper class describing a trigger pattern in the trigger string.
Analysis of high- tracks in triggered events.
Simple event container within the high- track analysis.
Exception class thrown when event collection is corrupted (event pointer 0 or trigger patch container...
AliEMCalTriggerAnaPatternContainer fTriggerStringPattern
Trigger patterns used for event selection.
bool IsEventTriggered(const AliEMCalTriggerEventData *const) const
bool Bool_t
Definition: External.C:53
Definition of a trigger class.
UInt_t fTriggerBits
Trigger bits used for event selection.
Event Data used in exchange to the different analysis components.
Exception class for events where the trigger patch handler is not set.