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