2 //**************************************************************************
3 //* This file is property of and copyright by the ALICE HLT Project *
4 //* ALICE Experiment at CERN, All rights reserved. *
6 //* Primary Authors: Matthias Richter <Matthias.Richter@ift.uib.no> *
7 //* for The ALICE HLT Project. *
9 //* Permission to use, copy, modify and distribute this software and its *
10 //* documentation strictly for non-commercial purposes is hereby granted *
11 //* without fee, provided that the above copyright notice appears in all *
12 //* copies and that both the copyright notice and this permission notice *
13 //* appear in the supporting documentation. The authors make no claims *
14 //* about the suitability of this software for any purpose. It is *
15 //* provided "as is" without express or implied warranty. *
16 //**************************************************************************
18 /// @file AliHLTTriggerBarrelMultiplicity.cxx
19 /// @author Matthias Richter
21 /// @brief HLT trigger component for charged particle multiplicity in
22 /// the central barrel.
24 // see header file for class documentation
26 // refer to README to build package
28 // visit http://web.ift.uib.no/~kjeks/doc/alice-hlt
30 #include "AliHLTTriggerBarrelMultiplicity.h"
31 #include "AliESDEvent.h"
32 #include "AliHLTTriggerDecision.h"
33 #include "AliHLTDomainEntry.h"
35 /** ROOT macro for the implementation of ROOT specific class methods */
36 ClassImp(AliHLTTriggerBarrelMultiplicity)
38 AliHLTTriggerBarrelMultiplicity::AliHLTTriggerBarrelMultiplicity()
44 // see header file for class documentation
46 // refer to README to build package
48 // visit http://web.ift.uib.no/~kjeks/doc/alice-hlt
51 AliHLTTriggerBarrelMultiplicity::~AliHLTTriggerBarrelMultiplicity()
53 // see header file for class documentation
56 const char* AliHLTTriggerBarrelMultiplicity::GetTriggerName() const
58 // see header file for class documentation
59 return "BarrelMultiplicityTrigger";
62 AliHLTComponent* AliHLTTriggerBarrelMultiplicity::Spawn()
64 // see header file for class documentation
65 return new AliHLTTriggerBarrelMultiplicity;
68 int AliHLTTriggerBarrelMultiplicity::DoTrigger()
70 // see header file for class documentation
71 const TObject* obj = GetFirstInputObject(kAliHLTAllDataTypes, "AliESDEvent");
72 AliESDEvent* esd = dynamic_cast<AliESDEvent*>(const_cast<TObject*>(obj));
78 unsigned int numberOfTracks=0;
79 for (Int_t i = 0; i < esd->GetNumberOfTracks(); i++) {
80 AliESDtrack* track = esd->GetTrack(i);
81 if (track && track->Pt() >= fPtMin &&
82 (fPtMax<=fPtMin || track->Pt() < fPtMax)) {
88 ptcut.Form(" %.02f GeV/c <= pt < %.02f GeV/c", fPtMin, fPtMax);
90 ptcut.Form(" pt >= %.02f GeV/c", fPtMin);
92 if (numberOfTracks>=fMinTracks) {
93 description.Form("Event contains %d track(s) with ", numberOfTracks);
95 SetDescription(description.Data());
96 // Enable the central detectors for readout.
97 GetReadoutList().Enable(
98 AliHLTReadoutList::kITSSPD |
99 AliHLTReadoutList::kITSSDD |
100 AliHLTReadoutList::kITSSSD |
101 AliHLTReadoutList::kTPC |
102 AliHLTReadoutList::kTRD |
103 AliHLTReadoutList::kTOF |
104 AliHLTReadoutList::kHMPID |
105 AliHLTReadoutList::kPHOS
107 // Add the available HLT information for readout too.
108 GetTriggerDomain().Add("CLUSTERS", "TPC ");
113 description.Form("No tracks matching the tresholds found in the central barrel (min tracks %d, %s)",
114 fMinTracks, ptcut.Data());
115 SetDescription(description.Data());