CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes
CaloSD Class Referenceabstract

#include <CaloSD.h>

Inheritance diagram for CaloSD:
SensitiveCaloDetector Observer< const BeginOfRun * > Observer< const BeginOfEvent * > Observer< const BeginOfTrack * > Observer< const EndOfTrack * > Observer< const EndOfEvent * > SensitiveDetector CastorSD DreamSD ECalSD EcalTBH4BeamSD HCalSD HcalTB02SD HcalTB06BeamSD HGCSD ZdcSD

Public Member Functions

 CaloSD (G4String aSDname, const DDCompactView &cpv, const SensitiveDetectorCatalog &clg, edm::ParameterSet const &p, const SimTrackManager *, float timeSlice=1., bool ignoreTkID=false)
 
virtual void clear ()
 
virtual void DrawAll ()
 
virtual void EndOfEvent (G4HCofThisEvent *eventHC)
 
void fillHits (edm::PCaloHitContainer &, std::string n)
 
virtual double getEnergyDeposit (G4Step *step)
 
virtual void Initialize (G4HCofThisEvent *HCE)
 
virtual void PrintAll ()
 
virtual bool ProcessHits (G4Step *step, G4TouchableHistory *tHistory)
 
virtual bool ProcessHits (G4GFlashSpot *aSpot, G4TouchableHistory *)
 
virtual uint32_t setDetUnitId (G4Step *step)=0
 
virtual ~CaloSD ()
 
- Public Member Functions inherited from SensitiveCaloDetector
 SensitiveCaloDetector (std::string &iname, const DDCompactView &cpv, const SensitiveDetectorCatalog &clg, edm::ParameterSet const &p)
 
- Public Member Functions inherited from SensitiveDetector
virtual void AssignSD (const std::string &vname)
 
Local3DPoint ConvertToLocal3DPoint (const G4ThreeVector &point)
 
Local3DPoint FinalStepPosition (G4Step *s, coordinates)
 
virtual std::vector< std::string > getNames ()
 
Local3DPoint InitialStepPosition (G4Step *s, coordinates)
 
std::string nameOfSD ()
 
void NaNTrap (G4Step *step)
 
void Register ()
 
 SensitiveDetector (std::string &iname, const DDCompactView &cpv, const SensitiveDetectorCatalog &, edm::ParameterSet const &p)
 
virtual ~SensitiveDetector ()
 
- Public Member Functions inherited from Observer< const BeginOfRun * >
 Observer ()
 
void slotForUpdate (const BeginOfRun *iT)
 
virtual ~Observer ()
 
- Public Member Functions inherited from Observer< const BeginOfEvent * >
 Observer ()
 
void slotForUpdate (const BeginOfEvent *iT)
 
virtual ~Observer ()
 
- Public Member Functions inherited from Observer< const BeginOfTrack * >
 Observer ()
 
void slotForUpdate (const BeginOfTrack *iT)
 
virtual ~Observer ()
 
- Public Member Functions inherited from Observer< const EndOfTrack * >
 Observer ()
 
void slotForUpdate (const EndOfTrack *iT)
 
virtual ~Observer ()
 
- Public Member Functions inherited from Observer< const EndOfEvent * >
 Observer ()
 
void slotForUpdate (const EndOfEvent *iT)
 
virtual ~Observer ()
 

Protected Member Functions

G4bool checkHit ()
 
virtual void clearHits ()
 
CaloG4HitcreateNewHit ()
 
virtual bool filterHit (CaloG4Hit *, double)
 
double getAttenuation (G4Step *aStep, double birk1, double birk2, double birk3)
 
virtual uint16_t getDepth (G4Step *)
 
int getNumberOfHits ()
 
double getResponseWt (G4Track *)
 
virtual G4bool getStepInfo (G4Step *aStep)
 
virtual int getTrackID (G4Track *)
 
G4bool hitExists ()
 
virtual void initRun ()
 
void resetForNewPrimary (const G4ThreeVector &, double)
 
G4ThreeVector setToGlobal (const G4ThreeVector &, const G4VTouchable *)
 
G4ThreeVector setToLocal (const G4ThreeVector &, const G4VTouchable *)
 
virtual void update (const BeginOfRun *)
 This routine will be called when the appropriate signal arrives. More...
 
virtual void update (const BeginOfEvent *)
 This routine will be called when the appropriate signal arrives. More...
 
virtual void update (const BeginOfTrack *trk)
 This routine will be called when the appropriate signal arrives. More...
 
