@@ -133,49 +133,9 @@ void TRestRawSignalChannelActivityProcess::Initialize() {
133133// / is found in the processing chain.
134134// /
135135void TRestRawSignalChannelActivityProcess::InitProcess () {
136- #ifdef REST_DetectorLib
137- fReadout = GetMetadata<TRestDetectorReadout>();
138-
139- RESTDebug << " TRestRawSignalChannelActivityProcess::InitProcess. Readout pointer : " << fReadout
140- << RESTendl;
141- if (GetVerboseLevel () >= TRestStringOutput::REST_Verbose_Level::REST_Info && fReadout )
142- fReadout ->PrintMetadata ();
143- #endif
144-
145136 if (!fReadOnly ) {
146137 fDaqChannelsHisto = new TH1D (" daqChannelActivityRaw" , " daqChannelActivityRaw" , fDaqChannels ,
147138 fDaqStartChannel , fDaqEndChannel );
148-
149- #ifdef REST_DetectorLib
150- if (fReadout ) {
151- fReadoutChannelsHisto = new TH1D (" rChannelActivityRaw" , " readoutChannelActivity" ,
152- fReadoutChannels , fReadoutStartChannel , fReadoutEndChannel );
153- fReadoutChannelsHisto_OneSignal =
154- new TH1D (" rChannelActivityRaw_1" , " readoutChannelActivity" , fReadoutChannels ,
155- fReadoutStartChannel , fReadoutEndChannel );
156- fReadoutChannelsHisto_OneSignal_High =
157- new TH1D (" rChannelActivityRaw_1H" , " readoutChannelActivity" , fReadoutChannels ,
158- fReadoutStartChannel , fReadoutEndChannel );
159- fReadoutChannelsHisto_TwoSignals =
160- new TH1D (" rChannelActivityRaw_2" , " readoutChannelActivity" , fReadoutChannels ,
161- fReadoutStartChannel , fReadoutEndChannel );
162- fReadoutChannelsHisto_TwoSignals_High =
163- new TH1D (" rChannelActivityRaw_2H" , " readoutChannelActivity" , fReadoutChannels ,
164- fReadoutStartChannel , fReadoutEndChannel );
165- fReadoutChannelsHisto_ThreeSignals =
166- new TH1D (" rChannelActivityRaw_3" , " readoutChannelActivity" , fReadoutChannels ,
167- fReadoutStartChannel , fReadoutEndChannel );
168- fReadoutChannelsHisto_ThreeSignals_High =
169- new TH1D (" rChannelActivityRaw_3H" , " readoutChannelActivity" , fReadoutChannels ,
170- fReadoutStartChannel , fReadoutEndChannel );
171- fReadoutChannelsHisto_MultiSignals =
172- new TH1D (" rChannelActivityRaw_M" , " readoutChannelActivity" , fReadoutChannels ,
173- fReadoutStartChannel , fReadoutEndChannel );
174- fReadoutChannelsHisto_MultiSignals_High =
175- new TH1D (" rChannelActivityRaw_MH" , " readoutChannelActivity" , fReadoutChannels ,
176- fReadoutStartChannel , fReadoutEndChannel );
177- }
178- #endif
179139 }
180140}
181141
@@ -194,33 +154,7 @@ TRestEvent* TRestRawSignalChannelActivityProcess::ProcessEvent(TRestEvent* input
194154 }
195155
196156 for (int s = 0 ; s < fSignalEvent ->GetNumberOfSignals (); s++) {
197- // Adding signal to the channel activity histogram
198- #ifdef REST_DetectorLib
199- TRestRawSignal* sgnl = fSignalEvent ->GetSignal (s);
200- if (!fReadOnly && fReadout ) {
201- Int_t signalID = fSignalEvent ->GetSignal (s)->GetID ();
202-
203- Int_t p, m, readoutChannel;
204- fReadout ->GetPlaneModuleChannel (signalID, p, m, readoutChannel);
205-
206- fReadoutChannelsHisto ->Fill (readoutChannel);
207-
208- if (sgnl->GetMaxValue () > fLowThreshold ) {
209- if (Nlow == 1 ) fReadoutChannelsHisto_OneSignal ->Fill (readoutChannel);
210- if (Nlow == 2 ) fReadoutChannelsHisto_TwoSignals ->Fill (readoutChannel);
211- if (Nlow == 3 ) fReadoutChannelsHisto_ThreeSignals ->Fill (readoutChannel);
212- if (Nlow > 3 && Nlow < 10 ) fReadoutChannelsHisto_MultiSignals ->Fill (readoutChannel);
213- }
214-
215- if (sgnl->GetMaxValue () > fHighThreshold ) {
216- if (Nhigh == 1 ) fReadoutChannelsHisto_OneSignal_High ->Fill (readoutChannel);
217- if (Nhigh == 2 ) fReadoutChannelsHisto_TwoSignals_High ->Fill (readoutChannel);
218- if (Nhigh == 3 ) fReadoutChannelsHisto_ThreeSignals_High ->Fill (readoutChannel);
219- if (Nhigh > 3 && Nhigh < 10 ) fReadoutChannelsHisto_MultiSignals_High ->Fill (readoutChannel);
220- }
221- }
222- #endif
223-
157+ // Adding signal to the channel activity histogram
224158 if (!fReadOnly ) {
225159 Int_t daqChannel = fSignalEvent ->GetSignal (s)->GetID ();
226160 fDaqChannelsHisto ->Fill (daqChannel);
@@ -241,20 +175,5 @@ TRestEvent* TRestRawSignalChannelActivityProcess::ProcessEvent(TRestEvent* input
241175void TRestRawSignalChannelActivityProcess::EndProcess () {
242176 if (!fReadOnly ) {
243177 fDaqChannelsHisto ->Write ();
244- #ifdef REST_DetectorLib
245- if (fReadout ) {
246- fReadoutChannelsHisto ->Write ();
247-
248- fReadoutChannelsHisto_OneSignal ->Write ();
249- fReadoutChannelsHisto_TwoSignals ->Write ();
250- fReadoutChannelsHisto_ThreeSignals ->Write ();
251- fReadoutChannelsHisto_MultiSignals ->Write ();
252-
253- fReadoutChannelsHisto_OneSignal_High ->Write ();
254- fReadoutChannelsHisto_TwoSignals_High ->Write ();
255- fReadoutChannelsHisto_ThreeSignals_High ->Write ();
256- fReadoutChannelsHisto_MultiSignals_High ->Write ();
257- }
258- #endif
259178 }
260179}
0 commit comments