|
ATLAS Offline Software
|
#include <TRTFastDigitizationTool.h>
|
StatusCode | initializeNumericalConstants () |
|
StatusCode | setNumericalConstants () |
|
StatusCode | produceDriftCircles (const EventContext &ctx, CLHEP::HepRandomEngine *rndmEngine, TimedHitCollection< TRTUncompressedHit > &thpctrt) |
|
Identifier | getIdentifier (int hitID, IdentifierHash &hash, Identifier &layer_id, bool &status) const |
|
StatusCode | createAndStoreRIOs (const EventContext &ctx, CLHEP::HepRandomEngine *rndmEngine) |
|
HepGeom::Point3D< double > | getGlobalPosition (const TimedHitPtr< TRTUncompressedHit > &hit) |
|
bool | isArgonStraw (const Identifier &straw_id) const |
|
int | gasType (const Identifier &straw_id) const |
|
double | getProbHT (int particleEncoding, float kineticEnergy, const Identifier &straw_id, double driftRadiusLoc, double hitGlobalPosition) const |
|
double | particleMass (int i) const |
|
|
PublicToolHandle< ITRT_DriftFunctionTool > | m_trtDriftFunctionTool {this, "TRT_DriftFunctionTool", "TRT_DriftFunctionTool/FatrasTrtDriftFunctionTool"} |
|
bool | m_useTrtElectronPidTool {true} |
|
PublicToolHandle< Trk::ITRT_ElectronPidTool > | m_trtElectronPidTool {this, "TRT_ElectronPidTool", "InDet::TRT_ElectronPidToolRun2/InDetTRT_ElectronPidTool"} |
|
ToolHandle< ITRT_StrawStatusSummaryTool > | m_trtStrawStatusSummaryTool {this, "TRT_StrawStatusSummaryTool", "InDetTRTStrawStatusSummaryTool"} |
|
ServiceHandle< PileUpMergeSvc > | m_mergeSvc {this, "MergeSvc", "PileUpMergeSvc"} |
|
ServiceHandle< IAthRNGSvc > | m_rndmSvc {this, "RndmSvc", "AthRNGSvc", ""} |
| Random number service. More...
|
|
StringProperty | m_randomEngineName {this, "RandomStreamName", "FatrasRnd"} |
|
StringProperty | m_trtHitCollectionKey {this, "trtHitCollectionName", "TRTUncompressedHits"} |
|
std::vector< TRTUncompressedHitCollection * > | m_trtHitCollList |
|
SG::WriteHandleKey< InDet::TRT_DriftCircleContainer > | m_trtDriftCircleContainerKey {this, "trtDriftCircleContainer", "TRT_DriftCircles"} |
|
SG::WriteHandleKey< PRD_MultiTruthCollection > | m_trtPrdTruthKey {this, "trtPrdMultiTruthCollection", "PRD_MultiTruthTRT"} |
|
TimedHitCollection< TRTUncompressedHit > * | m_thpctrt {} |
|
std::multimap< Identifier, InDet::TRT_DriftCircle * > | m_driftCircleMap |
|
const InDetDD::TRT_DetectorManager * | m_trt_manager {} |
|
const TRT_ID * | m_trt_id {} |
|
IntegerProperty | m_HardScatterSplittingMode {this, "HardScatterSplittingMode", 0, "Control pileup & signal splitting"} |
|
bool | m_HardScatterSplittingSkipper {false} |
|
BooleanProperty | m_useEventInfo {this, "useEventInfo", false} |
|
SG::ReadHandleKey< xAOD::EventInfo > | m_EventInfoKey { this, "EventInfoKey", "EventInfo", "SG key for EventInfo" } |
|
FloatProperty | m_NCollPerEvent {this, "NCollPerEvent", 30} |
|
double | m_trtTailFraction {0.0} |
|
double | m_trtSigmaDriftRadiusTail {0.0} |
|
double | m_trtHighProbabilityBoostBkg {1.} |
|
double | m_trtHighProbabilityBoostEle {1.} |
|
double | m_cFit [8][5] {} |
|
Definition at line 60 of file TRTFastDigitizationTool.h.
◆ TRTFastDigitizationTool()
TRTFastDigitizationTool::TRTFastDigitizationTool |
( |
const std::string & |
type, |
|
|
const std::string & |
name, |
|
|
const IInterface * |
parent |
|
) |
| |
◆ correctionHT()
Definition at line 1027 of file TRTFastDigitizationTool.cxx.
1029 const double par[][ 6 ] = { { 5.96038, 0.797671, 1.28832, -2.02763, -2.24630, 21.6857 },
1030 { 0.522755, 0.697029, -3.90787, 6.32952, 1.06347, 3.51847 }
1035 double x1 = 1. / (
x0 +
par[ j ][ 0 ] );
◆ createAndStoreRIOs()
StatusCode TRTFastDigitizationTool::createAndStoreRIOs |
( |
const EventContext & |
ctx, |
|
|
CLHEP::HepRandomEngine * |
rndmEngine |
|
) |
| |
|
private |
Definition at line 493 of file TRTFastDigitizationTool.cxx.
498 if ( !trtDriftCircleContainer.isValid() ) {
499 ATH_MSG_FATAL(
"Could not create TRT_DriftCircleContainer" );
500 return StatusCode::FAILURE;
502 ATH_MSG_DEBUG(
"InDet::TRT_DriftCircleContainer " << trtDriftCircleContainer.name() <<
" registered in StoreGate" );
514 std::multimap< IdentifierHash, InDet::TRT_DriftCircle * > idHashMap;
519 std::pair< DriftCircleMapItr, DriftCircleMapItr > hitsInOneStraw =
m_driftCircleMap.equal_range( trtid );
526 for ( DriftCircleMapItr itr2 = ++( hitsInOneStraw.first ); itr2 != hitsInOneStraw.second; ++itr2 ) {
528 if(trtDriftCircle2->
getWord() & maskHT) isHT =
true;
529 delete trtDriftCircle2;
533 if( !(trtDriftCircle->
getWord() & maskHT) && !isHT && numberOfHitsInOneStraw > 1) {
534 unsigned int newword = 0;
535 if(highTRMergeProb*(numberOfHitsInOneStraw-1) > CLHEP::RandFlat::shoot( rndmEngine )) newword += 1 << (26-9);
536 const unsigned int newword2 = newword;
538 const std::vector<Identifier> &rdolist = trtDriftCircle->
rdoList();
543 std::vector<Identifier>(rdolist),
548 std::multimap<IdentifierHash, InDet::TRT_DriftCircle*>::value_type(
549 hash, trtDriftCircle2));
550 delete trtDriftCircle;
553 idHashMap.insert( std::multimap<IdentifierHash, InDet::TRT_DriftCircle * >::value_type(
hash, trtDriftCircle ) );
558 for ( HashMapItr itr = idHashMap.begin(); itr != idHashMap.end(); itr = idHashMap.upper_bound( itr->first ) ) {
560 std::pair< HashMapItr, HashMapItr > itrPair = idHashMap.equal_range( itr->first );
566 trtDriftCircleCollection->setIdentifier( trtBaseElement->
identify() );
568 for ( HashMapItr itr2 = itrPair.first; itr2 != itrPair.second; ++itr2 ) {
570 trtDriftCircle->
setHashAndIndex( trtDriftCircleCollection->identifyHash(), trtDriftCircleCollection->size() );
571 trtDriftCircleCollection->push_back( trtDriftCircle );
574 if ( trtDriftCircleContainer->addCollection( trtDriftCircleCollection,
hash ).isFailure() ) {
575 ATH_MSG_WARNING(
"Could not add collection to Identifyable container" );
582 return StatusCode::SUCCESS;
◆ filterPassed()
virtual bool PileUpToolBase::filterPassed |
( |
| ) |
const |
|
inlineoverridevirtualinherited |
◆ finalize()
StatusCode TRTFastDigitizationTool::finalize |
( |
| ) |
|
◆ gasType()
◆ getDriftRadiusFromXYZ()
Definition at line 586 of file TRTFastDigitizationTool.cxx.
588 HepGeom::Vector3D< double > vecEnter( hit->GetPreStepX(), hit->GetPreStepY(), hit->GetPreStepZ() );
589 HepGeom::Vector3D< double > vecExit( hit->GetPostStepX(), hit->GetPostStepY(), hit->GetPostStepZ() );
591 HepGeom::Vector3D< double > vecDir = vecExit - vecEnter;
592 static const HepGeom::Vector3D< double > vecStraw( 0., 0., 1. );
594 vecDir = vecDir.unit();
597 if ( std::abs( vecDir.x() ) < 1.0e-6 && std::abs( vecDir.y() ) < 1.0e-6 ) {
601 double a = vecEnter.dot( vecStraw );
602 double b = vecEnter.dot( vecDir );
603 double c = vecDir.dot( vecStraw );
605 double paramStraw = (
a -
b*
c ) / ( 1. -
c*
c );
606 double paramTrack = -(
b -
a*
c ) / ( 1. -
c*
c );
608 HepGeom::Vector3D<double> vecClosestAppr = vecEnter + paramTrack * vecDir - paramStraw * vecStraw;
◆ getGlobalPosition()
Definition at line 674 of file TRTFastDigitizationTool.cxx.
676 int hitID = hit->GetHitID();
677 const HepGeom::Point3D< double > hitPreStep( hit->GetPreStepX(), hit->GetPreStepY(), hit->GetPreStepZ() );
679 const int mask( 0x0000001F );
680 const int word_shift( 5 );
682 if ( hitID & 0x00200000 ) {
683 int strawID = hitID &
mask;
684 int planeID = ( hitID >> word_shift ) &
mask;
685 int sectorID = ( hitID >> 2 * word_shift ) &
mask;
686 int wheelID = ( hitID >> 3 * word_shift ) &
mask;
687 int trtID = ( hitID >> 4 * word_shift );
690 trtID = ( trtID == 3 ? 0 : 1 );
693 if ( endcapElement ) {
699 int strawID = hitID &
mask;
700 int layerID = ( hitID >> word_shift ) &
mask;
701 int moduleID = ( hitID >> 2 * word_shift ) &
mask;
702 int ringID = ( hitID >> 3 * word_shift ) &
mask;
703 int trtID = ( hitID >> 4 * word_shift );
706 if ( barrelElement ) {
712 ATH_MSG_WARNING(
"Could not find global coordinate of a straw - drifttime calculation will be inaccurate" );
713 return { 0., 0., 0. };
◆ getIdentifier()
Definition at line 616 of file TRTFastDigitizationTool.cxx.
622 const int mask( 0x0000001F );
623 const int word_shift( 5 );
625 if ( hitID & 0x00200000 ) {
626 int strawID = hitID &
mask;
627 int planeID = ( hitID >> word_shift ) &
mask;
628 int sectorID = ( hitID >> 2 * word_shift ) &
mask;
629 int wheelID = ( hitID >> 3 * word_shift ) &
mask;
630 int trtID = ( hitID >> 4 * word_shift );
633 trtID = ( trtID == 3 ? 0 : 1 );
636 if ( endcapElement ) {
638 layer_id = endcapElement->
identify();
642 ATH_MSG_ERROR(
"Could not find detector element for endcap identifier with (ipos,iwheel,isector,iplane,istraw) = ("
643 << trtID <<
", " << wheelID <<
", " << sectorID <<
", " << planeID <<
", " << strawID <<
")" <<
endmsg
644 <<
"If this happens very rarely, don't be alarmed (it is a Geant4 'feature')" <<
endmsg
645 <<
"If it happens a lot, you probably have misconfigured geometry in the sim. job." );
651 int strawID = hitID &
mask;
652 int layerID = ( hitID >> word_shift ) &
mask;
653 int moduleID = ( hitID >> 2 * word_shift ) &
mask;
654 int ringID = ( hitID >> 3 * word_shift ) &
mask;
655 int trtID = ( hitID >> 4 * word_shift );
658 if ( barrelElement ) {
660 layer_id = barrelElement->
identify();
663 ATH_MSG_ERROR(
"Could not find detector element for barrel identifier with (ipos,iring,imod,ilayer,istraw) = ("
664 << trtID <<
", " << ringID <<
", " << moduleID <<
", " << layerID <<
", " << strawID <<
")" );
◆ getProbHT()
double TRTFastDigitizationTool::getProbHT |
( |
int |
particleEncoding, |
|
|
float |
kineticEnergy, |
|
|
const Identifier & |
straw_id, |
|
|
double |
driftRadiusLoc, |
|
|
double |
hitGlobalPosition |
|
) |
| const |
|
private |
Definition at line 747 of file TRTFastDigitizationTool.cxx.
751 switch( abs( particleEncoding ) ) {
773 if ( pTrk < 250. || pTrk > 7000000. )
return 0.;
780 if ( abs(
m_trt_id->
barrel_ec( straw_id ) ) == 2 ) trtPart = ( ( layerOrWheel < 6 ) ? 1 : 2 );
783 if ( trtPart == 0 ) {
784 if ( layerOrWheel )
strawLayer += 19 + ( layerOrWheel == 1 ? 0 : 24 );
786 else if ( trtPart == 1 ) {
793 const int strawLayerMax[] = { 72, 95, 63 };
799 const double hitGlobalPositionMin[] = { 0., 630., 630. };
800 const double hitGlobalPositionMax[] = { 720., 1030., 1030. };
802 if ( std::abs(hitGlobalPosition) < hitGlobalPositionMin[ trtPart ] ) {
803 ATH_MSG_WARNING(
"hitGlobalPosition was below allowed range (will be adjusted): trtPart = " << trtPart <<
", hitGlobalPosition = " << hitGlobalPosition );
804 hitGlobalPosition = copysign(hitGlobalPositionMin[ trtPart ] + 0.001,hitGlobalPosition);
806 if ( std::abs(hitGlobalPosition) > hitGlobalPositionMax[ trtPart ] ) {
807 ATH_MSG_WARNING(
"hitGlobalPosition was above allowed range (will be adjusted): trtPart = " << trtPart <<
", hitGlobalPosition = " << hitGlobalPosition );
808 hitGlobalPosition = copysign(hitGlobalPositionMax[ trtPart ] - 0.001,hitGlobalPosition);
811 if ( rTrkWire > 2.2 ) rTrkWire = 2.175;
816 if ( probHT == 0.5 || probHT == 1. ) probHT = 0.;
◆ HTProbabilityElectron_high_pt()
double TRTFastDigitizationTool::HTProbabilityElectron_high_pt |
( |
double |
eta | ) |
|
|
staticprivate |
Definition at line 823 of file TRTFastDigitizationTool.cxx.
825 constexpr std::array< double, 14 >
bins = { 0.05, 0.15, 0.25, 0.35, 0.45, 0.55, 0.65, 0.75, 0.85, 1.05, 1.4, 1.5, 1.6, 1.82 };
826 constexpr std::array< double, 15 > probability = { 0.210,
◆ HTProbabilityElectron_low_pt()
double TRTFastDigitizationTool::HTProbabilityElectron_low_pt |
( |
double |
eta | ) |
|
|
staticprivate |
Definition at line 847 of file TRTFastDigitizationTool.cxx.
849 constexpr std::array< double, 14 >
bins = { 0.05, 0.15, 0.25, 0.35, 0.45, 0.55, 0.65, 0.75, 0.85, 1.05, 1.4, 1.5, 1.6, 1.82 };
850 constexpr std::array< double, 15 > probability = { 0.210,
◆ HTProbabilityMuon_5_20()
double TRTFastDigitizationTool::HTProbabilityMuon_5_20 |
( |
double |
eta | ) |
|
|
staticprivate |
Definition at line 871 of file TRTFastDigitizationTool.cxx.
873 constexpr std::array< double, 41 >
bins = { -2.05, -1.95, -1.85, -1.75, -1.65, -1.55, -1.45, -1.35, -1.25, -1.15, -1.05, -0.95, -0.85,
874 -0.75, -0.65, -0.55, -0.45, -0.35, -0.25, -0.15, -0.05, 0.05, 0.15, 0.25, 0.35, 0.45, 0.55, 0.65,
875 0.75, 0.85, 0.95, 1.05, 1.15, 1.25, 1.35, 1.45, 1.55, 1.65, 1.75, 1.85, 1.95
878 constexpr std::array< double, 42 > probability = { 0.04466501,
◆ HTProbabilityMuon_60()
double TRTFastDigitizationTool::HTProbabilityMuon_60 |
( |
double |
eta | ) |
|
|
staticprivate |
Definition at line 926 of file TRTFastDigitizationTool.cxx.
928 constexpr std::array< double, 41 >
bins = { -2.05, -1.95, -1.85, -1.75, -1.65, -1.55, -1.45, -1.35, -1.25, -1.15, -1.05, -0.95, -0.85,
929 -0.75, -0.65, -0.55, -0.45, -0.35, -0.25, -0.15, -0.05, 0.05, 0.15, 0.25, 0.35, 0.45, 0.55, 0.65,
930 0.75, 0.85, 0.95, 1.05, 1.15, 1.25, 1.35, 1.45, 1.55, 1.65, 1.75, 1.85, 1.95
933 constexpr std::array< double, 42 > probability = { 0.058,
◆ initialize()
StatusCode TRTFastDigitizationTool::initialize |
( |
| ) |
|
|
virtual |
◆ initializeNumericalConstants()
StatusCode TRTFastDigitizationTool::initializeNumericalConstants |
( |
| ) |
|
|
private |
◆ isArgonStraw()
bool TRTFastDigitizationTool::isArgonStraw |
( |
const Identifier & |
straw_id | ) |
const |
|
private |
◆ mergeEvent()
StatusCode TRTFastDigitizationTool::mergeEvent |
( |
const EventContext & |
ctx | ) |
|
called at the end of the subevts loop.
Not (necessarily) able to access SubEvents
Definition at line 466 of file TRTFastDigitizationTool.cxx.
473 rngWrapper->
setSeed( rngName, ctx );
474 CLHEP::HepRandomEngine *rndmEngine = rngWrapper->
getEngine(ctx);
489 return StatusCode::SUCCESS;
◆ particleMass()
double TRTFastDigitizationTool::particleMass |
( |
int |
i | ) |
const |
|
private |
◆ prepareEvent()
StatusCode TRTFastDigitizationTool::prepareEvent |
( |
const EventContext & |
ctx, |
|
|
const unsigned int |
|
|
) |
| |
◆ processAllSubEvents() [1/2]
StatusCode TRTFastDigitizationTool::processAllSubEvents |
( |
const EventContext & |
ctx | ) |
|
|
virtual |
alternative interface which uses the PileUpMergeSvc to obtain all the required SubEvents.
Reimplemented from PileUpToolBase.
Definition at line 424 of file TRTFastDigitizationTool.cxx.
426 ATH_MSG_DEBUG(
"TRTFastDigitizationTool::processAllSubEvents()" );
430 HitCollectionTimedList hitCollectionTimedList;
431 unsigned int numberOfSimHits = 0;
432 if (
m_mergeSvc->retrieveSubEvtsData(
m_trtHitCollectionKey.value(), hitCollectionTimedList, numberOfSimHits ).isFailure() && hitCollectionTimedList.empty() ) {
434 return StatusCode::FAILURE;
442 for (
auto & itr : hitCollectionTimedList) {
453 rngWrapper->
setSeed( rngName, ctx );
454 CLHEP::HepRandomEngine *rndmEngine = rngWrapper->
getEngine(ctx);
462 return StatusCode::SUCCESS;
◆ processAllSubEvents() [2/2]
virtual StatusCode IPileUpTool::processAllSubEvents |
|
inherited |
dummy implementation to allow compilation while all Digitization packages are migrated to use this new interface.
◆ processBunchXing()
called for each active bunch-crossing to process current SubEvents bunchXing is in ns
Reimplemented from PileUpToolBase.
Definition at line 119 of file TRTFastDigitizationTool.cxx.
129 TimedHitCollList hitCollList;
132 bSubEvents, eSubEvents).isSuccess()) &&
133 hitCollList.empty()) {
135 return StatusCode::FAILURE;
137 ATH_MSG_VERBOSE(hitCollList.size() <<
" TRTUncompressedHitCollections with key " <<
144 for( ; iColl != endColl; ++iColl) {
147 ATH_MSG_DEBUG(
"TRTUncompressedHitCollection found with " << hitCollPtr->
size() <<
150 <<
" index: " << timeIndex.index()
151 <<
" type: " << timeIndex.type());
156 return StatusCode::SUCCESS;
◆ produceDriftCircles()
Definition at line 253 of file TRTFastDigitizationTool.cxx.
259 trtPrdTruth = std::make_unique< PRD_MultiTruthCollection >();
260 if ( !trtPrdTruth.isValid() ) {
261 ATH_MSG_FATAL(
"Could not record collection " << trtPrdTruth.name() );
262 return StatusCode::FAILURE;
264 ATH_MSG_DEBUG(
"PRD_MultiTruthCollection " << trtPrdTruth.name() <<
" registered in StoreGate" );
269 if(eventInfoContainer.isValid()){
278 if(
sc != StatusCode::SUCCESS)
return sc;
285 for ( ; itr1 != itr2; ++itr1 ) {
290 int hitID = hit->GetHitID();
292 if ( hitID & 0xc0000000 ) {
293 ATH_MSG_ERROR(
"Hit ID not Valid (" << MSG::hex << hitID <<
")" << MSG::dec );
303 ATH_MSG_ERROR(
"Ignoring simhits with suspicious identifier (1)" );
312 int idx = (
BEC > 0 ?
BEC : 2 -
BEC ) + 4 * isArgon - 1;
321 if ( CLHEP::RandFlat::shoot( rndmEngine ) < ( 1. -
efficiency ) )
continue;
336 double tailSmearing = CLHEP::RandFlat::shoot( rndmEngine );
337 dR = CLHEP::RandGaussZiggurat::shoot( rndmEngine, 0., ( tailSmearing <
m_cFit[
idx ][ 2 ] ?
m_cFit[
idx ][ 3 ] :
m_cFit[
idx ][ 4 ] ) ) * sigmaTrt;
340 dR = 2. - driftRadiusLoc;
344 while ( driftRadiusLoc + dR > 2. || driftRadiusLoc + dR < 0. );
345 double smearedRadius = driftRadiusLoc + dR;
348 std::vector< Identifier > rdoList = { straw_id };
356 unsigned int word = 0x00007c00;
360 int particleEncoding = hit->GetParticleEncoding();
361 float kineticEnergy = hit->GetKineticEnergy();
365 double position = ( std::abs(
BEC) == 1 ? hitGlobalPosition.z() : hitGlobalPosition.perp() );
368 if ( abs( particleEncoding ) == 11 && kineticEnergy > 5000. ) {
375 if ( CLHEP::RandFlat::shoot( rndmEngine ) < probability ) word |= maskHT;
379 double eta = hitGlobalPosition.pseudoRapidity();
382 float p = kineticEnergy;
384 if ( abs( particleEncoding ) == 11 &&
p > 5000. ) {
386 if ( CLHEP::RandFlat::shoot( rndmEngine ) < probability ) word |= maskHT;
388 else if ( abs( particleEncoding ) == 13 || abs( particleEncoding ) > 100 ) {
390 if ( CLHEP::RandFlat::shoot( rndmEngine ) < probability ) word |= maskHT;
399 std::move(hitErrorMatrix),
405 m_driftCircleMap.insert( std::multimap< Identifier, InDet::TRT_DriftCircle * >::value_type( straw_id, trtDriftCircle ) );
407 if ( particleLink.
isValid() ) {
409 trtPrdTruth->insert( std::make_pair( trtDriftCircle->
identify(), particleLink ) );
410 ATH_MSG_DEBUG(
"Truth map filled with cluster " << trtDriftCircle <<
" and link = " << particleLink );
414 ATH_MSG_DEBUG(
"Particle link NOT valid!! Truth map NOT filled with cluster " << trtDriftCircle <<
" and link = " << particleLink );
420 return StatusCode::SUCCESS;
◆ resetFilter()
virtual void PileUpToolBase::resetFilter |
( |
| ) |
|
|
inlineoverridevirtualinherited |
◆ setNumericalConstants()
StatusCode TRTFastDigitizationTool::setNumericalConstants |
( |
| ) |
|
|
private |
Definition at line 170 of file TRTFastDigitizationTool.cxx.
175 static const float eff_corr_pileup_dependence = -0.0005;
176 static const float res1_corr_pileup_dependence = 0.005;
177 static const float res2_corr_pileup_dependence = 0.015;
184 static const float tailRes = 3.600;
185 static const float coreFracEndcap_Xe = 0.40;
186 static const float coreFracEndcap_Ar = 0.40;
187 static const float coreFracBarrel_Xe = 0.250;
188 static const float coreFracBarrel_Ar = 0.250;
191 static const float eff_BarrelA_Xe = 0.840;
192 static const float eff_EndcapA_Xe = 0.875;
193 static const float eff_BarrelC_Xe = 0.833;
194 static const float eff_EndcapC_Xe = 0.894;
195 static const float eff_BarrelA_Ar = 0.933;
196 static const float eff_EndcapA_Ar = 0.949;
197 static const float eff_BarrelC_Ar = 0.937;
198 static const float eff_EndcapC_Ar = 0.977;
199 static const float err_Barrel_Xe = 0.997;
200 static const float err_Endcap_Xe = 1.065;
201 static const float err_Barrel_Ar = 1.020;
202 static const float err_Endcap_Ar = 1.040;
204 static const float coreRes_Barrel_Xe = 0.4;
205 static const float coreRes_Endcap_Xe = 0.5;
206 static const float coreRes_Barrel_Ar = 0.4;
207 static const float coreRes_Endcap_Ar = 0.5;
209 m_cFit[ 0 ][ 0 ] = effcorr*eff_BarrelA_Xe;
210 m_cFit[ 0 ][ 1 ] = err_Barrel_Xe;
211 m_cFit[ 0 ][ 2 ] = coreFracBarrel_Xe;
212 m_cFit[ 0 ][ 3 ] = res1corr*coreRes_Barrel_Xe;
213 m_cFit[ 0 ][ 4 ] = res2corr*tailRes;
214 m_cFit[ 1 ][ 0 ] = effcorr*eff_EndcapA_Xe;
215 m_cFit[ 1 ][ 1 ] = err_Endcap_Xe;
216 m_cFit[ 1 ][ 2 ] = coreFracEndcap_Xe;
217 m_cFit[ 1 ][ 3 ] = res1corr*coreRes_Endcap_Xe;
218 m_cFit[ 1 ][ 4 ] = res2corr*tailRes;
219 m_cFit[ 2 ][ 0 ] = effcorr*eff_BarrelC_Xe;
220 m_cFit[ 2 ][ 1 ] = err_Barrel_Xe;
221 m_cFit[ 2 ][ 2 ] = coreFracBarrel_Xe;
222 m_cFit[ 2 ][ 3 ] = res1corr*coreRes_Barrel_Xe;
223 m_cFit[ 2 ][ 4 ] = res2corr*tailRes;
224 m_cFit[ 3 ][ 0 ] = effcorr*eff_EndcapC_Xe;
225 m_cFit[ 3 ][ 1 ] = err_Endcap_Xe;
226 m_cFit[ 3 ][ 2 ] = coreFracEndcap_Xe;
227 m_cFit[ 3 ][ 3 ] = res1corr*coreRes_Endcap_Xe;
228 m_cFit[ 3 ][ 4 ] = res2corr*tailRes;
229 m_cFit[ 4 ][ 0 ] = effcorr*eff_BarrelA_Ar;
230 m_cFit[ 4 ][ 1 ] = err_Barrel_Ar;
231 m_cFit[ 4 ][ 2 ] = coreFracBarrel_Ar;
232 m_cFit[ 4 ][ 3 ] = res1corr*coreRes_Barrel_Ar;
233 m_cFit[ 4 ][ 4 ] = res2corr*tailRes;
234 m_cFit[ 5 ][ 0 ] = effcorr*eff_EndcapA_Ar;
235 m_cFit[ 5 ][ 1 ] = err_Endcap_Ar;
236 m_cFit[ 5 ][ 2 ] = coreFracEndcap_Ar;
237 m_cFit[ 5 ][ 3 ] = res1corr*coreRes_Endcap_Ar;
238 m_cFit[ 5 ][ 4 ] = res2corr*tailRes;
239 m_cFit[ 6 ][ 0 ] = effcorr*eff_BarrelC_Ar;
240 m_cFit[ 6 ][ 1 ] = err_Barrel_Ar;
241 m_cFit[ 6 ][ 2 ] = coreFracBarrel_Ar;
242 m_cFit[ 6 ][ 3 ] = res1corr*coreRes_Barrel_Ar;
243 m_cFit[ 6 ][ 4 ] = res2corr*tailRes;
244 m_cFit[ 7 ][ 0 ] = effcorr*eff_EndcapC_Ar;
245 m_cFit[ 7 ][ 1 ] = err_Endcap_Ar;
246 m_cFit[ 7 ][ 2 ] = coreFracEndcap_Ar;
247 m_cFit[ 7 ][ 3 ] = res1corr*coreRes_Endcap_Ar;
248 m_cFit[ 7 ][ 4 ] = res2corr*tailRes;
250 return StatusCode::SUCCESS;
◆ strawEfficiency()
double TRTFastDigitizationTool::strawEfficiency |
( |
double |
driftRadius, |
|
|
int |
BEC = 0 |
|
) |
| |
|
staticprivate |
Definition at line 982 of file TRTFastDigitizationTool.cxx.
984 const double p[][ 5 ] = { { 0.478, 0.9386, 0.9325, 0.2509, 0.03232 },
985 { 0.477001, 1.02865, 1.02910, 0.185082, 0. },
986 { 0.482528, 1.03601, 1.03693, 0.182581, 0. }
989 const double &trtFitAmplitude =
p[
BEC ][ 0 ];
990 const double &trtFitMu =
p[
BEC ][ 1 ];
991 const double &trtFitR =
p[
BEC ][ 2 ];
992 const double &trtFitSigma =
p[
BEC ][ 3 ];
993 const double &trtFitConstant =
p[
BEC ][ 4 ];
995 double efficiency = trtFitAmplitude * ( erf( ( trtFitMu + trtFitR -
driftRadius ) / ( std::sqrt( 2 ) * trtFitSigma ) )
996 + erf( ( trtFitMu + trtFitR +
driftRadius ) / ( std::sqrt( 2 ) * trtFitSigma ) )
997 - erf( ( trtFitMu - trtFitR -
driftRadius ) / ( std::sqrt( 2 ) * trtFitSigma ) )
998 - erf( ( trtFitMu - trtFitR +
driftRadius ) / ( std::sqrt( 2 ) * trtFitSigma ) )
◆ toProcess()
virtual bool PileUpToolBase::toProcess |
( |
int |
bunchXing | ) |
const |
|
inlineoverridevirtualinherited |
◆ m_cFit
double TRTFastDigitizationTool::m_cFit[8][5] {} |
|
private |
◆ m_driftCircleMap
◆ m_EventInfoKey
◆ m_filterPassed
bool PileUpToolBase::m_filterPassed {true} |
|
protectedinherited |
◆ m_firstXing
Gaudi::Property<int> PileUpToolBase::m_firstXing |
|
protectedinherited |
Initial value:{this, "FirstXing", -999,
"First bunch-crossing in which det is live"}
Definition at line 54 of file PileUpToolBase.h.
◆ m_HardScatterSplittingMode
IntegerProperty TRTFastDigitizationTool::m_HardScatterSplittingMode {this, "HardScatterSplittingMode", 0, "Control pileup & signal splitting"} |
|
private |
◆ m_HardScatterSplittingSkipper
bool TRTFastDigitizationTool::m_HardScatterSplittingSkipper {false} |
|
private |
◆ m_lastXing
Gaudi::Property<int> PileUpToolBase::m_lastXing |
|
protectedinherited |
Initial value:{this, "LastXing", 999,
"Last bunch-crossing in which det is live"}
Definition at line 56 of file PileUpToolBase.h.
◆ m_mergeSvc
◆ m_NCollPerEvent
FloatProperty TRTFastDigitizationTool::m_NCollPerEvent {this, "NCollPerEvent", 30} |
|
private |
◆ m_randomEngineName
StringProperty TRTFastDigitizationTool::m_randomEngineName {this, "RandomStreamName", "FatrasRnd"} |
|
private |
◆ m_rndmSvc
◆ m_thpctrt
◆ m_trt_id
◆ m_trt_manager
◆ m_trtDriftCircleContainerKey
◆ m_trtDriftFunctionTool
◆ m_trtElectronPidTool
◆ m_trtHighProbabilityBoostBkg
double TRTFastDigitizationTool::m_trtHighProbabilityBoostBkg {1.} |
|
private |
◆ m_trtHighProbabilityBoostEle
double TRTFastDigitizationTool::m_trtHighProbabilityBoostEle {1.} |
|
private |
◆ m_trtHitCollectionKey
StringProperty TRTFastDigitizationTool::m_trtHitCollectionKey {this, "trtHitCollectionName", "TRTUncompressedHits"} |
|
private |
◆ m_trtHitCollList
◆ m_trtPrdTruthKey
◆ m_trtSigmaDriftRadiusTail
double TRTFastDigitizationTool::m_trtSigmaDriftRadiusTail {0.0} |
|
private |
◆ m_trtStrawStatusSummaryTool
ToolHandle< ITRT_StrawStatusSummaryTool > TRTFastDigitizationTool::m_trtStrawStatusSummaryTool {this, "TRT_StrawStatusSummaryTool", "InDetTRTStrawStatusSummaryTool"} |
|
private |
◆ m_trtTailFraction
double TRTFastDigitizationTool::m_trtTailFraction {0.0} |
|
private |
◆ m_useEventInfo
BooleanProperty TRTFastDigitizationTool::m_useEventInfo {this, "useEventInfo", false} |
|
private |
◆ m_useTrtElectronPidTool
bool TRTFastDigitizationTool::m_useTrtElectronPidTool {true} |
|
private |
◆ m_vetoPileUpTruthLinks
Gaudi::Property<int> PileUpToolBase::m_vetoPileUpTruthLinks |
|
protectedinherited |
Initial value:{this, "VetoPileUpTruthLinks", true,
"Ignore links to suppressed pile-up truth"}
Definition at line 58 of file PileUpToolBase.h.
The documentation for this class was generated from the following files:
def retrieve(aClass, aKey=None)
JetConstituentVector::iterator iterator
void setSeed(const std::string &algName, const EventContext &ctx)
Set the random seed using a string (e.g.
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic > MatrixX
Dynamic Matrix - dynamic allocation.
Scalar eta() const
pseudorapidity method
Eigen::Matrix< double, 2, 1 > Vector2D
const TRT_BarrelElement * getBarrelElement(unsigned int positive, unsigned int moduleIndex, unsigned int phiIndex, unsigned int strawLayerIndex) const
Access Barrel Elements:---------------—(Fast)-------------------------—.
size_type straw_layer_hash_max(void) const
const Amg::MatrixX & localCovariance() const
return const ref to the error matrix
virtual const InDetDD::TRT_BaseElement * detectorElement() const override final
return the detector element corresponding to this PRD
const std::vector< Identifier > & rdoList() const
return the List of rdo identifiers (pointers)
#define ATH_MSG_VERBOSE(x)
bool ignoreTruthLink(const T &p, bool vetoPileUp)
Helper function for SDO creation in PileUpTools.
bool nextDetectorElement(const_iterator &b, const_iterator &e)
sets an iterator range with the hits of current detector element returns a bool when done
std::list< value_t > type
type of the collection of timed data object
a link optimized in size for a GenParticle in a McEventCollection
void efficiency(std::vector< double > &bins, std::vector< double > &values, const std::vector< std::string > &files, const std::string &histname, const std::string &tplotname, const std::string &label="")
void insert(const PileUpTimeEventIndex &timeEventIndex, const AtlasHitsVector< HIT > *inputCollection)
void setHashAndIndex(unsigned short collHash, unsigned short objIndex)
TEMP for testing: might make some classes friends later ...
::StatusCode StatusCode
StatusCode definition for legacy code.
const Version & getVersion() const
Get version information.
int majorNum() const
Major version number.
const HepGeom::Transform3D getAbsoluteTransform(int straw) const
This is an alias to strawTransform(int straw)
#define CHECK(...)
Evaluate an expression and check for errors.
virtual Identifier identify() const override final
identifier of this detector element:
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
int barrel_ec(const Identifier &id) const
Values of different levels (failure returns 0)
int straw_layer(const Identifier &id) const
bool isValid() const
Validity check.
int layer_or_wheel(const Identifier &id) const
virtual IdentifierHash identifyHash() const override final
identifier hash
const TRT_EndcapElement * getEndcapElement(unsigned int positive, unsigned int wheelIndex, unsigned int strawLayerIndex, unsigned int phiIndex) const
Access Endcap Elements:---------------—(Fast)--------------------------—.
Identifier identify() const
return the identifier
constexpr double mass[PARTICLEHYPOTHESES]
the array of masses
A wrapper class for event-slot-local random engines.
const TRT_BaseElement * getElement(Identifier id) const
Access Elements Generically---------------------------------------------—.
const Amg::Vector2D & localPosition() const
return the local position reference
Trk::PrepRawDataCollection< TRT_DriftCircle > TRT_DriftCircleCollection
static HepMcParticleLink getRedirectedLink(const HepMcParticleLink &particleLink, uint32_t eventIndex, const EventContext &ctx)
Return a HepMcParticleLink pointing at the same particle, but in a different GenEvent.
CLHEP::HepRandomEngine * getEngine(const EventContext &ctx) const
Retrieve the random engine corresponding to the provided EventContext.
unsigned short eventId() const
the index of the component event in PileUpEventInfo.
#define ATH_MSG_WARNING(x)
unsigned int getWord() const
returns the TRT dataword
This is a "hash" representation of an Identifier. This encodes a 32 bit index which can be used to lo...
constexpr int pow(int base, int exp) noexcept
a struct encapsulating the identifier of a pile-up event
float distance(const Amg::Vector3D &p1, const Amg::Vector3D &p2)
calculates the distance between two point in 3D space
Identifier straw_id(int barrel_ec, int phi_module, int layer_or_wheel, int straw_layer, int straw) const
Three ways of getting id for a single straw:
AtlasHitsVector< TRTUncompressedHit > TRTUncompressedHitCollection