--- PamCut/TofCuts/TofNucleiZCut/TofNucleiZCut.cpp 2009/05/27 13:30:09 1.1 +++ PamCut/TofCuts/TofNucleiZCut/TofNucleiZCut.cpp 2009/08/05 14:05:34 1.2 @@ -12,68 +12,67 @@ #include "TofNucleiZCut.h" const float TofNucleiZCut::_sigmaZdefault[] = { 0.12, 0.15, 0.20, 0.25, 0.32, 0.40, 0.45, 0.50 }; // the charge-width in a layer for Z=1..8 -const unsigned int TofNucleiZCut::_maskArray[] = { TOFNUCLEIZ_S11, TOFNUCLEIZ_S12, TOFNUCLEIZ_S21, TOFNUCLEIZ_S22, - TOFNUCLEIZ_S31, TOFNUCLEIZ_S32 }; //The layer - mask code association +const unsigned int TofNucleiZCut::_maskArray[] = { S11, S12, S21, S22, S31, S32 }; //The layer - mask code association -TofNucleiZCut::TofNucleiZCut(const char *cutName, unsigned int Z, float lowerLimit, float upperLimit, unsigned int minLayers, - unsigned int layersMask) : - PamCut(cutName), _Z(Z), _mean(8, 6), _sigma(8, 6), _lowerLimit(lowerLimit), _upperLimit(upperLimit), _minLayers( - minLayers), _layersMask(layersMask), _tofNuclei(NULL) { - - //TODO Put calibration parameters on a file; load only those parameters needed for the current Z. - - // Hard-coded calibrations - // H - _mean[0][0] = 0.987; // S11 peak - _sigma[0][0] = 0.11; // S11 sigma - _mean[0][1] = 0.988; // S12 peak - _sigma[0][1] = 0.12; // S12 sigma - _mean[0][2] = 0.961; // S21 peak - _sigma[0][2] = 0.083;// S21 sigma - _mean[0][3] = 0.966; // S22 peak - _sigma[0][3] = 0.10; // S22 sigma - _mean[0][4] = 0.981; // S31 peak - _sigma[0][4] = 0.092;// S31 sigma - _mean[0][5] = 0.979; // S32 peak - _sigma[0][5] = 0.095;// S32 sigma - - // He - _mean[1][0] = 1.96; // S11 peak - _sigma[1][0] = 0.12;// S11 sigma - _mean[1][1] = 1.95; // S12 peak - _sigma[1][1] = 0.14;// S12 sigma - _mean[1][2] = 1.95; // S21 peak - _sigma[1][2] = 0.13;// S21 sigma - _mean[1][3] = 1.96; // S22 peak - _sigma[1][3] = 0.14;// S22 sigma - _mean[1][4] = 1.99; // S31 peak - _sigma[1][4] = 0.14;// S31 sigma - _mean[1][5] = 2.00; // S32 peak - _sigma[1][5] = 0.15;// S32 sigma - - // Heavier nuclei are not calibrated yet; using default values - for (unsigned int z = 3; z < 9; z++) { - for (int i = 0; i < 6; i++) { - _mean[z - 1][i] = z; - _sigma[z - 1][i] = _sigmaZdefault[z - 1]; - } +TofNucleiZCut::TofNucleiZCut(const char *cutName, unsigned int Z, float lowerLimit, float upperLimit, + unsigned int minLayers, unsigned int layersMask) : + PamCut(cutName), _Z(Z), _mean(8, 6), _sigma(8, 6), _lowerLimit(lowerLimit), _upperLimit(upperLimit), _minLayers( + minLayers), _layersMask(layersMask), _tofNuclei(NULL) { + + //TODO Put calibration parameters on a file; load only those parameters needed for the current Z. + + // Hard-coded calibrations + // H + _mean[0][0] = 0.987; // S11 peak + _sigma[0][0] = 0.11; // S11 sigma + _mean[0][1] = 0.988; // S12 peak + _sigma[0][1] = 0.12; // S12 sigma + _mean[0][2] = 0.961; // S21 peak + _sigma[0][2] = 0.083;// S21 sigma + _mean[0][3] = 0.966; // S22 peak + _sigma[0][3] = 0.10; // S22 sigma + _mean[0][4] = 0.981; // S31 peak + _sigma[0][4] = 0.092;// S31 sigma + _mean[0][5] = 0.979; // S32 peak + _sigma[0][5] = 0.095;// S32 sigma + + // He + _mean[1][0] = 1.96; // S11 peak + _sigma[1][0] = 0.12;// S11 sigma + _mean[1][1] = 1.95; // S12 peak + _sigma[1][1] = 0.14;// S12 sigma + _mean[1][2] = 1.95; // S21 peak + _sigma[1][2] = 0.13;// S21 sigma + _mean[1][3] = 1.96; // S22 peak + _sigma[1][3] = 0.14;// S22 sigma + _mean[1][4] = 1.99; // S31 peak + _sigma[1][4] = 0.14;// S31 sigma + _mean[1][5] = 2.00; // S32 peak + _sigma[1][5] = 0.15;// S32 sigma + + // Heavier nuclei are not calibrated yet; using default values + for (unsigned int z = 3; z < 9; z++) { + for (int i = 0; i < 6; i++) { + _mean[z - 1][i] = z; + _sigma[z - 1][i] = _sigmaZdefault[z - 1]; } + } #ifdef DEBUGPAMCUT - TString hId; - TString hTitle; + TString hId; + TString hTitle; - for (UInt_t j = 0; j < 12; j++) { - hId.Form("h_tof_z_vs_beta_%i", j); - hTitle.Form("TOF Z vs beta (%i)", j); - h_tof_z_beta[j] = new TH2F(hId.Data(), hTitle.Data(), 50, 0, 1, 50, 0, 10); - } + for (UInt_t j = 0; j < 12; j++) { + hId.Form("h_tof_z_vs_beta_%i", j); + hTitle.Form("TOF Z vs beta (%i)", j); + h_tof_z_beta[j] = new TH2F(hId.Data(), hTitle.Data(), 50, 0, 1, 50, 0, 10); + } #endif - } +} int TofNucleiZCut::Check(PamLevel2 *event) {