]> git.uio.no Git - u/mrichter/AliRoot.git/blob - HLT/TPCLib/AliHLTTPCTrackHistoComponent.h
- use new function for calculation of track length
[u/mrichter/AliRoot.git] / HLT / TPCLib / AliHLTTPCTrackHistoComponent.h
1 // XEmacs -*-C++-*-
2 // $Id$
3
4 #ifndef ALIHLTTPCTRACKHISTOCOMPONENT_H
5 #define ALIHLTTPCTRACKHISTOCOMPONENT_H
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   AliHLTTPCTrackHistoComponent.h
11     @author Gaute Ovrebekk
12     @date   
13     @brief  Component for track histo
14 */
15
16 #include "AliHLTProcessor.h"
17 #include "AliHLTTPCSpacePointData.h"
18 #include "AliHLTTPCTrackSegmentData.h"
19
20 class TNtuple;
21 class TH1F;
22 class TProfile;
23
24 /**
25  * @class AliHLTTPCTrackHistoComponent
26  * Component for ploting proparties of Tracks. 
27  * The component gives out two NTuples. One for cluster- and one for track proprties
28  * 
29  * <h2>General properties:</h2> 
30  *
31  * Component ID: \b TPCTrackHisto <br>
32  * Library: \b libAliHLTTPC.so <br>
33  * Input Data Types: AliHLTTPCDefinitions::fgkClustersDataType,
34  *                   AliHLTTPCDefinitions::fgkTrackSegmentsDataType or
35  *                   AliHLTTPCDefinitions::fgkTracksDataType <br>
36  * Output Data Types: ::kAliHLTDataTypeTNtuple <br> 
37  *
38  * <h2> Mandatory arguments: </h2>
39  * \li No mandaroty arguments. 
40  * 
41  * <h2> Optional arguments: </h2>
42  * 
43  * <h2>Configuration:</h2>
44  * 
45  *
46  * <h2>Default CDB entries:</h2>
47  * The component has for now no CDB entry
48  *
49  * <h2>Performance:</h2>
50  * Not Tested 
51  *
52  * <h2>Memory consumption:</h2>
53  * Not Tested
54  *
55  * <h2>Output size:</h2>
56  * Size variables in Ntuple
57  *
58  * @ingroup alihlt_tpc_components
59  */
60 class AliHLTTPCTrackHistoComponent : public AliHLTProcessor
61 {
62 public:
63   /** default constructor */
64   AliHLTTPCTrackHistoComponent();
65   /** destructor */
66   virtual ~AliHLTTPCTrackHistoComponent();
67
68   // Public functions to implement AliHLTComponent's interface.
69   // These functions are required for the registration process
70
71   /** interface function, see AliHLTComponent for description */
72   const char* GetComponentID();
73   /** interface function, see AliHLTComponent for description */
74   void GetInputDataTypes(AliHLTComponentDataTypeList& list);
75   /** interface function, see AliHLTComponent for description */
76   AliHLTComponentDataType GetOutputDataType();
77   /** interface function, see AliHLTComponent for description */
78   int GetOutputDataTypes(AliHLTComponentDataTypeList& tgtList);
79   /** interface function, see AliHLTComponent for description */
80   virtual void GetOutputDataSize( unsigned long& constBase, double& inputMultiplier );
81   /** interface function, see AliHLTComponent for description */
82   AliHLTComponent* Spawn();
83
84 protected:
85
86   // Protected functions to implement AliHLTComponent's interface.
87   // These functions provide initialization as well as the actual processing
88   // capabilities of the component. 
89
90   /** interface function, see AliHLTComponent for description */
91   int DoInit( int argc, const char** argv );
92   /** interface function, see AliHLTComponent for description */
93   int DoDeinit();
94   /** interface function, see AliHLTComponent for description */
95   int DoEvent( const AliHLTComponentEventData& /*evtData*/, AliHLTComponentTriggerData& trigData );
96   /** inherited from AliHLTComponent: handle re-configuration event */
97   int Reconfigure(const char* cdbEntry, const char* chainId);
98   /** inherited from AliHLTComponent, scan one argument and its parameters */
99   int ScanConfigurationArgument(int argc, const char** argv);
100
101   using AliHLTProcessor::DoEvent;
102   
103 private:
104   /** copy constructor prohibited */
105   AliHLTTPCTrackHistoComponent(const AliHLTTPCTrackHistoComponent&);
106   /** assignment operator prohibited */
107   AliHLTTPCTrackHistoComponent& operator=(const AliHLTTPCTrackHistoComponent&);
108   /**
109    * Configure the component.
110    * Parse a string for the configuration arguments and set the component
111    * properties.
112    */ 
113   
114   void ReadTracks(const AliHLTComponentBlockData* iter,Int_t &tt);
115
116   void PushHisto();
117  
118   AliHLTUInt8_t fMinSlice;     //! transient
119   AliHLTUInt8_t fMaxSlice;     //! transient
120   AliHLTUInt8_t fMinPartition; //! transient
121   AliHLTUInt8_t fMaxPartition; //! transient
122
123   Int_t fNEvents;    //! transient
124   Int_t fNtotTracks; //! transient
125
126   Int_t fEvtMod;     //! number of events reached to reset the counter
127   Int_t fBufferSize; //! size of circular buffer (number of entries) for the ntuples
128   Bool_t fdEdx;      //! plot dEdx
129   //  Bool_t fReset;  //! Reset track counter every certain events
130
131   TH1F *fMeanMultiplicity; //! transient (mean multiplicity for every 20 evts vs. #evt by Z.Y.)
132   TH1F *fMultiplicity;     //! transient (track multiplicity by Z.Y.)
133      
134   //TH2F *fNClusterVsXY;   //! transient (#Clusters vs. x, y positions, by ZY)
135   //TH2F *fChargeVsXY;     //! transient (Charge distr. vs. x, y added by ZY)
136   TProfile *fDeDxVsP;    //! transient (dEdX vs. p)
137
138   TNtuple *fClusters;                             //! transient  
139   TNtuple *fTracks;                               //! transient
140
141   vector<UInt_t> fTrackClusterID[36][6];          //! transient
142
143   AliHLTTPCSpacePointData *fClustersArray[36][6]; //! transient
144   UInt_t                   fNSpacePoints[36][6];  //! transient
145   
146   /** the default configuration entry for this component */
147   static const char* fgkOCDBEntry; //!transient
148
149   ClassDef(AliHLTTPCTrackHistoComponent, 4);
150
151 };
152 #endif