//============================================================================= // Initialization //============================================================================= StatusCode HistoTimingAlg::initialize() { // must be called first const StatusCode sc = GaudiHistoAlg::initialize(); if ( sc.isFailure() ) return sc; // random number generator IRndmGenSvc * randSvc = svc<IRndmGenSvc>( "RndmGenSvc", true ); if ( !randSvc || !m_rand.initialize( randSvc, Rndm::Flat(0.,1.) ) ) { return Error( "Unable to create Random generator" ); } // book histos for ( unsigned int iH = 0; iH < m_nHistos; ++iH ) { std::ostringstream title; title << "Histogram Number " << iH; m_histos[ book1D(title.str(),0, 1,100) ] = title.str(); } return sc; }
//============================================================================= /// Setup Histograms //============================================================================= void TbTracking::setup_hists() { // TbKalmanTrack parameters plots m_Kfit_chi2 = Gaudi::Utils::Aida2ROOT::aida2root( book1D("KalmanFit/chi2", "Chi2", -0.5, 49.5, 100)); m_Kfit_prob = Gaudi::Utils::Aida2ROOT::aida2root( book1D("KalmanFit/probability", "Chi2 prob of K fit", 0.0, 1.0, 100)); // Kalman fit plots std::string hist_name; for (unsigned int i = 0; i < m_nPlanes; i++) { std::stringstream ss_chip; ss_chip << i; hist_name = "KalmanFit/UnbiasedResidualsX/plane_" + ss_chip.str(); m_XunresKfit.push_back(Gaudi::Utils::Aida2ROOT::aida2root( book1D(hist_name.c_str(), hist_name.c_str(), lowR, highR, binsR))); hist_name = "KalmanFit/UnbiasedResidualsY/plane_" + ss_chip.str(); m_YunresKfit.push_back(Gaudi::Utils::Aida2ROOT::aida2root( book1D(hist_name.c_str(), hist_name.c_str(), lowR, highR, binsR))); // hist_name = "KalmanFit/BiasedResidualsX/plane_" + ss_chip.str(); m_XresKfit.push_back(Gaudi::Utils::Aida2ROOT::aida2root( book1D(hist_name.c_str(), hist_name.c_str(), lowR, highR, binsR))); hist_name = "KalmanFit/BiasedResidualsY/plane_" + ss_chip.str(); m_YresKfit.push_back(Gaudi::Utils::Aida2ROOT::aida2root( book1D(hist_name.c_str(), hist_name.c_str(), lowR, highR, binsR))); // hist_name = "KalmanFit/ResidualsX_on_X/plane_" + ss_chip.str(); m_XresKfitOnX.push_back(Gaudi::Utils::Aida2ROOT::aida2root( book2D(hist_name.c_str(), hist_name.c_str(), -20., 20., 200, lowR, highR, binsR))); hist_name = "KalmanFit/ResidualsX_on_Y/plane_" + ss_chip.str(); m_XresKfitOnY.push_back(Gaudi::Utils::Aida2ROOT::aida2root( book2D(hist_name.c_str(), hist_name.c_str(), -20., 20., 200, lowR, highR, binsR))); hist_name = "KalmanFit/ResidualsY_on_Y/plane_" + ss_chip.str(); m_YresKfitOnY.push_back(Gaudi::Utils::Aida2ROOT::aida2root( book2D(hist_name.c_str(), hist_name.c_str(), -20., 20., 200, lowR, highR, binsR))); hist_name = "KalmanFit/ResidualsY_on_X/plane_" + ss_chip.str(); m_YresKfitOnX.push_back(Gaudi::Utils::Aida2ROOT::aida2root( book2D(hist_name.c_str(), hist_name.c_str(), -20., 20., 200, lowR, highR, binsR))); // hist_name = "KalmanFit/ResidualsX_on_slopeX/plane_" + ss_chip.str(); m_XresKfitOnTX.push_back(Gaudi::Utils::Aida2ROOT::aida2root( book2D(hist_name.c_str(), hist_name.c_str(), lowS, highS, binsR, lowR, highR, binsR))); hist_name = "KalmanFit/ResidualsX_on_slopeY/plane_" + ss_chip.str(); m_XresKfitOnTY.push_back(Gaudi::Utils::Aida2ROOT::aida2root( book2D(hist_name.c_str(), hist_name.c_str(), lowS, highS, binsR, lowR, highR, binsR))); hist_name = "KalmanFit/ResidualsY_on_slopeY/plane_" + ss_chip.str(); m_YresKfitOnTY.push_back(Gaudi::Utils::Aida2ROOT::aida2root( book2D(hist_name.c_str(), hist_name.c_str(), lowS, highS, binsR, lowR, highR, binsR))); hist_name = "KalmanFit/ResidualsY_on_slopeX/plane_" + ss_chip.str(); m_YresKfitOnTX.push_back(Gaudi::Utils::Aida2ROOT::aida2root( book2D(hist_name.c_str(), hist_name.c_str(), lowS, highS, binsR, lowR, highR, binsR))); // hist_name = "KalmanFit/Residual_errors_on_X/plane_" + ss_chip.str(); m_XreserrKfit.push_back(Gaudi::Utils::Aida2ROOT::aida2root( book1D(hist_name.c_str(), hist_name.c_str(), 0., 5.e-3, 1000))); hist_name = "KalmanFit/Residual_errors_on_Y/plane_" + ss_chip.str(); m_YreserrKfit.push_back(Gaudi::Utils::Aida2ROOT::aida2root( book1D(hist_name.c_str(), hist_name.c_str(), 0., 5.e-3, 1000))); hist_name = "KalmanFit/ResidualPull_on_X/plane_" + ss_chip.str(); m_XrespullKfit.push_back(Gaudi::Utils::Aida2ROOT::aida2root( book1D(hist_name.c_str(), hist_name.c_str(), -10., 10., 100))); hist_name = "KalmanFit/ResidualPull_on_Y/plane_" + ss_chip.str(); m_YrespullKfit.push_back(Gaudi::Utils::Aida2ROOT::aida2root( book1D(hist_name.c_str(), hist_name.c_str(), -10., 10., 100))); // hist_name = "KalmanFit/BiasedResidualsX_after_chi2_cut/plane_" + ss_chip.str(); m_qXresKfit.push_back(Gaudi::Utils::Aida2ROOT::aida2root( book1D(hist_name.c_str(), hist_name.c_str(), lowR, highR, binsR))); hist_name = "KalmanFit/BiasedResidualsY_after_chi2_cut/plane_" + ss_chip.str(); m_qYresKfit.push_back(Gaudi::Utils::Aida2ROOT::aida2root( book1D(hist_name.c_str(), hist_name.c_str(), lowR, highR, binsR))); // hist_name = "KalmanFit/ResidualPull_on_X_after_chi2_cut/plane_" + ss_chip.str(); m_qXrespullKfit.push_back(Gaudi::Utils::Aida2ROOT::aida2root( book1D(hist_name.c_str(), hist_name.c_str(), -10., 10., 100))); hist_name = "KalmanFit/ResidualPull_on_Y_after_chi2_cut/plane_" + ss_chip.str(); m_qYrespullKfit.push_back(Gaudi::Utils::Aida2ROOT::aida2root( book1D(hist_name.c_str(), hist_name.c_str(), -10., 10., 100))); } }