CMS 3D CMS Logo

/data/doxygen/doxygen-1.7.3/gen/CMSSW_4_2_8/src/SimG4CMS/ShowerLibraryProducer/interface/FiberSD.h

Go to the documentation of this file.
00001 #ifndef SimG4CMS_ShowerLibraryProducer_FiberSD_h
00002 #define SimG4CMS_ShowerLibraryProducer_FiberSD_h
00003 
00004 #include "SimG4Core/Notification/interface/Observer.h"
00005 #include "SimG4Core/Notification/interface/BeginOfRun.h"
00006 #include "SimG4Core/Notification/interface/BeginOfEvent.h"
00007 #include "SimG4Core/Notification/interface/EndOfEvent.h"
00008 #include "SimG4Core/SensitiveDetector/interface/SensitiveCaloDetector.h"
00009 #include "SimG4Core/Application/interface/SimTrackManager.h"
00010 
00011 #include "SimG4CMS/ShowerLibraryProducer/interface/FiberG4Hit.h"
00012 #include "SimG4CMS/Calo/interface/HFShower.h"
00013 
00014 #include "FWCore/MessageLogger/interface/MessageLogger.h"
00015 
00016 #include "G4Track.hh"
00017 
00018 #include <iostream>
00019 #include <fstream>
00020 #include <vector>
00021 
00022 class G4Step;
00023 class G4HCofThisEvent;
00024 
00025 class FiberSD : public SensitiveCaloDetector,
00026                 public Observer<const BeginOfRun *>,
00027                 public Observer<const BeginOfEvent*>,
00028                 public Observer<const EndOfEvent*> {
00029 
00030 public:
00031 
00032   FiberSD(std::string, const DDCompactView&, SensitiveDetectorCatalog&,
00033           edm::ParameterSet const &, const SimTrackManager*);
00034   virtual ~FiberSD();
00035 
00036   virtual void     Initialize(G4HCofThisEvent*HCE);
00037   virtual G4bool   ProcessHits(G4Step* aStep,G4TouchableHistory* ROhist);
00038   virtual void     EndOfEvent(G4HCofThisEvent* HCE);
00039   virtual void     clear();
00040   virtual void     DrawAll();
00041   virtual void     PrintAll();
00042 
00043 protected:
00044 
00045   virtual void     clearHits();
00046   virtual uint32_t setDetUnitId(G4Step*);
00047   virtual void     fillHits(edm::PCaloHitContainer&, std::string);
00048 
00049   virtual void     update(const BeginOfRun *);
00050   virtual void     update(const BeginOfEvent *);
00051   virtual void     update(const ::EndOfEvent *);
00052 
00053 private:
00054 
00055   std::string            theName;
00056   const SimTrackManager* m_trackManager;
00057   HFShower*              theShower;
00058 
00059   G4int                  theHCID;
00060   FiberG4HitsCollection* theHC;
00061 };
00062 
00063 #endif
00064