4 /**************************************************************************
5 * This file is property of and copyright by the ALICE HLT Project *
6 * All rights reserved. *
8 * Primary Authors: Oystein Djuvsland *
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 **************************************************************************/
19 #ifndef ALIHLTPHOSPHYSICSANALYZER_H
20 #define ALIHLTPHOSPHYSICSANALYZER_H
23 * Class is intended to be a base class for physics analysis for
26 * @file AliHLTPHOSPhysicsAnalyzer.h
27 * @author Oystein Djuvsland
29 * @brief Physics analysis base class
32 // see below for class documentation
34 // refer to README to build package
36 // visit http://web.ift.uib.no/~kjeks/doc/alice-hlt
39 #include "AliHLTPHOSConstants.h"
41 using namespace PhosHLTConst;
45 class AliHLTPHOSRecPointDataStruct;
46 class AliHLTPHOSRecPointContainerStruct;
48 const Float_t kCRYSTAL_SIZE = 2.25;
51 * @class AliHLTPHOSPhysicsAnalyzer
52 * Base class for physics analysis for PHOS in HLT
53 * @ingroup alihlt_phos
56 class AliHLTPHOSPhysicsAnalyzer
61 AliHLTPHOSPhysicsAnalyzer();
64 virtual ~AliHLTPHOSPhysicsAnalyzer();
66 /** Copy constructor */
67 AliHLTPHOSPhysicsAnalyzer(const AliHLTPHOSPhysicsAnalyzer &):
72 //Copy constructor not implemented
76 AliHLTPHOSPhysicsAnalyzer & operator = (const AliHLTPHOSPhysicsAnalyzer &)
82 void SetHistogram(TH1F* histPtr) {fRootHistPtr = histPtr;}
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
89 void LocalPosition(AliHLTPHOSRecPointDataStruct* recPointPtr, Float_t* locPositionPtr);
93 * Get the global position of a reconstruction point in ALICE
94 * @param recPointPtr is a pointer to the reconstruction point
95 * @param positionPtr is a pointer to the array where to fill the coord
97 void GlobalPosition(AliHLTPHOSRecPointDataStruct* recPointPtr, Float_t* positionPtr);
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)
105 void GlobalPosition(Float_t* locPositionPtr , Float_t* positionPtr, Int_t module);
107 virtual void WriteHistogram(const Char_t* fileName = "histogram.root");
110 * Abstract function, for doing analysis
111 * @param recPointsArrayPtr is an array of pointers to recPoints
112 * @param nRecPoints is the numbers of recPoints
114 virtual void Analyze(AliHLTPHOSRecPointContainerStruct* recPointsArrayPtr, Int_t nRecPoints);
118 /** Pointer to the clusters to be analyzed */
119 TObjArray* fRecPointsPtr; //! transient
121 /** Pointer to the histograms which is to be filled */
122 TH1F* fRootHistPtr; //! transient
126 /** Parameters for calculating global position */
127 Float_t fRotParametersCos[5];
129 /** Parameters for calculating global position */
130 Float_t fRotParametersSin[5];
132 /** Distance from the IP to the crystals */
135 ClassDef(AliHLTPHOSPhysicsAnalyzer,1);