| 1 | #include <iostream> | 
|---|
| 2 | #include "TObjArray.h" | 
|---|
| 3 | #include "TCanvas.h" | 
|---|
| 4 |  | 
|---|
| 5 | #include "rootfilehandler.h" | 
|---|
| 6 | #include "pixel.h" // class implemented | 
|---|
| 7 | using namespace std; | 
|---|
| 8 |  | 
|---|
| 9 | /////////////////////////////// PUBLIC /////////////////////////////////////// | 
|---|
| 10 |  | 
|---|
| 11 | //============================= LIFECYCLE ==================================== | 
|---|
| 12 |  | 
|---|
| 13 | //Pixel::Pixel(int pixelID) | 
|---|
| 14 | //{ | 
|---|
| 15 | //    Chid                                = pixelID; | 
|---|
| 16 | //    max_puslse_order                    = 1; | 
|---|
| 17 | //    hMaxOverlay                       = NULL; | 
|---|
| 18 | //    hEdgeOverlay                   = NULL; | 
|---|
| 19 | //    hMaxProfile                       = NULL; | 
|---|
| 20 | //    hEdgeProfile                      = NULL; | 
|---|
| 21 | //    hList                               = NULL; | 
|---|
| 22 |  | 
|---|
| 23 | //} | 
|---|
| 24 |  | 
|---|
| 25 | Pixel::Pixel( | 
|---|
| 26 | int         pixelID, | 
|---|
| 27 | int         maxPulsorder, | 
|---|
| 28 | int         verbosityLevel, | 
|---|
| 29 | int         pixelOverlayXaxisLeft, | 
|---|
| 30 | int         pixelOverlayXaxisRight, | 
|---|
| 31 | int         bSLMean, | 
|---|
| 32 | int         gainMean, | 
|---|
| 33 | TString     options | 
|---|
| 34 | ) | 
|---|
| 35 | { | 
|---|
| 36 | mChid                   = pixelID; | 
|---|
| 37 | mMaxPulseOrder          = maxPulsorder; | 
|---|
| 38 | mVerbosityLevel         = verbosityLevel; | 
|---|
| 39 | mOptions                = options; | 
|---|
| 40 | mPixelOverlayXaxisLeft  = pixelOverlayXaxisLeft; | 
|---|
| 41 | mPixelOverlayXaxisRight = pixelOverlayXaxisRight; | 
|---|
| 42 | mBSLMean                = bSLMean; | 
|---|
| 43 | mGainMean               = gainMean; | 
|---|
| 44 |  | 
|---|
| 45 | hMaxOverlay  = new TH2F*[mMaxPulseOrder]; | 
|---|
| 46 | hEdgeOverlay = new TH2F*[mMaxPulseOrder]; | 
|---|
| 47 | hMaxProfile  = new TProfile*[mMaxPulseOrder]; | 
|---|
| 48 | hEdgeProfile = new TProfile*[mMaxPulseOrder]; | 
|---|
| 49 |  | 
|---|
| 50 | if (mOptions.Contains("S") ) | 
|---|
| 51 | { | 
|---|
| 52 | hSlopeRisingEdge = new TH1F*[mMaxPulseOrder]; | 
|---|
| 53 | } | 
|---|
| 54 |  | 
|---|
| 55 | if (mOptions.Contains("R") ) | 
|---|
| 56 | { | 
|---|
| 57 | hRisingEdgeToMax = new TH1F*[mMaxPulseOrder]; | 
|---|
| 58 | } | 
|---|
| 59 |  | 
|---|
| 60 | if (mOptions.Contains("P") ) | 
|---|
| 61 | { | 
|---|
| 62 | hPosOfMax = new TH1F*[mMaxPulseOrder]; | 
|---|
| 63 | } | 
|---|
| 64 |  | 
|---|
| 65 | hList           = new TObjArray; | 
|---|
| 66 |  | 
|---|
| 67 | BookPixelHistos(); | 
|---|
| 68 | BookDistributionHistos(); | 
|---|
| 69 | } | 
|---|
| 70 |  | 
|---|
| 71 | Pixel::~Pixel() | 
|---|
| 72 | { | 
|---|
| 73 | if (mVerbosityLevel > 1) cout << endl << "...delete histograms of pixel " << mChid ; | 
|---|
| 74 |  | 
|---|
| 75 | DeletePixelHistos(); | 
|---|
| 76 | DeleteDistributionHistos(); | 
|---|
| 77 |  | 
|---|
| 78 | delete hList; | 
|---|
| 79 | hList = NULL; | 
|---|
| 80 |  | 
|---|
| 81 | }// ~Pixel | 
|---|
| 82 |  | 
|---|
| 83 |  | 
|---|
| 84 | //============================= OPERATORS ==================================== | 
|---|
| 85 |  | 
|---|
| 86 | //XX& | 
|---|
| 87 | //XX::operator=(const XX&); | 
|---|
| 88 | //{ | 
|---|
| 89 | //    return *this; | 
|---|
| 90 |  | 
|---|
| 91 | //}// = | 
|---|
| 92 |  | 
|---|
| 93 | //============================= OPERATIONS =================================== | 
|---|
| 94 | void | 
|---|
| 95 | Pixel::BookPixelHistos() | 
|---|
| 96 | { | 
|---|
| 97 | if (mVerbosityLevel > 2) cout << endl << "...book pixel histograms" << endl; | 
|---|
| 98 | TString histo_name; | 
|---|
| 99 |  | 
|---|
| 100 | for (int order = 0; order < mMaxPulseOrder; order++) | 
|---|
| 101 | { | 
|---|
| 102 | histo_name =    "hMaxOverlay"; | 
|---|
| 103 | histo_name +=   mChid; | 
|---|
| 104 | histo_name +=   "_"; | 
|---|
| 105 | histo_name +=   order; | 
|---|
| 106 | if (mVerbosityLevel > 3) cout << "\t...booking " << histo_name << endl; | 
|---|
| 107 | hMaxOverlay[order]=new TH2F( | 
|---|
| 108 | histo_name, | 
|---|
| 109 | "Overlay of detected pulses of one pulse order for one Pixel", | 
|---|
| 110 | mPixelOverlayXaxisLeft + mPixelOverlayXaxisRight , | 
|---|
| 111 | (-1*mPixelOverlayXaxisLeft)-0.5, | 
|---|
| 112 | mPixelOverlayXaxisRight-0.5 , | 
|---|
| 113 | 512, | 
|---|
| 114 | -55.5, | 
|---|
| 115 | 200.5 | 
|---|
| 116 | ); | 
|---|
| 117 | /* | 
|---|
| 118 | SetHistogramAttributes( | 
|---|
| 119 | "PeakMaxGaus", | 
|---|
| 120 | order, | 
|---|
| 121 | gMaxGausAttrib, | 
|---|
| 122 | MaxAmplOfFirstPulse | 
|---|
| 123 | ); | 
|---|
| 124 | */ | 
|---|
| 125 | hMaxOverlay[order]->SetAxisRange( | 
|---|
| 126 | mBSLMean - 5, | 
|---|
| 127 | (mGainMean*(order+1)) + 10, | 
|---|
| 128 | "Y"); | 
|---|
| 129 | hMaxOverlay[order]->GetXaxis()->SetTitle( "Timeslices [a.u.]" ); | 
|---|
| 130 | hMaxOverlay[order]->GetYaxis()->SetTitle( "Amplitude [mV]" ); | 
|---|
| 131 | //hMaxProfile->SetBit(TH2F::kCanRebin); | 
|---|
| 132 | hList->Add( hMaxOverlay[order] ); | 
|---|
| 133 |  | 
|---|
| 134 | //------------------------------------------------------------------------ | 
|---|
| 135 | /* | 
|---|
| 136 | SetHistogramAttributes( | 
|---|
| 137 | "PeakMaxGaus", | 
|---|
| 138 | order, | 
|---|
| 139 | gMaxGausAttrib, | 
|---|
| 140 | MaxAmplOfFirstPulse | 
|---|
| 141 | ); | 
|---|
| 142 | */ | 
|---|
| 143 | histo_name =    "hEdgeOverlay"; | 
|---|
| 144 | histo_name +=   mChid; | 
|---|
| 145 | histo_name +=   "_"; | 
|---|
| 146 | histo_name +=   order; | 
|---|
| 147 | if (mVerbosityLevel > 3) cout << "\t...booking " << histo_name << endl; | 
|---|
| 148 | hEdgeOverlay[order] = new TH2F( | 
|---|
| 149 | histo_name, | 
|---|
| 150 | "Overlay at rising edge of detected pulses of one pulse order for one Pixel ", | 
|---|
| 151 | mPixelOverlayXaxisLeft + mPixelOverlayXaxisRight , | 
|---|
| 152 | (-1*mPixelOverlayXaxisLeft)-0.5, | 
|---|
| 153 | mPixelOverlayXaxisRight-0.5 , | 
|---|
| 154 | 512, | 
|---|
| 155 | -55.5, | 
|---|
| 156 | 200.5 | 
|---|
| 157 | ); | 
|---|
| 158 |  | 
|---|
| 159 | hEdgeOverlay[order]->SetAxisRange( | 
|---|
| 160 | mBSLMean - 5, | 
|---|
| 161 | (mGainMean*(order+1)) + 10, | 
|---|
| 162 | "Y"); | 
|---|
| 163 | hEdgeOverlay[order]->GetXaxis()->SetTitle( "Timeslices [a.u.]" ); | 
|---|
| 164 | hEdgeOverlay[order]->GetYaxis()->SetTitle( "Amplitude [mV]" ); | 
|---|
| 165 | hList->Add( hEdgeOverlay[order] ); | 
|---|
| 166 |  | 
|---|
| 167 | //------------------------------------------------------------------------ | 
|---|
| 168 | /* | 
|---|
| 169 | SetHistogramAttributes( | 
|---|
| 170 | "PeakMaxGaus", | 
|---|
| 171 | order, | 
|---|
| 172 | gMaxGausAttrib, | 
|---|
| 173 | MaxAmplOfFirstPulse | 
|---|
| 174 | ); | 
|---|
| 175 | */ | 
|---|
| 176 | histo_name =    "hMaxProfile"; | 
|---|
| 177 | histo_name +=   mChid; | 
|---|
| 178 | histo_name +=   "_"; | 
|---|
| 179 | histo_name +=   order; | 
|---|
| 180 | if (mVerbosityLevel > 3) cout << "\t...booking " << histo_name << endl; | 
|---|
| 181 | hMaxProfile[order] = new TProfile( | 
|---|
| 182 | histo_name, | 
|---|
| 183 | "Mean value of each slice in overlay plot (Tprofile)", | 
|---|
| 184 | mPixelOverlayXaxisLeft + mPixelOverlayXaxisRight ,//nbinsx | 
|---|
| 185 | (-1*mPixelOverlayXaxisLeft)-0.5,                 //xlow | 
|---|
| 186 | mPixelOverlayXaxisRight-0.5 ,                    //xup | 
|---|
| 187 | //                512,                                            //nbinsy | 
|---|
| 188 | -55.5,                                          //ylow | 
|---|
| 189 | 300.5,                                          //yup | 
|---|
| 190 | "s");                                           //option | 
|---|
| 191 | hMaxProfile[order]->SetAxisRange( | 
|---|
| 192 | mBSLMean - 5, | 
|---|
| 193 | (mGainMean*(order+1)) + 10, | 
|---|
| 194 | "Y"); | 
|---|
| 195 | hMaxProfile[order]->GetXaxis()->SetTitle( "Timeslices [a.u.]" ); | 
|---|
| 196 | hMaxProfile[order]->GetYaxis()->SetTitle( "Amplitude [mV]" ); | 
|---|
| 197 | //hMaxProfile->SetBit(TH2F::kCanRebin); | 
|---|
| 198 | hList->Add( hMaxProfile[order] ); | 
|---|
| 199 |  | 
|---|
| 200 |  | 
|---|
| 201 | //------------------------------------------------------------------------ | 
|---|
| 202 | /* | 
|---|
| 203 | SetHistogramAttributes( | 
|---|
| 204 | "PeakMaxGaus", | 
|---|
| 205 | order, | 
|---|
| 206 | gMaxGausAttrib, | 
|---|
| 207 | MaxAmplOfFirstPulse | 
|---|
| 208 | ); | 
|---|
| 209 | */ | 
|---|
| 210 | histo_name = "hEdgeProfile"; | 
|---|
| 211 | histo_name +=   mChid; | 
|---|
| 212 | histo_name +=   "_"; | 
|---|
| 213 | histo_name += order; | 
|---|
| 214 | if (mVerbosityLevel > 3) cout << "\t...booking " << histo_name << endl; | 
|---|
| 215 | hEdgeProfile[order] = new TProfile( | 
|---|
| 216 | histo_name, | 
|---|
| 217 | "Mean value of each slice in overlay plot (Tprofile)", | 
|---|
| 218 | mPixelOverlayXaxisLeft + mPixelOverlayXaxisRight ,//nbinsx | 
|---|
| 219 | (-1*mPixelOverlayXaxisLeft)-0.5,                 //xlow | 
|---|
| 220 | mPixelOverlayXaxisRight-0.5 ,                    //xup | 
|---|
| 221 | //                512,                                            //nbinsy | 
|---|
| 222 | -55.5,                                          //ylow | 
|---|
| 223 | 300.5,                                          //yup | 
|---|
| 224 | "s");                                           //option | 
|---|
| 225 | hEdgeProfile[order]->SetLineColor(kRed); | 
|---|
| 226 | hEdgeProfile[order]->SetAxisRange( | 
|---|
| 227 | mBSLMean - 5, | 
|---|
| 228 | (mGainMean*(order+1)) + 10, | 
|---|
| 229 | "Y"); | 
|---|
| 230 | hEdgeProfile[order]->GetXaxis()->SetTitle( "Timeslices [a.u.]" ); | 
|---|
| 231 | hEdgeProfile[order]->GetYaxis()->SetTitle( "Amplitude [mV]" ); | 
|---|
| 232 | //hMaxProfile->SetBit(TH2F::kCanRebin); | 
|---|
| 233 | hList->Add( hEdgeProfile[order] ); | 
|---|
| 234 |  | 
|---|
| 235 | } | 
|---|
| 236 | if (mVerbosityLevel > 2) cout << "...done" << endl; | 
|---|
| 237 | } | 
|---|
| 238 | //end of BookPixelHistos | 
|---|
| 239 | //---------------------------------------------------------------------------- | 
|---|
| 240 |  | 
|---|
| 241 |  | 
|---|
| 242 | void | 
|---|
| 243 | Pixel::DrawHistograms( | 
|---|
| 244 | TCanvas*    pixelCanvas, | 
|---|
| 245 | int*        histoFrameNr | 
|---|
| 246 | ) | 
|---|
| 247 | { | 
|---|
| 248 | if (mVerbosityLevel > 2) cout << endl << "...drawing pulse histograms" ; | 
|---|
| 249 | for (int pulse_order = 0; pulse_order < mMaxPulseOrder; pulse_order++) | 
|---|
| 250 | { | 
|---|
| 251 | pixelCanvas[pulse_order].cd( histoFrameNr[0] ); | 
|---|
| 252 | hMaxOverlay[pulse_order]->Draw("COLZ"); | 
|---|
| 253 | pixelCanvas[pulse_order].cd( histoFrameNr[2] ); | 
|---|
| 254 | hMaxProfile[pulse_order]->Draw("COLZ"); | 
|---|
| 255 | hEdgeProfile[pulse_order]->Draw("SAME"); | 
|---|
| 256 |  | 
|---|
| 257 | pixelCanvas[pulse_order].cd( histoFrameNr[1] ); | 
|---|
| 258 | hEdgeOverlay[pulse_order]->Draw("COLZ"); | 
|---|
| 259 | } | 
|---|
| 260 | } | 
|---|
| 261 | // end of DrawPulseHistograms | 
|---|
| 262 | //---------------------------------------------------------------------------- | 
|---|
| 263 |  | 
|---|
| 264 |  | 
|---|
| 265 | void | 
|---|
| 266 | Pixel::BookDistributionHistos( ) | 
|---|
| 267 | { | 
|---|
| 268 | if (!mOptions.IsNull() ) | 
|---|
| 269 | { | 
|---|
| 270 | TString histo_name; | 
|---|
| 271 | for (int order =0; order < mMaxPulseOrder; order++) | 
|---|
| 272 | { | 
|---|
| 273 | if (mVerbosityLevel > 2) cout << endl | 
|---|
| 274 | << "...book distribution histograms" | 
|---|
| 275 | << endl; | 
|---|
| 276 |  | 
|---|
| 277 | if (mOptions.Contains("S")) | 
|---|
| 278 | { | 
|---|
| 279 | histo_name =    "hSlopeRisingEdge"; | 
|---|
| 280 | histo_name +=   mChid; | 
|---|
| 281 | histo_name +=   "_"; | 
|---|
| 282 | histo_name +=   order; | 
|---|
| 283 | if (mVerbosityLevel > 3) cout << "\t...booking " << histo_name << endl; | 
|---|
| 284 | hSlopeRisingEdge[order] = new TH1F ( | 
|---|
| 285 | histo_name, | 
|---|
| 286 | "Distribution of rising edge", | 
|---|
| 287 | 600, | 
|---|
| 288 | -10.1, | 
|---|
| 289 | 10.1 | 
|---|
| 290 | ); | 
|---|
| 291 | hSlopeRisingEdge[order]->GetXaxis()->SetTitle( "Timeslices [a.u.]" ); | 
|---|
| 292 | hSlopeRisingEdge[order]->GetYaxis()->SetTitle( "counts" ); | 
|---|
| 293 | hList->Add( hSlopeRisingEdge[order] ); | 
|---|
| 294 | } | 
|---|
| 295 |  | 
|---|
| 296 | if (mOptions.Contains("R")) | 
|---|
| 297 | { | 
|---|
| 298 | histo_name =    "hRisingEdgeToMax"; | 
|---|
| 299 | histo_name +=   mChid; | 
|---|
| 300 | histo_name +=   "_"; | 
|---|
| 301 | histo_name +=    order; | 
|---|
| 302 | if (mVerbosityLevel > 3) cout << "\t...booking " << histo_name << endl; | 
|---|
| 303 | hRisingEdgeToMax[order] = new TH1F ( | 
|---|
| 304 | histo_name, | 
|---|
| 305 | "Deviation of rising edge and maximum", | 
|---|
| 306 | 600, | 
|---|
| 307 | -10.1, | 
|---|
| 308 | 10.1 | 
|---|
| 309 | ); | 
|---|
| 310 | hRisingEdgeToMax[order]->GetXaxis()->SetTitle( "Timeslices [a.u.]" ); | 
|---|
| 311 | hRisingEdgeToMax[order]->GetYaxis()->SetTitle( "counts" ); | 
|---|
| 312 | hList->Add( hRisingEdgeToMax[order] ); | 
|---|
| 313 | } | 
|---|
| 314 |  | 
|---|
| 315 | if (mOptions.Contains("P")) | 
|---|
| 316 | { | 
|---|
| 317 | histo_name =    "hPosOfMax"; | 
|---|
| 318 | histo_name +=   mChid; | 
|---|
| 319 | histo_name +=   "_"; | 
|---|
| 320 | histo_name +=   order; | 
|---|
| 321 | if (mVerbosityLevel > 3) cout << "\t...booking " << histo_name << endl; | 
|---|
| 322 | hPosOfMax[order] = new TH1F ( | 
|---|
| 323 | histo_name, | 
|---|
| 324 | "Deviation of rising edge and maximum", | 
|---|
| 325 | 600, | 
|---|
| 326 | -10.1, | 
|---|
| 327 | 10.1 | 
|---|
| 328 | ); | 
|---|
| 329 | hPosOfMax[order]->GetXaxis()->SetTitle( "Timeslices [a.u.]" ); | 
|---|
| 330 | hPosOfMax[order]->GetYaxis()->SetTitle( "counts" ); | 
|---|
| 331 | hList->Add( hPosOfMax[order] ); | 
|---|
| 332 | } | 
|---|
| 333 |  | 
|---|
| 334 | if (mVerbosityLevel > 2) cout << "...done" << endl; | 
|---|
| 335 | } | 
|---|
| 336 | } | 
|---|
| 337 | } | 
|---|
| 338 |  | 
|---|
| 339 | void | 
|---|
| 340 | Pixel::DrawDistributionHistograms( | 
|---|
| 341 | TCanvas*    pixelCanvas, | 
|---|
| 342 | int*        histoFrameNr | 
|---|
| 343 | ) | 
|---|
| 344 | { | 
|---|
| 345 | if (mVerbosityLevel > 2) cout << endl << "...drawing distribution histograms" ; | 
|---|
| 346 | for (int pulse_order = 0; pulse_order < mMaxPulseOrder; pulse_order++) | 
|---|
| 347 | { | 
|---|
| 348 | pixelCanvas[pulse_order].cd( histoFrameNr[0] ); | 
|---|
| 349 | hSlopeRisingEdge[pulse_order]->Draw(); | 
|---|
| 350 | pixelCanvas[pulse_order].cd( histoFrameNr[1] ); | 
|---|
| 351 | hRisingEdgeToMax[pulse_order]->Draw(); | 
|---|
| 352 |  | 
|---|
| 353 | pixelCanvas[pulse_order].cd( histoFrameNr[2] ); | 
|---|
| 354 | hPosOfMax[pulse_order]->Draw(); | 
|---|
| 355 | } | 
|---|
| 356 | } | 
|---|
| 357 | // end of DrawDistributionHistograms | 
|---|
| 358 | //---------------------------------------------------------------------------- | 
|---|
| 359 |  | 
|---|
| 360 | void | 
|---|
| 361 | Pixel::SavePixelHistograms( | 
|---|
| 362 | const char* outRootFileName, | 
|---|
| 363 | bool        saveResults | 
|---|
| 364 | ) | 
|---|
| 365 | { | 
|---|
| 366 | cout << endl << "Saving histograms of Pixel# " << mChid | 
|---|
| 367 | << " Adress " << &mChid; | 
|---|
| 368 | if (!saveResults) return; | 
|---|
| 369 | cout << endl << "#### "; | 
|---|
| 370 | SaveHistograms( | 
|---|
| 371 | outRootFileName, | 
|---|
| 372 | CreateSubDirName( mChid ), | 
|---|
| 373 | hList, | 
|---|
| 374 | saveResults, | 
|---|
| 375 | mVerbosityLevel | 
|---|
| 376 | ); | 
|---|
| 377 | } | 
|---|
| 378 | // end of SavePixelHistograms | 
|---|
| 379 | //---------------------------------------------------------------------------- | 
|---|
| 380 |  | 
|---|
| 381 | void | 
|---|
| 382 | Pixel::DeletePixelHistos() | 
|---|
| 383 | { | 
|---|
| 384 | if (mVerbosityLevel > 2) cout << endl << "\t...delete current overlay histograms" ; | 
|---|
| 385 | cout << endl << "Deleting histograms of Pixel# " << mChid | 
|---|
| 386 | << " Adress " << &mChid; | 
|---|
| 387 | //    for (int order = 0; | 
|---|
| 388 | //         order < mMaxPulseOrder; | 
|---|
| 389 | //         order ++) | 
|---|
| 390 | //    { | 
|---|
| 391 | ////        if (mVerbosityLevel > 3) | 
|---|
| 392 | //        cout << endl << "\t\t...deleting hMaxOverlay" | 
|---|
| 393 | //                                      << mChid << "_" << order | 
|---|
| 394 | //                                      << " hMaxOverlay[order] adr " << hMaxOverlay[order] | 
|---|
| 395 | //                                      << " hMaxOverlay adr " << hMaxOverlay | 
|---|
| 396 | //                                         ; | 
|---|
| 397 |  | 
|---|
| 398 | //        delete hMaxOverlay[order]; | 
|---|
| 399 | //        hMaxOverlay[order] = NULL; | 
|---|
| 400 |  | 
|---|
| 401 | //        if (mVerbosityLevel > 3) cout << endl << "\t\t...deleting hEdgeOverlay" | 
|---|
| 402 | //                                      << mChid << "_" << order ; | 
|---|
| 403 | //        delete hEdgeOverlay[order]; | 
|---|
| 404 | //        hEdgeOverlay[order] = NULL; | 
|---|
| 405 |  | 
|---|
| 406 | //        if (mVerbosityLevel > 3) cout << endl << "\t\t...deleting hMaxProfile" | 
|---|
| 407 | //                                      << mChid << "_" << order ; | 
|---|
| 408 | //        delete hMaxProfile[order]; | 
|---|
| 409 | //        hMaxProfile[order] = NULL; | 
|---|
| 410 |  | 
|---|
| 411 | //        if (mVerbosityLevel > 3) cout << endl << "\t\t...deleting hMaxProfile2" | 
|---|
| 412 | //                                      << mChid << "_" << order ; | 
|---|
| 413 | //        delete hEdgeProfile[order]; | 
|---|
| 414 | //        hEdgeProfile[order] = NULL; | 
|---|
| 415 | //    } | 
|---|
| 416 | if (mVerbosityLevel > 3) cout << endl << "\t...deleting histogram Arrays"; | 
|---|
| 417 |  | 
|---|
| 418 | if (mVerbosityLevel > 3) cout << endl << "\t\t...deleting hMaxOverlay"; | 
|---|
| 419 | delete[] hMaxOverlay; | 
|---|
| 420 | hMaxOverlay = NULL; | 
|---|
| 421 |  | 
|---|
| 422 | if (mVerbosityLevel > 3) cout << endl << "\t\t...deleting hEdgeOverlay"; | 
|---|
| 423 | delete[] hEdgeOverlay; | 
|---|
| 424 | hEdgeOverlay = NULL; | 
|---|
| 425 |  | 
|---|
| 426 | if (mVerbosityLevel > 3) cout << endl << "\t\t...deleting hMaxProfile"; | 
|---|
| 427 | delete[] hMaxProfile; | 
|---|
| 428 | hMaxProfile = NULL; | 
|---|
| 429 |  | 
|---|
| 430 | if (mVerbosityLevel > 3) cout << endl << "\t\t...deleting hEdgeProfile"; | 
|---|
| 431 | delete[] hEdgeProfile; | 
|---|
| 432 | hEdgeProfile = NULL; | 
|---|
| 433 | } | 
|---|
| 434 | // end of DeletePixelHistos | 
|---|
| 435 | //---------------------------------------------------------------------------- | 
|---|
| 436 |  | 
|---|
| 437 | void | 
|---|
| 438 | Pixel::DeleteDistributionHistos() | 
|---|
| 439 | { | 
|---|
| 440 | if (mVerbosityLevel > 2) cout << endl | 
|---|
| 441 | << "\t...delete current distribution histograms" ; | 
|---|
| 442 |  | 
|---|
| 443 | //    for (int order = 0; | 
|---|
| 444 | //         order < mMaxPulseOrder; | 
|---|
| 445 | //         order ++) | 
|---|
| 446 | //    { | 
|---|
| 447 | //        if (mOptions.Contains("S")) | 
|---|
| 448 | //        { | 
|---|
| 449 | //            if (mVerbosityLevel > 3) cout << endl | 
|---|
| 450 | //                                          << "\t\t...deleting hSlopeRisingEdge" | 
|---|
| 451 | //                                          << mChid << "_" << order ; | 
|---|
| 452 | //            delete hSlopeRisingEdge[order]; | 
|---|
| 453 | //        } | 
|---|
| 454 |  | 
|---|
| 455 | //        if (mOptions.Contains("R")) | 
|---|
| 456 | //        { | 
|---|
| 457 | //            if (mVerbosityLevel > 3) cout << endl | 
|---|
| 458 | //                                          << "\t\t...deleting hRisingEdgeToMax" | 
|---|
| 459 | //                                          << mChid << "_" << order ; | 
|---|
| 460 | ////            delete hRisingEdgeToMax[order]; | 
|---|
| 461 | //        } | 
|---|
| 462 |  | 
|---|
| 463 | //        if (mOptions.Contains("P")) | 
|---|
| 464 | //        { | 
|---|
| 465 | //            if (mVerbosityLevel > 3) cout << endl | 
|---|
| 466 | //                                          << "\t\t...deleting hPosOfMax" | 
|---|
| 467 | //                                          << mChid << "_" << order ; | 
|---|
| 468 |  | 
|---|
| 469 | ////            delete hPosOfMax[order]; | 
|---|
| 470 | //        } | 
|---|
| 471 |  | 
|---|
| 472 | //    } | 
|---|
| 473 | if (mVerbosityLevel > 3) cout << endl << "\t...deleting histogram Arrays"; | 
|---|
| 474 |  | 
|---|
| 475 | if (mOptions.Contains("S")) | 
|---|
| 476 | { | 
|---|
| 477 | if (mVerbosityLevel > 3) cout << endl << "\t\t...deleting hSlopeRisingEdge"; | 
|---|
| 478 | delete[] hSlopeRisingEdge; | 
|---|
| 479 | hSlopeRisingEdge = NULL; | 
|---|
| 480 | } | 
|---|
| 481 |  | 
|---|
| 482 | if (mOptions.Contains("R")) | 
|---|
| 483 | { | 
|---|
| 484 | if (mVerbosityLevel > 3) cout << endl << "\t\t...deleting hRisingEdgeToMax"; | 
|---|
| 485 | delete[] hRisingEdgeToMax; | 
|---|
| 486 | hRisingEdgeToMax = NULL; | 
|---|
| 487 | } | 
|---|
| 488 |  | 
|---|
| 489 | if (mOptions.Contains("P")) | 
|---|
| 490 | { | 
|---|
| 491 | if (mVerbosityLevel > 3) cout << endl << "\t\t...deleting hPosOfMax"; | 
|---|
| 492 | delete[] hPosOfMax; | 
|---|
| 493 | hPosOfMax = NULL; | 
|---|
| 494 | } | 
|---|
| 495 | } | 
|---|
| 496 | // end of DeletePixelHistos | 
|---|
| 497 | //---------------------------------------------------------------------------- | 
|---|
| 498 |  | 
|---|
| 499 | //============================= ACESS      =================================== | 
|---|
| 500 | //============================= INQUIRY    =================================== | 
|---|
| 501 | /////////////////////////////// PROTECTED  /////////////////////////////////// | 
|---|
| 502 |  | 
|---|
| 503 | /////////////////////////////// PRIVATE    /////////////////////////////////// | 
|---|
| 504 |  | 
|---|
| 505 |  | 
|---|
| 506 |  | 
|---|
| 507 |  | 
|---|
| 508 |  | 
|---|
| 509 |  | 
|---|
| 510 |  | 
|---|
| 511 |  | 
|---|