![Logo](../../ATLAS-Logo-Square-Blue-RGB.png) |
ATLAS Offline Software
|
Go to the documentation of this file.
27 #include "GaudiKernel/Algorithm.h"
28 #include "GaudiKernel/AlgTool.h"
30 #include "CLHEP/Units/SystemOfUnits.h"
31 #include "CLHEP/Units/PhysicalConstants.h"
45 m_propertyNotSetMagicNumber(-999.0e50),
46 m_propertyNotSetMagicNumber_int(-9999)
137 defineNewUIntVariable(
"numberOfBins",&
m_numberOfBins,
"Number of internal bins in time interval covered by each digit (must be whole multiple of numberOfBinsInEncodingBin)",24,480);
188 std::cout << front <<
"======= Printing TRT Digitization Settings ======="<<std::endl;
190 std::map <std::string,doubleparameter>::const_iterator itd =
m_doubleparMap.begin();
191 std::map <std::string,doubleparameter>::const_iterator itdE =
m_doubleparMap.end();
193 for (;itd!=itdE;++itd) {
194 std::cout << front << itd->second.description<<
": "<<(*(itd->second.directvaraddress))/itd->second.unit<<
" "<<itd->second.unitname <<std::endl;
197 std::map <std::string,intboolparameter>::const_iterator itib =
m_intboolparMap.begin();
198 std::map <std::string,intboolparameter>::const_iterator itibE =
m_intboolparMap.end();
200 for (;itib!=itibE;++itib) {
201 if (itib->second.directvaraddress_int) {
203 std::cout << front << itib->second.description<<
": "<<*(itib->second.directvaraddress_int)<<std::endl;
204 }
else if (itib->second.directvaraddress_uint) {
206 std::cout << front << itib->second.description<<
": "<<*(itib->second.directvaraddress_uint)<<std::endl;
209 assert(itib->second.directvaraddress_bool);
210 std::cout << front << itib->second.description<<
": "<<(*(itib->second.directvaraddress_bool)?1:0)<<std::endl;
214 std::cout << front <<
"==============================================="<<std::endl;
232 if (dig_vers_from_condDB==12) {
236 return StatusCode::FAILURE;
239 return StatusCode::SUCCESS;
249 for (;itd!=itdE;++itd) {
250 alg->declareProperty(std::string(
"Override_")+itd->first, itd->second.valueSetByUser );
256 for (;itib!=itibE;++itib) {
257 alg->declareProperty(std::string(
"Override_")+itib->first, itib->second.valueSetByUser );
267 for (;itd!=itdE;++itd) {
268 algt->declareProperty(std::string(
"Override_")+itd->first, itd->second.valueSetByUser );
274 for (;itib!=itibE;++itib) {
275 algt->declareProperty(std::string(
"Override_")+itib->first, itib->second.valueSetByUser );
283 std::cout << front <<
"======= Printing TRT Digitization Settings Overrideable parameters ======="<<std::endl;
285 std::map <std::string,doubleparameter>::const_iterator itd =
m_doubleparMap.begin();
286 std::map <std::string,doubleparameter>::const_iterator itdE =
m_doubleparMap.end();
288 for (;itd!=itdE;++itd) {
289 std::cout << front << std::endl;
290 std::cout << front <<
"Alg. Property: Override_"<<itd->first<<std::endl;
291 std::cout << front <<
" Type: Double"<<std::endl;
292 std::cout << front <<
" Range: ["<<itd->second.okrange_low/itd->second.unit<<
" "
293 << itd->second.unitname<<
", "
294 << itd->second.okrange_high/itd->second.unit<<
" "<<itd->second.unitname<<
"]"<<std::endl;
295 std::cout << front <<
" Description: "<<itd->second.description<<std::endl;
298 std::map <std::string,intboolparameter>::const_iterator itib =
m_intboolparMap.begin();
299 std::map <std::string,intboolparameter>::const_iterator itibE =
m_intboolparMap.end();
301 for (;itib!=itibE;++itib) {
302 std::cout << front << std::endl;
303 std::cout << front <<
"Alg. Property: Override_"<<itib->first<<std::endl;
304 std::cout << front <<
" Type: Int"<<std::endl;
305 std::cout << front <<
" Range: ["<<itib->second.okrange_low<<
", "
306 << itib->second.okrange_high<<
"]"<<std::endl;
307 std::cout << front <<
" Description: "<<itib->second.description<<std::endl;
310 std::cout << front <<std::endl;
311 std::cout << front <<
"==============================================="<<std::endl;
317 const std::string & unitname,
double unitval,
double lowrange,
double highrange) {
331 p.directvaraddress = datamember;
332 p.unitname = unitname;
334 p.okrange_low = lowrange*unitval;
335 p.okrange_high = highrange*unitval;
344 unsigned int lowrange,
unsigned int highrange) {
350 if (lowrange > highrange ) {
358 p.directvaraddress_int =
nullptr;
359 p.directvaraddress_uint = datamember;
360 p.directvaraddress_bool =
nullptr;
361 p.okrange_low =
static_cast<int>(lowrange);
362 p.okrange_high =
static_cast<int>(highrange);
371 int lowrange,
int highrange) {
385 p.directvaraddress_int = datamember;
386 p.directvaraddress_uint =
nullptr;
387 p.directvaraddress_bool =
nullptr;
388 p.okrange_low = lowrange;
389 p.okrange_high = highrange;
407 p.directvaraddress_int =
nullptr;
408 p.directvaraddress_uint =
nullptr;
409 p.directvaraddress_bool = datamember;
432 std::cout <<
"TRTDigSettings::fillDefaults TRT digitization version: digversion = "
438 throw std::runtime_error(
"fillDefaults: digversion is not supported");
445 ATH_MSG_WARNING(
"Active gas setting seems incompatible with dig. version number.");
446 ATH_MSG_WARNING(
"If not deliberate, it might indicate a configuration or DB problem.");
554 ATH_MSG_WARNING(
"Setting up non suppressed double counted delta-ray xenon tune");
606 bool anyoverrides =
false;
610 for (;itd!=itdE;++itd) {
612 if (itd->second.valueSetByUser < itd->second.okrange_low || itd->second.valueSetByUser > itd->second.okrange_high) {
613 ATH_MSG_ERROR(
"Can not override value of "<<itd->first<<
" : New value outside allowed range");
615 if (
static_cast<float>(*(itd->second.directvaraddress)) !=
static_cast<float>(itd->second.valueSetByUser) ) {
617 << (*(itd->second.directvaraddress))/itd->second.unit<<
" "<<itd->second.unitname<<
" -> "
618 << itd->second.valueSetByUser/itd->second.unit<<
" "<<itd->second.unitname<<
")");
619 *(itd->second.directvaraddress) = itd->second.valueSetByUser;
629 for (;itib!=itibE;++itib) {
631 if (itib->second.valueSetByUser < itib->second.okrange_low || itib->second.valueSetByUser > itib->second.okrange_high) {
632 ATH_MSG_ERROR(
"Can not override value of "<<itib->first<<
" : New value outside allowed range");
634 if (itib->second.directvaraddress_int) {
636 if ( (*(itib->second.directvaraddress_int)) != itib->second.valueSetByUser ) {
638 << *(itib->second.directvaraddress_int)<<
" -> "<< itib->second.valueSetByUser<<
")");
639 *(itib->second.directvaraddress_int) = itib->second.valueSetByUser;
642 }
else if (itib->second.directvaraddress_uint) {
644 if ( (*(itib->second.directvaraddress_uint)) !=
static_cast<unsigned int>(itib->second.valueSetByUser) ) {
646 << *(itib->second.directvaraddress_uint)<<
" -> "<< itib->second.valueSetByUser<<
")");
647 *(itib->second.directvaraddress_uint) = itib->second.valueSetByUser;
652 assert(itib->second.directvaraddress_bool);
653 if ( (*(itib->second.directvaraddress_bool)) != itib->second.valueSetByUser ) {
655 << (*(itib->second.directvaraddress_bool)?1:0)<<
" -> "
656 << (itib->second.valueSetByUser?1:0)<<
")");
657 *(itib->second.directvaraddress_bool) = itib->second.valueSetByUser == 1;
666 ATH_MSG_WARNING(
"Settings overridden from joboptions => possible deviation from version defaults.");
Settable parameter, int and bool.
JetConstituentVector::iterator iterator
double m_smearingFactor
Cluster energy smearing factor.
void defineNewBoolVariable(const std::string &name, bool *datamember, const std::string &description)
Define new bool variable.
double m_relativeHighThresholdFluctuation
Relative high threshold fluctuation.
unsigned int m_numberOfBins
No.
double m_trEfficiencyEndCapBArgon
Transition Radiation efficiency, end cap B, Argon.
double m_highThresholdECAwheelsKrypton
High threshold discriminator setting Krypton.
double m_averageNoiseLevel
Average noise level.
int m_ltT0shiftECBwheelsKr
double m_highThresholdBarShort
High threshold discriminator setting.
bool m_killEndCap
Disable end cap.
double m_ionisationPotential
Mean ionisation potential.
double m_trEfficiencyEndCapBKrypton
Transition Radiation efficiency, end cap B, Krypton.
double m_lowThresholdBarKrypton
Low threshold discriminator setting for Krypton mixture.
double m_highThresholdBarLongKrypton
High threshold discriminator setting Krypton.
double m_trEfficiencyBarrelArgon
Transition Radiation efficiency, barrel, Argon.
double m_discriminatorSettlingTime
Discriminator settling time.
double m_lowThresholdECKrypton
Low threshold discriminator setting for Krypton mixture.
std::map< std::string, doubleparameter > m_doubleparMap
Map of settable parameters (double)
bool m_useMagneticFieldMap
void printFlagsForOverrideableParameters(const std::string &front="") const
Print TRT digitization settings overrideable parameters.
void addPropertiesForOverrideableParameters(Algorithm *alg)
Add properties for overrideable parameters.
double m_crosstalkNoiseLevel
Average cross talk noise level.
double m_slowPeriodicNoisePulseDistance
Slow periodic noise pulse distance (time)
double m_highThresholdBarShortKrypton
High threshold discriminator setting Krypton.
double m_slowPeriodicNoisePulseFraction
Slow periodic noise pulse fraction.
double m_highThresholdBarLongArgon
High threshold discriminator setting Argon.
void defineNewVariable(const std::string &name, double *datamember, const std::string &description, const std::string &unitname, double unitval, double lowrange, double highrange)
Define new double variable.
bool m_killBarrel
Disable barrel.
bool m_electronicsAreAtFarEnd
Electronics assumed at far end of straw.
double m_highThresholdECAwheels
High threshold discriminator setting.
double m_pileUpSDOsMinEkin
Min.
int m_propertyNotSetMagicNumber_int
double m_trEfficiencyEndCapB
Transition Radiation efficiency, end cap B.
unsigned int m_numberOfCrossingsBeforeMain
For pileup: BCs before main event.
double m_trEfficiencyBarrel
Transition Radiation efficiency, barrel.
double m_lowThresholdBarArgon
Low threshold discriminator setting for Argon mixture.
void fillDefaults(const InDetDD::TRT_DetectorManager *detmgr)
Fill default values into settable variables.
unsigned int m_storeSDO
Time window in which to store SDOs.
bool m_isCTB
Data is from CTB (Combined Test Beam)
bool m_timeCorrection
Corrrect for flight and wire propagation delays.
double m_highThresholdECBwheels
High threshold discriminator setting.
int m_ltT0shiftECAwheelsXe
int m_ltT0shiftBarShortKr
LT T0 shift.
double m_ionisationPotentialKrypton
Mean ionisation potential for Krypton mixture.
double m_propertyNotSetMagicNumber
bool m_timeshiftsSymmetricForPhiSectors
Time offset assumed phi symmetric.
double m_smearingFactorKrypton
Cluster energy smearing factor for Krypton mixture.
double m_signalPropagationSpeed
Signal propagation time in signal wire.
::StatusCode StatusCode
StatusCode definition for legacy code.
double m_timeOffsetCalcVertexY
y-coord.
double m_minDiscriminatorWidth
Min.
int m_htT0shiftBarLong
HT T0 shift.
TRTDigSettings()
Parameters and settings for TRT digitization.
double m_trEfficiencyEndCapAKrypton
Transition Radiation efficiency, end cap A, Krypton.
int m_ltT0shiftECBwheelsAr
Class to provide easy MsgStream access and capabilities.
double m_timeInterval
Time interval covered by each digit.
double m_highThresholdECBwheelsArgon
High threshold discriminator setting Argon.
double m_outerRadiusOfWire
Radius of drift wire.
double m_timeOffsetCalcVertexZ
z-coord.
double m_highThresholdBarLong
High threshold discriminator setting.
double m_trtRangeCutProperty
Electrons xenon range cut in TRT simulation
double m_discriminatorDeadTime
Discriminator dead time.
std::string digitizationVersionName() const
double m_jitterTimeOffset
Event time not correlated with LHC clock.
double m_relativeLowThresholdFluctuation
Relative low threshold fluctuation.
double m_lowThresholdECArgon
Low threshold discriminator setting for Argon mixture.
double m_highThresholdECAwheelsArgon
High threshold discriminator setting Argon.
double m_trEfficiencyEndCapA
Transition Radiation efficiency, end cap A.
double m_highThresholdBarShortArgon
High threshold discriminator setting Argon.
double m_crosstalkNoiseLevelOtherEnd
Average cross talk noise level - other end.
void processOverrides()
Overwrite default values by uses values.
int m_ltT0shiftECBwheelsXe
bool m_noiseInUnhitStraws
Simulate noise in unhit straws.
double m_fastElectronicsNoisePulseDistance
Fast electronics noise pulse distance (time)
StatusCode DigSettingsFromCondDB(int m_dig_vers_from_condDB)
The Detector Manager for all TRT Detector elements, it acts as the interface to the detector elements...
bool m_noiseInSimhits
Simulate noise in hit straws.
void defineNewIntVariable(const std::string &name, int *datamember, const std::string &description, int lowrange, int highrange)
Define new int variable.
unsigned int m_cosmicFlag
Data is cosmics.
#define ATH_MSG_WARNING(x)
ActiveGasType gasType() const
double m_trEfficiencyEndCapAArgon
Transition Radiation efficiency, end cap A, Argon.
unsigned int digitizationVersion() const
Get and set information about digitization version ---------------------—.
void defineNewUIntVariable(const std::string &name, unsigned int *datamember, const std::string &description, unsigned int lowrange, unsigned int highrange)
Define new unsigned int variable.
double m_lowThresholdBar
Low threshold discriminator setting.
int m_ltT0shiftBarShortXe
double m_attenuationLength
bool m_doCrosstalk
Crosstalk noise.
void print(const std::string &front="") const
Printing of TRT digitization settings.
double m_timeOffsetCalcVertexX
x-coord.
int m_ltT0shiftECAwheelsKr
void defineVariables()
Define settable variables.
void initialize(const InDetDD::TRT_DetectorManager *detmgr)
Initialize: fill defaults and overwrite by user values where appropriate.
std::map< std::string, intboolparameter > m_intboolparMap
Map of settable parameters (int & bool)
double m_smearingFactorArgon
Cluster energy smearing factor for Argon mixture.
double m_distanceToTimeFactor
Fudge factor: time to distance.
bool m_isOverlay
Doing overlay.
double m_highThresholdECBwheelsKrypton
High threshold discriminator setting Krypton.
double m_maxVertexDisplacement
Max.
double m_lowThresholdEC
Low threshold discriminator setting.
int m_ltT0shiftBarShortAr
unsigned int m_numberOfBinsInEncodingBin
No.
double m_trEfficiencyBarrelKrypton
Transition Radiation efficiency, barrel, Krypton.
unsigned int m_digversion
double m_innerRadiusOfStraw
Inner radius of straw.
double m_ionisationPotentialArgon
Mean ionisation potential for Argon mixture.
double m_lengthOfDeadRegion
Length of dead region at straw end.
Settable parameter, double.
int m_ltT0shiftECAwheelsAr
bool m_doCosmicTimingPit
Cosmics pit setup.
std::string description
glabal timer - how long have I taken so far?
double m_solenoidFieldStrength
Solenoid field strength.