diff --git a/NPSimulation/Core/PrimaryGeneratorAction.cc b/NPSimulation/Core/PrimaryGeneratorAction.cc
index 6226326cba41fcb3f50a0f7227781efe5e9d96a0..725041c272860dbe95fa66bcb672c2c382f75a0f 100644
--- a/NPSimulation/Core/PrimaryGeneratorAction.cc
+++ b/NPSimulation/Core/PrimaryGeneratorAction.cc
@@ -41,6 +41,7 @@
 
 // Event Generator Class
 #include "EventGeneratorIsotropic.hh"
+#include "EventGeneratorCosmic.hh"
 #include "EventGeneratorMultipleParticle.hh"
 #include "EventGeneratorBeam.hh"
 
@@ -109,6 +110,14 @@ void PrimaryGeneratorAction::ReadEventGeneratorFile(string Path){
         if(m_detector->GetTarget()!=NULL)myEventGenerator->SetTarget(m_detector->GetTarget());
         m_EventGenerator.push_back(myEventGenerator);
     }
+    blocks.clear();
+    blocks = parser.GetAllBlocksWithToken("Cosmic");
+    if (blocks.size()>0) {
+        NPS::VEventGenerator* myEventGenerator = new EventGeneratorCosmic();
+        myEventGenerator->ReadConfiguration(parser);
+        myEventGenerator->InitializeRootOutput();
+        m_EventGenerator.push_back(myEventGenerator);
+    }
     
     m_Target=m_detector->GetTarget();
     if(m_Target!=NULL){