]> git.uio.no Git - u/mrichter/AliRoot.git/blob - HLT/PHOS/AliHLTPHOSMIPCounter.h
e026b78c250df542286843bea23ee293b3574ac8
[u/mrichter/AliRoot.git] / HLT / PHOS / AliHLTPHOSMIPCounter.h
1
2  /**************************************************************************
3  * This file is property of and copyright by the ALICE HLT Project        *
4  * All rights reserved.                                                   *
5  *                                                                        *
6  * Primary Authors: Oystein Djuvsland                                     *
7  *                                                                        *
8  * Permission to use, copy, modify and distribute this software and its   *
9  * documentation strictly for non-commercial purposes is hereby granted   *
10  * without fee, provided that the above copyright notice appears in all   *
11  * copies and that both the copyright notice and this permission notice   *
12  * appear in the supporting documentation. The authors make no claims     *
13  * about the suitability of this software for any purpose. It is          *
14  * provided "as is" without express or implied warranty.                  *
15  **************************************************************************/
16
17 #ifndef ALIHLTPHOSMIPCOUNTER_H
18 #define ALIHLTPHOSMIPCOUNTER_H
19
20 #include "AliHLTPHOSBase.h"
21
22 class AliHLTPHOSDigitContainerDataStruct;
23 class TH2I;
24
25 /**
26  @author Ã˜ystein Djuvsland <oystein.djuvsland@gmail.com>
27 */
28
29 class AliHLTPHOSMIPCounter : public AliHLTPHOSBase
30   {
31     public:
32       /**
33        * Default constructor
34        */
35       AliHLTPHOSMIPCounter();
36       
37       /**
38        * Default destructor
39        */
40       ~AliHLTPHOSMIPCounter();
41
42       /**
43        * This functions counts the number of approved MIP hits in one digit container
44        * @param digitContainer ContainerStruct for digits
45        * @return Number of approved MIP hits
46        */
47       Int_t CountMIPs(AliHLTPHOSDigitContainerDataStruct* digitContainer);
48
49   
50       /**
51        * Sets the upper bound of the amplitude accepted for a MIP
52        * @param val Upper bound value
53        */
54       void SetUpperBound ( const Float_t& val ) { fUpperBound = val; }
55       
56       /**
57        * Gets the upper bound of the amplitude accepted for a MIP
58        * @return Upper bound value
59        */
60       Float_t GetUpperBound() const { return fUpperBound; }
61       
62       /**
63        * Sets the lower bound of the amplitude accepted for a MIP
64        * @param val lower bound value
65        */
66       void SetLowerBound ( const Float_t& val ) { fLowerBound = val; }
67       
68       /**
69        * Gets the lower bound of the amplitude accepted for a MIP
70        * @return Lower bound value
71        */
72       Float_t GetLowerBound() const { return fLowerBound; }
73       
74       /**
75        * Sets the upper bound for the start time of the signal, i.e. where the
76        * baseline shouldn't be zero anymore
77        * @param val Upper start time
78        */
79       void SetUpperStartTime ( const Float_t& val ) { fUpperStartTime = val; }
80       
81       /**
82        * Sets the upper bound for the start time of the signal, i.e. where the 
83        * baseline shouldn't be zero anymore
84        * @return Upper start time
85        */
86       Float_t GetUpperStartTime() const { return fUpperStartTime; }
87       
88       /**
89        * Sets the lower bound for the start time of the signal, i.e. where the 
90        * baseline shouldn't be zero anymore
91        * @param val Lower start time
92       */
93       void SetLowerStartTime ( const Float_t& val ) { fLowerStartTime = val; }
94       
95       /**
96        * Gets the lower bound for the start time of the signal, i.e. where the 
97        * baseline shouldn't be zero anymore
98        * @return Lower start time
99        */
100       Float_t GetLowerStartTime() const { return fLowerStartTime; }
101       
102       /**
103        * Sets the threshold for what is zero when checking the baseline
104        * @param val Zero threshold
105        */
106       void SetZeroThreshold ( const Float_t& val ) { fZeroThreshold = val; } 
107       
108       /**
109        * Gets the threshold for what is zero when checking the baseline
110        * @return Zero threshold
111        */
112       Float_t GetZeroThreshold() const { return fZeroThreshold; }
113       
114       /**
115        * Get the total count of MIPs which the MIP counter has seen
116        * @return Total count of MIPs
117        */
118       Int_t GetMIPCountTotal() const { return fMIPCountTotal; }
119       
120       /**
121        * Get the total count of MIPs in the last event
122        * @return Total count of MIPs in last event
123        */
124       Int_t GetMIPCountEvent() const { return fMIPCountEvent; }
125       
126       /**
127        * Sets a pointer to the TH2I histogram of channels with MIP hits
128        * @param hist Pointer to the histogram
129        */
130       void SetChannelHistogram(TH2I *hist) { fChannelHistPtr = hist; }
131       
132       /**
133        * Get the pointer to the TH2I histogram of channels with MIP hits
134        * @return Pointer to the histogram
135        */
136       TH2I* GetChannelHistogram() { return fChannelHistPtr; }
137       
138
139     private:
140     Int_t fMIPCountEvent; //comment
141       Int_t fMIPCountTotal;  //comment
142       Float_t fMIPRate; //comment
143       Float_t fLowerBound; //comment
144       Float_t fUpperBound; //comment 
145       Float_t fUpperStartTime; //comment
146       Float_t fLowerStartTime; //comment
147       Float_t fZeroThreshold; //comment
148       TH2I *fChannelHistPtr; //comment
149   };
150
151 #endif