CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_4_4_5_patch3/src/SimG4CMS/Forward/interface/PLTSensitiveDetector.h

Go to the documentation of this file.
00001 #ifndef Forward_PLTSensitiveDetector_h
00002 #define Forward_PLTSensitiveDetector_h
00003  
00004 // system include files
00005 
00006 // user include files
00007 
00008 #include "SimG4Core/Notification/interface/Observer.h"
00009 #include "SimG4Core/SensitiveDetector/interface/SensitiveTkDetector.h"
00010 #include "SimG4Core/Notification/interface/BeginOfJob.h"
00011 #include "SimG4Core/Notification/interface/BeginOfEvent.h"
00012 #include "SimG4Core/Notification/interface/BeginOfTrack.h"
00013 
00014 #include "SimG4Core/Notification/interface/G4TrackToParticleID.h"
00015 #include "SimG4Core/Physics/interface/G4ProcessTypeEnumerator.h"
00016 
00017 #include "G4Step.hh"
00018 #include "G4StepPoint.hh"
00019 #include "G4Track.hh"
00020  
00021 #include <string>
00022 
00023 class TrackInformation;
00024 class SimTrackManager;
00025 class TrackingSlaveSD;
00026 class UpdatablePSimHit;
00027 class G4ProcessTypeEnumerator;
00028 class G4TrackToParticleID;
00029 
00030 class PLTSensitiveDetector : public SensitiveTkDetector,
00031                              public Observer<const BeginOfEvent*>,
00032                              public Observer<const BeginOfTrack*>,
00033                              public Observer<const BeginOfJob*> {
00034 
00035 public:
00036 
00037   PLTSensitiveDetector(std::string, const DDCompactView &, 
00038                        SensitiveDetectorCatalog &, 
00039                        edm::ParameterSet const &, const SimTrackManager*);
00040   virtual ~PLTSensitiveDetector();
00041 
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 
00048 private:
00049 
00050   virtual void   sendHit();
00051   virtual void   updateHit(G4Step *);
00052   virtual bool   newHit(G4Step *);
00053   virtual bool   closeHit(G4Step *);
00054   virtual void   createHit(G4Step *);
00055   void           update(const BeginOfEvent *);
00056   void           update(const BeginOfTrack *);
00057   void           update(const BeginOfJob *);
00058   virtual void   clearHits();
00059   TrackInformation* getOrCreateTrackInformation(const G4Track *);
00060 
00061 private:
00062 
00063   TrackingSlaveSD*            slave;
00064   G4ProcessTypeEnumerator * theG4ProcessTypeEnumerator;
00065   G4TrackToParticleID * myG4TrackToParticleID;
00066   std::string        myName;
00067   UpdatablePSimHit * mySimHit;
00068   float energyCut;
00069   float energyHistoryCut;
00070 
00071   Local3DPoint globalEntryPoint;
00072   Local3DPoint globalExitPoint;
00073   G4VPhysicalVolume * oldVolume;
00074   uint32_t lastId;
00075   unsigned int lastTrack;
00076   int eventno;
00077   std::string pname;
00078 
00079 };
00080 
00081 #endif