31 #include "AliEMCALTriggerPatchInfo.h" 39 AliEmcalTriggerSelectionCuts::AliEmcalTriggerSelectionCuts() :
41 fSelectionMethod(kADC),
42 fPatchType(kAnyPatch),
43 fAcceptanceType(kEMCALDCALAcceptance),
45 fUseSimpleOffline(kFALSE),
61 if(valfirst == valsecond)
return 0;
62 if(valfirst > valsecond)
return 1;
69 case kADC: energy =
static_cast<Double_t>(patch->GetADCAmp());
break;
70 case kEnergyRough: energy = patch->GetADCAmpGeVRough();
break;
73 default: energy = -1.;
106 default: selected =
false;
112 std::map<AcceptanceType_t, std::string> acceptancetext = {{
kEMCALAcceptance,
"EMCAL"},
115 std::map<PatchType_t, std::string> patchtypetext = {{
kL0Patch,
"Level0"},
122 std::map<SelectionMethod_t, std::string> selmodetext = {{
kADC,
"FastOR ADC"},
126 stream <<
" Cut settings:" << std::endl;
127 stream <<
" acceptance: " << acceptancetext.find(
fAcceptanceType)->second << std::endl;
128 stream <<
" patchtype: " << patchtypetext.find(
fPatchType)->second << std::endl;
129 stream <<
" sel mode: " << selmodetext.find(
fSelectionMethod)->second << std::endl;
130 stream <<
" Offline Patches: " << (
fUseSimpleOffline ?
"yes" :
"no") << std::endl;
131 stream <<
" Recalc Patches: " << (
fUseRecalc ?
"yes" :
"no") << std::endl;
132 stream <<
" Threshold: " <<
fThreshold << std::endl;
Class for the selection of trigger patches in the EMCAL triggered event selection.
Bool_t SelectPatchType(const AliEMCALTriggerPatchInfo *const patch) const
Select type of the patch according the definitions in the header file.
Bool_t SelectAcceptance(const AliEMCALTriggerPatchInfo *const patch) const
Select detector acceptance.
Bool_t fUseSimpleOffline
Request simple offline patches.
Namespace for EMCAL framework classes and task.
Bool_t IsSelected(const AliEMCALTriggerPatchInfo *const patch) const
Apply selection of the given trigger patch according to the selections described in the object...
Bool_t fUseRecalc
Request recalc patch.
Namespace for PWG framework classes.
void PrintStream(std::ostream &stream) const
Helper function for output stream operator.
Double_t GetCutPrimitive(const AliEMCALTriggerPatchInfo *const patch) const
Return (energy) measure we cut on, depending on the selection method specified.
friend std::ostream & operator<<(std::ostream &stream, const AliEmcalTriggerSelectionCuts &cuts)
Output stream operator.
SelectionMethod_t fSelectionMethod
Variable to cut on.
Int_t CompareTriggerPatches(const AliEMCALTriggerPatchInfo *first, const AliEMCALTriggerPatchInfo *second) const
Compare two patches according to the energy measure specified in the cut object.
AcceptanceType_t fAcceptanceType
Acceptance type (EMCAL or DCAL acceptance)
Double_t fThreshold
Threshold used.
PatchType_t fPatchType
Type of the patch to be selected.