CMS 3D CMS Logo

List of all members | Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes
HcalTB06BeamSD Class Reference

#include <HcalTB06BeamSD.h>

Inheritance diagram for HcalTB06BeamSD:
CaloSD SensitiveCaloDetector Observer< const BeginOfRun * > Observer< const BeginOfEvent * > Observer< const BeginOfTrack * > Observer< const EndOfTrack * > Observer< const EndOfEvent * > SensitiveDetector

Public Member Functions

 HcalTB06BeamSD (const std::string &, const HcalTB06BeamParameters *, const SensitiveDetectorCatalog &, edm::ParameterSet const &, const SimTrackManager *)
 
uint32_t setDetUnitId (const G4Step *step) override
 
 ~HcalTB06BeamSD () override
 
- Public Member Functions inherited from CaloSD
 CaloSD (const std::string &aSDname, const SensitiveDetectorCatalog &clg, edm::ParameterSet const &p, const SimTrackManager *, float timeSlice=1., bool ignoreTkID=false)
 
void clear () override
 
void clearHits () override
 
void DrawAll () override
 
void EndOfEvent (G4HCofThisEvent *eventHC) override
 
void fillHits (edm::PCaloHitContainer &, const std::string &) override
 
void Initialize (G4HCofThisEvent *HCE) override
 
bool isItFineCalo (const G4VTouchable *touch)
 
void PrintAll () override
 
bool ProcessHits (G4GFlashSpot *aSpot, G4TouchableHistory *) override
 
G4bool ProcessHits (G4Step *step, G4TouchableHistory *) override
 
void reset () override
 
 ~CaloSD () override
 
- Public Member Functions inherited from SensitiveCaloDetector
 SensitiveCaloDetector (const std::string &iname, const SensitiveDetectorCatalog &clg)
 
- Public Member Functions inherited from SensitiveDetector
void EndOfEvent (G4HCofThisEvent *eventHC) override
 
const std::vector< std::string > & getNames () const
 
void Initialize (G4HCofThisEvent *eventHC) override
 
bool isCaloSD () const
 
 SensitiveDetector (const std::string &iname, const SensitiveDetectorCatalog &, bool calo)
 
 ~SensitiveDetector () override
 
- 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

double getEnergyDeposit (const G4Step *) override
 
- Protected Member Functions inherited from CaloSD
bool checkHit ()
 
CaloG4HitcreateNewHit (const G4Step *, const G4Track *)
 
virtual void endEvent ()
 
virtual double EnergyCorrected (const G4Step &step, const G4Track *)
 
virtual bool filterHit (CaloG4Hit *, double)
 
double getAttenuation (const G4Step *aStep, double birk1, double birk2, double birk3) const
 
virtual uint16_t getDepth (const G4Step *)
 
virtual bool getFromLibrary (const G4Step *step)
 
int getNumberOfHits ()
 
double getResponseWt (const G4Track *)
 
virtual int getTrackID (const G4Track *)
 
void hitBookkeepingFineCalo (const G4Step *step, const G4Track *currentTrack, CaloG4Hit *hit)
 
bool hitExists (const G4Step *)
 
void ignoreRejection ()
 
virtual void initEvent (const BeginOfEvent *)
 
virtual void initRun ()
 
void printDetectorLevels (const G4VTouchable *) const
 
void processHit (const G4Step *step)
 
void resetForNewPrimary (const G4Step *)
 
void setNumberCheckedHits (int val)
 
void setParameterized (bool val)
 
G4ThreeVector setToGlobal (const G4ThreeVector &, const G4VTouchable *) const
 
G4ThreeVector setToLocal (const G4ThreeVector &, const G4VTouchable *) const
 
virtual int setTrackID (const G4Step *)
 
void setUseMap (bool val)
 
void update (const ::EndOfEvent *) override
 
void update (const BeginOfEvent *) override
 This routine will be called when the appropriate signal arrives. More...
 
void update (const BeginOfRun *) override
 This routine will be called when the appropriate signal arrives. More...
 
void update (const BeginOfTrack *trk) override
 This routine will be called when the appropriate signal arrives. More...
 
void update (const EndOfTrack *trk) override
 This routine will be called when the appropriate signal arrives. More...
 
void updateHit (CaloG4Hit *)
 
- Protected Member Functions inherited from SensitiveDetector
TrackInformationcmsTrackInformation (const G4Track *aTrack)
 
Local3DPoint ConvertToLocal3DPoint (const G4ThreeVector &point) const
 
Local3DPoint FinalStepPosition (const G4Step *step, coordinates) const
 
Local3DPoint InitialStepPosition (const G4Step *step, coordinates) const
 
Local3DPoint LocalPostStepPosition (const G4Step *step) const
 
