CMS 3D CMS Logo

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

#include <TotemT2ScintSD.h>

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

Public Member Functions

uint32_t setDetUnitId (const G4Step *step) override
 
void setNumberingScheme (TotemT2ScintNumberingScheme *scheme)
 
 TotemT2ScintSD (const std::string &, const edm::EventSetup &, const SensitiveDetectorCatalog &, edm::ParameterSet const &, const SimTrackManager *)
 
 ~TotemT2ScintSD () override=default
 
- Public Member Functions inherited from CaloSD
 CaloSD (const std::string &aSDname, const edm::EventSetup &es, 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 edm::EventSetup &es, const SensitiveDetectorCatalog &clg, edm::ParameterSet const &p)
 
- 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 edm::EventSetup &es, const SensitiveDetectorCatalog &, edm::ParameterSet const &p, 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

uint32_t setDetUnitId (const int &zside, const int &lay, const int &phi)
 

Private Attributes

double birk1_
 
double birk2_
 
double birk3_
 
std::unique_ptr< TotemT2ScintNumberingSchemenumberingScheme
 
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 7 of file TotemT2ScintSD.h.

Constructor & Destructor Documentation

◆ TotemT2ScintSD()

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

Definition at line 19 of file TotemT2ScintSD.cc.

24  : CaloSD(name,
25  es,
26  clg,
27  p,
28  manager,
29  (float)(p.getParameter<edm::ParameterSet>("TotemT2ScintSD").getParameter<double>("TimeSliceUnit")),
30  p.getParameter<edm::ParameterSet>("TotemT2ScintSD").getParameter<bool>("IgnoreTrackID")) {
31  edm::ParameterSet m_T2SD = p.getParameter<edm::ParameterSet>("TotemT2ScintSD");
32  useBirk_ = m_T2SD.getParameter<bool>("UseBirkLaw");
33  birk1_ = m_T2SD.getParameter<double>("BirkC1") * (g / (MeV * cm2));
34  birk2_ = m_T2SD.getParameter<double>("BirkC2");
35  birk3_ = m_T2SD.getParameter<double>("BirkC3");
37 
38  edm::LogVerbatim("ForwardSim") << "***************************************************\n"
39  << "* *\n"
40  << "* Constructing a TotemT2ScintSD with name " << name << " *\n"
41  << "* *\n"
42  << "***************************************************";
43 
44  edm::LogVerbatim("ForwardSim") << "\nUse of Birks law is set to " << useBirk_
45  << " with three constants kB = " << birk1_ << ", C1 = " << birk2_
46  << ", C2 = " << birk3_;
47 }

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

◆ ~TotemT2ScintSD()

TotemT2ScintSD::~TotemT2ScintSD ( )
overridedefault

Member Function Documentation

◆ getEnergyDeposit()

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

Reimplemented from CaloSD.

Definition at line 67 of file TotemT2ScintSD.cc.

67  {
68  double destep = aStep->GetTotalEnergyDeposit();
69  double weight = ((useBirk_) ? getAttenuation(aStep, birk1_, birk2_, birk3_) : 1.0);
70  double edep = weight * destep;
71 #ifdef EDM_ML_DEBUG
72  edm::LogVerbatim("ForwardSim") << "TotemT2ScintSD: edep= " << destep << ":" << weight << ":" << edep;
73 #endif
74  return edep;
75 }

References birk1_, birk2_, birk3_, CaloSD::getAttenuation(), and useBirk_.

◆ setDetUnitId() [1/2]

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

Implements CaloSD.

Definition at line 49 of file TotemT2ScintSD.cc.

49  {
50  auto const prePoint = aStep->GetPreStepPoint();
51  auto const touch = prePoint->GetTouchable();
52 
53  int iphi = (touch->GetReplicaNumber(0)) % 10;
54  int lay = (touch->GetReplicaNumber(0) / 10) % 10 + 1;
55  int zside = (((touch->GetReplicaNumber(1)) == 1) ? 1 : -1);
56 
57  return setDetUnitId(zside, lay, iphi);
58 }

References LEDCalibrationChannels::iphi, and ecaldqm::zside().

◆ setDetUnitId() [2/2]

uint32_t TotemT2ScintSD::setDetUnitId ( const int &  zside,
const int &  lay,
const int &  phi 
)
private

Definition at line 77 of file TotemT2ScintSD.cc.

