diff --git a/reco/detectors/rich/mcbm/CbmRichMCbmQaRichOnly.cxx b/reco/detectors/rich/mcbm/CbmRichMCbmQaRichOnly.cxx
index 2e7e6e602cebc045fe7d3ebb2829cee4552ec388..b58cb9f86316d1d4663261206baefad39fe08396 100644
--- a/reco/detectors/rich/mcbm/CbmRichMCbmQaRichOnly.cxx
+++ b/reco/detectors/rich/mcbm/CbmRichMCbmQaRichOnly.cxx
@@ -14,6 +14,7 @@
 #include "TMath.h"
 #include "TStyle.h"
 #include "TSystem.h"
+#include "TFile.h"
 
 #include <TBox.h>
 #include <TLegend.h>