Local3DPoint LocalPreStepPosition (const G4Step *step) const
 
void NaNTrap (const G4Step *step) const
 
void setNames (const std::vector< std::string > &)
 
- 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...
 

Private Member Functions

bool isItWireChamber (const std::string &)
 

Private Attributes

double birk1_
 
double birk2_
 
double birk3_
 
const HcalTB06BeamParametershcalBeamPar_
 
bool useBirk_
 

Additional Inherited Members

- Protected Types inherited from SensitiveDetector
enum  coordinates { WorldCoordinates, LocalCoordinates }
 
- Static Protected Member Functions inherited from CaloSD
static std::string printableDecayChain (const std::vector< unsigned int > &decayChain)
 
- Protected Attributes inherited from CaloSD
CaloG4HitcurrentHit
 
CaloHitID currentID
 
float edepositEM
 
float edepositHAD
 
double eminHit
 
double energyCut
 
G4ThreeVector entranceLocal
 
G4ThreeVector entrancePoint
 
bool forceSave
 
float incidentEnergy
 
double kmaxIon
 
double kmaxNeutron
 
double kmaxProton
 
G4ThreeVector posGlobal
 
CaloHitID previousID
 
bool suppressHeavy
 
double tmaxHit
 

Detailed Description

Definition at line 20 of file HcalTB06BeamSD.h.

Constructor & Destructor Documentation

◆ HcalTB06BeamSD()

HcalTB06BeamSD::HcalTB06BeamSD ( const std::string &  name,
const HcalTB06BeamParameters es,
const SensitiveDetectorCatalog clg,
edm::ParameterSet const &  p,
const SimTrackManager manager 
)

Definition at line 20 of file HcalTB06BeamSD.cc.

25  : CaloSD(name, clg, p, manager), hcalBeamPar_(es) {
26  // Values from NIM 80 (1970) 239-244: as implemented in Geant3
27  edm::ParameterSet m_HC = p.getParameter<edm::ParameterSet>("HcalTB06BeamSD");
28  useBirk_ = m_HC.getParameter<bool>("UseBirkLaw");
29  birk1_ = m_HC.getParameter<double>("BirkC1") * (CLHEP::g / (CLHEP::MeV * CLHEP::cm2));
30  birk2_ = m_HC.getParameter<double>("BirkC2");
31  birk3_ = m_HC.getParameter<double>("BirkC3");
32 
33 #ifdef EDM_ML_DEBUG
34  edm::LogVerbatim("HcalTBSim") << "HcalTB06BeamSD:: Use of Birks law is set to " << useBirk_
35  << " with three constants kB = " << birk1_ << ", C1 = " << birk2_
36  << ", C2 = " << birk3_;
37 #endif
38 }

References birk1_, birk2_, birk3_, g, edm::ParameterSet::getParameter(), MeV, AlCaHLTBitMon_ParallelJobs::p, and useBirk_.

◆ ~HcalTB06BeamSD()

HcalTB06BeamSD::~HcalTB06BeamSD ( )
override

Definition at line 40 of file HcalTB06BeamSD.cc.

40 {}

Member Function Documentation

◆ getEnergyDeposit()

double HcalTB06BeamSD::getEnergyDeposit ( const G4Step *  aStep)
overrideprotectedvirtual

Reimplemented from CaloSD.

Definition at line 42 of file HcalTB06BeamSD.cc.

42  {
43  double destep = aStep->GetTotalEnergyDeposit();
44  double weight = 1;
45  if (useBirk_ && aStep->GetPreStepPoint()->GetMaterial()->GetName() == static_cast<G4String>(hcalBeamPar_->material_))
47 #ifdef EDM_ML_DEBUG
48  edm::LogVerbatim("HcalTBSim") << "HcalTB06BeamSD: Detector "
49  << aStep->GetPreStepPoint()->GetTouchable()->GetVolume()->GetName() << " weight "
50  << weight;
51 #endif
52  return weight * destep;
53 }

References birk1_, birk2_, birk3_, CaloSD::getAttenuation(), hcalBeamPar_, HcalTB06BeamParameters::material_, useBirk_, and mps_merge::weight.

◆ isItWireChamber()

bool HcalTB06BeamSD::isItWireChamber ( const std::string &  name)
private

Definition at line 75 of file HcalTB06BeamSD.cc.

75  {
76  std::vector<std::string>::const_iterator it = hcalBeamPar_->wchambers_.begin();
77  for (; it != hcalBeamPar_->wchambers_.end(); it++)
78  if (name == *it)
79  return true;
80  return false;
81 }

References hcalBeamPar_, Skims_PA_cff::name, and HcalTB06BeamParameters::wchambers_.

Referenced by setDetUnitId().