77  {
78  uint32_t id = ((numberingScheme.get()) ? numberingScheme->packID(zside, lay, iphi) : 0);
79 #ifdef EDM_ML_DEBUG
80  edm::LogVerbatim("ForwardSim") << "TotemT2ScintSD: zside " << zside << " layer " << lay << " phi " << iphi << " ID "
81  << std::hex << id << std::dec;
82 #endif
83  return id;
84 }

References TauDecayModes::dec, triggerObjects_cff::id, LEDCalibrationChannels::iphi, numberingScheme, and ecaldqm::zside().

◆ setNumberingScheme()

void TotemT2ScintSD::setNumberingScheme ( TotemT2ScintNumberingScheme scheme)

Definition at line 60 of file TotemT2ScintSD.cc.

60  {
61  if (scheme != nullptr) {
62  edm::LogVerbatim("ForwardSim") << "TotemT2ScintSD: updates numbering scheme for " << GetName();
63  numberingScheme.reset(scheme);
64  }
65 }

References numberingScheme, and generator_cfi::scheme.

Referenced by TotemT2ScintSD().

Member Data Documentation

◆ birk1_

double TotemT2ScintSD::birk1_
private

Definition at line 25 of file TotemT2ScintSD.h.

Referenced by getEnergyDeposit(), and TotemT2ScintSD().

◆ birk2_

double TotemT2ScintSD::birk2_
private

Definition at line 25 of file TotemT2ScintSD.h.

Referenced by getEnergyDeposit(), and TotemT2ScintSD().

◆ birk3_

double TotemT2ScintSD::birk3_
private

Definition at line 25 of file TotemT2ScintSD.h.

Referenced by getEnergyDeposit(), and TotemT2ScintSD().

◆ numberingScheme

std::unique_ptr<TotemT2ScintNumberingScheme> TotemT2ScintSD::numberingScheme
private

Definition at line 27 of file TotemT2ScintSD.h.

Referenced by setDetUnitId(), and setNumberingScheme().

◆ useBirk_

bool TotemT2ScintSD::useBirk_
private

Definition at line 24 of file TotemT2ScintSD.h.

Referenced by getEnergyDeposit(), and TotemT2ScintSD().

TotemT2ScintSD::setDetUnitId
uint32_t setDetUnitId(const G4Step *step) override
Definition: TotemT2ScintSD.cc:49
TotemT2ScintSD::numberingScheme
std::unique_ptr< TotemT2ScintNumberingScheme > numberingScheme
Definition: TotemT2ScintSD.h:27
ecaldqm::zside
int zside(DetId const &)
Definition: EcalDQMCommonUtils.cc:189
AlCaHLTBitMon_ParallelJobs.p
p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
CaloSD::getAttenuation
double getAttenuation(const G4Step *aStep, double birk1, double birk2, double birk3) const
Definition: CaloSD.cc:685
MeV
const double MeV
LEDCalibrationChannels.iphi
iphi
Definition: LEDCalibrationChannels.py:64
TotemT2ScintSD::birk2_
double birk2_
Definition: TotemT2ScintSD.h:25
TotemT2ScintSD::useBirk_
bool useBirk_
Definition: TotemT2ScintSD.h:24
edm::ParameterSet
Definition: ParameterSet.h:47
CaloSD::CaloSD
CaloSD(const std::string &aSDname, const edm::EventSetup &es, const SensitiveDetectorCatalog &clg, edm::ParameterSet const &p, const SimTrackManager *, float timeSlice=1., bool ignoreTkID=false)
Definition: CaloSD.cc:35
generator_cfi.scheme
scheme
Definition: generator_cfi.py:22
TotemT2ScintSD::birk3_
double birk3_
Definition: TotemT2ScintSD.h:25
TotemT2ScintSD::birk1_
double birk1_
Definition: TotemT2ScintSD.h:25
edm::LogVerbatim
Log< level::Info, true > LogVerbatim
Definition: MessageLogger.h:128
triggerObjects_cff.id
id
Definition: triggerObjects_cff.py:29
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
TotemT2ScintSD::setNumberingScheme
void setNumberingScheme(TotemT2ScintNumberingScheme *scheme)
Definition: TotemT2ScintSD.cc:60
TauDecayModes.dec
dec
Definition: TauDecayModes.py:143
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
TotemT2ScintNumberingScheme
Definition: TotemT2ScintNumberingScheme.h:6