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