Go to the documentation of this file. 1 #ifndef SimG4CMS_CaloSD_h
2 #define SimG4CMS_CaloSD_h
24 #include "G4VPhysicalVolume.hh"
26 #include "G4VGFlashSensitiveDetector.hh"
33 class G4HCofThisEvent;
39 public G4VGFlashSensitiveDetector,
41 public Observer<const BeginOfEvent*>,
42 public Observer<const BeginOfTrack*>,
52 bool ignoreTkID =
false);
56 bool ProcessHits(G4GFlashSpot* aSpot, G4TouchableHistory*)
override;
60 void Initialize(G4HCofThisEvent* HCE)
override;
61 void EndOfEvent(G4HCofThisEvent* eventHC)
override;
62 void clear()
override;
68 void reset()
override;
77 G4ThreeVector
setToLocal(
const G4ThreeVector&,
const G4VTouchable*)
const;
78 G4ThreeVector
setToGlobal(
const G4ThreeVector&,
const G4VTouchable*)
const;
85 double getAttenuation(
const G4Step* aStep,
double birk1,
double birk2,
double birk3)
const;
94 void update(const ::EndOfEvent*)
override;
102 virtual uint16_t
getDepth(
const G4Step*);
185 std::map<int, TrackWithHistory*>
tkMap;
190 #endif // SimG4CMS_CaloSD_h
std::map< int, TrackWithHistory * > tkMap
virtual bool filterHit(CaloG4Hit *, double)
void storeHit(CaloG4Hit *)
G4ThreeVector setToGlobal(const G4ThreeVector &, const G4VTouchable *) const
G4bool ProcessHits(G4Step *step, G4TouchableHistory *) override
bool saveHit(CaloG4Hit *)
void update(const BeginOfRun *) override
This routine will be called when the appropriate signal arrives.
double getAttenuation(const G4Step *aStep, double birk1, double birk2, double birk3) const
bool hitExists(const G4Step *)
virtual int setTrackID(const G4Step *)
double getResponseWt(const G4Track *)
uint32_t setDetUnitId(const G4Step *step) override=0
G4ThreeVector setToLocal(const G4ThreeVector &, const G4VTouchable *) const
G4ThreeVector entrancePoint
void processHit(const G4Step *step)
void clearHits() override
std::unique_ptr< CaloMeanResponse > meanResponse
void EndOfEvent(G4HCofThisEvent *eventHC) override
std::map< CaloHitID, CaloG4Hit * > hitMap
CaloG4HitCollection * theHC
virtual double getEnergyDeposit(const G4Step *step)
std::unique_ptr< CaloSlaveSD > slave
CaloSD(const std::string &aSDname, const edm::EventSetup &es, const SensitiveDetectorCatalog &clg, edm::ParameterSet const &p, const SimTrackManager *, float timeSlice=1., bool ignoreTkID=false)
void printDetectorLevels(const G4VTouchable *) const
void resetForNewPrimary(const G4Step *)
void setNumberCheckedHits(int val)
virtual uint16_t getDepth(const G4Step *)
std::vector< std::unique_ptr< CaloG4Hit > > reusehit
const SimTrackManager * m_trackManager
virtual int getTrackID(const G4Track *)
void cleanHitCollection()
void setParameterized(bool val)
std::vector< Detector > fineDetectors_
G4ThreeVector entranceLocal
std::vector< PCaloHit > PCaloHitContainer
void hitBookkeepingFineCalo(const G4Step *step, const G4Track *currentTrack, CaloG4Hit *hit)
G4THitsCollection< CaloG4Hit > CaloG4HitCollection
virtual bool getFromLibrary(const G4Step *step)
void Initialize(G4HCofThisEvent *HCE) override
void fillHits(edm::PCaloHitContainer &, const std::string &) override
virtual void initEvent(const BeginOfEvent *)
static std::string printableDecayChain(const std::vector< unsigned int > &decayChain)
void updateHit(CaloG4Hit *)
virtual double EnergyCorrected(const G4Step &step, const G4Track *)
bool isItFineCalo(const G4VTouchable *touch)
CaloG4Hit * createNewHit(const G4Step *, const G4Track *)