|
ATLAS Offline Software
|
#include <TgcDigitMaker.h>
|
enum | NumberOfDimensions {
N_STATIONNAME = 8,
OFFSET_STATIONNAME = 41,
N_STATIONETA = 11,
OFFSET_STATIONETA = -5,
N_STATIONPHI = 48,
OFFSET_STATIONPHI = 1,
N_GASGAP = 3,
OFFSET_GASGAP = 1,
N_ISSTRIP = 2,
OFFSET_ISSTRIP = 0,
N_ABSSTATIONETA = 5,
OFFSET_ABSSTATIONETA = 1,
N_STRIPCHANNEL = 32,
OFFSET_STRIPCHANNEL = 1
} |
|
enum | TgcStation { kOUTER = 0,
kINNER,
N_STATION
} |
|
enum | TgcSensor { kWIRE = 0,
kSTRIP,
N_SENSOR
} |
|
|
StatusCode | readFileOfTimeJitter () |
| Reads parameters for intrinsic time response from timejitter.dat. More...
|
|
float | timeJitter (const Amg::Vector3D &, CLHEP::HepRandomEngine *rndmEngine) const |
| Calculates intrinsic time response according to incident angle of a track based on time response parameters. More...
|
|
bool | efficiencyCheck (const TgcSensor sensor, CLHEP::HepRandomEngine *rndmEngine) const |
| Determines whether a hit is detected or not. More...
|
|
bool | efficiencyCheck (const std::string &stationName, const int stationEta, const int stationPhi, const int gasGap, const TgcSensor sensor, const double energyDeposit) const |
|
uint16_t | bcTagging (const double digittime, const double window, const double offset) const |
|
StatusCode | readFileOfEnergyThreshold () |
| Read share/TGC_Digitization_energyThreshold.dat file. More...
|
|
StatusCode | readFileOfDeadChamber () |
| Read share/TGC_Digitization_deadChamber.dat file. More...
|
|
StatusCode | readFileOfStripPosition () |
| Read share/TGC_Digitization_StripPosition.dat file. More...
|
|
double | getEnergyThreshold (const std::string &stationName, int stationEta, int stationPhi, int gasGap, const TgcSensor sensor) const |
| Get energy threshold value for each chamber. More...
|
|
void | randomCrossTalk (const TgcDigitCrosstalkData *crosstalk, const Identifier elemId, const int gasGap, const TgcSensor sensor, const int channel, const float posInStrip, const float digitTime, const float time_offset, CLHEP::HepRandomEngine *rndmEngine, TgcDigitCollection *digits) const |
|
bool | isDeadChamber (const std::string &stationName, int stationEta, int stationPhi, int gasGap) |
| Method to check a chamber is dead or active. More...
|
|
float | getStripPosition (const std::string &stationName, int stationEta, int channel) const |
| Method to get position of Strip channel. More...
|
|
float | getDistanceToAsdFromSensor (const TgcDigitASDposData *readCdo, const int iStationName, const int stationEta, const int stationPhi, const TgcSensor sensor, const int channel, const float position) const |
| Method to get propagation time to the ASD from the sensor. More...
|
|
unsigned int | getRunPeriod () const |
| Determine the run period. More...
|
|
void | initMessaging () const |
| Initialize our message level and MessageSvc. More...
|
|
|
static void | addDigit (const Identifier id, const uint16_t bctag, TgcDigitCollection *digits) |
|
static int | getIStationName (const std::string &staionName) |
| Get stationName integer from stationName string. More...
|
|
static double | getSigPropTimeDelay (const float cableDistance) |
| Method to get signal propagation time delay. More...
|
|
static float | timeDiffByCableRadiusOfInner (const int iStationName, const int stationPhi, const int channel) |
| Method to get time difference by cable radius of inner. More...
|
|
static float | getTimeOffset (const TgcDigitTimeOffsetData *readCdo, const uint16_t station_num, const int station_eta, const TgcSensor sensor) |
| Method to get time offset to absorb signal delay. More...
|
|
static float | getCrosstalkProbability (const TgcDigitCrosstalkData *readCdo, const uint16_t layer_id, const TgcSensor sensor, const unsigned int index_prob) |
| Method to get the channel crosstalk probability. More...
|
|
for SCT_ChargeTrappingTool
All functionality of TGC digitization is implemented to this class.
Definition at line 40 of file TgcDigitMaker.h.
◆ NumberOfDimensions
Enumerator |
---|
N_STATIONNAME | |
OFFSET_STATIONNAME | |
N_STATIONETA | |
OFFSET_STATIONETA | |
N_STATIONPHI | |
OFFSET_STATIONPHI | |
N_GASGAP | |
OFFSET_GASGAP | |
N_ISSTRIP | |
OFFSET_ISSTRIP | |
N_ABSSTATIONETA | |
OFFSET_ABSSTATIONETA | |
N_STRIPCHANNEL | |
OFFSET_STRIPCHANNEL | |
Definition at line 85 of file TgcDigitMaker.h.
◆ TgcSensor
◆ TgcStation
◆ TgcDigitMaker()
◆ ~TgcDigitMaker()
virtual TgcDigitMaker::~TgcDigitMaker |
( |
| ) |
|
|
virtualdefault |
◆ addDigit()
Definition at line 673 of file TgcDigitMaker.cxx.
676 if ((bctag >> (bc - 1)) & 0
x1) {
677 bool duplicate =
false;
678 for (
const auto digit : *digits) {
679 if (
id ==
digit->identify() &&
digit->bcTag() == bc) {
685 std::unique_ptr<TgcDigit> multihitDigit =
686 std::make_unique<TgcDigit>(
id, bc);
687 digits->push_back(multihitDigit.release());
◆ bcTagging()
uint16_t TgcDigitMaker::bcTagging |
( |
const double |
digittime, |
|
|
const double |
window, |
|
|
const double |
offset |
|
) |
| const |
|
private |
Definition at line 649 of file TgcDigitMaker.cxx.
651 const double calc_coll_time =
658 if (0. < calc_coll_time && calc_coll_time < window) {
◆ efficiencyCheck() [1/2]
◆ efficiencyCheck() [2/2]
bool TgcDigitMaker::efficiencyCheck |
( |
const TgcSensor |
sensor, |
|
|
CLHEP::HepRandomEngine * |
rndmEngine |
|
) |
| const |
|
private |
Determines whether a hit is detected or not.
Definition at line 630 of file TgcDigitMaker.cxx.
632 if (CLHEP::RandFlat::shoot(rndmEngine, 0.0, 1.0) <
m_efficiency[sensor])
635 << sensor <<
"(0=WIRE,1=STRIP)");
◆ executeDigi()
A single hit can be digitized in the two directions independently: R and phi directions.
The information is restored by MuonGeoModel and accessible from the class of TGCReadOutElement. As described the preceding section, R direction is digitized based on the wire ganging information in the database. Digits in phi direction are calculated based on the formula in which the structure of strips in TGC is well expressed for amdb_simrec.P.03. For amdb_simrec.Q or later, phi direction is digitized based on the parameter in the database as the same manner of those in R direction. The method determines the response time for digits which is commonly used for signals from wire gangs and strips, and signal propagation time along wires and strips. In case that response time is outside of the time window to be set, that hit is removed. This method also removes some hits based on the detection efficiency to be set.
Definition at line 88 of file TgcDigitMaker.cxx.
94 constexpr
float sensor_propagation_time =
102 constexpr
float wire_pitch = 1.8 *
CLHEP::mm;
103 constexpr
float zwidth_frame = 17. *
CLHEP::mm;
108 int Id = hit->
TGCid();
135 <<
"context begin_index = " << tgcContext.
begin_index()
136 <<
" context end_index = " << tgcContext.
end_index()
137 <<
" the identifier is " << elemId);
141 std::unique_ptr<TgcDigitCollection> digits =
142 std::make_unique<TgcDigitCollection>(elemId, coll_hash);
145 float height = tgcChamber->
getRsize();
146 float hmin = sqrt(
pow(centreChamber.x(), 2) +
pow(centreChamber.y(), 2)) -
156 float distanceZ = 1.4 *
CLHEP::mm / direCos[0] * direCos[2];
157 float zLocal = localPos.z() + distanceZ;
160 float distanceY = 1.4 *
CLHEP::mm / direCos[0] * direCos[1];
164 float yLocal = ySign * (localPos.y() + distanceY);
169 double tofCorrection =
170 (sqrt(
pow(hmin + zwidth_frame, 2) +
pow(centreChamber.z(), 2)) /
174 float bunchTime = globalHitTime - tofCorrection;
176 static const float jitterInitial = 9999.;
177 float jitter = jitterInitial;
198 kWIRE, rndmEngine))) {
201 float posInWireGroup[2] = {0., 0.};
202 for (
int iPosition = 0; iPosition < 2; iPosition++) {
203 int nWireOffset = (std::abs(
stationEta) == 5 ||
211 double zPosInSensArea =
212 zLocal +
static_cast<double>(tgcChamber->
nWires(ilyr) -
217 if (zPosInSensArea < 0. ||
218 zPosInSensArea > tgcChamber->
nWires(ilyr) * wire_pitch) {
219 iWireGroup[iPosition] = 0;
220 posInWireGroup[iPosition] = 0.;
222 "executeDigi(): Wire: Hit position located at outside of a "
226 <<
" position: " << zPosInSensArea <<
" xlocal: " << zLocal
227 <<
" dir cosine: " << direCos[0] <<
"/" << direCos[1] <<
"/"
229 <<
" active region: " << height - zwidth_frame * 2.);
233 while (wire_pitch * (
static_cast<float>(wire_index)) <
235 igang <= tgcChamber->nWireGangs(ilyr)) {
236 wire_index += tgcChamber->
nWires(ilyr, igang);
239 posInWireGroup[iPosition] =
240 (zPosInSensArea / wire_pitch -
241 (
static_cast<float>(wire_index))) /
243 tgcChamber->
nWires(ilyr, igang - 1))) +
246 iWireGroup[iPosition] = ((1 == igang) ? 1 : igang - 1);
250 unsigned int jWG[2] = {
251 (iWireGroup[0] <= iWireGroup[1]) ? (
unsigned int)(0)
253 (iWireGroup[0] <= iWireGroup[1]) ? (
unsigned int)(1)
254 : (
unsigned int)(0)};
255 int iWG[2] = {iWireGroup[jWG[0]], iWireGroup[jWG[1]]};
256 float posInWG[2] = {posInWireGroup[jWG[0]], posInWireGroup[jWG[1]]};
257 if (iWG[0] != iWG[1]) {
258 ATH_MSG_DEBUG(
"executeDigi(): Multihits found in WIRE GROUPs:"
259 << iWG[0] <<
" " << iWG[1]);
263 for (
int iwg = iWG[0]; iwg <= iWG[1]; iwg++) {
264 if (1 <= iwg && iwg <= tgcChamber->nWireGangs(ilyr)) {
266 float wire_timeOffset =
272 if (iStationName > 46)
280 float ySignPhi = (
stationPhi % 2 == 1) ? -1. : +1.;
284 float wTimeDiffByRadiusOfInner =
288 bunchTime + jitter + wTimeDiffByRadiusOfInner;
289 float wASDDis{-1000.};
290 if (ASDpos !=
nullptr) {
295 wASDDis + (ySignPhi * yLocal +
298 sensor_propagation_time *
301 cable_propagation_time * wASDDis;
314 "WireGroup: digitized time "
315 << digit_time <<
" ns is outside of time window from "
316 << wire_timeOffset <<
". bunchTime: " << bunchTime
317 <<
" time jitter: " << jitter <<
" propagation time: "
318 << sensor_propagation_time *
321 cable_propagation_time * wASDDis
322 <<
" time difference by cable radius of inner station: "
323 << wTimeDiffByRadiusOfInner);
328 addDigit(newId, bctag, digits.get());
332 posInWG[0], digit_time, wire_timeOffset,
333 rndmEngine, digits.get());
337 "WireGroup: newid breakdown digitTime x/y/z direcos "
338 "height_gang bctag: "
341 <<
"WIRE/" << iwg <<
" " << digit_time <<
" "
342 << localPos.x() <<
"/" << localPos.y() <<
"/"
343 << localPos.z() <<
" " << direCos.x() <<
"/"
344 << direCos.y() <<
"/" << direCos.z() <<
" " << height
345 <<
" " << tgcChamber->
nWires(ilyr, iwg) <<
" "
350 "Wire Gang id is out of range. id, x/y/z, height: "
351 << iwg <<
" " << localPos.x() <<
"/" << localPos.y() <<
"/"
352 << localPos.z() <<
" " << height);
360 if ((ilyr != 2 || (
stationName.compare(0, 2,
"T1") !=
364 sensor, rndmEngine)) ||
373 float posInStrip[2] = {0., 0.};
375 for (
int iPosition = 0; iPosition < 2; iPosition++) {
378 float zPos = zLocal + height / 2. - zwidth_frame;
380 iStrip[iPosition] = 0;
381 posInStrip[iPosition] = 0.;
383 "Strip: Hit position located at outside of a sensitive "
384 "volume, id, position, xlocal0/1, dir cosine: "
386 <<
"/" << ilyr << zPos <<
" " << zLocal <<
" " << direCos[0]
387 <<
"/" << direCos[1] <<
"/" << direCos[2]);
388 }
else if (zPos > height - zwidth_frame * 2.) {
389 iStrip[iPosition] = tgcChamber->
nStrips(ilyr) + 1;
390 posInStrip[iPosition] = 0.;
392 "Strip: Hit position located at outside of a sensitive "
393 "volume, id, position, active region: "
395 <<
"/" << ilyr << zPos <<
" "
396 << height - zwidth_frame * 2.);
405 float phiLocal = atan2(yLocal, zLocal + height / 2. + hmin);
408 "dphi, phiLocal, yLocal, zLocall+ height/2.+hmin: "
409 << dphi <<
" " << phiLocal <<
" " << yLocal <<
" "
410 << zLocal + height / 2. + hmin);
415 istr =
static_cast<int>(floor(phiLocal / dphi + 15.75)) + 1;
416 posInStrip[iPosition] =
417 phiLocal / dphi + 15.75 -
static_cast<float>(istr - 1);
419 istr =
static_cast<int>(floor(
420 (phiLocal - dphi * 14.25) / (dphi / 2.))) +
422 posInStrip[iPosition] =
423 (phiLocal - dphi * 14.25) / (dphi / 2.) -
424 static_cast<float>(istr - 31);
427 istr =
static_cast<int>(floor(phiLocal / dphi + 16.25)) + 1;
428 posInStrip[iPosition] =
429 phiLocal / dphi + 16.25 -
static_cast<float>(istr - 1);
431 istr =
static_cast<int>(floor(
432 (phiLocal + dphi * 14.25) / (dphi / 2.))) +
434 posInStrip[iPosition] =
435 (phiLocal + dphi * 14.25) / (dphi / 2.) -
436 static_cast<float>(istr - 3);
441 posInStrip[iPosition] = 0.;
442 }
else if (32 < istr) {
444 posInStrip[iPosition] = 0.;
446 iStrip[iPosition] = istr;
450 unsigned int jStr[2] = {
451 (iStrip[0] <= iStrip[1]) ? (
unsigned int)(0) : (
unsigned int)(1),
452 (iStrip[0] <= iStrip[1]) ? (
unsigned int)(1) : (
unsigned int)(0)};
453 int iStr[2] = {iStrip[jStr[0]], iStrip[jStr[1]]};
454 float posInStr[2] = {posInStrip[jStr[0]], posInStrip[jStr[1]]};
455 if (iStr[0] != iStr[1]) {
461 float strip_timeOffset =
466 for (
int istr = iStr[0]; istr <= iStr[1]; istr++) {
467 if (1 <= istr && istr <= 32) {
469 if (jitter > jitterInitial - 0.1) {
478 float sTimeDiffByRadiusOfInner =
483 sensor_propagation_time *
484 (height / 2. + zwidth_frame + zSignEta * zLocal) +
485 sTimeDiffByRadiusOfInner;
486 float sASDDis{-1000};
487 if (ASDpos !=
nullptr) {
492 float sCableDis = sASDDis + (height / 2. + zwidth_frame +
495 sASDDis * cable_propagation_time;
506 "Strip: Digitized time is outside of time window. "
507 << sDigitTime <<
" bunchTime: " << bunchTime
508 <<
" time jitter: " << jitter <<
" propagation time: "
509 << sensor_propagation_time *
510 (height / 2. + zwidth_frame + zSignEta * zLocal)
511 <<
" time difference by cable radius of inner station: "
512 << sTimeDiffByRadiusOfInner);
517 addDigit(newId, bctag, digits.get());
519 if (istr == iStr[0]) {
521 iStr[0], posInStr[0], sDigitTime,
522 strip_timeOffset, rndmEngine,
527 "Strip: newid breakdown digitTime x/y/z direcos "
530 <<
"/" <<
stationPhi <<
"/" << ilyr <<
"/" << sensor
531 <<
"/" << istr <<
" " << sDigitTime <<
" "
532 << localPos.x() <<
"/" << localPos.y() <<
"/"
533 << localPos.z() <<
" " << direCos.x() <<
"/"
534 << direCos.y() <<
"/" << direCos.z() <<
" "
535 << height / 2. + hmin <<
" " << bctag);
539 << ilyr <<
" " << istr);
544 return digits.release();
◆ getCrosstalkProbability()
Method to get the channel crosstalk probability.
Definition at line 1236 of file TgcDigitMaker.cxx.
1239 if (readCdo ==
nullptr)
1241 return ((sensor == TgcSensor::kSTRIP)
◆ getDistanceToAsdFromSensor()
Method to get propagation time to the ASD from the sensor.
Definition at line 1197 of file TgcDigitMaker.cxx.
1203 int phiId = (iStationName >= 47) ?
stationPhi : 0x1f;
1206 unsigned int asdNo =
static_cast<unsigned int>(
channel - 1) /
1209 float asd_position = 0.;
1211 auto it = map.find(chamberId);
1213 if (
it != map.end()) {
1218 <<
", phi=" << phiId);
1221 float distance = fabs(position - asd_position);
◆ getEnergyThreshold()
double TgcDigitMaker::getEnergyThreshold |
( |
const std::string & |
stationName, |
|
|
int |
stationEta, |
|
|
int |
stationPhi, |
|
|
int |
gasGap, |
|
|
const TgcSensor |
sensor |
|
) |
| const |
|
private |
Get energy threshold value for each chamber.
Definition at line 978 of file TgcDigitMaker.cxx.
991 double energyThreshold = +999999.;
1008 << sensor <<
" energyThreshold(MeV)= " << energyThreshold);
1010 return energyThreshold;
◆ getIStationName()
int TgcDigitMaker::getIStationName |
( |
const std::string & |
staionName | ) |
|
|
staticprivate |
Get stationName integer from stationName string.
Definition at line 1134 of file TgcDigitMaker.cxx.
1135 int iStationName = 0;
1153 return iStationName;
◆ getRunPeriod()
unsigned int TgcDigitMaker::getRunPeriod |
( |
| ) |
const |
|
private |
Determine the run period.
Definition at line 773 of file TgcDigitMaker.cxx.
777 SmartIF<IGeoModelSvc> geoModel{Gaudi::svcLocator()->service(
"GeoModelSvc")};
782 std::string atlasVersion = geoModel->atlasVersion();
784 SmartIF<IRDBAccessSvc> rdbAccess{Gaudi::svcLocator()->service(
"RDBAccessSvc")};
791 rdbAccess->getRecordsetPtr(
"AtlasCommon", atlasVersion,
"ATLAS");
793 if (atlasCommonRec->size() == 0)
796 std::string configVal = (*atlasCommonRec)[0]->getString(
"CONFIG");
797 if (configVal ==
"RUN1")
799 else if (configVal ==
"RUN2")
801 else if (configVal ==
"RUN3")
804 else if (configVal ==
"RUN4")
810 "Unexpected value for geometry config read from the database: "
◆ getSigPropTimeDelay()
double TgcDigitMaker::getSigPropTimeDelay |
( |
const float |
cableDistance | ) |
|
|
staticprivate |
◆ getStripPosition()
float TgcDigitMaker::getStripPosition |
( |
const std::string & |
stationName, |
|
|
int |
stationEta, |
|
|
int |
channel |
|
) |
| const |
|
private |
◆ getTimeOffset()
Method to get time offset to absorb signal delay.
Definition at line 1225 of file TgcDigitMaker.cxx.
1230 (station_num << 3) + static_cast<uint16_t>(std::abs(
station_eta));
1231 return ((sensor == TgcSensor::kSTRIP)
1233 : readCdo->
wireOffset.find(chamberId)->second);
◆ initialize()
StatusCode TgcDigitMaker::initialize |
( |
| ) |
|
◆ initMessaging()
void AthMessaging::initMessaging |
( |
| ) |
const |
|
privateinherited |
Initialize our message level and MessageSvc.
This method should only be called once.
Definition at line 39 of file AthMessaging.cxx.
◆ isDeadChamber()
bool TgcDigitMaker::isDeadChamber |
( |
const std::string & |
stationName, |
|
|
int |
stationEta, |
|
|
int |
stationPhi, |
|
|
int |
gasGap |
|
) |
| |
|
private |
Method to check a chamber is dead or active.
Definition at line 1101 of file TgcDigitMaker.cxx.
1103 bool v_isDeadChamber =
true;
1129 <<
" isDeadChamber= " << v_isDeadChamber);
1131 return v_isDeadChamber;
◆ msg() [1/2]
MsgStream & AthMessaging::msg |
( |
| ) |
const |
|
inlineinherited |
The standard message stream.
Returns a reference to the default message stream May not be invoked before sysInitialize() has been invoked.
Definition at line 164 of file AthMessaging.h.
◆ msg() [2/2]
MsgStream & AthMessaging::msg |
( |
const MSG::Level |
lvl | ) |
const |
|
inlineinherited |
The standard message stream.
Returns a reference to the default message stream May not be invoked before sysInitialize() has been invoked.
Definition at line 179 of file AthMessaging.h.
180 {
return msg() << lvl; }
◆ msgLvl()
bool AthMessaging::msgLvl |
( |
const MSG::Level |
lvl | ) |
const |
|
inlineinherited |
Test the output level.
- Parameters
-
lvl | The message level to test against |
- Returns
- boolean Indicating if messages at given level will be printed
- Return values
-
true | Messages at level "lvl" will be printed |
Definition at line 151 of file AthMessaging.h.
◆ randomCrossTalk()
Definition at line 1014 of file TgcDigitMaker.cxx.
1032 float prob1CrossTalk =
1034 float prob11CrossTalk =
1036 float prob20CrossTalk =
1038 float prob21CrossTalk =
1041 int nCrossTalks_neg = 0;
1042 int nCrossTalks_pos = 0;
1044 if (posInChan < prob1CrossTalk) {
1045 nCrossTalks_neg = 1;
1046 }
else if (posInChan > 1. - prob1CrossTalk) {
1047 nCrossTalks_pos = 1;
1049 double prob = CLHEP::RandFlat::shoot(rndmEngine, 0.0, 1.0);
1050 if (
prob < prob11CrossTalk / (1. - 2. * prob1CrossTalk)) {
1051 nCrossTalks_neg = 1;
1052 nCrossTalks_pos = 1;
1053 }
else if (
prob < (prob20CrossTalk + prob11CrossTalk) /
1054 (1. - 2. * prob1CrossTalk)) {
1055 if (posInChan < 0.5) {
1056 nCrossTalks_neg = 2;
1059 nCrossTalks_pos = 2;
1063 (prob20CrossTalk + prob11CrossTalk + 2. * prob21CrossTalk) /
1064 (1. - 2. * prob1CrossTalk)) {
1065 if (posInChan < 0.5) {
1066 nCrossTalks_neg = 2;
1067 nCrossTalks_pos = 1;
1070 nCrossTalks_neg = 1;
1071 nCrossTalks_pos = 2;
1077 if (nCrossTalks_neg == 0 && nCrossTalks_pos == 0)
1081 float dt = digitTime;
1090 for (
int jChan =
channel - nCrossTalks_neg;
1091 jChan <=
channel + nCrossTalks_pos; jChan++) {
1092 if (jChan ==
channel || jChan < 1 || jChan > maxChannelNumber)
◆ readFileOfDeadChamber()
StatusCode TgcDigitMaker::readFileOfDeadChamber |
( |
| ) |
|
|
private |
Read share/TGC_Digitization_deadChamber.dat file.
Definition at line 817 of file TgcDigitMaker.cxx.
822 for (iStationName = 0; iStationName <
N_STATIONNAME; iStationName++) {
836 return StatusCode::FAILURE;
842 fileName =
"TGC_Digitization_deadChamber.dat";
844 fileName =
"TGC_Digitization_2016deadChamber.dat";
846 fileName =
"TGC_Digitization_NOdeadChamber.dat";
849 <<
" is unexpected in TgcDigitMaker - "
850 "using NOdeadChamber configuration.");
851 return StatusCode::FAILURE;
854 if (fileWithPath.empty()) {
855 ATH_MSG_FATAL(
"readFileOfDeadChamber(): Could not find file "
857 return StatusCode::FAILURE;
862 ifs.open(fileWithPath.c_str(), std::ios::in);
864 ATH_MSG_FATAL(
"readFileOfDeadChamber(): Could not open file "
866 return StatusCode::FAILURE;
870 unsigned int nDeadChambers = 0;
879 <<
" stationName= " << iStationName <<
" stationEta= "
896 if (gasGap < 0 || gasGap >=
N_GASGAP)
910 ATH_MSG_INFO(
"readFileOfDeadChamber: the number of dead chambers = "
913 return StatusCode::SUCCESS;
◆ readFileOfEnergyThreshold()
StatusCode TgcDigitMaker::readFileOfEnergyThreshold |
( |
| ) |
|
|
private |
Read share/TGC_Digitization_energyThreshold.dat file.
Definition at line 693 of file TgcDigitMaker.cxx.
697 for (iStationName = 0; iStationName <
N_STATIONNAME; iStationName++) {
711 const std::string
fileName =
"TGC_Digitization_energyThreshold.dat";
713 if (fileWithPath.empty()) {
714 ATH_MSG_FATAL(
"readFileOfEnergyThreshold(): Could not find file "
716 return StatusCode::FAILURE;
721 ifs.open(fileWithPath.c_str(), std::ios::in);
723 ATH_MSG_FATAL(
"readFileOfEnergyThreshold(): Could not open file "
725 return StatusCode::FAILURE;
728 double energyThreshold;
734 <<
" stationName= " << iStationName <<
" stationEta= "
737 <<
" energyThreshold(MeV)= " << energyThreshold);
753 if (gasGap < 0 || gasGap >=
N_GASGAP)
769 return StatusCode::SUCCESS;
◆ readFileOfStripPosition()
StatusCode TgcDigitMaker::readFileOfStripPosition |
( |
| ) |
|
|
private |
Read share/TGC_Digitization_StripPosition.dat file.
Definition at line 916 of file TgcDigitMaker.cxx.
920 for (iStationName = 0; iStationName <
N_STATIONNAME; iStationName++) {
929 const std::string
fileName =
"TGC_Digitization_StripPosition.dat";
931 if (fileWithPath.empty()) {
932 ATH_MSG_FATAL(
"readFileOfStripPosition(): Could not find file "
934 return StatusCode::FAILURE;
939 ifs.open(fileWithPath.c_str(), std::ios::in);
941 ATH_MSG_FATAL(
"readFileOfStripPosition(): Could not open file "
943 return StatusCode::FAILURE;
951 <<
" stationName= " << iStationName <<
" stationEta= "
953 <<
" StripPosition= " << strippos);
975 return StatusCode::SUCCESS;
◆ readFileOfTimeJitter()
StatusCode TgcDigitMaker::readFileOfTimeJitter |
( |
| ) |
|
|
private |
Reads parameters for intrinsic time response from timejitter.dat.
Definition at line 548 of file TgcDigitMaker.cxx.
549 const char*
const fileName =
"TGC_Digitization_timejitter.dat";
553 if (!fileWithPath.empty()) {
554 ifs.open(fileWithPath.c_str(), std::ios::in);
558 return StatusCode::FAILURE;
564 return StatusCode::FAILURE;
578 "readFileOfTimeJitter(): Timejitter, angle, Number of bins, prob. "
582 for (
int j = 0; j < 41 ; j++) {
595 return StatusCode::SUCCESS;
◆ setLevel()
void AthMessaging::setLevel |
( |
MSG::Level |
lvl | ) |
|
|
inherited |
◆ timeDiffByCableRadiusOfInner()
float TgcDigitMaker::timeDiffByCableRadiusOfInner |
( |
const int |
iStationName, |
|
|
const int |
stationPhi, |
|
|
const int |
channel |
|
) |
| |
|
staticprivate |
Method to get time difference by cable radius of inner.
Definition at line 1177 of file TgcDigitMaker.cxx.
1181 if (iStationName != 47 && iStationName != 48)
◆ timeJitter()
float TgcDigitMaker::timeJitter |
( |
const Amg::Vector3D & |
direCosLocal, |
|
|
CLHEP::HepRandomEngine * |
rndmEngine |
|
) |
| const |
|
private |
Calculates intrinsic time response according to incident angle of a track based on time response parameters.
Definition at line 598 of file TgcDigitMaker.cxx.
600 float injectionAngle =
601 atan2(fabs(direCosLocal[2]), fabs(direCosLocal[0])) /
CLHEP::degree;
603 int ithAngle =
static_cast<int>(injectionAngle / 5.);
604 float wAngle = injectionAngle / 5. -
static_cast<float>(ithAngle);
610 jthAngle = ithAngle + 1;
617 while (
prob > probRef) {
618 prob = CLHEP::RandFlat::shoot(rndmEngine, 0.0, 1.0);
619 jitter = CLHEP::RandFlat::shoot(rndmEngine, 0.0, 1.0) * 40. *
621 int ithJitter =
static_cast<int>(jitter);
◆ ATLAS_THREAD_SAFE
std::atomic_flag m_initialized AthMessaging::ATLAS_THREAD_SAFE = ATOMIC_FLAG_INIT |
|
mutableprivateinherited |
◆ m_bunchCrossingTime
double TgcDigitMaker::m_bunchCrossingTime |
|
private |
◆ m_doFourBunchDigitization
bool TgcDigitMaker::m_doFourBunchDigitization {false} |
|
private |
◆ m_efficiency
float TgcDigitMaker::m_efficiency[N_SENSOR] {} |
|
private |
◆ m_energyThreshold
◆ m_gateTimeWindow
define the time windows for signals from wiregangs and strips.
The offsets are defined as relative time differences with respect to the time after TOF and cable length corrections. Bunch crossing time is specified.
Definition at line 204 of file TgcDigitMaker.h.
◆ m_hitIdHelper
◆ m_idHelper
◆ m_imsg
std::atomic<IMessageSvc*> AthMessaging::m_imsg { nullptr } |
|
mutableprivateinherited |
◆ m_isDeadChamber
◆ m_lvl
std::atomic<MSG::Level> AthMessaging::m_lvl { MSG::NIL } |
|
mutableprivateinherited |
◆ m_mdManager
◆ m_msg_tls
boost::thread_specific_ptr<MsgStream> AthMessaging::m_msg_tls |
|
mutableprivateinherited |
MsgStream instance (a std::cout like with print-out levels)
Definition at line 132 of file AthMessaging.h.
◆ m_nm
std::string AthMessaging::m_nm |
|
privateinherited |
◆ m_StripPos
Position of Strip Channel (Longer base or Shorter base)
Definition at line 188 of file TgcDigitMaker.h.
◆ m_vecAngle_Time
std::vector<std::vector<float> > TgcDigitMaker::m_vecAngle_Time |
|
private |
The documentation for this class was generated from the following files:
double energyDeposit() const
std::atomic< MSG::Level > m_lvl
Current logging level.
constexpr uint8_t stationPhi
station Phi 1 to 8
float m_StripPos[N_STATIONNAME][N_ABSSTATIONETA][N_STRIPCHANNEL]
Position of Strip Channel (Longer base or Shorter base)
double chamberWidth(double z) const
StatusCode readFileOfDeadChamber()
Read share/TGC_Digitization_deadChamber.dat file.
static std::string find_file(const std::string &logical_file_name, const std::string &search_path, SearchType search_type=LocalSearch)
static float getTimeOffset(const TgcDigitTimeOffsetData *readCdo, const uint16_t station_num, const int station_eta, const TgcSensor sensor)
Method to get time offset to absorb signal delay.
int GetGasGap(const int &hid) const
double stripDeltaPhi() const
size_type end_index() const
std::map< uint16_t, std::vector< float > > stripAsdPos
float getStripPosition(const std::string &stationName, int stationEta, int channel) const
Method to get position of Strip channel.
float getDistanceToAsdFromSensor(const TgcDigitASDposData *readCdo, const int iStationName, const int stationEta, const int stationPhi, const TgcSensor sensor, const int channel, const float position) const
Method to get propagation time to the ASD from the sensor.
unsigned int getRunPeriod() const
Determine the run period.
StatusCode readFileOfEnergyThreshold()
Read share/TGC_Digitization_energyThreshold.dat file.
int stationName(const Identifier &id) const
#define ATH_MSG_VERBOSE(x)
std::atomic< IMessageSvc * > m_imsg
MessageSvc pointer.
const MuonGM::MuonDetectorManager * m_mdManager
std::map< uint16_t, float > wireOffset
IMessageSvc * getMessageSvc(bool quiet=false)
static float timeDiffByCableRadiusOfInner(const int iStationName, const int stationPhi, const int channel)
Method to get time difference by cable radius of inner.
const TgcReadoutElement * getTgcReadoutElement(const Identifier &id) const
access via extended identifier (requires unpacking)
const Amg::Vector3D & localPosition() const
AthMessaging()
Default constructor:
size_type begin_index() const
bool msgLvl(const MSG::Level lvl) const
Test the output level.
const TgcHitIdHelper * m_hitIdHelper
std::string GetStationName(const int &hid) const
double angle(const GeoTrf::Vector2D &a, const GeoTrf::Vector2D &b)
int nWires(int gasGap) const
Returns the total number of wires in a given gas gap.
bool efficiencyCheck(const TgcSensor sensor, CLHEP::HepRandomEngine *rndmEngine) const
Determines whether a hit is detected or not.
double m_gateTimeWindow[N_STATION][N_SENSOR]
define the time windows for signals from wiregangs and strips.
A TgcReadoutElement corresponds to a single TGC chamber; therefore typically a TGC station contains s...
std::map< uint16_t, float > stripOffset
std::vector< std::vector< float > > m_vecAngle_Time
double delay(std::size_t d)
static const TgcHitIdHelper * GetHelper()
void randomCrossTalk(const TgcDigitCrosstalkData *crosstalk, const Identifier elemId, const int gasGap, const TgcSensor sensor, const int channel, const float posInStrip, const float digitTime, const float time_offset, CLHEP::HepRandomEngine *rndmEngine, TgcDigitCollection *digits) const
const Amg::Vector3D globalPosition() const
static void addDigit(const Identifier id, const uint16_t bctag, TgcDigitCollection *digits)
int nStrips(int gasGap) const
Returns the number of strips in a given gas gap.
void show() const
Print out in hex form.
std::shared_ptr< IRDBRecordset > IRDBRecordset_ptr
MsgStream & msg() const
The standard message stream.
Identifier elementID(int stationName, int stationEta, int stationPhi) const
int GetStationPhi(const int &hid) const
std::map< uint16_t, std::vector< float > > wireAsdPos
const TgcIdHelper * tgcIdHelper() const
int stationEta(const Identifier &id) const
StatusCode readFileOfStripPosition()
Read share/TGC_Digitization_StripPosition.dat file.
Eigen::Matrix< double, 3, 1 > Vector3D
static int getIStationName(const std::string &staionName)
Get stationName integer from stationName string.
double m_energyThreshold[N_STATIONNAME][N_STATIONETA][N_STATIONPHI][N_GASGAP][N_ISSTRIP]
Energy threshold value for each chamber.
std::string show_to_string(Identifier id, const IdContext *context=0, char sep='.') const
or provide the printout in string form
#define ATH_MSG_WARNING(x)
virtual int get_hash(const Identifier &id, IdentifierHash &hash_id, const IdContext *context=0) const override
Create hash id from compact id (return == 0 for OK)
float getStripProbability(const uint16_t layer_id, const unsigned int index_prob) const
std::string m_nm
Message source name.
IdContext module_context() const
id for module
double m_bunchCrossingTime
const Amg::Vector3D & localDireCos() const
float m_efficiency[N_SENSOR]
double getEnergyThreshold(const std::string &stationName, int stationEta, int stationPhi, int gasGap, const TgcSensor sensor) const
Get energy threshold value for each chamber.
int GetStationEta(const int &hid) const
Identifier channelID(int stationName, int stationEta, int stationPhi, int gasGap, int isStrip, int channel) const
bool m_isDeadChamber[N_STATIONNAME][N_STATIONETA][N_STATIONPHI][N_GASGAP]
Dead chamber flag for each chamber.
void initMessaging() const
Initialize our message level and MessageSvc.
constexpr uint8_t stationEta
1 to 3
This is a "hash" representation of an Identifier. This encodes a 32 bit index which can be used to lo...
StatusCode readFileOfTimeJitter()
Reads parameters for intrinsic time response from timejitter.dat.
boost::thread_specific_ptr< MsgStream > m_msg_tls
MsgStream instance (a std::cout like with print-out levels)
bool m_doFourBunchDigitization
Activate four bunch digitization.
static float getCrosstalkProbability(const TgcDigitCrosstalkData *readCdo, const uint16_t layer_id, const TgcSensor sensor, const unsigned int index_prob)
Method to get the channel crosstalk probability.
float distance(const Amg::Vector3D &p1, const Amg::Vector3D &p2)
calculates the distance between two point in 3D space
This class saves the "context" of an expanded identifier (ExpandedIdentifier) for compact or hash ver...
const TgcIdHelper * m_idHelper
uint16_t bcTagging(const double digittime, const double window, const double offset) const
bool isDeadChamber(const std::string &stationName, int stationEta, int stationPhi, int gasGap)
Method to check a chamber is dead or active.
static double getSigPropTimeDelay(const float cableDistance)
Method to get signal propagation time delay.
float timeJitter(const Amg::Vector3D &, CLHEP::HepRandomEngine *rndmEngine) const
Calculates intrinsic time response according to incident angle of a track based on time response para...
float getWireProbability(const uint16_t layer_id, const unsigned int index_prob) const