| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

In This Package:

HistorianStepAction.h

Go to the documentation of this file.
00001 #ifndef HISTORIANSTEPACTION_H
00002 #define HISTORIANSTEPACTION_H
00003 
00004 #include "QueriableStepAction.h"
00005 #include "GiGa/GiGaStepActionBase.h"
00006 #include "RuleParser/Queriable.h"
00007 #include "Event/SimTrackReference.h"
00008 #include "Event/SimVertexReference.h"
00009 
00010 namespace DayaBay {
00011   class SimVertex;
00012   class SimTrack;
00013   class SimParticleHistory;
00014 }
00015 
00016 namespace RuleParser{
00017   class Rule;
00018 }
00019 
00020 class ITouchableToDetectorElement;
00021 class IHistoryKeeper;
00022 class IDetectorElement;
00023 class ILVolume;
00024 class IPVolume;
00025 class G4Track;
00026 class G4StepPoint;
00027 class G4HistoryUserTrackInfo;
00028 
00029 
00030 class HistorianStepAction: public QueriableStepAction
00031                            
00032 {
00033 public:
00034   HistorianStepAction( const std::string& type   , 
00035                      const std::string& name   , 
00036                      const IInterface*  parent ) ;
00037   virtual ~HistorianStepAction() {};
00038   
00039   virtual StatusCode         initialize () ; 
00040   virtual StatusCode         finalize   () ;
00041 
00042   virtual void UserSteppingAction(const G4Step*);
00043   
00044   // Things for evaluating selection rules:
00045   virtual void      queryParam(int id,double&      output) const;
00046   virtual void      queryParam(int id,std::string& output) const;
00047 
00048   // Things for above, or for filling the track:
00049   DayaBay::SimTrackReference    getAncestorTrack()        const;
00050   DayaBay::SimVertexReference   getAncestorVertex()       const;
00051   
00052   // Users are free to override this class, and provide their own way to do things.
00053   virtual bool    IsInterestingTrack(const G4Track*);
00054   virtual bool    IsInterestingVertex(const G4Step*);
00055   
00056 private:
00057    G4bool   idflag;
00058 
00059   // Configuration.
00060   std::string              m_TrackSelection;
00061   std::string              m_VertexSelection;
00062   G4bool                   m_UseFastMuEnergyCut;  // Defined a flag for using or not use the energy cut for muon simulation.  // Tools and other persistble information
00063   IHistoryKeeper*               mHistoryKeeper;
00064   RuleParser::Rule*             mTrackRule;
00065   RuleParser::Rule*             mVertexRule;
00066   
00067   // This is temporary storage for a single processing call.
00068   DayaBay::SimParticleHistory*     mCurrentHistory;
00069   DayaBay::SimTrackReference       mCurrentTrackRef;
00070 
00071   StatusCode CreateTrack(const G4Track*, DayaBay::SimTrack* &track);
00072   StatusCode CreateVertex(DayaBay::SimVertex* &v, 
00073                           const DayaBay::SimTrackReference& parent); // Only works if vertex hasn't yet been filled.
00074   
00075   
00076   HistorianStepAction (); 
00077   HistorianStepAction           ( const HistorianStepAction& ); 
00078   HistorianStepAction& operator=( const HistorianStepAction& ); 
00079   
00080   
00081   enum EHistorianStepParams {
00082     kPar_HISTORIAN_START = kPar_END_QUERIABLE
00083     // Tracky things specific to Histories:
00084     , kPar_ParentPdg                  // int
00085     , kPar_ParentIndirection          // int
00086     , kPar_GrandParentPdg             // int
00087     , kPar_GrandParentIndirection     // int
00088   
00089      // Vertex-y things only applicable if we have current history information.
00090     , kPar_distanceFromLastVertex     // double
00091     , kPar_timeSinceLastVertex        // double
00092     , kPar_energyLossSinceLastVertex  // double
00093     , kPar_angleFromLastVertex        // double
00094     
00095   };
00096 };
00097 
00098 
00099 
00100 #endif /* MYSTEPACTION_H */
00101 
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

Generated on Mon Apr 11 20:54:53 2011 for Historian by doxygen 1.4.7