![Logo](../../ATLAS-Logo-Square-Blue-RGB.png) |
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...
|
|
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()
TgcDigitMaker::~TgcDigitMaker |
( |
| ) |
|
|
virtualdefault |
◆ addDigit()
Definition at line 672 of file TgcDigitMaker.cxx.
675 if ((bctag >> (bc - 1)) & 0
x1) {
676 bool duplicate =
false;
677 for (
const auto digit : *digits) {
678 if (
id ==
digit->identify() &&
digit->bcTag() == bc) {
684 std::unique_ptr<TgcDigit> multihitDigit =
685 std::make_unique<TgcDigit>(
id, bc);
686 digits->push_back(multihitDigit.release());
◆ bcTagging()
uint16_t TgcDigitMaker::bcTagging |
( |
const double |
digittime, |
|
|
const double |
window, |
|
|
const double |
offset |
|
) |
| const |
|
private |
Definition at line 648 of file TgcDigitMaker.cxx.
650 const double calc_coll_time =
657 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 629 of file TgcDigitMaker.cxx.
631 if (CLHEP::RandFlat::shoot(rndmEngine, 0.0, 1.0) <
m_efficiency[sensor])
634 << 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 87 of file TgcDigitMaker.cxx.
93 constexpr
float sensor_propagation_time =
101 constexpr
float wire_pitch = 1.8 *
CLHEP::mm;
102 constexpr
float zwidth_frame = 17. *
CLHEP::mm;
107 int Id = hit->
TGCid();
134 <<
"context begin_index = " << tgcContext.
begin_index()
135 <<
" context end_index = " << tgcContext.
end_index()
136 <<
" the identifier is " << elemId);
140 std::unique_ptr<TgcDigitCollection> digits =
141 std::make_unique<TgcDigitCollection>(elemId, coll_hash);
144 float height = tgcChamber->
getRsize();
145 float hmin = sqrt(
pow(centreChamber.x(), 2) +
pow(centreChamber.y(), 2)) -
155 float distanceZ = 1.4 *
CLHEP::mm / direCos[0] * direCos[2];
156 float zLocal = localPos.z() + distanceZ;
159 float distanceY = 1.4 *
CLHEP::mm / direCos[0] * direCos[1];
163 float yLocal = ySign * (localPos.y() + distanceY);
168 double tofCorrection =
169 (sqrt(
pow(hmin + zwidth_frame, 2) +
pow(centreChamber.z(), 2)) /
173 float bunchTime = globalHitTime - tofCorrection;
175 static const float jitterInitial = 9999.;
176 float jitter = jitterInitial;
197 kWIRE, rndmEngine))) {
200 float posInWireGroup[2] = {0., 0.};
201 for (
int iPosition = 0; iPosition < 2; iPosition++) {
202 int nWireOffset = (std::abs(
stationEta) == 5 ||
210 double zPosInSensArea =
211 zLocal +
static_cast<double>(tgcChamber->
nWires(ilyr) -
216 if (zPosInSensArea < 0. ||
217 zPosInSensArea > tgcChamber->
nWires(ilyr) * wire_pitch) {
218 iWireGroup[iPosition] = 0;
219 posInWireGroup[iPosition] = 0.;
221 "executeDigi(): Wire: Hit position located at outside of a "
225 <<
" position: " << zPosInSensArea <<
" xlocal: " << zLocal
226 <<
" dir cosine: " << direCos[0] <<
"/" << direCos[1] <<
"/"
228 <<
" active region: " << height - zwidth_frame * 2.);
232 while (wire_pitch * (
static_cast<float>(wire_index)) <
234 igang <= tgcChamber->nWireGangs(ilyr)) {
235 wire_index += tgcChamber->
nWires(ilyr, igang);
238 posInWireGroup[iPosition] =
239 (zPosInSensArea / wire_pitch -
240 (
static_cast<float>(wire_index))) /
242 tgcChamber->
nWires(ilyr, igang - 1))) +
245 iWireGroup[iPosition] = ((1 == igang) ? 1 : igang - 1);
249 unsigned int jWG[2] = {
250 (iWireGroup[0] <= iWireGroup[1]) ? (
unsigned int)(0)
252 (iWireGroup[0] <= iWireGroup[1]) ? (
unsigned int)(1)
253 : (
unsigned int)(0)};
254 int iWG[2] = {iWireGroup[jWG[0]], iWireGroup[jWG[1]]};
255 float posInWG[2] = {posInWireGroup[jWG[0]], posInWireGroup[jWG[1]]};
256 if (iWG[0] != iWG[1]) {
257 ATH_MSG_DEBUG(
"executeDigi(): Multihits found in WIRE GROUPs:"
258 << iWG[0] <<
" " << iWG[1]);
262 for (
int iwg = iWG[0]; iwg <= iWG[1]; iwg++) {
263 if (1 <= iwg && iwg <= tgcChamber->nWireGangs(ilyr)) {
265 float wire_timeOffset =
271 if (iStationName > 46)
279 float ySignPhi = (
stationPhi % 2 == 1) ? -1. : +1.;
283 float wTimeDiffByRadiusOfInner =
287 bunchTime + jitter + wTimeDiffByRadiusOfInner;
288 float wASDDis{-1000.};
289 if (ASDpos !=
nullptr) {
294 wASDDis + (ySignPhi * yLocal +
297 sensor_propagation_time *
300 cable_propagation_time * wASDDis;
313 "WireGroup: digitized time "
314 << digit_time <<
" ns is outside of time window from "
315 << wire_timeOffset <<
". bunchTime: " << bunchTime
316 <<
" time jitter: " << jitter <<
" propagation time: "
317 << sensor_propagation_time *
320 cable_propagation_time * wASDDis
321 <<
" time difference by cable radius of inner station: "
322 << wTimeDiffByRadiusOfInner);
327 addDigit(newId, bctag, digits.get());
331 posInWG[0], digit_time, wire_timeOffset,
332 rndmEngine, digits.get());
336 "WireGroup: newid breakdown digitTime x/y/z direcos "
337 "height_gang bctag: "
340 <<
"WIRE/" << iwg <<
" " << digit_time <<
" "
341 << localPos.x() <<
"/" << localPos.y() <<
"/"
342 << localPos.z() <<
" " << direCos.x() <<
"/"
343 << direCos.y() <<
"/" << direCos.z() <<
" " << height
344 <<
" " << tgcChamber->
nWires(ilyr, iwg) <<
" "
349 "Wire Gang id is out of range. id, x/y/z, height: "
350 << iwg <<
" " << localPos.x() <<
"/" << localPos.y() <<
"/"
351 << localPos.z() <<
" " << height);
359 if ((ilyr != 2 || (
stationName.compare(0, 2,
"T1") !=
363 sensor, rndmEngine)) ||
372 float posInStrip[2] = {0., 0.};
374 for (
int iPosition = 0; iPosition < 2; iPosition++) {
377 float zPos = zLocal + height / 2. - zwidth_frame;
379 iStrip[iPosition] = 0;
380 posInStrip[iPosition] = 0.;
382 "Strip: Hit position located at outside of a sensitive "
383 "volume, id, position, xlocal0/1, dir cosine: "
385 <<
"/" << ilyr << zPos <<
" " << zLocal <<
" " << direCos[0]
386 <<
"/" << direCos[1] <<
"/" << direCos[2]);
387 }
else if (zPos > height - zwidth_frame * 2.) {
388 iStrip[iPosition] = tgcChamber->
nStrips(ilyr) + 1;
389 posInStrip[iPosition] = 0.;
391 "Strip: Hit position located at outside of a sensitive "
392 "volume, id, position, active region: "
394 <<
"/" << ilyr << zPos <<
" "
395 << height - zwidth_frame * 2.);
404 float phiLocal = atan2(yLocal, zLocal + height / 2. + hmin);
407 "dphi, phiLocal, yLocal, zLocall+ height/2.+hmin: "
408 << dphi <<
" " << phiLocal <<
" " << yLocal <<
" "
409 << zLocal + height / 2. + hmin);
414 istr =
static_cast<int>(floor(phiLocal / dphi + 15.75)) + 1;
415 posInStrip[iPosition] =
416 phiLocal / dphi + 15.75 -
static_cast<float>(istr - 1);
418 istr =
static_cast<int>(floor(
419 (phiLocal - dphi * 14.25) / (dphi / 2.))) +
421 posInStrip[iPosition] =
422 (phiLocal - dphi * 14.25) / (dphi / 2.) -
423 static_cast<float>(istr - 31);
426 istr =
static_cast<int>(floor(phiLocal / dphi + 16.25)) + 1;
427 posInStrip[iPosition] =
428 phiLocal / dphi + 16.25 -
static_cast<float>(istr - 1);
430 istr =
static_cast<int>(floor(
431 (phiLocal + dphi * 14.25) / (dphi / 2.))) +
433 posInStrip[iPosition] =
434 (phiLocal + dphi * 14.25) / (dphi / 2.) -
435 static_cast<float>(istr - 3);
440 posInStrip[iPosition] = 0.;
441 }
else if (32 < istr) {
443 posInStrip[iPosition] = 0.;
445 iStrip[iPosition] = istr;
449 unsigned int jStr[2] = {
450 (iStrip[0] <= iStrip[1]) ? (
unsigned int)(0) : (
unsigned int)(1),
451 (iStrip[0] <= iStrip[1]) ? (
unsigned int)(1) : (
unsigned int)(0)};
452 int iStr[2] = {iStrip[jStr[0]], iStrip[jStr[1]]};
453 float posInStr[2] = {posInStrip[jStr[0]], posInStrip[jStr[1]]};
454 if (iStr[0] != iStr[1]) {
460 float strip_timeOffset =
465 for (
int istr = iStr[0]; istr <= iStr[1]; istr++) {
466 if (1 <= istr && istr <= 32) {
468 if (jitter > jitterInitial - 0.1) {
477 float sTimeDiffByRadiusOfInner =
482 sensor_propagation_time *
483 (height / 2. + zwidth_frame + zSignEta * zLocal) +
484 sTimeDiffByRadiusOfInner;
485 float sASDDis{-1000};
486 if (ASDpos !=
nullptr) {
491 float sCableDis = sASDDis + (height / 2. + zwidth_frame +
494 sASDDis * cable_propagation_time;
505 "Strip: Digitized time is outside of time window. "
506 << sDigitTime <<
" bunchTime: " << bunchTime
507 <<
" time jitter: " << jitter <<
" propagation time: "
508 << sensor_propagation_time *
509 (height / 2. + zwidth_frame + zSignEta * zLocal)
510 <<
" time difference by cable radius of inner station: "
511 << sTimeDiffByRadiusOfInner);
516 addDigit(newId, bctag, digits.get());
518 if (istr == iStr[0]) {
520 iStr[0], posInStr[0], sDigitTime,
521 strip_timeOffset, rndmEngine,
526 "Strip: newid breakdown digitTime x/y/z direcos "
529 <<
"/" <<
stationPhi <<
"/" << ilyr <<
"/" << sensor
530 <<
"/" << istr <<
" " << sDigitTime <<
" "
531 << localPos.x() <<
"/" << localPos.y() <<
"/"
532 << localPos.z() <<
" " << direCos.x() <<
"/"
533 << direCos.y() <<
"/" << direCos.z() <<
" "
534 << height / 2. + hmin <<
" " << bctag);
538 << ilyr <<
" " << istr);
543 return digits.release();
◆ getCrosstalkProbability()
Method to get the channel crosstalk probability.
Definition at line 1183 of file TgcDigitMaker.cxx.
1186 if (readCdo ==
nullptr)
1188 return ((sensor == TgcSensor::kSTRIP)
◆ getDistanceToAsdFromSensor()
Method to get propagation time to the ASD from the sensor.
Definition at line 1144 of file TgcDigitMaker.cxx.
1150 int phiId = (iStationName >= 47) ?
stationPhi : 0x1f;
1153 unsigned int asdNo =
static_cast<unsigned int>(
channel - 1) /
1156 float asd_position = 0.;
1158 auto it = map.find(chamberId);
1160 if (
it != map.end()) {
1165 <<
", phi=" << phiId);
1168 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 925 of file TgcDigitMaker.cxx.
938 double energyThreshold = +999999.;
955 << sensor <<
" energyThreshold(MeV)= " << energyThreshold);
957 return energyThreshold;
◆ getIStationName()
int TgcDigitMaker::getIStationName |
( |
const std::string & |
staionName | ) |
|
|
staticprivate |
Get stationName integer from stationName string.
Definition at line 1081 of file TgcDigitMaker.cxx.
1082 int iStationName = 0;
1100 return iStationName;
◆ 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 1172 of file TgcDigitMaker.cxx.
1177 (station_num << 3) + static_cast<uint16_t>(std::abs(
station_eta));
1178 return ((sensor == TgcSensor::kSTRIP)
1180 : 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 1048 of file TgcDigitMaker.cxx.
1050 bool v_isDeadChamber =
true;
1076 <<
" isDeadChamber= " << v_isDeadChamber);
1078 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 961 of file TgcDigitMaker.cxx.
979 float prob1CrossTalk =
981 float prob11CrossTalk =
983 float prob20CrossTalk =
985 float prob21CrossTalk =
988 int nCrossTalks_neg = 0;
989 int nCrossTalks_pos = 0;
991 if (posInChan < prob1CrossTalk) {
993 }
else if (posInChan > 1. - prob1CrossTalk) {
996 double prob = CLHEP::RandFlat::shoot(rndmEngine, 0.0, 1.0);
997 if (
prob < prob11CrossTalk / (1. - 2. * prob1CrossTalk)) {
1000 }
else if (
prob < (prob20CrossTalk + prob11CrossTalk) /
1001 (1. - 2. * prob1CrossTalk)) {
1002 if (posInChan < 0.5) {
1003 nCrossTalks_neg = 2;
1006 nCrossTalks_pos = 2;
1010 (prob20CrossTalk + prob11CrossTalk + 2. * prob21CrossTalk) /
1011 (1. - 2. * prob1CrossTalk)) {
1012 if (posInChan < 0.5) {
1013 nCrossTalks_neg = 2;
1014 nCrossTalks_pos = 1;
1017 nCrossTalks_neg = 1;
1018 nCrossTalks_pos = 2;
1024 if (nCrossTalks_neg == 0 && nCrossTalks_pos == 0)
1028 float dt = digitTime;
1037 for (
int jChan =
channel - nCrossTalks_neg;
1038 jChan <=
channel + nCrossTalks_pos; jChan++) {
1039 if (jChan ==
channel || jChan < 1 || jChan > maxChannelNumber)
◆ readFileOfDeadChamber()
StatusCode TgcDigitMaker::readFileOfDeadChamber |
( |
| ) |
|
|
private |
Read share/TGC_Digitization_deadChamber.dat file.
Definition at line 771 of file TgcDigitMaker.cxx.
775 for (iStationName = 0; iStationName <
N_STATIONNAME; iStationName++) {
789 fileName =
"TGC_Digitization_deadChamber.dat";
791 fileName =
"TGC_Digitization_2016deadChamber.dat";
793 fileName =
"TGC_Digitization_NOdeadChamber.dat";
796 <<
" is unexpected in TgcDigitMaker - "
797 "using NOdeadChamber configuration.");
798 return StatusCode::FAILURE;
801 if (fileWithPath.empty()) {
802 ATH_MSG_FATAL(
"readFileOfDeadChamber(): Could not find file "
804 return StatusCode::FAILURE;
809 ifs.open(fileWithPath.c_str(), std::ios::in);
811 ATH_MSG_FATAL(
"readFileOfDeadChamber(): Could not open file "
813 return StatusCode::FAILURE;
817 unsigned int nDeadChambers = 0;
826 <<
" stationName= " << iStationName <<
" stationEta= "
843 if (gasGap < 0 || gasGap >=
N_GASGAP)
857 ATH_MSG_INFO(
"readFileOfDeadChamber: the number of dead chambers = "
860 return StatusCode::SUCCESS;
◆ readFileOfEnergyThreshold()
StatusCode TgcDigitMaker::readFileOfEnergyThreshold |
( |
| ) |
|
|
private |
Read share/TGC_Digitization_energyThreshold.dat file.
Definition at line 692 of file TgcDigitMaker.cxx.
696 for (iStationName = 0; iStationName <
N_STATIONNAME; iStationName++) {
710 const std::string
fileName =
"TGC_Digitization_energyThreshold.dat";
712 if (fileWithPath.empty()) {
713 ATH_MSG_FATAL(
"readFileOfEnergyThreshold(): Could not find file "
715 return StatusCode::FAILURE;
720 ifs.open(fileWithPath.c_str(), std::ios::in);
722 ATH_MSG_FATAL(
"readFileOfEnergyThreshold(): Could not open file "
724 return StatusCode::FAILURE;
727 double energyThreshold;
733 <<
" stationName= " << iStationName <<
" stationEta= "
736 <<
" energyThreshold(MeV)= " << energyThreshold);
752 if (gasGap < 0 || gasGap >=
N_GASGAP)
768 return StatusCode::SUCCESS;
◆ readFileOfStripPosition()
StatusCode TgcDigitMaker::readFileOfStripPosition |
( |
| ) |
|
|
private |
Read share/TGC_Digitization_StripPosition.dat file.
Definition at line 863 of file TgcDigitMaker.cxx.
867 for (iStationName = 0; iStationName <
N_STATIONNAME; iStationName++) {
876 const std::string
fileName =
"TGC_Digitization_StripPosition.dat";
878 if (fileWithPath.empty()) {
879 ATH_MSG_FATAL(
"readFileOfStripPosition(): Could not find file "
881 return StatusCode::FAILURE;
886 ifs.open(fileWithPath.c_str(), std::ios::in);
888 ATH_MSG_FATAL(
"readFileOfStripPosition(): Could not open file "
890 return StatusCode::FAILURE;
898 <<
" stationName= " << iStationName <<
" stationEta= "
900 <<
" StripPosition= " << strippos);
922 return StatusCode::SUCCESS;
◆ readFileOfTimeJitter()
StatusCode TgcDigitMaker::readFileOfTimeJitter |
( |
| ) |
|
|
private |
Reads parameters for intrinsic time response from timejitter.dat.
Definition at line 547 of file TgcDigitMaker.cxx.
548 const char*
const fileName =
"TGC_Digitization_timejitter.dat";
552 if (!fileWithPath.empty()) {
553 ifs.open(fileWithPath.c_str(), std::ios::in);
557 return StatusCode::FAILURE;
563 return StatusCode::FAILURE;
577 "readFileOfTimeJitter(): Timejitter, angle, Number of bins, prob. "
581 for (
int j = 0; j < 41 ; j++) {
594 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 1124 of file TgcDigitMaker.cxx.
1128 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 597 of file TgcDigitMaker.cxx.
599 float injectionAngle =
600 atan2(fabs(direCosLocal[2]), fabs(direCosLocal[0])) /
CLHEP::degree;
602 int ithAngle =
static_cast<int>(injectionAngle / 5.);
603 float wAngle = injectionAngle / 5. -
static_cast<float>(ithAngle);
609 jthAngle = ithAngle + 1;
616 while (
prob > probRef) {
617 prob = CLHEP::RandFlat::shoot(rndmEngine, 0.0, 1.0);
618 jitter = CLHEP::RandFlat::shoot(rndmEngine, 0.0, 1.0) * 40. *
620 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 203 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_runperiod
unsigned int TgcDigitMaker::m_runperiod |
|
private |
◆ m_StripPos
Position of Strip Channel (Longer base or Shorter base)
Definition at line 186 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
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.
size_type end_index(void) const
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:
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.
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
size_type begin_index(void) const
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
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
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