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 *
7 /// @file AliHLTGlobalTrackResidualsComponent.h
8 /// @author Timur Pocheptsov
10 /// @brief A histogramming component for plotting the Y and Z track residuals
14 * @class AliHLTGlobalTrackResidualsComponent
16 * <h2>General properties:</h2>
18 * Component ID: \b GlobalTrackResiduals <br>
19 * Library: \b libAliHLTGlobal.so <br>
20 * Input Data Types: <br>
21 * Output Data Types: <br>
23 * <h2>Mandatory arguments:</h2>
24 * <!-- NOTE: ignore the \li. <i> and </i>: it's just doxygen formatting -->
26 * <h2>Optional arguments:</h2>
27 * <!-- NOTE: ignore the \li. <i> and </i>: it's just doxygen formatting -->
29 * <h2>Configuration:</h2>
30 * <!-- NOTE: ignore the \li. <i> and </i>: it's just doxygen formatting -->
31 * Configuration by component arguments.
33 * <h2>Default CDB entries:</h2>
35 * <h2>Performance:</h2>
36 * The component does not process any event data.
38 * <h2>Memory consumption:</h2>
39 * The component does not process any event data.
41 * @ingroup alihlt_global_components
44 #ifndef ALIHLTGLOBALTRACKRESIDUALSCOMPONENT_H
45 #define ALIHLTGLOBALTRACKRESIDUALSCOMPONENT_H
52 #include "AliHLTProcessor.h"
54 class AliHLTTPCSpacePointData;
55 class AliHLTGlobalBarrelTrack;
57 class AliHLTGlobalTrackResidualsComponent : public AliHLTProcessor {
64 /** default constructor */
65 AliHLTGlobalTrackResidualsComponent();
67 //Overriders. These functions are required for the registration process
68 /** Component's id - "name" - "GlobalTrackResiduals" */
69 const char* GetComponentID();
70 /** Types of input data blocks */
71 void GetInputDataTypes(AliHLTComponentDataTypeList& list);
72 /** The type of output data */
73 AliHLTComponentDataType GetOutputDataType();
74 /** Types of output data */
75 int GetOutputDataTypes(AliHLTComponentDataTypeList& tgtList);
76 /** Approximate size of output */
77 virtual void GetOutputDataSize(unsigned long& constBase, double& inputMultiplier);
78 /** "Virtual constructor" to create a component */
79 AliHLTComponent* Spawn();
83 //Overriders. Do component's work.
84 /** Reset histograms */
85 int DoInit(int argc, const char** argv);
86 /** Do nothing at the moment */
88 /** Process input - clusters and global barrel tracks */
89 int DoEvent(const AliHLTComponentEventData& evtData, AliHLTComponentTriggerData& trigData);
90 /** Supress warning from compiler about the hidden name */
91 using AliHLTProcessor::DoEvent;
95 /** Read input data, find residuals, fill histgrams */
97 /** Read input data, extract clusters */
98 void ReadClusterBlocks();
99 /** Extract hits' Xs for the track, sort them. */
100 void SortHitsX(const AliHLTGlobalBarrelTrack& gt);
101 /** Find residuals and fill histograms */
102 void FillResiduals(const AliHLTGlobalBarrelTrack& gt);
103 /** Clean fClustersArray and fNSpacePoints */
104 void CleanClusters();
105 /** Reset histograms - ranges, bins */
106 void ResetHistograms();
111 std::vector<std::pair<Float_t, UInt_t> > fSortedX; //! Hits, sorted along X
112 const AliHLTTPCSpacePointData* fClustersArray[36][6]; //! Clusters for event.
113 UInt_t fNSpacePoints[36][6]; //! Number of points in a cluster for event.
115 /** Non-copyable class */
116 AliHLTGlobalTrackResidualsComponent(const AliHLTGlobalTrackResidualsComponent& rhs);
117 /** Non-copyable class */
118 AliHLTGlobalTrackResidualsComponent& operator = (const AliHLTGlobalTrackResidualsComponent& rhs);
120 ClassDef(AliHLTGlobalTrackResidualsComponent, 0);//Component to calculate residuals.