]>
Commit | Line | Data |
---|---|---|
739e2587 | 1 | //-*- Mode: C++ -*- |
2 | // $Id$ | |
3 | #ifndef ALIHLTTRIGGERCALOCLUSTERENERGY_H | |
4 | #define ALIHLTTRIGGERCALOCLUSTERENERGY_H | |
5 | ||
6 | //* This file is property of and copyright by the ALICE HLT Project * | |
7 | //* ALICE Experiment at CERN, All rights reserved. * | |
8 | //* See cxx source for full Copyright notice * | |
9 | ||
10 | /// @file AliHLTTriggerCaloClusterEnergy.h | |
11 | /// @author Svein Lindal | |
d67cae30 | 12 | /// @date 2010-03-25 |
13 | /// @brief Base class for CALO HLT energy threshold triggers | |
739e2587 | 14 | |
15 | /** | |
16 | * @class AliHLTTriggerCaloClusterEnergy | |
17 | * HLT trigger component for high energy clusters in PHOS | |
18 | * | |
19 | * Triggers on PHOS clusters containing energy > threshold value. | |
20 | * Configurable through database entry or from command line using "-energy" option | |
21 | * | |
22 | * <h2>General properties:</h2> | |
23 | * | |
24 | * Component ID: \b CaloClusterEnergyTrigger <br> | |
25 | * Library: \b libAliHLTTrigger.so <br> | |
26 | * Input Data Types: kAliHLTDataTypeESDObject, kAliHLTDataTypeESDTree <br> | |
27 | * Output Data Types: ::kAliHLTAnyDataType <br> | |
28 | * | |
29 | * <h2>Mandatory arguments:</h2> | |
30 | * <!-- NOTE: ignore the \li. <i> and </i>: it's just doxygen formatting --> | |
31 | * | |
32 | * <h2>Optional arguments:</h2> | |
33 | * <!-- NOTE: ignore the \li. <i> and </i>: it's just doxygen formatting --> | |
34 | * | |
35 | * <h2>Configuration:</h2> | |
36 | * <!-- NOTE: ignore the \li. <i> and </i>: it's just doxygen formatting --> | |
37 | * \li -energy <i> e </i> <br> | |
38 | * required energy of the cluster | |
39 | * | |
40 | * By default, configuration is loaded from OCDB, can be overridden by | |
41 | * component arguments. | |
42 | * | |
43 | * <h2>Default CDB entries:</h2> | |
44 | * HLT/ConfigHLT/CaloClusterEnergyTrigger: TObjString storing the arguments | |
45 | * | |
46 | * <h2>Performance:</h2> | |
47 | * | |
48 | * | |
49 | * <h2>Memory consumption:</h2> | |
50 | * | |
51 | * | |
52 | * <h2>Output size:</h2> | |
53 | * | |
54 | * | |
55 | * \ingroup alihlt_trigger_components | |
56 | */ | |
57 | ||
58 | ||
59 | #include "AliHLTTrigger.h" | |
60 | class AliHLTCaloClusterReader; | |
61 | class TRefArray; | |
62 | class AliESDEvent; | |
80036c6c | 63 | class TMap; |
739e2587 | 64 | |
65 | class AliHLTTriggerCaloClusterEnergy : public AliHLTTrigger | |
66 | { | |
67 | ||
68 | public: | |
69 | AliHLTTriggerCaloClusterEnergy(TString detector); | |
70 | ~AliHLTTriggerCaloClusterEnergy(); | |
71 | ||
72 | /// inherited from AliHLTTrigger: name of this trigger | |
73 | virtual const char* GetTriggerName() const = 0; | |
74 | /// inherited from AliHLTComponent: create an instance | |
75 | virtual AliHLTComponent* Spawn() = 0; | |
76 | ||
80036c6c | 77 | ///Inherited from AliHLTComponent: Get list of OCDB objects |
78 | void GetOCDBObjectDescription( TMap* const targetMap); | |
79 | ||
739e2587 | 80 | protected: |
81 | /// inherited from AliHLTComponent: handle the initialization | |
82 | int DoInit(int argc, const char** argv); | |
83 | ||
84 | /// inherited from AliHLTComponent: handle cleanup | |
85 | int DoDeinit(); | |
86 | ||
87 | /// inherited from AliHLTComponent: handle re-configuration event | |
88 | int Reconfigure(const char* cdbEntry, const char* chainId); | |
89 | ||
90 | /// inherited from AliHLTComponent, scan one argument and | |
91 | /// its parameters | |
92 | int ScanConfigurationArgument(int argc, const char** argv); | |
93 | ||
94 | /// inherited from AliHLTComponent | |
95 | // Get a ratio by how much the data volume is shrunken or enhanced. | |
96 | virtual void GetOutputDataSize(unsigned long& constBase, double& inputMultiplier); | |
97 | ||
98 | protected : | |
99 | ||
100 | ///Get the clusters from the esd | |
101 | virtual Int_t GetClustersFromEsd( const AliESDEvent * esd, TRefArray * clustersRefs ) = 0; | |
102 | ||
177f8c98 | 103 | // FR: Set the appropriate readout list for each calo |
104 | virtual void SetCaloReadoutList() = 0; | |
105 | ||
739e2587 | 106 | /// inherited from AliHLTTrigger: calculate the trigger |
107 | Int_t DoTrigger(); | |
108 | ||
109 | ///Default constructor prohibited | |
110 | AliHLTTriggerCaloClusterEnergy(); | |
111 | ||
112 | /// Copy constructor prohibited | |
113 | AliHLTTriggerCaloClusterEnergy(const AliHLTTriggerCaloClusterEnergy & ); | |
114 | ||
115 | /// Assignment operator prohibited | |
116 | AliHLTTriggerCaloClusterEnergy& operator=(const AliHLTTriggerCaloClusterEnergy &); | |
117 | ||
118 | /// Check if cluster fullfills criteria and if so trigger | |
119 | template <class T> | |
120 | Bool_t TriggerOnCluster(T* cluster); | |
121 | ||
122 | /// Threshold cluster energy to trigger on | |
123 | Float_t fEThreshold; | |
124 | ||
125 | ///array to hold esd clusters | |
126 | TRefArray * fClustersRefs; //!transient | |
127 | ||
128 | //The detector string (PHOS or EMCAL) | |
129 | const TString fDetector; | |
130 | ||
131 | ///Cluster data struct reader | |
132 | AliHLTCaloClusterReader * fClusterReader; //!transient | |
133 | ||
134 | /// the default configuration entry for this component | |
9e7cc92a | 135 | const char* fOCDBEntry; //!transient |
739e2587 | 136 | |
137 | ||
9e7cc92a | 138 | AliHLTComponentDataType fInputDataType; ///Input data type for calo struct input, must be set in child class |
739e2587 | 139 | |
140 | ||
141 | ClassDef(AliHLTTriggerCaloClusterEnergy, 0) | |
142 | }; | |
143 | ||
144 | ||
145 | ||
146 | ||
147 | ||
148 | #endif //ALIHLTTRIGGERCALOCLUSTERENERGY_H |