]> git.uio.no Git - u/mrichter/AliRoot.git/blame - HLT/global/AliHLTGlobalTrackResidualsComponent.h
FindFASTJET
[u/mrichter/AliRoot.git] / HLT / global / AliHLTGlobalTrackResidualsComponent.h
CommitLineData
52c31c26 1// -*- Mode: C++ -*-
2// $Id$
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 AliHLTGlobalTrackResidualsComponent.h
8/// @author Timur Pocheptsov
9/// @date
10/// @brief A histogramming component for plotting the Y and Z track residuals
11///
12
13/**
14 * @class AliHLTGlobalTrackResidualsComponent
15 *
16 * <h2>General properties:</h2>
17 *
18 * Component ID: \b GlobalTrackResiduals <br>
19 * Library: \b libAliHLTGlobal.so <br>
20 * Input Data Types: <br>
21 * Output Data Types: <br>
22 *
23 * <h2>Mandatory arguments:</h2>
24 * <!-- NOTE: ignore the \li. <i> and </i>: it's just doxygen formatting -->
25 *
26 * <h2>Optional arguments:</h2>
27 * <!-- NOTE: ignore the \li. <i> and </i>: it's just doxygen formatting -->
28 *
29 * <h2>Configuration:</h2>
30 * <!-- NOTE: ignore the \li. <i> and </i>: it's just doxygen formatting -->
31 * Configuration by component arguments.
32 *
33 * <h2>Default CDB entries:</h2>
34 *
35 * <h2>Performance:</h2>
36 * The component does not process any event data.
37 *
38 * <h2>Memory consumption:</h2>
39 * The component does not process any event data.
40 *
41 * @ingroup alihlt_global_components
42 */
43
44#ifndef ALIHLTGLOBALTRACKRESIDUALSCOMPONENT_H
45#define ALIHLTGLOBALTRACKRESIDUALSCOMPONENT_H
46
47#include <utility>
48#include <vector>
49
50#include <TH1F.h>
51
52#include "AliHLTProcessor.h"
53
1cc7250e 54struct AliHLTTPCSpacePointData;
52c31c26 55class AliHLTGlobalBarrelTrack;
56
57class AliHLTGlobalTrackResidualsComponent : public AliHLTProcessor {
58private:
59 enum EDefaults {
60 kNBins = 100
61 };
62
63public:
64 /** default constructor */
65 AliHLTGlobalTrackResidualsComponent();
66
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();
80
81protected:
82
83 //Overriders. Do component's work.
84 /** Reset histograms */
85 int DoInit(int argc, const char** argv);
86 /** Do nothing at the moment */
87 int DoDeinit();
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;
92
93private:
94
95 /** Read input data, find residuals, fill histgrams */
96 void ProcessBlocks();
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();
107
108 TH1F fResY;
109 TH1F fResZ;
110
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.
114
115 /** Non-copyable class */
116 AliHLTGlobalTrackResidualsComponent(const AliHLTGlobalTrackResidualsComponent& rhs);
117 /** Non-copyable class */
118 AliHLTGlobalTrackResidualsComponent& operator = (const AliHLTGlobalTrackResidualsComponent& rhs);
119
120 ClassDef(AliHLTGlobalTrackResidualsComponent, 0);//Component to calculate residuals.
121};
122
123#endif