]> git.uio.no Git - u/mrichter/AliRoot.git/blob - HLT/trigger/AliHLTD0Trigger.h
update of the D0 trigger (Gaute)
[u/mrichter/AliRoot.git] / HLT / trigger / AliHLTD0Trigger.h
1 //-*- Mode: C++ -*-
2 // $Id: AliHLTD0Trigger.h 
3 #ifndef ALIHLTD0TRIGGER_H
4 #define ALIHLTD0TRIGGER_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   AliHLTD0Trigger.h
10 /// @author Gaute Ovrebekk
11 /// @date   2009-10-28
12 /// @brief  HLT trigger component for D0->Kpi
13
14 #include "AliHLTTrigger.h"
15 #include <vector>
16 #include "AliHLTD0toKpi.h"
17
18 class TH1F;
19 class TObjArray;
20 class AliESDVertex;
21 class AliExternalTrackParam;
22 class TTree;
23 class TClonesArray;
24
25 /**
26  * @class  AliHLTD0Trigger
27  *
28  * HLT trigger component for D0->Kpi
29  *
30  * <h2>General properties:</h2>
31  *
32  * Component ID: \b D0Trigger                             <br>
33  * Library: \b libAliHLTTrigger.so                                        <br>
34  * Input Data Types:  kAliHLTDataTypeESDObject, kAliHLTDataTypeESDTree
35  *                    kAliHLTDataTypeTrack                                <br>
36  * Output Data Types: ::kAliHLTAnyDataType                                <br>
37  *
38  * <h2>Mandatory arguments:</h2>
39  * <!-- NOTE: ignore the \li. <i> and </i>: it's just doxygen formatting -->
40  * TODO: code audit 2010-07-23 describe component arguments
41  *
42  * <h2>Optional arguments:</h2>
43  * <!-- NOTE: ignore the \li. <i> and </i>: it's just doxygen formatting -->
44  *
45  * <h2>Configuration:</h2>
46  * <!-- NOTE: ignore the \li. <i> and </i>: it's just doxygen formatting -->
47  * \li -pt    <i> pt cut for decay products </i> <br>
48  * \li -dca    <i> dca cut for distance between decay tracks  </i> <br>
49  * \li -invmass    <i> inv. mass half width of D0  </i> <br>
50  * \li -costhetastar    <i> cos of decay angle  </i> <br>
51  * \li -d0    <i> Impact parameter for decay products  </i> <br>
52  * \li -d0d0    <i> Product of impact parameter for decay products  </i> <br>
53  * \li -cospoint    <i> pointing angle  </i> <br>
54  * \li -plothistogram    <i> ploting the inv. mass and pt of D0  </i> <br>
55  * \li -useV0    <i> will use the V0's found by the vertexer and stored in the ESD</i> <br>
56  * \li -useKF    <i> will use partilce KF for vertex finding  </i> <br>
57  * \li -send-candidates    <i> will send out an array of candidates for each event</i> <br>
58  * \li -write-file    <i> will store a local file. Only use for small local tests.</i> <br>
59  *
60  * By default, configuration is loaded from OCDB, can be overridden by
61  * component arguments.
62  *
63  * <h2>Default CDB entries:</h2>
64  * HLT/ConfigHLT/D0Trigger: TObjString storing the arguments
65  *
66  * <h2>Performance:</h2>
67  * 
68  *
69  * <h2>Memory consumption:</h2>
70  * 
71  *
72  * <h2>Output size:</h2>
73  * 
74  *
75  * \ingroup alihlt_trigger_components
76  */
77 class AliHLTD0Trigger : public AliHLTTrigger
78 {
79  public:
80   AliHLTD0Trigger();
81   ~AliHLTD0Trigger();
82
83   /// inherited from AliHLTTrigger: name of this trigger
84   virtual const char* GetTriggerName() const;
85   /// inherited from AliHLTComponent: create an instance
86   virtual AliHLTComponent* Spawn();
87
88   /// inherited from AliHLTComponent: return OCDB requirements
89   void GetOCDBObjectDescription( TMap* const targetMap);
90
91  protected:
92   /// inherited from AliHLTComponent: handle the initialization
93   int DoInit(int argc, const char** argv);
94
95   /// inherited from AliHLTComponent: handle cleanup
96   int DoDeinit();
97
98   /// inherited from AliHLTComponent: handle re-configuration event
99   int Reconfigure(const char* cdbEntry, const char* chainId);
100
101   /// inherited from AliHLTComponent, scan one argument and
102   /// its parameters
103   int ScanConfigurationArgument(int argc, const char** argv);
104
105  private:
106   /// Not implemented. Do not allow copying of this object.
107   AliHLTD0Trigger(const AliHLTD0Trigger& );
108   /// Not implemented. Do not allow copying of this object.
109   AliHLTD0Trigger& operator=(const  AliHLTD0Trigger& );
110
111   /// inherited from AliHLTTrigger: calculate the trigger
112   virtual int DoTrigger();
113   
114   /// Adding single track cut on input tracks, and split in pos. and neg.
115   void SingleTrackSelect(AliExternalTrackParam*,const AliESDVertex*,Double_t field);
116   /// Useing the V0's in the ESD found by the V0 finder
117   Int_t RecV0(const TObject* iter);
118   /// Reconstructing the D0 from K and pi
119   void RecD0(Int_t&,const AliESDVertex*,Double_t field);
120
121   /// pt cut for decay, minimum [GeV/c]
122   float fPtMin;                                            //! transient
123   /// Distance between decay tracks [cm] ??
124   float fdca;                                              //! transient
125   /// Inv. mass half width [GeV]
126   float finvMass;                                          //! transient
127   /// Decay angle
128   float fcosThetaStar;                                     //! transient  
129   /// Distance from primary vertex for decay tracks [cm] 
130   float fd0;                                               //! transient
131   /// Product of d0 for the two decay tracks [cm^2]
132   float fd0d0;                                             //! transient
133   /// Pionting angle
134   float fcosPoint;                                         //! transient 
135
136   /// Option for ploting InvMass and Pt of D0's
137   bool fplothisto;                                         //! transient
138   /// Option for useing the V0' from V0 finder
139   bool fUseV0;                                             //! transient 
140
141   /// D0 mass
142   Double_t fD0PDG;                                         //! transient
143
144   /// D0 inv. mass plot
145   TH1F *fD0mass;                                           //! transient  
146   /// Pt plot of D0's
147   TH1F *fD0pt;                                             //! transient  
148
149   /// Vector for positive tracks
150   vector<AliExternalTrackParam*> fPos;                     //! transient
151   /// Vector for negative tracks
152   vector<AliExternalTrackParam*> fNeg;                     //! transient
153
154   /// Object for calculations
155   AliHLTD0toKpi *fd0calc;                                  //! transient
156   /// Array of the two decay products
157   TObjArray *ftwoTrackArray;                               //! transient
158
159   /// Counters for D0
160   Int_t fTotalD0;                                          //! transient
161
162   /// Option for useing KF particle for vertexing
163   bool fuseKF;                                             //!transient
164
165   /// Option for storing MC information
166   bool fSendCandidate;                                     //!transient
167   /// Tree for storing the MC information
168   TTree *fCandidateTree;                                   //!transient
169   /// Array with D0 candidates
170   TClonesArray *fCandidateArray;                           //!transient
171   /// Option for writing MC information to file
172   bool fWriteFile;                                         //!transient
173
174   /// the default configuration entry for this component
175   static const char* fgkOCDBEntry; //!transient
176
177   ClassDef(AliHLTD0Trigger, 0)
178 };
179 #endif //ALIHLTD0TRIGGER_H