CMS 3D CMS Logo

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

#include <Bcm1fSD.h>

Inheritance diagram for Bcm1fSD:
TimingSD SensitiveTkDetector Observer< const BeginOfEvent * > SensitiveDetector

Public Member Functions

 Bcm1fSD (const std::string &, const SensitiveDetectorCatalog &, edm::ParameterSet const &, const SimTrackManager *)
 
uint32_t setDetUnitId (const G4Step *) override
 
 ~Bcm1fSD () override
 
- Public Member Functions inherited from TimingSD
void clearHits () override
 
void EndOfEvent (G4HCofThisEvent *eventHC) override
 
void fillHits (edm::PSimHitContainer &, const std::string &) override
 
void Initialize (G4HCofThisEvent *HCE) override
 
void PrintAll () override
 
bool ProcessHits (G4Step *, G4TouchableHistory *) override
 
 TimingSD (const std::string &, const SensitiveDetectorCatalog &, const SimTrackManager *)
 
 ~TimingSD () override
 
- Public Member Functions inherited from SensitiveTkDetector
 SensitiveTkDetector (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 BeginOfEvent * >
 Observer ()
 
void slotForUpdate (const BeginOfEvent * iT)
 
virtual ~Observer ()
 

Protected Member Functions

bool checkHit (const G4Step *, BscG4Hit *) override
 
- Protected Member Functions inherited from TimingSD
const G4ThreeVector & getGlobalEntryPoint () const
 
const G4ThreeVector & getLocalEntryPoint () const
 
void setCuts (double eCut, double historyCut)
 
void setTimeFactor (double)
 
void setToLocal (const G4StepPoint *stepPoint, const G4ThreeVector &globalPoint, G4ThreeVector &localPoint)
 
void update (const BeginOfEvent *) override
 This routine will be called when the appropriate signal arrives. More...
 
- 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 > &)
 

Private Attributes

float energyCut
 
float energyHistoryCut
 

Additional Inherited Members

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

Detailed Description

Definition at line 13 of file Bcm1fSD.h.

Constructor & Destructor Documentation

◆ Bcm1fSD()

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

Definition at line 31 of file Bcm1fSD.cc.

35  : TimingSD(name, clg, manager) {
36  edm::ParameterSet m_TrackerSD = p.getParameter<edm::ParameterSet>("Bcm1fSD");
37  energyCut = m_TrackerSD.getParameter<double>("EnergyThresholdForPersistencyInGeV") * GeV; //default must be 0.5 (?)
39  m_TrackerSD.getParameter<double>("EnergyThresholdForHistoryInGeV") * GeV; //default must be 0.05 (?)
40 
42 }

References energyCut, energyHistoryCut, edm::ParameterSet::getParameter(), GeV, AlCaHLTBitMon_ParallelJobs::p, and TimingSD::setCuts().

◆ ~Bcm1fSD()

Bcm1fSD::~Bcm1fSD ( )
override

Definition at line 44 of file Bcm1fSD.cc.

44 {}

Member Function Documentation

◆ checkHit()

bool Bcm1fSD::checkHit ( const G4Step *  ,
BscG4Hit hit 
)
overrideprotectedvirtual

Reimplemented from TimingSD.

Definition at line 81 of file Bcm1fSD.cc.

81  {
82  // 50 micron are allowed between the exit
83  // point of the current hit and the entry point of the new hit
84  static const float tolerance2 = (float)(0.0025 * CLHEP::mm * CLHEP::mm);
85  return ((hit->getExitLocalP() - getLocalEntryPoint()).mag2() < tolerance2);
86 }

References dqmMemoryStats::float, TimingSD::getLocalEntryPoint(), and mag2().

◆ setDetUnitId()

uint32_t Bcm1fSD::setDetUnitId ( const G4Step *  aStep)
overridevirtual

Implements SensitiveDetector.

Definition at line 46 of file Bcm1fSD.cc.

46  {
47  uint32_t detId = 0;
48 
49  //Find number of levels
50  const G4VTouchable* touch = aStep->GetPreStepPoint()->GetTouchable();
51  int level = (touch) ? ((touch->GetHistoryDepth()) + 1) : 0;
52 
53  //Get name and copy numbers
54  if (level > 1) {
55  G4String sensorName = touch->GetVolume(0)->GetName();
56  G4String diamondName = touch->GetVolume(1)->GetName();
57  G4String detectorName = touch->GetVolume(2)->GetName();
58  G4String volumeName = touch->GetVolume(3)->GetName();
59 
60  if (sensorName != "BCM1FSensor") {
61  edm::LogWarning("ForwardSim") << "Bcm1fSD::setDetUnitId -w- Sensor name not BCM1FSensor ";
62  }
63  if (detectorName != "BCM1F") {
64  edm::LogWarning("ForwardSim") << " Bcm1fSD::setDetUnitId -w- Detector name not BCM1F ";
65  }
66  int sensorNo = touch->GetReplicaNumber(0);
67  int diamondNo = touch->GetReplicaNumber(1);
68  int volumeNo = touch->GetReplicaNumber(3);
69 
70  // Detector ID definition
71  // detId = XYYZ
72  // X = volume, 1: +Z, 2: -Z
73  // YY = diamond, 01-12, 12: phi = 90 deg, numbering clockwise when looking from the IP
74  // Z = sensor, 1 or 2, clockwise when looking from the IP
75 
76  detId = 1000 * volumeNo + 10 * diamondNo + sensorNo;
77  }
78  return detId;
79 }

References hgcalTopologyTester_cfi::detectorName, and personalPlayback::level.

Member Data Documentation

◆ energyCut

float Bcm1fSD::energyCut
private

Definition at line 24 of file Bcm1fSD.h.

Referenced by Bcm1fSD().

◆ energyHistoryCut

float Bcm1fSD::energyHistoryCut
private

Definition at line 25 of file Bcm1fSD.h.

Referenced by Bcm1fSD().

personalPlayback.level
level
Definition: personalPlayback.py:22
dqmMemoryStats.float
float
Definition: dqmMemoryStats.py:127
TimingSD::getLocalEntryPoint
const G4ThreeVector & getLocalEntryPoint() const
Definition: TimingSD.h:62
edm::LogWarning
Log< level::Warning, false > LogWarning
Definition: MessageLogger.h:122
Bcm1fSD::energyHistoryCut
float energyHistoryCut
Definition: Bcm1fSD.h:25
Bcm1fSD::energyCut
float energyCut
Definition: Bcm1fSD.h:24
edm::ParameterSet
Definition: ParameterSet.h:47
AlCaHLTBitMon_ParallelJobs.p
def p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
hgcalTopologyTester_cfi.detectorName
detectorName
Definition: hgcalTopologyTester_cfi.py:6
GeV
const double GeV
Definition: MathUtil.h:16
mag2
T mag2() const
The vector magnitude squared. Equivalent to vec.dot(vec)
Definition: Basic3DVectorLD.h:124
TimingSD::TimingSD
TimingSD(const std::string &, const SensitiveDetectorCatalog &, const SimTrackManager *)
Definition: TimingSD.cc:37
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
TimingSD::setCuts
void setCuts(double eCut, double historyCut)
Definition: TimingSD.cc:89
hit
Definition: SiStripHitEffFromCalibTree.cc:88