]> git.uio.no Git - u/mrichter/AliRoot.git/blob - HLT/PHOS/AliHLTPHOSPhysicsAnalyzer.h
Fixing comments
[u/mrichter/AliRoot.git] / HLT / PHOS / AliHLTPHOSPhysicsAnalyzer.h
1 //-*- Mode: C++ -*-
2 // $Id$
3
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  **************************************************************************/
18
19 #ifndef ALIHLTPHOSPHYSICSANALYZER_H
20 #define ALIHLTPHOSPHYSICSANALYZER_H
21
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
37
38 #include "Rtypes.h"
39 #include "AliHLTPHOSConstant.h"
40
41 using namespace PhosHLTConst;
42
43 class TObjArray;
44 class TH1F;
45 class AliHLTPHOSRecPointDataStruct;
46 class AliHLTPHOSRecPointContainerStruct;
47
48 const Float_t kCRYSTALSIZE = 2.25;
49
50 /**
51  * @class AliHLTPHOSPhysicsAnalyzer
52  * Base class for physics analysis for PHOS in HLT
53  * @ingroup alihlt_phos
54  */
55
56 class AliHLTPHOSPhysicsAnalyzer
57
58  public:
59
60   /** Constructor */
61   AliHLTPHOSPhysicsAnalyzer();
62
63   /** Destructor */
64   virtual ~AliHLTPHOSPhysicsAnalyzer();
65
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   
82   void SetHistogram(TH1F* histPtr) {fRootHistPtr = histPtr;}
83
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
95    * @param positionPtr is a pointer to the array where to fill the coord
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    */
105   void GlobalPosition(Float_t* locPositionPtr , Float_t* positionPtr, Int_t module);
106
107   virtual void WriteHistogram(const Char_t* fileName = "histogram.root");
108
109   /** 
110    * Abstract function, for doing analysis
111    * @param recPointsArrayPtr is an array of pointers to recPoints
112    * @param nRecPoints is the numbers of recPoints
113    */
114   virtual void Analyze(AliHLTPHOSRecPointContainerStruct* recPointsArrayPtr, Int_t nRecPoints);
115
116  protected:
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 
123
124  private:
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;                                
134
135   ClassDef(AliHLTPHOSPhysicsAnalyzer,1);
136 };
137
138 #endif