Changeset 70
- Timestamp:
- Jan 12, 2006, 3:58:03 PM (18 years ago)
- Location:
- MEMPHYS/HEAD
- Files:
-
- 21 added
- 21 deleted
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
MEMPHYS/HEAD/applications/MEMPHYS_batch.cxx
r68 r70 5 5 6 6 //MEMPHYS: 7 #include "MEMPHYS/ MEMPHYSAnalysis.hh"8 #include "MEMPHYS/ MEMPHYSDetectorConstruction.hh"9 #include "MEMPHYS/ MEMPHYSPhysicsList.hh"10 #include "MEMPHYS/ MEMPHYSPhysicsMessenger.hh"11 #include "MEMPHYS/ MEMPHYSPrimaryGeneratorAction.hh"12 #include "MEMPHYS/ MEMPHYSEventAction.hh"13 #include "MEMPHYS/ MEMPHYSRunAction.hh"14 #include "MEMPHYS/ MEMPHYSStackingAction.hh"15 #include "MEMPHYS/ MEMPHYSTrackingAction.hh"16 #include "MEMPHYS/ MEMPHYSSteppingAction.hh"7 #include "MEMPHYS/Analysis.hh" 8 #include "MEMPHYS/DetectorConstruction.hh" 9 #include "MEMPHYS/PhysicsList.hh" 10 #include "MEMPHYS/PhysicsMessenger.hh" 11 #include "MEMPHYS/PrimaryGeneratorAction.hh" 12 #include "MEMPHYS/EventAction.hh" 13 #include "MEMPHYS/RunAction.hh" 14 #include "MEMPHYS/StackingAction.hh" 15 #include "MEMPHYS/TrackingAction.hh" 16 #include "MEMPHYS/SteppingAction.hh" 17 17 18 18 … … 40 40 } 41 41 //Book all the histo, tuple 42 MEMPHYS:: MEMPHYSAnalysis* analysis = new MEMPHYS::MEMPHYSAnalysis(*aida);42 MEMPHYS::Analysis* analysis = new MEMPHYS::Analysis(*aida); 43 43 44 44 … … 51 51 52 52 //JEC 18/11/05 give the "analysis" to fill geometry ITuple 53 MEMPHYS:: MEMPHYSDetectorConstruction* MEMPHYSdetector =54 new MEMPHYS:: MEMPHYSDetectorConstruction(*analysis);53 MEMPHYS::DetectorConstruction* MEMPHYSdetector = 54 new MEMPHYS::DetectorConstruction(*analysis); 55 55 56 56 runManager->SetUserInitialization(MEMPHYSdetector); 57 57 58 runManager->SetUserInitialization(new MEMPHYS:: MEMPHYSPhysicsList);58 runManager->SetUserInitialization(new MEMPHYS::PhysicsList); 59 59 60 60 G4UImanager* UI = G4UImanager::GetUIpointer(); … … 68 68 69 69 // Set user action classes 70 MEMPHYS:: MEMPHYSPrimaryGeneratorAction* myGeneratorAction = new MEMPHYS::MEMPHYSPrimaryGeneratorAction(MEMPHYSdetector);70 MEMPHYS::PrimaryGeneratorAction* myGeneratorAction = new MEMPHYS::PrimaryGeneratorAction(MEMPHYSdetector); 71 71 runManager->SetUserAction(myGeneratorAction); 72 72 73 MEMPHYS:: MEMPHYSRunAction* myRunAction = new MEMPHYS::MEMPHYSRunAction();73 MEMPHYS::RunAction* myRunAction = new MEMPHYS::RunAction(); 74 74 75 75 runManager->SetUserAction(myRunAction); 76 76 77 77 78 runManager->SetUserAction(new MEMPHYS:: MEMPHYSEventAction(*analysis,78 runManager->SetUserAction(new MEMPHYS::EventAction(*analysis, 79 79 myRunAction, 80 80 MEMPHYSdetector, 81 81 myGeneratorAction)); 82 runManager->SetUserAction(new MEMPHYS:: MEMPHYSTrackingAction);82 runManager->SetUserAction(new MEMPHYS::TrackingAction); 83 83 84 runManager->SetUserAction(new MEMPHYS:: MEMPHYSStackingAction);85 runManager->SetUserAction(new MEMPHYS:: MEMPHYSSteppingAction); //JEC 15/12/05 Add user SteppingAction84 runManager->SetUserAction(new MEMPHYS::StackingAction); 85 runManager->SetUserAction(new MEMPHYS::SteppingAction); //JEC 15/12/05 Add user SteppingAction 86 86 87 87 // Initialize G4 kernel -
MEMPHYS/HEAD/applications/MEMPHYS_session.cxx
r68 r70 23 23 24 24 //MEMPHYS: 25 #include "MEMPHYS/ MEMPHYSAnalysis.hh"26 #include "MEMPHYS/ MEMPHYSDetectorConstruction.hh"27 #include "MEMPHYS/ MEMPHYSPhysicsList.hh"28 #include "MEMPHYS/ MEMPHYSPhysicsMessenger.hh"29 #include "MEMPHYS/ MEMPHYSPrimaryGeneratorAction.hh"30 #include "MEMPHYS/ MEMPHYSEventAction.hh"31 #include "MEMPHYS/ MEMPHYSRunAction.hh"32 #include "MEMPHYS/ MEMPHYSStackingAction.hh"33 #include "MEMPHYS/ MEMPHYSTrackingAction.hh"34 #include "MEMPHYS/ MEMPHYSSteppingAction.hh"35 #include "MEMPHYS/ MEMPHYSWCDigi.hh"25 #include "MEMPHYS/Analysis.hh" 26 #include "MEMPHYS/DetectorConstruction.hh" 27 #include "MEMPHYS/PhysicsList.hh" 28 #include "MEMPHYS/PhysicsMessenger.hh" 29 #include "MEMPHYS/PrimaryGeneratorAction.hh" 30 #include "MEMPHYS/EventAction.hh" 31 #include "MEMPHYS/RunAction.hh" 32 #include "MEMPHYS/StackingAction.hh" 33 #include "MEMPHYS/TrackingAction.hh" 34 #include "MEMPHYS/SteppingAction.hh" 35 #include "MEMPHYS/WCDigi.hh" 36 36 37 37 // Create a manager to access the MEMPHYSAnalysis from the callbacks : … … 39 39 //JEC 10/1/06 introduce MEMPHYS namespace 40 40 namespace MEMPHYS { 41 class MEMPHYSAnalysisManager 41 42 class AnalysisManager 42 43 :public virtual IManager 43 ,public MEMPHYSAnalysis {44 ,public Analysis { 44 45 public: //IManager 45 46 virtual const std::string& name() const { return fName;} 46 47 virtual void* cast(const std::string& aTo) const { 47 if(aTo=="MEMPHYS:: MEMPHYSAnalysisManager") {48 return Lib_SCast(MEMPHYS:: MEMPHYSAnalysisManager);49 } else if(aTo=="MEMPHYS:: MEMPHYSIAnalysis") {50 return Lib_SCast(MEMPHYS:: MEMPHYSIAnalysis);51 } else if(aTo=="MEMPHYS:: MEMPHYSAnalysis") {52 return Lib_SCast(MEMPHYS:: MEMPHYSAnalysis);48 if(aTo=="MEMPHYS::AnalysisManager") { 49 return Lib_SCast(MEMPHYS::AnalysisManager); 50 } else if(aTo=="MEMPHYS::IAnalysis") { 51 return Lib_SCast(MEMPHYS::IAnalysis); 52 } else if(aTo=="MEMPHYS::Analysis") { 53 return Lib_SCast(MEMPHYS::Analysis); 53 54 } else if(aTo=="IManager") { 54 55 return Lib_SCast(IManager); … … 58 59 } 59 60 public: 60 MEMPHYSAnalysisManager(AIDA::IAnalysisFactory& aAIDA,bool aBatch)61 : MEMPHYSAnalysis(aAIDA,aBatch),fName("MEMPHYS::MEMPHYSAnalysisManager") {}62 virtual ~ MEMPHYSAnalysisManager(){}61 AnalysisManager(AIDA::IAnalysisFactory& aAIDA,bool aBatch) 62 :Analysis(aAIDA,aBatch),fName("MEMPHYS::AnalysisManager") {} 63 virtual ~AnalysisManager(){} 63 64 private: 64 65 std::string fName; … … 82 83 G4Lab::UIOnX* session = new G4Lab::UIOnX(*runManager,gui,aArgc,aArgv); 83 84 84 MEMPHYS:: MEMPHYSAnalysisManager* analysisManager = 0;85 MEMPHYS::AnalysisManager* analysisManager = 0; 85 86 86 87 AIDA::IAnalysisFactory* aida = G4Lab::UIOnX_aida(*session); … … 88 89 std::cout << "MEMPHYS_session : AIDA not found." << std::endl; 89 90 } else { 90 analysisManager = new MEMPHYS:: MEMPHYSAnalysisManager(*aida,false);91 analysisManager = new MEMPHYS::AnalysisManager(*aida,false); 91 92 session->addManager(analysisManager); 92 93 } … … 96 97 //FIXME : From G4VDigiCollection, we can't loop on G4VDigi ! 97 98 session->addType 98 (new G4Lab::DigitsCollectionType<MEMPHYS:: MEMPHYSWCDigi>99 (new G4Lab::DigitsCollectionType<MEMPHYS::WCDigi> 99 100 (*(session->session()),"WCDigitizedCollection")); 100 101 } … … 109 110 110 111 //JEC 18/11/05 give the "analysis" to fill geometry ITuple 111 MEMPHYS:: MEMPHYSDetectorConstruction* MEMPHYSdetector =112 new MEMPHYS:: MEMPHYSDetectorConstruction(*analysisManager);112 MEMPHYS::DetectorConstruction* MEMPHYSdetector = 113 new MEMPHYS::DetectorConstruction(*analysisManager); 113 114 114 115 runManager->SetUserInitialization(MEMPHYSdetector); 115 116 116 runManager->SetUserInitialization(new MEMPHYS:: MEMPHYSPhysicsList);117 runManager->SetUserInitialization(new MEMPHYS::PhysicsList); 117 118 118 119 // Set user action classes 119 MEMPHYS:: MEMPHYSPrimaryGeneratorAction* myGeneratorAction =120 new MEMPHYS:: MEMPHYSPrimaryGeneratorAction(MEMPHYSdetector);120 MEMPHYS::PrimaryGeneratorAction* myGeneratorAction = 121 new MEMPHYS::PrimaryGeneratorAction(MEMPHYSdetector); 121 122 runManager->SetUserAction(myGeneratorAction); 122 123 123 MEMPHYS:: MEMPHYSRunAction* myRunAction = new MEMPHYS::MEMPHYSRunAction();124 MEMPHYS::RunAction* myRunAction = new MEMPHYS::RunAction(); 124 125 125 126 runManager->SetUserAction(myRunAction); 126 127 127 128 128 runManager->SetUserAction(new MEMPHYS:: MEMPHYSEventAction(*analysisManager,129 runManager->SetUserAction(new MEMPHYS::EventAction(*analysisManager, 129 130 myRunAction, 130 131 MEMPHYSdetector, 131 132 myGeneratorAction)); 132 runManager->SetUserAction(new MEMPHYS:: MEMPHYSTrackingAction);133 runManager->SetUserAction(new MEMPHYS::TrackingAction); 133 134 134 runManager->SetUserAction(new MEMPHYS:: MEMPHYSStackingAction);135 runManager->SetUserAction(new MEMPHYS::StackingAction); 135 136 136 runManager->SetUserAction(new MEMPHYS:: MEMPHYSSteppingAction); //JEC 15/12/05 Add user SteppingAction137 runManager->SetUserAction(new MEMPHYS::SteppingAction); //JEC 15/12/05 Add user SteppingAction 137 138 138 139 // Initialize G4 kernel
Note: See TracChangeset
for help on using the changeset viewer.