2 /**************************************************************************
3 * This file is property of and copyright by the ALICE HLT Project *
4 * All rights reserved. *
6 * Primary Authors: Oystein Djuvsland *
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 **************************************************************************/
17 #ifndef ALIHLTPHOSMIPCOUNTER_H
18 #define ALIHLTPHOSMIPCOUNTER_H
20 #include "AliHLTPHOSBase.h"
22 class AliHLTPHOSDigitContainerDataStruct;
26 @author Øystein Djuvsland <oystein.djuvsland@gmail.com>
29 class AliHLTPHOSMIPCounter : public AliHLTPHOSBase
35 AliHLTPHOSMIPCounter();
40 ~AliHLTPHOSMIPCounter();
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
47 Int_t CountMIPs(AliHLTPHOSDigitContainerDataStruct* digitContainer);
51 * Sets the upper bound of the amplitude accepted for a MIP
52 * @param val Upper bound value
54 void SetUpperBound ( const Float_t& val ) { fUpperBound = val; }
57 * Gets the upper bound of the amplitude accepted for a MIP
58 * @return Upper bound value
60 Float_t GetUpperBound() const { return fUpperBound; }
63 * Sets the lower bound of the amplitude accepted for a MIP
64 * @param val lower bound value
66 void SetLowerBound ( const Float_t& val ) { fLowerBound = val; }
69 * Gets the lower bound of the amplitude accepted for a MIP
70 * @return Lower bound value
72 Float_t GetLowerBound() const { return fLowerBound; }
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
79 void SetUpperStartTime ( const Float_t& val ) { fUpperStartTime = val; }
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
86 Float_t GetUpperStartTime() const { return fUpperStartTime; }
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
93 void SetLowerStartTime ( const Float_t& val ) { fLowerStartTime = val; }
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
100 Float_t GetLowerStartTime() const { return fLowerStartTime; }
103 * Sets the threshold for what is zero when checking the baseline
104 * @param val Zero threshold
106 void SetZeroThreshold ( const Float_t& val ) { fZeroThreshold = val; }
109 * Gets the threshold for what is zero when checking the baseline
110 * @return Zero threshold
112 Float_t GetZeroThreshold() const { return fZeroThreshold; }
115 * Get the total count of MIPs which the MIP counter has seen
116 * @return Total count of MIPs
118 Int_t GetMIPCountTotal() const { return fMIPCountTotal; }
121 * Get the total count of MIPs in the last event
122 * @return Total count of MIPs in last event
124 Int_t GetMIPCountEvent() const { return fMIPCountEvent; }
127 * Sets a pointer to the TH2I histogram of channels with MIP hits
128 * @param hist Pointer to the histogram
130 void SetChannelHistogram(TH2I *hist) { fChannelHistPtr = hist; }
133 * Get the pointer to the TH2I histogram of channels with MIP hits
134 * @return Pointer to the histogram
136 TH2I* GetChannelHistogram() { return fChannelHistPtr; }
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