//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... #ifndef sr1RootOutput_h #define sr1RootOutput_h 1 //#include "G4UserRunAction.hh" #include "globals.hh" #include "G4ThreeVector.hh" // ROOT #include "TFile.h" #include "TTree.h" #include "TH1.h" #include "TH2.h" #include "TVectorD.h" // #include //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... class sr1RootOutput { public: sr1RootOutput(); ~sr1RootOutput(); static sr1RootOutput* GetRootInstance(); public: void BeginOfRunAction(); void EndOfRunAction(); void FillEvent(); void ClearAllRootVariables(); // void SetSensitiveDetectorMapping(std::string logivol, int volumeID); void SetVolumeIDMapping(std::string logivol, int volumeID); G4int ConvertVolumeToID(std::string logivol); G4int ConvertProcessToID(std::string processName); void SetSpecialSaveVolumeDefined() {boolIsAnySpecialSaveVolumeDefined=true;}; // Getting variables (just for debugging) G4double GetDecayPositionZ() {return muDecayPosZ_t;}; G4double GetDecayTime() {return muDecayTime_t*microsecond;}; G4double GetTimeInTarget() {return muTargetTime_t*microsecond;}; // Setting variables common to the whole event: void SetRunID (G4int id) {runID_t = id;}; void SetEventID (G4int id) {eventID_t = id;}; void SetDecayDetectorID (std::string detectorName) {muDecayDetID_t = SensDetectorMapping[detectorName];}; void SetBField (G4double F[6]) {B_t[0]=F[0]/tesla; B_t[1]=F[1]/tesla; B_t[2]=F[2]/tesla; B_t[3]=F[3]/tesla; B_t[4]=F[4]/tesla; B_t[5]=F[5]/tesla;}; void SetDecayPolarisation (G4ThreeVector pol) {muDecayPolX_t=pol.x(); muDecayPolY_t=pol.y(); muDecayPolZ_t=pol.z();}; void SetDecayPosition (G4ThreeVector pos) {muDecayPosX_t=pos.x()/mm; muDecayPosY_t=pos.y()/mm; muDecayPosZ_t=pos.z()/mm;}; // void SetGlobTime (G4double gt) {globalTime_t = gt/microsecond;}; // void SetEventWeight (G4int w) {weight_t *= w;} void SetEventWeight (G4double w) {weight_t *= w;} void SetDetectorInfo (G4int nDetectors, G4int ID, G4int particleID, G4double edep, G4double edep_el, G4double edep_pos, G4double edep_gam, G4double edep_mup,G4int nsteps, G4double length, G4double t1, G4double t2, G4double x, G4double y, G4double z, G4double ek, G4double ekVertex, G4double xVertex, G4double yVertex, G4double zVertex, G4int idVolVertex, G4int idProcVertex, G4int idTrackVertex) ; void SetDetectorInfoVvv (G4int nDetectors, G4double ekVertex, G4double xVertex, G4double yVertex, G4double zVertex, G4int idVolVertex, G4int idProcVertex, G4int idTrackVertex, G4int particleID) ; void SetSaveDetectorInfo (G4int ID, G4int particleID, G4double x, G4double y, G4double z, G4double px, G4double py, G4double pz) ; void SetInitialMuonParameters(G4double x, G4double y, G4double z, G4double px, G4double py, G4double pz, G4double xpolaris, G4double ypolaris, G4double zpolaris) { muIniPosX_t=x; muIniPosY_t=y; muIniPosZ_t=z; muIniMomX_t=px; muIniMomY_t=py; muIniMomZ_t=pz; muIniPolX_t=xpolaris; muIniPolY_t=ypolaris; muIniPolZ_t=zpolaris; } void PrintInitialMuonParameters() { G4cout<<"sr1RootOutput.hh: Initial muon parameters: x="< SensDetectorMapping; std::map ProcessIDMapping; }; //G4int sr1RootOutput::maxNSubTracks=30; //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... #endif