1 #ifndef SimG4CMS_CaloSD_h 2 #define SimG4CMS_CaloSD_h 24 #include "G4VPhysicalVolume.hh" 26 #include "G4VGFlashSensitiveDetector.hh" 32 class G4HCofThisEvent;
38 public G4VGFlashSensitiveDetector,
40 public Observer<const BeginOfEvent *>,
41 public Observer<const BeginOfTrack *>,
43 public Observer<const EndOfEvent *> {
50 float timeSlice=1.,
bool ignoreTkID=
false);
54 bool ProcessHits(G4GFlashSpot* aSpot, G4TouchableHistory*)
override;
58 void Initialize(G4HCofThisEvent * HCE)
override;
59 void EndOfEvent(G4HCofThisEvent * eventHC)
override;
60 void clear()
override;
72 G4ThreeVector
setToLocal(
const G4ThreeVector&,
const G4VTouchable*)
const;
73 G4ThreeVector
setToGlobal(
const G4ThreeVector&,
const G4VTouchable*)
const;
80 double getAttenuation(
const G4Step* aStep,
double birk1,
double birk2,
87 void update(const ::EndOfEvent *)
override;
93 virtual uint16_t
getDepth(
const G4Step*);
167 std::map<int,TrackWithHistory*>
tkMap;
175 #endif // SimG4CMS_CaloSD_h
virtual bool getFromLibrary(const G4Step *step)
std::vector< PCaloHit > PCaloHitContainer
void setNumberCheckedHits(int val)
void updateHit(CaloG4Hit *)
virtual uint16_t getDepth(const G4Step *)
virtual double getEnergyDeposit(const G4Step *step)
uint32_t setDetUnitId(const G4Step *step) override=0
virtual int getTrackID(const G4Track *)
void Initialize(G4HCofThisEvent *HCE) override
void processHit(const G4Step *step)
Compact representation of the geometrical detector hierarchy.
void fillHits(edm::PCaloHitContainer &, const std::string &) override
std::vector< CaloG4Hit * > reusehit
void cleanHitCollection()
std::unique_ptr< CaloSlaveSD > slave
void resetForNewPrimary(const G4Step *)
CaloG4Hit * createNewHit(const G4Step *)
G4bool ProcessHits(G4Step *step, G4TouchableHistory *) override
std::vector< CaloG4Hit * > hitvec
G4ThreeVector setToGlobal(const G4ThreeVector &, const G4VTouchable *) const
CaloSD(const std::string &aSDname, const DDCompactView &cpv, const SensitiveDetectorCatalog &clg, edm::ParameterSet const &p, const SimTrackManager *, float timeSlice=1., bool ignoreTkID=false)
std::vector< unsigned int > selIndex
void storeHit(CaloG4Hit *)
virtual bool filterHit(CaloG4Hit *, double)
G4ThreeVector setToLocal(const G4ThreeVector &, const G4VTouchable *) const
bool hitExists(const G4Step *)
std::unique_ptr< CaloMeanResponse > meanResponse
void EndOfEvent(G4HCofThisEvent *eventHC) override
std::map< CaloHitID, CaloG4Hit * > hitMap
double getAttenuation(const G4Step *aStep, double birk1, double birk2, double birk3) const
CaloG4HitCollection * theHC
virtual int setTrackID(const G4Step *)
G4THitsCollection< CaloG4Hit > CaloG4HitCollection
std::map< int, TrackWithHistory * > tkMap
const SimTrackManager * m_trackManager
void clearHits() override
double getResponseWt(const G4Track *)
bool saveHit(CaloG4Hit *)
G4ThreeVector entrancePoint
G4ThreeVector entranceLocal
void update(const BeginOfRun *) override
This routine will be called when the appropriate signal arrives.
void setParameterized(bool val)