1 #ifndef SimG4CMS_CaloSD_h
2 #define SimG4CMS_CaloSD_h
25 #include "G4VPhysicalVolume.hh"
27 #include "G4VGFlashSensitiveDetector.hh"
31 #include <unordered_map>
35 class G4HCofThisEvent;
41 public G4VGFlashSensitiveDetector,
43 public Observer<const BeginOfEvent*>,
44 public Observer<const BeginOfTrack*>,
53 bool ignoreTkID =
false);
57 bool ProcessHits(G4GFlashSpot* aSpot, G4TouchableHistory*)
override;
61 void Initialize(G4HCofThisEvent* HCE)
override;
62 void EndOfEvent(G4HCofThisEvent* eventHC)
override;
63 void clear()
override;
69 void reset()
override;
78 G4ThreeVector
setToLocal(
const G4ThreeVector&,
const G4VTouchable*)
const;
79 G4ThreeVector
setToGlobal(
const G4ThreeVector&,
const G4VTouchable*)
const;
86 double getAttenuation(
const G4Step* aStep,
double birk1,
double birk2,
double birk3)
const;
97 void update(const ::EndOfEvent*)
override;
105 virtual uint16_t
getDepth(
const G4Step*);
188 std::map<int, TrackWithHistory*>
tkMap;
195 #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)
virtual double EnergyCorrected(const G4Step &step, const G4Track *)
unsigned int findBoundaryCrossingParent(const G4Track *track, bool markParentAsSaveable=true)
uint32_t setDetUnitId(const G4Step *step) override=0
virtual int getTrackID(const G4Track *)
void Initialize(G4HCofThisEvent *HCE) override
void processHit(const G4Step *step)
void fillHits(edm::PCaloHitContainer &, const std::string &) override
std::vector< Detector > fineDetectors_
virtual void initEvent(const BeginOfEvent *)
std::unordered_map< unsigned int, unsigned int > boundaryCrossingParentMap_
void cleanHitCollection()
bool isItFineCalo(const G4VTouchable *touch)
static std::string printableDecayChain(const std::vector< unsigned int > &decayChain)
std::unique_ptr< CaloSlaveSD > slave
void resetForNewPrimary(const G4Step *)
G4bool ProcessHits(G4Step *step, G4TouchableHistory *) override
G4ThreeVector setToGlobal(const G4ThreeVector &, const G4VTouchable *) const
CaloG4Hit * createNewHit(const G4Step *, const G4Track *)
void storeHit(CaloG4Hit *)
virtual bool filterHit(CaloG4Hit *, double)
G4ThreeVector setToLocal(const G4ThreeVector &, const G4VTouchable *) const
bool hitExists(const G4Step *)
std::unique_ptr< CaloMeanResponse > meanResponse
std::map< CaloHitID, CaloG4Hit * > hitMap
void EndOfEvent(G4HCofThisEvent *eventHC) override
double getAttenuation(const G4Step *aStep, double birk1, double birk2, double birk3) const
CaloG4HitCollection * theHC
CaloSD(const std::string &aSDname, const SensitiveDetectorCatalog &clg, edm::ParameterSet const &p, const SimTrackManager *, float timeSlice=1., bool ignoreTkID=false)
virtual int setTrackID(const G4Step *)
G4THitsCollection< CaloG4Hit > CaloG4HitCollection
void printDetectorLevels(const G4VTouchable *) const
std::map< int, TrackWithHistory * > tkMap
std::vector< std::unique_ptr< CaloG4Hit > > reusehit
const SimTrackManager * m_trackManager
std::string shortreprID(const CaloHitID &ID)
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)