]> git.uio.no Git - u/mrichter/AliRoot.git/blame - HLT/PHOS/AliHLTPHOSPhysicsAnalyzer.h
Selectiv readout and writing to FXS (oystein)
[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
25b7f84c 63 /** Copy constructor */
64 AliHLTPHOSPhysicsAnalyzer(const AliHLTPHOSPhysicsAnalyzer &):
65 fRecPointsPtr(0),
66 fRootHistPtr(0),
67 fPHOSRadius(0)
68 {
69 //Copy constructor not implemented
70 }
71
72 /** Assignment */
73 AliHLTPHOSPhysicsAnalyzer & operator = (const AliHLTPHOSPhysicsAnalyzer &)
74 {
75 //Assignement
76 return *this;
77 }
78
2410262d 79 void SetHistogram(TH1F* histPtr) {fRootHistPtr = histPtr;}
80
2374af72 81 /**
82 * Get the local position of a reconstruction point in the PHOS module
83 * @param recPointPtr is a pointer to the reconstruction point
84 * @param locPositionPtr is a pointer to the array of local coordinates
85 */
86 void LocalPosition(AliHLTPHOSRecPointDataStruct* recPointPtr, Float_t* locPositionPtr);
87
88
89 /**
90 * Get the global position of a reconstruction point in ALICE
91 * @param recPointPtr is a pointer to the reconstruction point
92 * @param locPositionPtr is a pointer to the array where to fill the coord
93 */
94 void GlobalPosition(AliHLTPHOSRecPointDataStruct* recPointPtr, Float_t* positionPtr);
95
96 /**
97 * Get the global position of local coordinates in ALICE
98 * @param locPositionPtr is a pointer to the array of local coordinates
99 * @param positionPtr is a pointer to the array of global coordinates
100 * @param module is the module number (0 - 4)
101 */
2410262d 102 void GlobalPosition(Float_t* locPositionPtr , Float_t* positionPtr, Int_t module);
103
104 virtual void WriteHistogram(Char_t* fileName = "histogram.root");
2374af72 105
106 /**
107 * Abstract function, for doing analysis
108 * @param recPointsPtr is an array of pointers to recPoints
109 * @param nRecPoints is the numbers of recPoints
110 */
a20d23f9 111 virtual void Analyze(AliHLTPHOSRecPointContainerStruct* recPointsArrayPtr, Int_t nRecPoints) = 0;
2410262d 112
113 protected:
2374af72 114
115 /** Pointer to the clusters to be analyzed */
116 TObjArray* fRecPointsPtr; //! transient
117
118 /** Pointer to the histograms which is to be filled */
119 TH1F* fRootHistPtr; //! transient
2410262d 120
121 private:
2374af72 122
123 /** Parameters for calculating global position */
124 Float_t fRotParametersCos[5];
125
126 /** Parameters for calculating global position */
127 Float_t fRotParametersSin[5];
128
129 /** Distance from the IP to the crystals */
130 Float_t fPHOSRadius;
2410262d 131
132 ClassDef(AliHLTPHOSPhysicsAnalyzer,1);
133};
134
135#endif