CMS 3D CMS Logo

TkAccumulatingSensitiveDetector.h

Go to the documentation of this file.
00001 #ifndef SimG4CMS_TkAccumulatingSensitiveDetector_H
00002 #define SimG4CMS_TkAccumulatingSensitiveDetector_H
00003 
00008 #include "SimG4Core/Notification/interface/Observer.h"
00009 #include "SimG4Core/SensitiveDetector/interface/SensitiveTkDetector.h"
00010 #include "SimG4Core/Notification/interface/BeginOfTrack.h"
00011 #include "SimG4Core/Notification/interface/BeginOfEvent.h"
00012 #include "SimG4Core/Notification/interface/EndOfEvent.h"
00013 #include "SimG4Core/Notification/interface/BeginOfJob.h"
00014 
00015 #include "G4Step.hh"
00016 #include "G4StepPoint.hh"
00017 #include "G4Track.hh"
00018 
00019 #include <string>
00020 
00021 class TrackInformation;
00022 class SimTrackManager;
00023 class TrackingSlaveSD;
00024 class FrameRotation;
00025 class UpdatablePSimHit;
00026 class G4ProcessTypeEnumerator;
00027 class G4TrackToParticleID;
00028 class TrackerG4SimHitNumberingScheme;
00029 
00030 class TkAccumulatingSensitiveDetector : 
00031 public SensitiveTkDetector, 
00032 public Observer<const BeginOfEvent*>,
00033 public Observer<const BeginOfTrack*>,
00034 public Observer<const BeginOfJob*>
00035 { 
00036 public:    
00037     TkAccumulatingSensitiveDetector(std::string, const DDCompactView &,
00038                                     SensitiveDetectorCatalog &,
00039                                     edm::ParameterSet const &,
00040                                     const SimTrackManager*);
00041     virtual ~TkAccumulatingSensitiveDetector();
00042     virtual bool ProcessHits(G4Step *,G4TouchableHistory *);
00043     virtual uint32_t setDetUnitId(G4Step*);
00044     virtual void EndOfEvent(G4HCofThisEvent*);
00045 
00046     void fillHits(edm::PSimHitContainer&, std::string use);
00047     std::vector<std::string> getNames();
00048     std::string type();
00049 
00050 private:
00051     virtual void sendHit();
00052     virtual void updateHit(G4Step *);
00053     virtual bool newHit(G4Step *);
00054     virtual bool closeHit(G4Step *);
00055     virtual void createHit(G4Step *);
00056     void checkExitPoint(Local3DPoint);
00057     void update(const BeginOfEvent *);
00058     void update(const BeginOfTrack *);
00059     void update(const BeginOfJob *);
00060     virtual void clearHits();
00061     Local3DPoint toOrcaRef(Local3DPoint ,G4VPhysicalVolume *);
00062     int tofBin(float);
00063     std::string myName; 
00064     TrackingSlaveSD * slaveLowTof;
00065     TrackingSlaveSD * slaveHighTof;
00066     FrameRotation * myRotation;
00067     UpdatablePSimHit * mySimHit;
00068     std::string pname;
00069     Local3DPoint globalEntryPoint;
00070     Local3DPoint globalExitPoint;
00071     const SimTrackManager* theManager;
00072     G4VPhysicalVolume * oldVolume;
00073     G4ProcessTypeEnumerator * theG4ProcessTypeEnumerator;
00074     double theSigma;
00075     uint32_t lastId;
00076     unsigned int lastTrack;
00077     int eventno;
00078     // cache stuff for debugging
00079     float px,py,pz;
00080     bool allowZeroEnergyLoss;
00081     bool printHits;
00082     bool neverAccumulate;
00083     G4TrackToParticleID * myG4TrackToParticleID;
00084     TrackInformation* getOrCreateTrackInformation(const G4Track *);
00085     float energyCut;
00086     float energyHistoryCut;
00087     //
00088     // definition of Tracker volume
00089     //
00090     float rTracker;
00091     float zTracker;
00092 
00093     TrackerG4SimHitNumberingScheme* numberingScheme_;
00094 };
00095 
00096 #endif
00097 
00098 
00099 
00100 
00101 

Generated on Tue Jun 9 17:46:59 2009 for CMSSW by  doxygen 1.5.4