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