Newer
Older
TB_Chris / TbSimulation / src / .svn / text-base / TbTrackFitter.cpp.svn-base
  1. // ROOT
  2. #include "TMath.h"
  3.  
  4. // Gaudi
  5. #include "GaudiKernel/PhysicalConstants.h"
  6. #include "GaudiUtils/Aida2ROOT.h"
  7.  
  8. // Tb
  9. #include "TbKernel/ITbGeometrySvc.h"
  10. #include "Event/TbCluster.h"
  11. #include "Event/TbTrack.h"
  12. #include "Event/TbState.h"
  13.  
  14. #include "Event/TbKalmanTrack.h"
  15. #include "Event/TbKalmanNode.h"
  16. #include "Event/TbKalmanPixelMeasurement.h"
  17.  
  18. #include <math.h>
  19.  
  20. // Local
  21. #include "TbTrackFitter.h"
  22.  
  23. /** @file TbTrackFitter.cpp
  24. *
  25. * Implementation of class : TbTrackFitter
  26. * Author: Panagiotis Tsopelas
  27. */
  28.  
  29. DECLARE_ALGORITHM_FACTORY(TbTrackFitter)
  30.  
  31. //=============================================================================
  32. /// Standard constructor
  33. //=============================================================================
  34. TbTrackFitter::TbTrackFitter(const std::string& name, ISvcLocator* pSvcLocator)
  35. : GaudiTupleAlg(name, pSvcLocator), m_trackFit(NULL) {
  36.  
  37. // Global default values.
  38. declareProperty("onOff_hists", m_onOff_hists = true);
  39. declareProperty("scat2", m_scat2 = 1.35e-8);
  40. declareProperty("hiterror2", m_hiterror2 = 1.6e-5);
  41. declareProperty("theta0", m_theta0 = 1.e-4);
  42. declareProperty("direction", m_direction = -1);
  43. // Local default values.
  44. m_nPlanes = 8;
  45. sigmax = 0.004 * Gaudi::Units::mm;
  46. sigmay = 0.004 * Gaudi::Units::mm;
  47. }
  48.  
  49. //=============================================================================
  50. /// Initialization
  51. //=============================================================================
  52. StatusCode TbTrackFitter::initialize() {
  53.  
  54. StatusCode sc = GaudiAlgorithm::initialize();
  55. if (sc.isFailure()) return sc;
  56. setHistoTopDir("Tb/");
  57. if (m_onOff_hists) setup_hists();
  58.  
  59. // Setup the track fit tool.
  60. m_trackFit = tool<ITbTrackFit>("TbTrackFit", "Fitter", this);
  61.  
  62. // Initialize the random number generator.
  63. sc = m_gauss.initialize(randSvc(), Rndm::Gauss(0.0, 1.0));
  64. if (!sc) {
  65. error() << "Cannot initialize Gaussian random number generator." << endmsg;
  66. return sc;
  67. }
  68.  
  69. return StatusCode::SUCCESS;
  70. }
  71.  
  72. //=============================================================================
  73. /// Main execution
  74. //=============================================================================
  75. StatusCode TbTrackFitter::execute() {
  76. if (msgLevel(MSG::DEBUG)) debug() << " ==> execute()" << endmsg;
  77.  
  78. // TbTrack container
  79. std::vector<LHCb::TbTrack*> tracks_vec;
  80. // TbKalmanTrack container
  81. std::vector<LHCb::TbKalmanTrack*> ktracks_vec;
  82. const unsigned int nPlanes = m_nPlanes;
  83. // const double sigmax = 0.004 * Gaudi::Units::mm;
  84. // const double sigmay = 0.004 * Gaudi::Units::mm;
  85.  
  86. // Gap from next/previous event
  87. // std::cout << std::endl << std::endl << std::endl ;
  88.  
  89. // make random track parameters -> True straight track - NO scattering
  90. double Rx0 = m_gauss() * 15. * Gaudi::Units::mm ;
  91. double Rtx = m_gauss() * 1.e-4 ;
  92. double Ry0 = m_gauss() * 15. * Gaudi::Units::mm ;
  93. double Rty = m_gauss() * 1.e-4 ;
  94. // print random initial track parameters
  95. // std::cout << "--> Random track with x0 = " << Rx0 << " and tx = " << Rtx << std::endl;
  96. // theta0 for MCS through small angles
  97. double theta0 = TMath::ATan(m_theta0) ;
  98. // store true slope and intercept from scattering
  99. std::vector<double> scatRtx(nPlanes);
  100. std::vector<double> scatRty(nPlanes);
  101. // Declare TbTrack
  102. LHCb::TbTrack* track = new LHCb::TbTrack();
  103.  
  104. // make random clusters ..
  105. std::vector<LHCb::TbCluster> clusters(nPlanes);
  106. // .. but fix their Z positions according to the Alignment File
  107. clusters[0].setZ( 0. ); clusters[4].setZ( 306. );
  108. clusters[1].setZ( 31. ); clusters[5].setZ( 336. );
  109. clusters[2].setZ( 60. ); clusters[6].setZ( 366. );
  110. clusters[3].setZ( 89. ); clusters[7].setZ( 397. );
  111. const double weight = 1. / (0.004 * 0.004);
  112. // initialize 1st cluster
  113. clusters[0].setX( ( Rtx + Rx0 ) + m_gauss()*sigmax ); // random straight line
  114. clusters[0].setY( ( Rty + Ry0 ) + m_gauss()*sigmay ); // random straight line
  115. clusters[0].setXErr( 0.004 );
  116. clusters[0].setYErr( 0.004 );
  117. clusters[0].setWx(weight);
  118. clusters[0].setWy(weight);
  119. clusters[0].setPlane(0);
  120. track->addToClusters(&clusters[0]);
  121. // std::cout << " Clusters in X: " ;
  122. // std::cout << clusters[0].x() << ", " ;
  123. // update x0 and tx due to scattering
  124. scatRx0[0] = Rx0 ;
  125. scatRtx[0] = Rtx + m_gauss()*theta0;
  126. scatRy0[0] = Ry0;
  127. scatRty[0] = Rty + m_gauss()*theta0;
  128. // fill the rest of the clusters
  129. for (unsigned int i = 1; i < nPlanes; ++i) {
  130. // update x0 and tx due to scattering
  131. scatRx0[i] = ( clusters[i].z() - clusters[i-1].z() ) * scatRtx[i-1] + scatRx0[i-1] ;
  132. scatRtx[i] = scatRtx[i-1] + m_gauss() * theta0;
  133. scatRy0[i] = ( clusters[i].z() - clusters[i-1].z() ) * scatRty[i-1] + scatRy0[i-1];
  134. scatRty[i] = scatRty[i-1] + m_gauss() * theta0;
  135. clusters[i].setX( scatRx0[i] + m_gauss()*sigmax );
  136. clusters[i].setY( scatRy0[i] + m_gauss()*sigmay );
  137. clusters[i].setXErr( 0.004 );
  138. clusters[i].setYErr( 0.004 );
  139. clusters[i].setWx(weight);
  140. clusters[i].setWy(weight);
  141. clusters[i].setPlane(i);
  142. track->addToClusters(&clusters[i]);
  143. if (i==nPlanes) continue;
  144. }
  145. // const SmartRefVector<LHCb::TbCluster>& clustersL = track->clusters();
  146. // std::cout << std::endl << "Track with " << track->size() << " clusters. " << std::endl;
  147. // // print true positions of track
  148. // std::cout << " True X positions of (scattered) track: ";
  149. // std::cout << Rx0 << ", " ;
  150. // for (int i=0; i<nPlanes; i++){
  151. // std::cout << scatRx0[i] << ", " ;
  152. // }
  153. // std::cout << std::endl;
  154. // std::cout << " Cluster X positions : ";
  155. // for (auto it = clustersL.cbegin(), end = clustersL.cend(); it != end; ++it) {
  156. // std::cout << (*it)->x() << ", ";
  157. // }
  158. // std::cout << " Cluster X errors : ";
  159. // for (auto it = clustersL.cbegin(), end = clustersL.cend(); it != end; ++it) {
  160. // std::cout << (*it)->xErr() << ", ";
  161. // }
  162. //// for (int i=0; i<nPlanes; i++){
  163. //// std::cout << clusters[i].x() << ", " ;
  164. //// }
  165. //
  166. // std::cout << std::endl;
  167. // std::cout << " Cluster Z positions : ";
  168. // for (auto it = clustersL.cbegin(), end = clustersL.cend(); it != end; ++it) {
  169. // std::cout << (*it)->z() << ", ";
  170. // }
  171. //// for (int i=0; i<nPlanes; i++){
  172. //// std::cout << clusters[i].z() << ", " ;
  173. //// }
  174. // std::cout << std::endl;
  175. // fit the track
  176. m_trackFit->fit(track);
  177.  
  178.  
  179.  
  180. // print results of simple fit
  181. // std::cout << std::endl << " * chi2 on x-z plane: " << track->chi2() << " with ndof = " << track->ndof() << std::endl
  182. // << " x0: " << track->firstState().x() << " +/- " << TMath::Sqrt(track->firstState().errX2() )
  183. // << ", y0: " << track->firstState().y() << " +/- " << TMath::Sqrt(track->firstState().errY2() )
  184. // << std::endl
  185. // << " tx: " << track->firstState().tx() << " +/- " << TMath::Sqrt( track->firstState().errTx2() )
  186. // << ", ty: " << track->firstState().ty() << " +/- " << TMath::Sqrt( track->firstState().errTy2() )
  187. // << std::endl ;
  188.  
  189.  
  190.  
  191.  
  192.  
  193. //---------------------------------------------------------------------------
  194. // Wouter's new code
  195. //---------------------------------------------------------------------------
  196. // node : combination of a measurement and a track state is referred to as a node
  197. // std::cout << std::endl << " ================================================== " << std::endl;
  198. // create a fit track object (which is actually also a TbTrack)
  199. LHCb::TbKalmanTrack* ktrack = new LHCb::TbKalmanTrack(*track, m_hiterror2, m_scat2) ;
  200. // fit it
  201. ktrack->fit() ;
  202. // dump some info about the fit
  203. // ktrack->print() ;
  204. // std::cout << " ================================================== " << std::endl;
  205. //---------------------------------------------------------------------------
  206.  
  207.  
  208. // store the track in the track vector
  209. tracks_vec.push_back(track);
  210. // store the ktrack in the track vector
  211. ktracks_vec.push_back(ktrack);
  212.  
  213. // Check whether to fill histograms
  214. if (m_onOff_hists) {
  215. fill_hists(tracks_vec);
  216. fill_khists(ktracks_vec);
  217. }
  218.  
  219. // delete the pointer to the track
  220. delete track;
  221.  
  222. return StatusCode::SUCCESS;
  223. }
  224.  
  225. //=============================================================================
  226. /// F U N C T I O N S
  227. //=============================================================================
  228.  
  229. //=============================================================================
  230. /// Fill Histograms for TbTracks
  231. //=============================================================================
  232. void TbTrackFitter::fill_hists(std::vector<LHCb::TbTrack*>& tracks) {
  233.  
  234. std::vector<LHCb::TbTrack*>::iterator ictra;
  235. for (ictra = tracks.begin(); ictra != tracks.end(); ictra++) {
  236.  
  237. // if ( TMath::Prob((*ictra)->chi2() , (*ictra)->ndof()) < 0.05) continue;
  238.  
  239. // Fill the track histos
  240. m_slopesX->Fill((*ictra)->firstState().tx());
  241. m_slopesY->Fill((*ictra)->firstState().ty());
  242. m_Sfit_chi2->Fill((*ictra)->chi2PerNdof());
  243. m_Sfit_prob->Fill( TMath::Prob((*ictra)->chi2() , (*ictra)->ndof()) );
  244.  
  245. // Get the clusters of this TbTrack
  246. const SmartRefVector<LHCb::TbCluster> clusters = (*ictra)->clusters();
  247.  
  248. // Loop through the clusters of this TbTrack
  249. SmartRefVector<LHCb::TbCluster>::const_iterator icclu;
  250. for (icclu = clusters.begin(); icclu != clusters.end(); ++icclu) {
  251. int ichip = (*icclu)->plane();
  252.  
  253. m_clustersX->Fill((*icclu)->x());
  254. m_clustersY->Fill((*icclu)->y());
  255.  
  256. double xTraAtZclu = (*ictra)->firstState().x() +
  257. (*ictra)->firstState().tx() * (double)(*icclu)->z();
  258. double yTraAtZclu = (*ictra)->firstState().y() +
  259. (*ictra)->firstState().ty() * (double)(*icclu)->z();
  260.  
  261. double resx = (*icclu)->x() - xTraAtZclu ;
  262. double resy = (*icclu)->y() - yTraAtZclu ;
  263. // Fill residuals
  264. m_resSfit_X[ichip]->Fill( resx );
  265. m_resSfit_Y[ichip]->Fill( resy );
  266. // Fill residual pulls
  267. m_respullSfit_X[ichip]->Fill((double) resx / sigmax);
  268. m_respullSfit_Y[ichip]->Fill((double) resy / sigmay);
  269. // Fill differences from true track
  270. m_trueSfit_X[ichip]->Fill( scatRx0[ichip] - xTraAtZclu );
  271. m_trueSfit_Y[ichip]->Fill( scatRy0[ichip] - yTraAtZclu );
  272. // Fill true pulls
  273. m_trackpullSfit_X[ichip]->Fill( (scatRx0[ichip] - xTraAtZclu) / std::sqrt((*ictra)->firstState().covariance()(0,0)) );
  274. m_trackpullSfit_Y[ichip]->Fill( (scatRy0[ichip] - yTraAtZclu) / std::sqrt((*ictra)->firstState().covariance()(1,1)) );
  275. // m_trackpullSfit_X[ichip]->Fill( (scatRx0[ichip] - xTraAtZclu) / sigmax );
  276. // m_trackpullSfit_Y[ichip]->Fill( (scatRy0[ichip] - yTraAtZclu) / sigmay );
  277.  
  278.  
  279. } // end of cluster loop
  280.  
  281. } // end of track loop
  282. }
  283.  
  284. //=============================================================================
  285. /// Fill Histograms for TbKalmanTracks
  286. //=============================================================================
  287. void TbTrackFitter::fill_khists(std::vector<LHCb::TbKalmanTrack*>& ktracks) {
  288. std::vector<LHCb::TbKalmanTrack*>::iterator icktra;
  289. for (icktra = ktracks.begin(); icktra != ktracks.end(); icktra++) {
  290. // Fill the track histos
  291. m_Kfit_chi2->Fill((*icktra)->chi2());
  292. m_Kfit_prob->Fill( TMath::Prob((*icktra)->chi2(), (*icktra)->ndof()) );
  293. // node->residualX() / std::sqrt(pixelhit->residualCovX()
  294. // Get the nodes of this TbKalmanTrack
  295. //const std::vector<LHCb::TbKalmanNode*>& knodes = (*icktra)->nodes();
  296. // Loop through the nodes of this TbKalmanTrack
  297. for( auto node : (*icktra)->nodes() ) {
  298. auto pixnode = dynamic_cast< LHCb::TbKalmanPixelMeasurement*>( node) ;
  299. if( pixnode ) {
  300. int ichip = pixnode->cluster().plane();
  301. // Fill unbiased residuals
  302. m_XunresKfit[ichip]->Fill( pixnode->residualX() * pixnode->covX() / pixnode->residualCovX() );
  303. m_YunresKfit[ichip]->Fill( pixnode->residualY() * pixnode->covY() / pixnode->residualCovY() );
  304. // Fill residuals
  305. m_resKfit_X[ichip]->Fill( pixnode->residualX() );
  306. m_resKfit_Y[ichip]->Fill( pixnode->residualY() );
  307. // Fill residual errors
  308. m_reserrKfit_X[ichip]->Fill( std::sqrt(pixnode->residualCovX()) );
  309. m_reserrKfit_Y[ichip]->Fill( std::sqrt(pixnode->residualCovY()) );
  310. // Fill residual pulls
  311. m_respullKfit_X[ichip]->Fill( pixnode->residualX() / std::sqrt(pixnode->residualCovX() ) );
  312. m_respullKfit_Y[ichip]->Fill( pixnode->residualY() / std::sqrt(pixnode->residualCovY() ) );
  313. // Fill differences from true tracks
  314. m_trueKfit_X[ichip]->Fill( scatRx0[ichip] - pixnode->state().x() );
  315. m_trueKfit_Y[ichip]->Fill( scatRy0[ichip] - pixnode->state().y() );
  316. // Fill differences errors from true tracks
  317. m_trueerrKfit_X[ichip]->Fill( TMath::Sqrt(pixnode->state().covariance()(0,0)) );
  318. m_trueerrKfit_Y[ichip]->Fill( TMath::Sqrt(pixnode->state().covariance()(1,1)) );
  319. // Fill true pulls
  320. m_trackpullKfit_X[ichip]->Fill( (scatRx0[ichip] - pixnode->state().x() ) / TMath::Sqrt(pixnode->state().covariance()(0,0)) );
  321. m_trackpullKfit_Y[ichip]->Fill( (scatRy0[ichip] - pixnode->state().y() ) / TMath::Sqrt(pixnode->state().covariance()(1,1)) );
  322. }
  323. }
  324. } // end of Ktrack loop
  325. }
  326.  
  327.  
  328. //=============================================================================
  329. /// Setup Histograms
  330. //=============================================================================
  331. void TbTrackFitter::setup_hists() {
  332.  
  333. // TbTrack parameters plots
  334. m_Sfit_chi2 = Gaudi::Utils::Aida2ROOT::aida2root(
  335. book1D("StraightLineFit/chi2perndof", "Chi2/ndof", -0.5, 49.5, 100));
  336. m_Sfit_prob = Gaudi::Utils::Aida2ROOT::aida2root(
  337. book1D("StraightLineFit/probability", "Chi2 prob of S fit", 0.0, 1.0, 100));
  338.  
  339. m_slopesX = Gaudi::Utils::Aida2ROOT::aida2root(
  340. book1D("StraightLineFit/slopesX", "slopes in X of TbTracks", -1.e-3, 1.e-3, 100));
  341. m_slopesY = Gaudi::Utils::Aida2ROOT::aida2root(
  342. book1D("StraightLineFit/slopesY", "slopes in Y of TbTracks", -1.e-3, 1.e-3, 100));
  343.  
  344. m_Kfit_chi2 = Gaudi::Utils::Aida2ROOT::aida2root(
  345. book1D("KalmanFit/chi2", "Chi2", -0.5, 49.5, 100));
  346. m_Kfit_prob = Gaudi::Utils::Aida2ROOT::aida2root(
  347. book1D("KalmanFit/probability", "Chi2 prob of K fit", 0.0, 1.0, 100));
  348. m_clustersX = Gaudi::Utils::Aida2ROOT::aida2root(
  349. book1D("clustersX", "cluster X positions ", -1.e-2, 1.e-2, 100));
  350.  
  351. m_clustersY = Gaudi::Utils::Aida2ROOT::aida2root(
  352. book1D("clustersY", "cluster Y positions ", -1.e-2, 1.e-2, 100));
  353.  
  354.  
  355. // Residual plots
  356. std::string hist_name;
  357. for (unsigned int i = 0; i < m_nPlanes; i++) {
  358. std::stringstream ss_chip;
  359. ss_chip << i;
  360.  
  361. // straight line fit
  362. hist_name = "StraightLineFit/Residuals_on_X/plane_" + ss_chip.str();
  363. m_resSfit_X.push_back(Gaudi::Utils::Aida2ROOT::aida2root(
  364. book1D(hist_name.c_str(), hist_name.c_str(), -1.e-2, 1.e-2, 100)));
  365.  
  366. hist_name = "StraightLineFit/Residuals_on_Y/plane_" + ss_chip.str();
  367. m_resSfit_Y.push_back(Gaudi::Utils::Aida2ROOT::aida2root(
  368. book1D(hist_name.c_str(), hist_name.c_str(), -1.e-2, 1.e-2, 100)));
  369.  
  370.  
  371. hist_name = "StraightLineFit/ResidualPull_on_X/plane_" + ss_chip.str();
  372. m_respullSfit_X.push_back(Gaudi::Utils::Aida2ROOT::aida2root(
  373. book1D(hist_name.c_str(), hist_name.c_str(), -10., 10., 100)));
  374. hist_name = "StraightLineFit/ResidualPull_on_Y/plane_" + ss_chip.str();
  375. m_respullSfit_Y.push_back(Gaudi::Utils::Aida2ROOT::aida2root(
  376. book1D(hist_name.c_str(), hist_name.c_str(), -10., 10., 100)));
  377.  
  378.  
  379. hist_name = "StraightLineFit/Differences_from_true_on_X/plane_" + ss_chip.str();
  380. m_trueSfit_X.push_back(Gaudi::Utils::Aida2ROOT::aida2root(
  381. book1D(hist_name.c_str(), hist_name.c_str(), -1.e-2, 1.e-2, 100)));
  382. hist_name = "StraightLineFit/Differences_from_true_on_Y/plane_" + ss_chip.str();
  383. m_trueSfit_Y.push_back(Gaudi::Utils::Aida2ROOT::aida2root(
  384. book1D(hist_name.c_str(), hist_name.c_str(), -1.e-2, 1.e-2, 100)));
  385.  
  386.  
  387. hist_name = "StraightLineFit/TrackPull_on_X/plane_" + ss_chip.str();
  388. m_trackpullSfit_X.push_back(Gaudi::Utils::Aida2ROOT::aida2root(
  389. book1D(hist_name.c_str(), hist_name.c_str(), -10., 10., 100)));
  390.  
  391. hist_name = "StraightLineFit/TrackPull_on_Y/plane_" + ss_chip.str();
  392. m_trackpullSfit_Y.push_back(Gaudi::Utils::Aida2ROOT::aida2root(
  393. book1D(hist_name.c_str(), hist_name.c_str(), -10., 10., 100)));
  394.  
  395. // Kalman fit
  396. hist_name = "KalmanFit/UnbiasedResidualsX/plane_" + ss_chip.str();
  397. m_XunresKfit.push_back(Gaudi::Utils::Aida2ROOT::aida2root(
  398. book1D(hist_name.c_str(), hist_name.c_str(), -1.e-2, 1.e-2, 100)));
  399. hist_name = "KalmanFit/UnbiasedResidualsY/plane_" + ss_chip.str();
  400. m_YunresKfit.push_back(Gaudi::Utils::Aida2ROOT::aida2root(
  401. book1D(hist_name.c_str(), hist_name.c_str(), -1.e-2, 1.e-2, 100)));
  402. //
  403. hist_name = "KalmanFit/Residuals_on_X/plane_" + ss_chip.str();
  404. m_resKfit_X.push_back(Gaudi::Utils::Aida2ROOT::aida2root(
  405. book1D(hist_name.c_str(), hist_name.c_str(), -1.e-2, 1.e-2, 100)));
  406. hist_name = "KalmanFit/Residuals_on_Y/plane_" + ss_chip.str();
  407. m_resKfit_Y.push_back(Gaudi::Utils::Aida2ROOT::aida2root(
  408. book1D(hist_name.c_str(), hist_name.c_str(), -1.e-2, 1.e-2, 100)));
  409. hist_name = "KalmanFit/Residual_errors_on_X/plane_" + ss_chip.str();
  410. m_reserrKfit_X.push_back(Gaudi::Utils::Aida2ROOT::aida2root(
  411. book1D(hist_name.c_str(), hist_name.c_str(), 0., 5.e-3, 1000)));
  412. hist_name = "KalmanFit/Residual_errors_on_Y/plane_" + ss_chip.str();
  413. m_reserrKfit_Y.push_back(Gaudi::Utils::Aida2ROOT::aida2root(
  414. book1D(hist_name.c_str(), hist_name.c_str(), 0., 5.e-3, 1000)));
  415. hist_name = "KalmanFit/ResidualPull_on_X/plane_" + ss_chip.str();
  416. m_respullKfit_X.push_back(Gaudi::Utils::Aida2ROOT::aida2root(
  417. book1D(hist_name.c_str(), hist_name.c_str(), -10., 10., 100)));
  418. hist_name = "KalmanFit/ResidualPull_on_Y/plane_" + ss_chip.str();
  419. m_respullKfit_Y.push_back(Gaudi::Utils::Aida2ROOT::aida2root(
  420. book1D(hist_name.c_str(), hist_name.c_str(), -10., 10., 100)));
  421.  
  422. hist_name = "KalmanFit/Differences_from_true_on_X/plane_" + ss_chip.str();
  423. m_trueKfit_X.push_back(Gaudi::Utils::Aida2ROOT::aida2root(
  424. book1D(hist_name.c_str(), hist_name.c_str(), -1.e-2, 1.e-2, 100)));
  425. hist_name = "KalmanFit/Differences_from_true_on_Y/plane_" + ss_chip.str();
  426. m_trueKfit_Y.push_back(Gaudi::Utils::Aida2ROOT::aida2root(
  427. book1D(hist_name.c_str(), hist_name.c_str(), -1.e-2, 1.e-2, 100)));
  428. hist_name = "KalmanFit/Differences_errors_from_true_on_X/plane_" + ss_chip.str();
  429. m_trueerrKfit_X.push_back(Gaudi::Utils::Aida2ROOT::aida2root(
  430. book1D(hist_name.c_str(), hist_name.c_str(), 0., 5.e-3, 1000)));
  431. hist_name = "KalmanFit/Differences_errors_from_true_on_Y/plane_" + ss_chip.str();
  432. m_trueerrKfit_Y.push_back(Gaudi::Utils::Aida2ROOT::aida2root(
  433. book1D(hist_name.c_str(), hist_name.c_str(), 0., 5.e-3, 1000)));
  434. hist_name = "KalmanFit/TrackPull_on_X/plane_" + ss_chip.str();
  435. m_trackpullKfit_X.push_back(Gaudi::Utils::Aida2ROOT::aida2root(
  436. book1D(hist_name.c_str(), hist_name.c_str(), -10., 10., 100)));
  437. hist_name = "KalmanFit/TrackPull_on_Y/plane_" + ss_chip.str();
  438. m_trackpullKfit_Y.push_back(Gaudi::Utils::Aida2ROOT::aida2root(
  439. book1D(hist_name.c_str(), hist_name.c_str(), -10., 10., 100)));
  440. }
  441. }
  442.  
  443. //=============================================================================
  444. /// End
  445. //=============================================================================