]> git.uio.no Git - u/mrichter/AliRoot.git/blob - HLT/trigger/AliHLTTriggerBarrelGeomMultiplicity.h
added HLT scalers to feed monitoring component
[u/mrichter/AliRoot.git] / HLT / trigger / AliHLTTriggerBarrelGeomMultiplicity.h
1 //-*- Mode: C++ -*-
2 // $Id$
3 #ifndef ALIHLTTRIGGERBARRELGEOMMULTIPLICITY_H
4 #define ALIHLTTRIGGERBARRELGEOMMULTIPLICITY_H
5 //* This file is property of and copyright by the ALICE HLT Project        * 
6 //* ALICE Experiment at CERN, All rights reserved.                         *
7 //* See cxx source for full Copyright notice                               *
8
9 /// @file   AliHLTTriggerBarrelGeomMultiplicity.h
10 /// @author Oystein Djuvsland
11 /// @date   2009-10-08
12 /// @brief  HLT trigger component for charged particle multiplicity in
13 ///         a geometrical selection of the central barrel.
14
15 #include "AliHLTTrigger.h"
16
17 class AliHLTTriggerDecisionParameters;
18
19 /**
20  * @class  AliHLTTriggerBarrelGeomMultiplicity
21  * HLT trigger component for charged particle multiplicity in the
22  * central barrel.
23  * 
24  * Triggers on charged particle number in a certain geometrical acceptance
25  *
26  * <h2>General properties:</h2>
27  *
28  * Component ID: \b BarrelGeomMultiplicityTrigger                             <br>
29  * Library: \b libAliHLTTrigger.so                                        <br>
30  * Input Data Types:  kAliHLTDataTypeESDObject, kAliHLTDataTypeESDTree
31  *                    kAliHLTDataTypeTrack                                <br>
32  * Output Data Types: ::kAliHLTAnyDataType                                <br>
33  *
34  * <h2>Mandatory arguments:</h2>
35  * <!-- NOTE: ignore the \li. <i> and </i>: it's just doxygen formatting -->
36  * \li -triggername     <i> n   </i> <br>
37  *      specifies which configuration object to use for the trigger
38  *
39  * <h2>Optional arguments:</h2>
40  * <!-- NOTE: ignore the \li. <i> and </i>: it's just doxygen formatting -->
41  * \li -geomfile     <i> n   </i> <br>
42  *      specifies root file containing configuration objects
43  *
44  * <h2>Configuration:</h2>
45  * <!-- NOTE: ignore the \li. <i> and </i>: it's just doxygen formatting -->
46  * \li -mintracks     <i> n   </i> <br>
47  *      required number of tracks for a trigger
48  * \li  -solenoidBz    <i> field  </i> <br>
49  *      magnetic field needed if the input is not an ESD object
50  *
51  * By default, configuration is loaded from OCDB, can be overridden by
52  * component arguments.
53  *
54  * <h2>Default CDB entries:</h2>
55  * HLT/ConfigHLT/BarrelGeomMultiplicityTrigger/<triggername>: TObjArray storing the
56  * geometries and readout parameters. 
57  * HLT/ConfigHLT/Solenoidbz: TObjString -solenoidBz field
58  *
59  * <h2>Performance:</h2>
60  * 
61  *
62  * <h2>Memory consumption:</h2>
63  * 
64  *
65  * <h2>Output size:</h2>
66  * 
67  *
68  * \ingroup alihlt_trigger_components
69  */
70 class AliHLTTriggerBarrelGeomMultiplicity : public AliHLTTrigger
71 {
72  public:
73
74   AliHLTTriggerBarrelGeomMultiplicity();
75   ~AliHLTTriggerBarrelGeomMultiplicity();
76
77   /// inherited from AliHLTComponent: create an instance
78   virtual AliHLTComponent* Spawn();
79
80   /// inherited from AliHLTTrigger: name of this trigger
81   virtual const char* GetTriggerName() const;
82
83  protected:
84   /// inherited from AliHLTComponent: handle the initialization
85   int DoInit(int argc, const char** argv);
86
87   /// inherited from AliHLTComponent: handle cleanup
88   int DoDeinit();
89
90   /// inherited from AliHLTComponent: handle dcs update event
91   int ReadPreprocessorValues(const char* modules);
92
93   /// inherited from AliHLTComponent, scan one argument and
94   /// its parameters
95   virtual int ScanConfigurationArgument(int argc, const char** argv);
96   
97   // Get the detector geometries from CDB entry
98   virtual int GetDetectorGeomsFromCDBObject(const char *cdbEntry, const char *chainId);
99
100   // Get the detector geometries from a root file
101   virtual int GetDetectorGeomsFromFile(const char *filename);
102
103   /// inherited from AliHLTComponent: handle re-configuration event
104   int Reconfigure(const char* cdbEntry = 0, const char* chainId = 0);
105
106  private:
107
108   /// inherited from AliHLTTrigger: calculate the trigger
109   virtual int DoTrigger();
110
111   /// check whether a track meets the criteria  
112   template<class T>
113   bool CheckCondition(T* track, float b);
114
115   // check whether a track is in the desired detectors
116   template<class T>
117   bool IsInDetectors(T* track, float b);
118
119   // magnetic field (dca estimation for)
120   Float_t fSolenoidBz; 
121
122   // minimum number of tracks satisfying the cut
123   Int_t fMinTracks;
124
125   // array of (sub-)detectors to trigger on
126   TObjArray *fDetectorArray; // !transient
127
128   // Trigger decision parameters
129   AliHLTTriggerDecisionParameters *fTriggerDecisionPars; //!transient
130
131   // The trigger name
132   char *fTriggerName; //!transient
133   
134   // the default configuration entry for this component
135   char* fOCDBEntry; //!transient
136
137   /** Keep the copy constructor private since it should not be used */
138   AliHLTTriggerBarrelGeomMultiplicity(const AliHLTTriggerBarrelGeomMultiplicity & );
139
140   /** Keep the assignement operator private since it should not be used */
141   AliHLTTriggerBarrelGeomMultiplicity & operator = (const AliHLTTriggerBarrelGeomMultiplicity &);
142
143   ClassDef(AliHLTTriggerBarrelGeomMultiplicity, 0);
144
145 };
146
147 #endif