virtual void update (const EndOfTrack *trk)
 This routine will be called when the appropriate signal arrives. More...
 
virtual void update (const ::EndOfEvent *)
 
void updateHit (CaloG4Hit *)
 
- Protected Member Functions inherited from Observer< const EndOfEvent * >
virtual void update (const EndOfEvent *)=0
 This routine will be called when the appropriate signal arrives. More...
 

Protected Attributes

int checkHits
 
double correctT
 
bool corrTOFBeam
 
CaloG4HitcurrentHit
 
CaloHitID currentID
 
float edepositEM
 
float edepositHAD
 
double eminHit
 
double eminHitD
 
G4int emPDG
 
double energyCut
 
G4ThreeVector entranceLocal
 
G4ThreeVector entrancePoint
 
G4int epPDG
 
bool forceSave
 
G4int gammaPDG
 
float incidentEnergy
 
double kmaxIon
 
double kmaxNeutron
 
double kmaxProton
 
const SimTrackManagerm_trackManager
 
G4ThreeVector posGlobal
 
G4StepPoint * preStepPoint
 
CaloHitID previousID
 
int primIDSaved
 
bool runInit
 
bool suppressHeavy
 
G4Track * theTrack
 
double tmaxHit
 
bool useMap
 

Private Member Functions

void cleanHitCollection ()
 
bool saveHit (CaloG4Hit *)
 
void storeHit (CaloG4Hit *)
 
void summarize ()
 

Private Attributes

int cleanIndex
 
int hcID
 
std::map< CaloHitID, CaloG4Hit * > hitMap
 
std::vector< CaloG4Hit * > hitvec
 
bool ignoreTrackID
 
CaloMeanResponsemeanResponse
 
int primAncestor
 
std::vector< CaloG4Hit * > reusehit
 
std::vector< unsigned int > selIndex
 
CaloSlaveSDslave
 
CaloG4HitCollectiontheHC
 
float timeSlice
 
std::map< int, TrackWithHistory * > tkMap
 
int totalHits
 

Additional Inherited Members

- Public Types inherited from SensitiveDetector
enum  coordinates { WorldCoordinates, LocalCoordinates }
 

Detailed Description

Definition at line 42 of file CaloSD.h.

Constructor & Destructor Documentation

CaloSD::CaloSD ( G4String  aSDname,
const DDCompactView cpv,
const SensitiveDetectorCatalog clg,
edm::ParameterSet const &  p,
const SimTrackManager manager,
float  timeSlice = 1.,
bool  ignoreTkID = false 
)

Definition at line 24 of file CaloSD.cc.

CaloSD::~CaloSD ( )
virtual

Definition at line 113 of file CaloSD.cc.

Member Function Documentation

G4bool CaloSD::checkHit ( )
protected

Definition at line 331 of file CaloSD.cc.

void CaloSD::cleanHitCollection ( )
private

Definition at line 688 of file CaloSD.cc.

void CaloSD::clear ( void  )
virtual

Definition at line 234 of file CaloSD.cc.

void CaloSD::clearHits ( )
protectedvirtual

Implements SensitiveDetector.

Definition at line 556 of file CaloSD.cc.

CaloG4Hit * CaloSD::createNewHit ( )
protected

Definition at line 363 of file CaloSD.cc.

void CaloSD::DrawAll ( )
virtual

Definition at line 236 of file CaloSD.cc.

void CaloSD::EndOfEvent ( G4HCofThisEvent *  eventHC)
virtual

Reimplemented from SensitiveDetector.

Definition at line 222 of file CaloSD.cc.

void CaloSD::fillHits ( edm::PCaloHitContainer c,
std::string  n 
)
virtual

Implements SensitiveCaloDetector.

Definition at line 245 of file CaloSD.cc.

bool CaloSD::filterHit ( CaloG4Hit hit,
double  time 
)
protectedvirtual

Reimplemented in HCalSD, and HGCSD.

Definition at line 597 of file CaloSD.cc.

double CaloSD::getAttenuation ( G4Step *  aStep,
double  birk1,
double  birk2,
double  birk3 
)
protected

Definition at line 465 of file CaloSD.cc.

Referenced by EcalTBH4BeamSD::getEnergyDeposit().

uint16_t CaloSD::getDepth ( G4Step *  )
protectedvirtual

Reimplemented in ECalSD.

Definition at line 595 of file CaloSD.cc.

