]> git.uio.no Git - u/mrichter/AliRoot.git/blame - HLT/PHOS/AliHLTPHOSPhysicsAnalyzer.h
Components for selective readout of the DDL blocks
[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;
a20d23f9 43class AliHLTPHOSRecPointContainerStruct;
91b95d47 44
45const Float_t kCRYSTAL_SIZE = 2.25;
2410262d 46
2374af72 47/**
48 * @class AliHLTPHOSPhysicsAnalyzer
49 * Base class for physics analysis for PHOS in HLT
50 * @ingroup alihlt_phos
51 */
52
2410262d 53class AliHLTPHOSPhysicsAnalyzer
91b95d47 54{
2410262d 55 public:
2374af72 56
57 /** Constructor */
2410262d 58 AliHLTPHOSPhysicsAnalyzer();
2374af72 59
60 /** Destructor */
2410262d 61 virtual ~AliHLTPHOSPhysicsAnalyzer();
62
2374af72 63 /*
2410262d 64 AliHLTPHOSPhysicsAnalyzer(const AliHLTPHOSPhysicsAnalyzer & );
65 AliHLTPHOSPhysicsAnalyzer & operator = (const AliHLTPHOSPhysicsAnalyzer &) {return *this;}
2374af72 66 */
67
2410262d 68
69 void SetHistogram(TH1F* histPtr) {fRootHistPtr = histPtr;}
70
2374af72 71 /**
72 * Get the local position of a reconstruction point in the PHOS module
73 * @param recPointPtr is a pointer to the reconstruction point
74 * @param locPositionPtr is a pointer to the array of local coordinates
75 */
76 void LocalPosition(AliHLTPHOSRecPointDataStruct* recPointPtr, Float_t* locPositionPtr);
77
78
79 /**
80 * Get the global position of a reconstruction point in ALICE
81 * @param recPointPtr is a pointer to the reconstruction point
82 * @param locPositionPtr is a pointer to the array where to fill the coord
83 */
84 void GlobalPosition(AliHLTPHOSRecPointDataStruct* recPointPtr, Float_t* positionPtr);
85
86 /**
87 * Get the global position of local coordinates in ALICE
88 * @param locPositionPtr is a pointer to the array of local coordinates
89 * @param positionPtr is a pointer to the array of global coordinates
90 * @param module is the module number (0 - 4)
91 */
2410262d 92 void GlobalPosition(Float_t* locPositionPtr , Float_t* positionPtr, Int_t module);
93
94 virtual void WriteHistogram(Char_t* fileName = "histogram.root");
2374af72 95
96 /**
97 * Abstract function, for doing analysis
98 * @param recPointsPtr is an array of pointers to recPoints
99 * @param nRecPoints is the numbers of recPoints
100 */
a20d23f9 101 virtual void Analyze(AliHLTPHOSRecPointContainerStruct* recPointsArrayPtr, Int_t nRecPoints) = 0;
2410262d 102
103 protected:
2374af72 104
105 /** Pointer to the clusters to be analyzed */
106 TObjArray* fRecPointsPtr; //! transient
107
108 /** Pointer to the histograms which is to be filled */
109 TH1F* fRootHistPtr; //! transient
2410262d 110
111 private:
2374af72 112
113 /** Parameters for calculating global position */
114 Float_t fRotParametersCos[5];
115
116 /** Parameters for calculating global position */
117 Float_t fRotParametersSin[5];
118
119 /** Distance from the IP to the crystals */
120 Float_t fPHOSRadius;
2410262d 121
122 ClassDef(AliHLTPHOSPhysicsAnalyzer,1);
123};
124
125#endif