20 #include "G4Material.hh" 21 #include "CLHEP/Units/GlobalSystemOfUnits.h" 30 CaloSD(name, cpv, clg, p, manager) {
39 edm::LogInfo(
"HcalTB06BeamSD") <<
"HcalTB06BeamSD:: Use of Birks law is set " 40 <<
"to " << useBirk <<
" with three " 41 <<
"constants kB = " << birk1 <<
", C1 = " 42 << birk2 <<
", C2 = " <<
birk3;
48 value =
"WireChamber";
52 edm::LogInfo(
"HcalTB06BeamSD") <<
"HcalTB06BeamSD:: Names to be tested for " 53 << attribute <<
" = " << value <<
": " 56 edm::LogInfo(
"HcalTB06BeamSD") <<
"HcalTB06BeamSD:: (" <<
i <<
") " 60 attribute =
"ReadOutName";
65 std::vector<G4String> matNames;
66 std::vector<int> nocc;
71 for (
unsigned int i=0;
i<matNames.size();
i++) {
72 if (
matName == matNames[
i]) {notIn =
false; nocc[
i]++;}
80 if (!matNames.empty()) {
83 for (
unsigned int i = 0;
i < matNames.size();
i++) {
92 edm::LogInfo(
"HcalTB06BeamSD") <<
"HcalTB06BeamSD: Material name for " 93 << attribute <<
" = " << name <<
":" 101 double destep = aStep->GetTotalEnergyDeposit();
103 if (
useBirk &&
matName == aStep->GetPreStepPoint()->GetMaterial()->GetName())
107 << aStep->GetPreStepPoint()->GetTouchable()->GetVolume()->GetName()
110 return weight*destep;
115 const G4StepPoint* preStepPoint = aStep->GetPreStepPoint();
116 const G4VTouchable* touch = preStepPoint->GetTouchable();
117 G4String
name = preStepPoint->GetPhysicalVolume()->GetName();
120 int lay = 0,
x = 0,
y = 0;
122 lay = (touch->GetReplicaNumber(0));
125 lay = (touch->GetReplicaNumber(1));
126 G4ThreeVector localPoint =
setToLocal(preStepPoint->GetPosition(), touch);
127 x = (
int)(localPoint.x()/(0.2*mm));
128 y = (
int)(localPoint.y()/(0.2*mm));
136 std::vector<G4String>
tmp;
142 for (
unsigned int i=0;
i<tmp.size();
i++)
143 if (name == tmp[
i]) ok =
false;
144 if (ok) tmp.push_back(name);
152 std::vector<G4String>::const_iterator it =
wcNames.begin();
153 for (; it !=
wcNames.end(); it++)
154 if (name == *it)
return true;
T getParameter(std::string const &) const
const DDLogicalPart & logicalPart() const
The logical-part of the current node in the filtered-view.
std::vector< G4String > wcNames
double getEnergyDeposit(const G4Step *) override
Compact representation of the geometrical detector hierarchy.
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
static uint32_t packIndex(int det, int lay, int x, int y)
bool isItWireChamber(const G4String &)
HcalTB06BeamSD(const std::string &, const DDCompactView &, const SensitiveDetectorCatalog &, edm::ParameterSet const &, const SimTrackManager *)
bool next()
set current node to the next node in the filtered tree
const std::vector< std::string > & getNames() const
uint32_t setDetUnitId(const G4Step *step) override
A DDLogicalPart aggregates information concerning material, solid and sensitveness ...
~HcalTB06BeamSD() override
G4ThreeVector setToLocal(const G4ThreeVector &, const G4VTouchable *) const
double getAttenuation(const G4Step *aStep, double birk1, double birk2, double birk3) const
std::vector< std::vector< double > > tmp
bool firstChild()
set the current node to the first child ...
const std::string & name() const
Returns the name.
const DDMaterial & material(void) const
Returns a reference object of the material this LogicalPart is made of.