double CaloSD::getEnergyDeposit ( G4Step *  step)
virtual

Reimplemented in HCalSD, CastorSD, HcalTB02SD, HGCSD, ECalSD, EcalTBH4BeamSD, and HcalTB06BeamSD.

Definition at line 203 of file CaloSD.cc.

int CaloSD::getNumberOfHits ( )
protected

Definition at line 361 of file CaloSD.cc.

double CaloSD::getResponseWt ( G4Track *  aTrack)
protected

Definition at line 607 of file CaloSD.cc.

bool CaloSD::getStepInfo ( G4Step *  aStep)
protectedvirtual

Reimplemented in DreamSD.

Definition at line 250 of file CaloSD.cc.

int CaloSD::getTrackID ( G4Track *  aTrack)
protectedvirtual

Reimplemented in ECalSD.

Definition at line 574 of file CaloSD.cc.

G4bool CaloSD::hitExists ( )
protected

Definition at line 310 of file CaloSD.cc.

void CaloSD::Initialize ( G4HCofThisEvent *  HCE)
virtual

Reimplemented from SensitiveDetector.

Definition at line 207 of file CaloSD.cc.

void CaloSD::initRun ( void  )
protectedvirtual

Reimplemented in CastorSD, HCalSD, HGCSD, DreamSD, and ZdcSD.

Definition at line 572 of file CaloSD.cc.

void CaloSD::PrintAll ( )
virtual

Definition at line 238 of file CaloSD.cc.

bool CaloSD::ProcessHits ( G4Step *  step,
G4TouchableHistory *  tHistory 
)
virtual

Implements SensitiveDetector.

Reimplemented in HCalSD, HGCSD, DreamSD, and ZdcSD.

Definition at line 119 of file CaloSD.cc.

bool CaloSD::ProcessHits ( G4GFlashSpot *  aSpot,
G4TouchableHistory *   
)
virtual

Definition at line 134 of file CaloSD.cc.

void CaloSD::resetForNewPrimary ( const G4ThreeVector &  point,
double  energy 
)
protected

Definition at line 454 of file CaloSD.cc.

bool CaloSD::saveHit ( CaloG4Hit aHit)
private

Definition at line 627 of file CaloSD.cc.

virtual uint32_t CaloSD::setDetUnitId ( G4Step *  step)
pure virtual
G4ThreeVector CaloSD::setToGlobal ( const G4ThreeVector &  local,
const G4VTouchable *  touch 
)
protected

Definition at line 303 of file CaloSD.cc.

G4ThreeVector CaloSD::setToLocal ( const G4ThreeVector &  global,
const G4VTouchable *  touch 
)
protected

Definition at line 296 of file CaloSD.cc.

void CaloSD::storeHit ( CaloG4Hit hit)
private

Definition at line 616 of file CaloSD.cc.

void CaloSD::summarize ( )
private

Definition at line 663 of file CaloSD.cc.

void CaloSD::update ( const BeginOfRun )
protectedvirtual

This routine will be called when the appropriate signal arrives.

Implements Observer< const BeginOfRun * >.

Definition at line 487 of file CaloSD.cc.

Referenced by Vispa.Gui.ZoomableWidget.ZoomableWidget::setZoom().

void CaloSD::update ( const BeginOfEvent )
protectedvirtual

This routine will be called when the appropriate signal arrives.

Implements Observer< const BeginOfEvent * >.

Definition at line 501 of file CaloSD.cc.

Referenced by Vispa.Gui.ZoomableWidget.ZoomableWidget::setZoom().

void CaloSD::update ( const BeginOfTrack )
protectedvirtual

This routine will be called when the appropriate signal arrives.

Implements Observer< const BeginOfTrack * >.

Definition at line 665 of file CaloSD.cc.

Referenced by Vispa.Gui.ZoomableWidget.ZoomableWidget::setZoom().

void CaloSD::update ( const EndOfTrack )
protectedvirtual

This routine will be called when the appropriate signal arrives.

Implements Observer< const EndOfTrack * >.

Definition at line 509 of file CaloSD.cc.

Referenced by Vispa.Gui.ZoomableWidget.ZoomableWidget::setZoom().

void CaloSD::update ( const ::EndOfEvent )
protectedvirtual

Definition at line 535 of file CaloSD.cc.

Referenced by Vispa.Gui.ZoomableWidget.ZoomableWidget::setZoom().

void CaloSD::updateHit ( CaloG4Hit aHit)
protected