◆ setDetUnitId()

uint32_t HcalTB06BeamSD::setDetUnitId ( const G4Step *  step)
overridevirtual

Implements CaloSD.

Definition at line 55 of file HcalTB06BeamSD.cc.

55  {
56  const G4StepPoint* preStepPoint = aStep->GetPreStepPoint();
57  const G4VTouchable* touch = preStepPoint->GetTouchable();
58  std::string name = static_cast<std::string>(preStepPoint->GetPhysicalVolume()->GetName());
59 
60  int det = 1;
61  int lay = 0, x = 0, y = 0;
62  if (!isItWireChamber(name)) {
63  lay = (touch->GetReplicaNumber(0));
64  } else {
65  det = 2;
66  lay = (touch->GetReplicaNumber(1));
67  G4ThreeVector localPoint = setToLocal(preStepPoint->GetPosition(), touch);
68  x = (int)(localPoint.x() / (0.2 * mm));
69  y = (int)(localPoint.y() / (0.2 * mm));
70  }
71 
72  return HcalTestBeamNumbering::packIndex(det, lay, x, y);
73 }

References createfilelist::int, isItWireChamber(), Skims_PA_cff::name, HcalTestBeamNumbering::packIndex(), CaloSD::setToLocal(), AlCaHLTBitMon_QueryRunRegistry::string, x, and y.

Member Data Documentation

◆ birk1_

double HcalTB06BeamSD::birk1_
private

Definition at line 37 of file HcalTB06BeamSD.h.

Referenced by getEnergyDeposit(), and HcalTB06BeamSD().

◆ birk2_

double HcalTB06BeamSD::birk2_
private

Definition at line 37 of file HcalTB06BeamSD.h.

Referenced by getEnergyDeposit(), and HcalTB06BeamSD().

◆ birk3_

double HcalTB06BeamSD::birk3_
private

Definition at line 37 of file HcalTB06BeamSD.h.

Referenced by getEnergyDeposit(), and HcalTB06BeamSD().

◆ hcalBeamPar_

const HcalTB06BeamParameters* HcalTB06BeamSD::hcalBeamPar_
private

Definition at line 38 of file HcalTB06BeamSD.h.

Referenced by getEnergyDeposit(), and isItWireChamber().

◆ useBirk_

bool HcalTB06BeamSD::useBirk_
private

Definition at line 36 of file HcalTB06BeamSD.h.

Referenced by getEnergyDeposit(), and HcalTB06BeamSD().

HcalTB06BeamSD::hcalBeamPar_
const HcalTB06BeamParameters * hcalBeamPar_
Definition: HcalTB06BeamSD.h:38
DDAxes::y
HcalTestBeamNumbering::packIndex
static uint32_t packIndex(int det, int lay, int x, int y)
Definition: HcalTestBeamNumbering.cc:6
HcalTB06BeamParameters::wchambers_
std::vector< std::string > wchambers_
Definition: HcalTB06BeamParameters.h:13
mps_merge.weight
weight
Definition: mps_merge.py:88
HcalTB06BeamSD::isItWireChamber
bool isItWireChamber(const std::string &)
Definition: HcalTB06BeamSD.cc:75
CaloSD::getAttenuation
double getAttenuation(const G4Step *aStep, double birk1, double birk2, double birk3) const
Definition: CaloSD.cc:683
HcalTB06BeamSD::birk3_
double birk3_
Definition: HcalTB06BeamSD.h:37
MeV
const double MeV
DDAxes::x
HcalTB06BeamParameters::material_
std::string material_
Definition: HcalTB06BeamParameters.h:14
CaloSD::setToLocal
G4ThreeVector setToLocal(const G4ThreeVector &, const G4VTouchable *) const
Definition: CaloSD.cc:385
HcalTB06BeamSD::useBirk_
bool useBirk_
Definition: HcalTB06BeamSD.h:36
HcalTB06BeamSD::birk1_
double birk1_
Definition: HcalTB06BeamSD.h:37
edm::ParameterSet
Definition: ParameterSet.h:47
AlCaHLTBitMon_ParallelJobs.p
def p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
createfilelist.int
int
Definition: createfilelist.py:10
CaloSD::CaloSD
CaloSD(const std::string &aSDname, const SensitiveDetectorCatalog &clg, edm::ParameterSet const &p, const SimTrackManager *, float timeSlice=1., bool ignoreTkID=false)
Definition: CaloSD.cc:34
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
HcalTB06BeamSD::birk2_
double birk2_
Definition: HcalTB06BeamSD.h:37
edm::LogVerbatim
Log< level::Info, true > LogVerbatim
Definition: MessageLogger.h:128
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
weight
Definition: weight.py:1
g
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e g
Definition: Activities.doc:4