]>
Commit | Line | Data |
---|---|---|
1b41ab20 | 1 | //-*- Mode: C++ -*- |
2 | // $Id$ | |
3 | ||
2374af72 | 4 | /************************************************************************** |
5 | * This file is property of and copyright by the ALICE HLT Project * | |
6 | * All rights reserved. * | |
7 | * * | |
8 | * Primary Authors: Oystein Djuvsland * | |
9 | * * | |
10 | * Permission to use, copy, modify and distribute this software and its * | |
11 | * documentation strictly for non-commercial purposes is hereby granted * | |
12 | * without fee, provided that the above copyright notice appears in all * | |
13 | * copies and that both the copyright notice and this permission notice * | |
14 | * appear in the supporting documentation. The authors make no claims * | |
15 | * about the suitability of this software for any purpose. It is * | |
16 | * provided "as is" without express or implied warranty. * | |
17 | **************************************************************************/ | |
2410262d | 18 | |
19 | #ifndef ALIHLTPHOSPHYSICSANALYZER_H | |
20 | #define ALIHLTPHOSPHYSICSANALYZER_H | |
21 | ||
2374af72 | 22 | /** |
23 | * Class is intended to be a base class for physics analysis for | |
24 | * PHOS in HLT | |
25 | * | |
26 | * @file AliHLTPHOSPhysicsAnalyzer.h | |
27 | * @author Oystein Djuvsland | |
28 | * @date | |
29 | * @brief Physics analysis base class | |
30 | */ | |
31 | ||
32 | // see below for class documentation | |
33 | // or | |
34 | // refer to README to build package | |
35 | // or | |
36 | // visit http://web.ift.uib.no/~kjeks/doc/alice-hlt | |
2410262d | 37 | |
91b95d47 | 38 | #include "Rtypes.h" |
2ef3c547 | 39 | #include "AliHLTPHOSConstants.h" |
2ef3c547 | 40 | |
2374af72 | 41 | using namespace PhosHLTConst; |
2410262d | 42 | |
91b95d47 | 43 | class TObjArray; |
44 | class TH1F; | |
2374af72 | 45 | class AliHLTPHOSRecPointDataStruct; |
a20d23f9 | 46 | class AliHLTPHOSRecPointContainerStruct; |
91b95d47 | 47 | |
27029341 | 48 | const Float_t kCRYSTALSIZE = 2.25; |
2410262d | 49 | |
2374af72 | 50 | /** |
51 | * @class AliHLTPHOSPhysicsAnalyzer | |
52 | * Base class for physics analysis for PHOS in HLT | |
53 | * @ingroup alihlt_phos | |
54 | */ | |
55 | ||
2410262d | 56 | class AliHLTPHOSPhysicsAnalyzer |
91b95d47 | 57 | { |
2410262d | 58 | public: |
2374af72 | 59 | |
60 | /** Constructor */ | |
2410262d | 61 | AliHLTPHOSPhysicsAnalyzer(); |
2374af72 | 62 | |
63 | /** Destructor */ | |
2410262d | 64 | virtual ~AliHLTPHOSPhysicsAnalyzer(); |
65 | ||
25b7f84c | 66 | /** Copy constructor */ |
67 | AliHLTPHOSPhysicsAnalyzer(const AliHLTPHOSPhysicsAnalyzer &): | |
68 | fRecPointsPtr(0), | |
69 | fRootHistPtr(0), | |
70 | fPHOSRadius(0) | |
71 | { | |
72 | //Copy constructor not implemented | |
73 | } | |
74 | ||
75 | /** Assignment */ | |
76 | AliHLTPHOSPhysicsAnalyzer & operator = (const AliHLTPHOSPhysicsAnalyzer &) | |
77 | { | |
78 | //Assignement | |
79 | return *this; | |
80 | } | |
81 | ||
2410262d | 82 | void SetHistogram(TH1F* histPtr) {fRootHistPtr = histPtr;} |
83 | ||
2374af72 | 84 | /** |
85 | * Get the local position of a reconstruction point in the PHOS module | |
86 | * @param recPointPtr is a pointer to the reconstruction point | |
87 | * @param locPositionPtr is a pointer to the array of local coordinates | |
88 | */ | |
89 | void LocalPosition(AliHLTPHOSRecPointDataStruct* recPointPtr, Float_t* locPositionPtr); | |
90 | ||
91 | ||
92 | /** | |
93 | * Get the global position of a reconstruction point in ALICE | |
94 | * @param recPointPtr is a pointer to the reconstruction point | |
18af2efc | 95 | * @param positionPtr is a pointer to the array where to fill the coord |
2374af72 | 96 | */ |
97 | void GlobalPosition(AliHLTPHOSRecPointDataStruct* recPointPtr, Float_t* positionPtr); | |
98 | ||
99 | /** | |
100 | * Get the global position of local coordinates in ALICE | |
101 | * @param locPositionPtr is a pointer to the array of local coordinates | |
102 | * @param positionPtr is a pointer to the array of global coordinates | |
103 | * @param module is the module number (0 - 4) | |
104 | */ | |
2410262d | 105 | void GlobalPosition(Float_t* locPositionPtr , Float_t* positionPtr, Int_t module); |
106 | ||
5d4ed6f4 | 107 | virtual void WriteHistogram(const Char_t* fileName = "histogram.root"); |
2374af72 | 108 | |
109 | /** | |
110 | * Abstract function, for doing analysis | |
18af2efc | 111 | * @param recPointsArrayPtr is an array of pointers to recPoints |
2374af72 | 112 | * @param nRecPoints is the numbers of recPoints |
113 | */ | |
18af2efc | 114 | virtual void Analyze(AliHLTPHOSRecPointContainerStruct* recPointsArrayPtr, Int_t nRecPoints); |
2410262d | 115 | |
116 | protected: | |
2374af72 | 117 | |
118 | /** Pointer to the clusters to be analyzed */ | |
119 | TObjArray* fRecPointsPtr; //! transient | |
120 | ||
121 | /** Pointer to the histograms which is to be filled */ | |
122 | TH1F* fRootHistPtr; //! transient | |
2410262d | 123 | |
124 | private: | |
2374af72 | 125 | |
126 | /** Parameters for calculating global position */ | |
127 | Float_t fRotParametersCos[5]; | |
128 | ||
129 | /** Parameters for calculating global position */ | |
130 | Float_t fRotParametersSin[5]; | |
131 | ||
132 | /** Distance from the IP to the crystals */ | |
133 | Float_t fPHOSRadius; | |
2410262d | 134 | |
135 | ClassDef(AliHLTPHOSPhysicsAnalyzer,1); | |
136 | }; | |
137 | ||
138 | #endif |