Definition at line 440 of file CaloSD.cc.

Member Data Documentation

int CaloSD::checkHits
protected

Definition at line 124 of file CaloSD.h.

int CaloSD::cleanIndex
private

Definition at line 152 of file CaloSD.h.

double CaloSD::correctT
protected

Definition at line 133 of file CaloSD.h.

bool CaloSD::corrTOFBeam
protected

Definition at line 132 of file CaloSD.h.

CaloG4Hit* CaloSD::currentHit
protected

Definition at line 128 of file CaloSD.h.

CaloHitID CaloSD::currentID
protected

Definition at line 117 of file CaloSD.h.

float CaloSD::edepositEM
protected

Definition at line 121 of file CaloSD.h.

float CaloSD::edepositHAD
protected

Definition at line 121 of file CaloSD.h.

double CaloSD::eminHit
protected

Definition at line 123 of file CaloSD.h.

double CaloSD::eminHitD
protected

Definition at line 123 of file CaloSD.h.

G4int CaloSD::emPDG
protected

Definition at line 136 of file CaloSD.h.

double CaloSD::energyCut
protected

Definition at line 123 of file CaloSD.h.

G4ThreeVector CaloSD::entranceLocal
protected

Definition at line 112 of file CaloSD.h.

G4ThreeVector CaloSD::entrancePoint
protected

Definition at line 111 of file CaloSD.h.

G4int CaloSD::epPDG
protected

Definition at line 136 of file CaloSD.h.

bool CaloSD::forceSave
protected

Definition at line 137 of file CaloSD.h.

G4int CaloSD::gammaPDG
protected

Definition at line 136 of file CaloSD.h.

int CaloSD::hcID
private

Definition at line 144 of file CaloSD.h.

std::map<CaloHitID,CaloG4Hit*> CaloSD::hitMap
private

Definition at line 146 of file CaloSD.h.

std::vector<CaloG4Hit*> CaloSD::hitvec
private

Definition at line 154 of file CaloSD.h.

bool CaloSD::ignoreTrackID
private

Definition at line 142 of file CaloSD.h.

float CaloSD::incidentEnergy
protected

Definition at line 114 of file CaloSD.h.

double CaloSD::kmaxIon
protected

Definition at line 134 of file CaloSD.h.

double CaloSD::kmaxNeutron
protected

Definition at line 134 of file CaloSD.h.

double CaloSD::kmaxProton
protected

Definition at line 134 of file CaloSD.h.

const SimTrackManager* CaloSD::m_trackManager
protected

Definition at line 127 of file CaloSD.h.

CaloMeanResponse* CaloSD::meanResponse
private

Definition at line 149 of file CaloSD.h.

G4ThreeVector CaloSD::posGlobal
protected

Definition at line 113 of file CaloSD.h.

G4StepPoint* CaloSD::preStepPoint
protected

Definition at line 120 of file CaloSD.h.

Referenced by EcalTBH4BeamSD::getEnergyDeposit().

CaloHitID CaloSD::previousID
protected

Definition at line 117 of file CaloSD.h.

int CaloSD::primAncestor
private

Definition at line 151 of file CaloSD.h.

int CaloSD::primIDSaved
protected

Definition at line 115 of file CaloSD.h.

std::vector<CaloG4Hit*> CaloSD::reusehit
private

Definition at line 153 of file CaloSD.h.

bool CaloSD::runInit
protected

Definition at line 130 of file CaloSD.h.

std::vector<unsigned int> CaloSD::selIndex
private

Definition at line 155 of file CaloSD.h.

CaloSlaveSD* CaloSD::slave
private

Definition at line 143 of file CaloSD.h.

bool CaloSD::suppressHeavy
protected

Definition at line 132 of file CaloSD.h.

CaloG4HitCollection* CaloSD::theHC
private

Definition at line 145 of file CaloSD.h.

G4Track* CaloSD::theTrack
protected

Definition at line 118 of file CaloSD.h.

float CaloSD::timeSlice
private

Definition at line 141 of file CaloSD.h.

std::map<int,TrackWithHistory*> CaloSD::tkMap
private

Definition at line 148 of file CaloSD.h.

double CaloSD::tmaxHit
protected

Definition at line 123 of file CaloSD.h.

int CaloSD::totalHits
private

Definition at line 156 of file CaloSD.h.

bool CaloSD::useMap
protected

Definition at line 125 of file CaloSD.h.