ATLAS Offline Software
Loading...
Searching...
No Matches
LVL1TGCTrigger::TGCOutputModifier Class Reference

#include <TGCOutputModifier.h>

Inheritance diagram for LVL1TGCTrigger::TGCOutputModifier:
Collaboration diagram for LVL1TGCTrigger::TGCOutputModifier:

Public Member Functions

 TGCOutputModifier (const std::string &name, ISvcLocator *pSvcLocator)
virtual ~TGCOutputModifier ()
virtual StatusCode initialize () override
 Regular Gaudi algorithm initialization function.
virtual StatusCode execute (const EventContext &eventContext) const override
 Regular Gaudi algorithm execute function.
virtual StatusCode sysInitialize () override
 Override sysInitialize.
virtual bool isClonable () const override
 Specify if the algorithm is clonable.
virtual unsigned int cardinality () const override
 Cardinality (Maximum number of clones that can exist) special value 0 means that algorithm is reentrant.
virtual StatusCode sysExecute (const EventContext &ctx) override
 Execute an algorithm.
virtual const DataObjIDColl & extraOutputDeps () const override
 Return the list of extra output dependencies.
virtual bool filterPassed (const EventContext &ctx) const
virtual void setFilterPassed (bool state, const EventContext &ctx) const
ServiceHandle< StoreGateSvc > & evtStore ()
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
virtual StatusCode sysStart () override
 Handle START transition.
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles.
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles.
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T, V, H > &t)
void updateVHKA (Gaudi::Details::PropertyBase &)
MsgStream & msg () const
bool msgLvl (const MSG::Level lvl) const

Protected Member Functions

void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce (T &h)
void extraDeps_update_handler (Gaudi::Details::PropertyBase &ExtraDeps)
 Add StoreName to extra input/output deps as needed.

Private Types

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t

Private Member Functions

void Copy (const LVL1MUONIF::Lvl1MuSectorLogicDataPhase1 *sldataOrg, LVL1MUONIF::Lvl1MuSectorLogicDataPhase1 &sldataNew) const
void Update (const std::vector< const xAOD::MuonSegment * > &segs, LVL1MUONIF::Lvl1MuSectorLogicDataPhase1 &sldata, size_t systemAddress, size_t subSystemAddress, size_t sectorAddress) const
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey>

Private Attributes

SG::ReadHandleKey< LVL1MUONIF::Lvl1MuCTPIInputPhase1m_inputKey {this,"InputMuctpiLocation","L1MuctpiStoreTGC","Input Tgc2Muctpi interface container"}
SG::WriteHandleKey< LVL1MUONIF::Lvl1MuCTPIInputPhase1m_outputKey {this, "OutputMuctpiLocation", "L1MuctpiStoreTGCmod", "Output Tgc2Muctpi interface container"}
ToolHandle< LVL1::ITrigT1MuonRecRoiToolm_recTGCRoiTool {this,"TrigT1TGCRecRoiTool","LVL1::TrigT1TGCRecRoiTool","hoge"}
SG::ReadHandleKey< xAOD::MuonSegmentContainerm_musegKey {this,"MuonSegmentContainer","xaodMuonSegments","MuonSegmentContainer"}
DoubleProperty m_deltaThetaCut1 {this,"DeltaThetaCut1", 0.008,"Delta theta cut for MuonSegment in low-eta region"}
DoubleProperty m_deltaEtaCut1 {this,"DeltaEtaCut1", 0.09,"Delta eta cut for MuonSegment and RoI position in low-eta region"}
DoubleProperty m_deltaPhiCut1 {this,"DeltaPhiCut1", 0.16,"Delta phi cut for MuonSegment and RoI position in low-eta region"}
DoubleProperty m_deltaThetaCut2 {this,"DeltaThetaCut2", 0.001,"Delta theta cut for MuonSegment in high-eta region"}
DoubleProperty m_deltaEtaCut2 {this,"DeltaEtaCut2", 0.16,"Delta eta cut for MuonSegment and RoI position in high-eta region"}
DoubleProperty m_deltaPhiCut2 {this,"DeltaPhiCut2", 0.19,"Delta phi cut for MuonSegment and RoI position in high-eta region"}
DoubleProperty m_etaBoundary1 {this,"EtaBoundary1", 1.9,"Eta boundary where the cuts1 are applied"}
DoubleProperty m_etaBoundary2 {this,"EtaBoundary2", 2.1,"Eta boundary where the cuts2 are applied"}
BooleanProperty m_emulateA {this,"EmulateA", true,"Emulate A-side"}
BooleanProperty m_emulateC {this,"EmulateC", true,"Emulate C-side"}
BooleanProperty m_nswVetoMode {this,"NSWVetoMode", true,"NSW veto mode or monitoring mode"}
DataObjIDColl m_extendedExtraObjects
 Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.
StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default)
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
bool m_varHandleArraysDeclared

Detailed Description

Definition at line 27 of file TGCOutputModifier.h.

Member Typedef Documentation

◆ StoreGateSvc_t

typedef ServiceHandle<StoreGateSvc> AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::StoreGateSvc_t
privateinherited

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ TGCOutputModifier()

LVL1TGCTrigger::TGCOutputModifier::TGCOutputModifier ( const std::string & name,
ISvcLocator * pSvcLocator )

Definition at line 19 of file TGCOutputModifier.cxx.

20 :
21 AthReentrantAlgorithm(name, pSvcLocator)
22 {
23 }

◆ ~TGCOutputModifier()

LVL1TGCTrigger::TGCOutputModifier::~TGCOutputModifier ( )
virtualdefault

Member Function Documentation

◆ cardinality()

unsigned int AthCommonReentrantAlgorithm< Gaudi::Algorithm >::cardinality ( ) const
overridevirtualinherited

Cardinality (Maximum number of clones that can exist) special value 0 means that algorithm is reentrant.

Override this to return 0 for reentrant algorithms.

Definition at line 75 of file AthCommonReentrantAlgorithm.cxx.

64{
65 return 0;
66}

◆ Copy()

void LVL1TGCTrigger::TGCOutputModifier::Copy ( const LVL1MUONIF::Lvl1MuSectorLogicDataPhase1 * sldataOrg,
LVL1MUONIF::Lvl1MuSectorLogicDataPhase1 & sldataNew ) const
private

Definition at line 135 of file TGCOutputModifier.cxx.

137 {
138 sldataNew.clear2candidatesInSector();
139 if(sldataOrg->is2candidatesInSector()) sldataNew.set2candidatesInSector();
140 sldataNew.bcid(sldataOrg->bcid());
141 for (unsigned int icand=0;
143 sldataNew.roi(icand,sldataOrg->roi(icand));
144 sldataNew.pt(icand,sldataOrg->pt(icand));
145 sldataNew.ovl(icand,sldataOrg->ovl(icand));
146 sldataNew.charge(icand,sldataOrg->charge(icand));
147 sldataNew.bw2or3(icand,sldataOrg->bw2or3(icand));
148 sldataNew.goodmf(icand,sldataOrg->goodmf(icand));
149 sldataNew.innercoin(icand,sldataOrg->innercoin(icand));
150 sldataNew.clear2candidates(icand);
151 if(sldataOrg->is2candidates(icand))sldataNew.set2candidates(icand);
152 }
153 }
static const size_t NCAND[3]

◆ declareGaudiProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareGaudiProperty ( Gaudi::Property< T, V, H > & hndl,
const SG::VarHandleKeyType &  )
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKey>

Definition at line 156 of file AthCommonDataStore.h.

158 {
160 hndl.value(),
161 hndl.documentation());
162
163 }
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)

◆ declareProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareProperty ( Gaudi::Property< T, V, H > & t)
inlineinherited

Definition at line 145 of file AthCommonDataStore.h.

145 {
146 typedef typename SG::HandleClassifier<T>::type htype;
148 }
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>

◆ detStore()

const ServiceHandle< StoreGateSvc > & AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::detStore ( ) const
inlineinherited

The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 95 of file AthCommonDataStore.h.

◆ evtStore()

ServiceHandle< StoreGateSvc > & AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::evtStore ( )
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 85 of file AthCommonDataStore.h.

◆ execute()

StatusCode LVL1TGCTrigger::TGCOutputModifier::execute ( const EventContext & eventContext) const
overridevirtual

Regular Gaudi algorithm execute function.

Definition at line 58 of file TGCOutputModifier.cxx.

59 {
60 SG::ReadHandle<LVL1MUONIF::Lvl1MuCTPIInputPhase1> rh_muctpiTgc(m_inputKey, eventContext);
61 if(!rh_muctpiTgc.isValid()){
62 ATH_MSG_ERROR("Cannot retrieve LVL1MUONIF::Lvl1MuCTPIInputPhase1");
63 return StatusCode::FAILURE;
64 }
65 const LVL1MUONIF::Lvl1MuCTPIInputPhase1* inTgc2Muctpi = rh_muctpiTgc.cptr();
66
67 std::vector<const xAOD::MuonSegment*> muSegDataColl;
68 if( m_nswVetoMode.value() ){
69 SG::ReadHandle<xAOD::MuonSegmentContainer> rh_museg(m_musegKey, eventContext);
70 if(!rh_museg.isValid()){
71 ATH_MSG_ERROR("Cannot retrieve xAOD::MuonSegmentContainer");
72 return StatusCode::FAILURE;
73 }
74 const xAOD::MuonSegmentContainer* muSegContainer = rh_museg.cptr();
75 for(auto seg : *muSegContainer){
76 if(seg->chamberIndex() != ChIdx::EIS && seg->chamberIndex() != ChIdx::EIL &&
77 seg->chamberIndex() != ChIdx::CSS && seg->chamberIndex() != ChIdx::CSL ) continue;
78 muSegDataColl.push_back(seg);
79 }
80 }
81
82 SG::WriteHandle<LVL1MUONIF::Lvl1MuCTPIInputPhase1> wh_muctpiTgc(m_outputKey, eventContext);
83 ATH_CHECK(wh_muctpiTgc.record(std::make_unique<LVL1MUONIF::Lvl1MuCTPIInputPhase1>()));
84 LVL1MUONIF::Lvl1MuCTPIInputPhase1* outTgc2Muctpi = wh_muctpiTgc.ptr();
85
89 for(auto isys : tgc_systems){
90 auto data = &inTgc2Muctpi->getData(isys); // const std::vector<Lvl1MuVectWithBC>&
91 for(const auto & [bcid, muvec] : *data){ // Lvl1MuVectWithBC
92
93 for(size_t i = 0 ; i < muvec.size() ; i++){ // i = system index = MaxSectors * Side + Sectors
94 auto sectorData = muvec.at(i).get();// std::shared_ptr <Lvl1MuSectorLogicDataPhase1>
95 if(!sectorData){
96 ATH_MSG_WARNING("sectorData is null!");
97 continue;
98 }
101 size_t isub = (i<numberOfSectors)
103 size_t isec = i % numberOfSectors;
104 if(i != inTgc2Muctpi->getSystemIndex(isys,isub,isec)){
105 ATH_MSG_WARNING("System Index Mismatch!!");
106 continue;
107 }
108 LVL1MUONIF::Lvl1MuEndcapSectorLogicDataPhase1 sldata;
109 Copy(sectorData,sldata);
110 Update(muSegDataColl,sldata,isys,isub,isec);
111 outTgc2Muctpi->setSectorLogicData(sldata,isys,isub,isec,bcid);
114 size_t isub = (i<numberOfSectors)
116 size_t isec = i % numberOfSectors;
117 if(i != inTgc2Muctpi->getSystemIndex(isys,isub,isec)){
118 ATH_MSG_WARNING("System Index Mismatch!!");
119 continue;
120 }
121 LVL1MUONIF::Lvl1MuForwardSectorLogicDataPhase1 sldata;
122 Copy(sectorData,sldata);
123 Update(muSegDataColl,sldata,isys,isub,isec);
124 outTgc2Muctpi->setSectorLogicData(sldata,isys,isub,isec,bcid);
125 }else{
126 ATH_MSG_WARNING("Unknown system. Barrel? isys="<<isys);
127 }
128 }
129 }
130 }
131
132 return StatusCode::SUCCESS;
133 }
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_ERROR(x)
#define ATH_MSG_WARNING(x)
char data[hepevt_bytes_allocation_ATLAS]
Definition HepEvt.cxx:11
void setSectorLogicData(const Lvl1MuSectorLogicDataPhase1 &data, size_t systemAddress, size_t subSystemAddress, size_t sectorAddress, int bcid=0)
const std::vector< Lvl1MuVectWithBC > & getData(MuonSystem system) const
size_t getSystemIndex(size_t systemAddress, size_t subSystemAddress, size_t sectorAddress) const
void Copy(const LVL1MUONIF::Lvl1MuSectorLogicDataPhase1 *sldataOrg, LVL1MUONIF::Lvl1MuSectorLogicDataPhase1 &sldataNew) const
SG::ReadHandleKey< LVL1MUONIF::Lvl1MuCTPIInputPhase1 > m_inputKey
SG::ReadHandleKey< xAOD::MuonSegmentContainer > m_musegKey
void Update(const std::vector< const xAOD::MuonSegment * > &segs, LVL1MUONIF::Lvl1MuSectorLogicDataPhase1 &sldata, size_t systemAddress, size_t subSystemAddress, size_t sectorAddress) const
SG::WriteHandleKey< LVL1MUONIF::Lvl1MuCTPIInputPhase1 > m_outputKey
constexpr unsigned numberOfSectors()
return total number of sectors
MuonSegmentContainer_v1 MuonSegmentContainer
Definition of the current "MuonSegment container version".

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::extraDeps_update_handler ( Gaudi::Details::PropertyBase & ExtraDeps)
protectedinherited

Add StoreName to extra input/output deps as needed.

use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given

◆ extraOutputDeps()

const DataObjIDColl & AthCommonReentrantAlgorithm< Gaudi::Algorithm >::extraOutputDeps ( ) const
overridevirtualinherited

Return the list of extra output dependencies.

This list is extended to include symlinks implied by inheritance relations.

Definition at line 94 of file AthCommonReentrantAlgorithm.cxx.

90{
91 // If we didn't find any symlinks to add, just return the collection
92 // from the base class. Otherwise, return the extended collection.
93 if (!m_extendedExtraObjects.empty()) {
95 }
97}
An algorithm that can be simultaneously executed in multiple threads.

◆ filterPassed()

virtual bool AthCommonReentrantAlgorithm< Gaudi::Algorithm >::filterPassed ( const EventContext & ctx) const
inlinevirtualinherited

Definition at line 96 of file AthCommonReentrantAlgorithm.h.

96 {
97 return execState( ctx ).filterPassed();
98 }
virtual bool filterPassed(const EventContext &ctx) const

◆ initialize()

StatusCode LVL1TGCTrigger::TGCOutputModifier::initialize ( )
overridevirtual

Regular Gaudi algorithm initialization function.

Definition at line 30 of file TGCOutputModifier.cxx.

31 {
32 ATH_MSG_INFO( "=======================================" );
33 ATH_MSG_INFO( "Initialisation for TGCOutputModifier" );
34 ATH_MSG_INFO( "NSWVetoMode="<<m_nswVetoMode.value());
35 ATH_MSG_INFO( "EmulateA="<<m_emulateA.value());
36 ATH_MSG_INFO( "EmulateC="<<m_emulateC.value());
37 ATH_MSG_INFO( "EtaBoundary1="<<m_etaBoundary1.value() );
38 ATH_MSG_INFO( "DeltaEtaCut1="<<m_deltaEtaCut1.value() );
39 ATH_MSG_INFO( "DeltaPhiCut1="<<m_deltaPhiCut1.value() );
40 ATH_MSG_INFO( "DeltaThetaCut1="<<m_deltaThetaCut1.value() );
41 ATH_MSG_INFO( "EtaBoundary2="<<m_etaBoundary2.value() );
42 ATH_MSG_INFO( "DeltaEtaCut2="<<m_deltaEtaCut2.value() );
43 ATH_MSG_INFO( "DeltaPhiCut2="<<m_deltaPhiCut2.value() );
44 ATH_MSG_INFO( "DeltaThetaCut2="<<m_deltaThetaCut2.value() );
45 ATH_MSG_INFO( "InputMuctpiLocation="<<m_inputKey.key() );
46 ATH_MSG_INFO( "OutputMuctpiLocation="<<m_outputKey.key() );
47 ATH_MSG_INFO( "MuonSegmentContainer="<<m_musegKey.key() );
48 ATH_MSG_INFO( "=======================================" );
49
50 ATH_CHECK(m_inputKey.initialize());
51 ATH_CHECK(m_outputKey.initialize());
52 ATH_CHECK(m_recTGCRoiTool.retrieve());
53 ATH_CHECK(m_musegKey.initialize(m_nswVetoMode.value()));
54 return StatusCode::SUCCESS;
55 }
#define ATH_MSG_INFO(x)
ToolHandle< LVL1::ITrigT1MuonRecRoiTool > m_recTGCRoiTool

◆ inputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::inputHandles ( ) const
overridevirtualinherited

Return this algorithm's input handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ isClonable()

◆ msg()

MsgStream & AthCommonMsg< Gaudi::Algorithm >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

24 {
25 return this->msgStream();
26 }

◆ msgLvl()

bool AthCommonMsg< Gaudi::Algorithm >::msgLvl ( const MSG::Level lvl) const
inlineinherited

Definition at line 30 of file AthCommonMsg.h.

30 {
31 return this->msgLevel(lvl);
32 }

◆ outputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::outputHandles ( ) const
overridevirtualinherited

Return this algorithm's output handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ renounce()

std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::renounce ( T & h)
inlineprotectedinherited

Definition at line 380 of file AthCommonDataStore.h.

381 {
382 h.renounce();
384 }
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce(T &h)

◆ renounceArray()

void AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::renounceArray ( SG::VarHandleKeyArray & handlesArray)
inlineprotectedinherited

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364 {
366 }

◆ setFilterPassed()

virtual void AthCommonReentrantAlgorithm< Gaudi::Algorithm >::setFilterPassed ( bool state,
const EventContext & ctx ) const
inlinevirtualinherited

Definition at line 100 of file AthCommonReentrantAlgorithm.h.

100 {
102 }
virtual void setFilterPassed(bool state, const EventContext &ctx) const

◆ sysExecute()

StatusCode AthCommonReentrantAlgorithm< Gaudi::Algorithm >::sysExecute ( const EventContext & ctx)
overridevirtualinherited

Execute an algorithm.

We override this in order to work around an issue with the Algorithm base class storing the event context in a member variable that can cause crashes in MT jobs.

Definition at line 85 of file AthCommonReentrantAlgorithm.cxx.

77{
78 return BaseAlg::sysExecute (ctx);
79}

◆ sysInitialize()

StatusCode AthCommonReentrantAlgorithm< Gaudi::Algorithm >::sysInitialize ( )
overridevirtualinherited

Override sysInitialize.

Override sysInitialize from the base class.

Loop through all output handles, and if they're WriteCondHandles, automatically register them and this Algorithm with the CondSvc

Scan through all outputHandles, and if they're WriteCondHandles, register them with the CondSvc

Reimplemented from AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >.

Reimplemented in HypoBase, and InputMakerBase.

Definition at line 61 of file AthCommonReentrantAlgorithm.cxx.

107 {
109
110 if (sc.isFailure()) {
111 return sc;
112 }
113
114 ServiceHandle<ICondSvc> cs("CondSvc",name());
115 for (auto h : outputHandles()) {
116 if (h->isCondition() && h->mode() == Gaudi::DataHandle::Writer) {
117 // do this inside the loop so we don't create the CondSvc until needed
118 if ( cs.retrieve().isFailure() ) {
119 ATH_MSG_WARNING("no CondSvc found: won't autoreg WriteCondHandles");
120 return StatusCode::SUCCESS;
121 }
122 if (cs->regHandle(this,*h).isFailure()) {
124 ATH_MSG_ERROR("unable to register WriteCondHandle " << h->fullKey()
125 << " with CondSvc");
126 }
127 }
128 }
129 return sc;
130}
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::sysStart ( )
overridevirtualinherited

Handle START transition.

We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.

◆ Update()

void LVL1TGCTrigger::TGCOutputModifier::Update ( const std::vector< const xAOD::MuonSegment * > & segs,
LVL1MUONIF::Lvl1MuSectorLogicDataPhase1 & sldata,
size_t systemAddress,
size_t subSystemAddress,
size_t sectorAddress ) const
private

Definition at line 154 of file TGCOutputModifier.cxx.

159 {
160 if(subSystemId==LVL1MUONIF::Lvl1MuCTPIInputPhase1::idSideA() && !m_emulateA.value()) return;
161 if(subSystemId==LVL1MUONIF::Lvl1MuCTPIInputPhase1::idSideC() && !m_emulateC.value()) return;
162 int tmpside = (subSystemId==LVL1MUONIF::Lvl1MuCTPIInputPhase1::idSideA())?(1):(0);
163 int tmpsector = sectorId;
165 unsigned int sectorAddress = (tmpside) + (tmpsector<<1) + (tmptype<<6);
166 for (unsigned int icand=0;
168 if(sldata.pt(icand)<0)continue;
169 int roi = sldata.roi(icand);
170 unsigned long int roiWord = (roi<<2)+(sectorAddress<<14);
171 LVL1::TrigT1MuonRecRoiData roiData;
172 if( !m_recTGCRoiTool->roiData(roiWord,roiData).isSuccess() )continue;
173 TVector3 roiPos;
174 roiPos.SetPtEtaPhi(10,roiData.eta(),roiData.phi());
175 if( std::abs(roiPos.Eta()) < 1.3 ) continue; // only NSW region
176 ATH_MSG_DEBUG("RoI pT=" << sldata.pt(icand)
177 << " roiEta=" << roiPos.Eta()
178 << " roiPhi=" << roiPos.Phi()
179 << " flagF=" << sldata.bw2or3(icand)
180 << " flagC=" << sldata.innercoin(icand)
181 << " flagH=" << sldata.goodmf(icand) );
182 bool matched = !m_nswVetoMode.value();
183 double deltaEtaCut=0,deltaPhiCut=0,deltaThetaCut=0;
184 if( std::abs(roiPos.Eta()) < m_etaBoundary1.value() ){
185 deltaEtaCut=m_deltaEtaCut1.value();
186 deltaPhiCut=m_deltaPhiCut1.value();
187 deltaThetaCut=m_deltaThetaCut1.value();
188 }else if( std::abs(roiPos.Eta()) > m_etaBoundary2.value() ){
189 deltaEtaCut=m_deltaEtaCut2.value();
190 deltaPhiCut=m_deltaPhiCut2.value();
191 deltaThetaCut=m_deltaThetaCut2.value();
192 }else{
193 matched = true;
194 }
195 for(const auto seg : muSegDataColl){
196 TVector3 segPos(seg->x(),seg->y(),seg->z());
197 TVector3 segVec(seg->px(),seg->py(),seg->pz());
198 float deltaEta = std::abs( segPos.Eta() - roiPos.Eta() );
199 float deltaPhi = std::abs( segPos.DeltaPhi( roiPos ) );
200 float deltaTheta = std::abs( segVec.Theta() - segPos.Theta() );
201 bool tmpmatched = (deltaEta < deltaEtaCut && deltaPhi < deltaPhiCut && deltaTheta < deltaThetaCut);
202 ATH_MSG_DEBUG(" matched=" << tmpmatched
203 << " RoI pT=" << sldata.pt(icand)
204 << " roiEta=" << roiPos.Eta()
205 << " roiPhi=" << roiPos.Phi()
206 << " segEta=" << segPos.Eta()
207 << " segPhi=" << segPos.Phi()
208 << " segEtaVec=" << segVec.Eta()
209 << " segPhiVec=" << segVec.Phi()
210 << " chi2=" << seg->chiSquared()
211 << " ndof=" << seg->numberDoF()
212 << " sector=" << seg->sector()
213 << " etaIndex=" << seg->etaIndex()
214 << " technology=" << Muon::MuonStationIndex::technologyName(seg->technology())
215 << " nPrecisionHits=" << seg->nPrecisionHits()
216 << " nPhiLayers=" << seg->nPhiLayers()
217 << " nTrigEtaLayers=" << seg->nTrigEtaLayers()
218 << " deltaEta=" << deltaEta
219 << " deltaPhi=" << deltaPhi
220 << " deltaTheta=" << deltaTheta);
221 matched |= tmpmatched;
222 }
223 sldata.innercoin(icand,matched);
224 }
225 }
Scalar deltaPhi(const MatrixBase< Derived > &vec) const
#define ATH_MSG_DEBUG(x)
const std::string & technologyName(TechnologyIndex index)
convert LayerIndex into a string
double deltaEta(const I4Momentum &p1, const I4Momentum &p2)
Computes efficiently .
Definition P4Helpers.h:66

◆ updateVHKA()

void AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::updateVHKA ( Gaudi::Details::PropertyBase & )
inlineinherited

Definition at line 308 of file AthCommonDataStore.h.

308 {
309 // debug() << "updateVHKA for property " << p.name() << " " << p.toString()
310 // << " size: " << m_vhka.size() << endmsg;
311 for (auto &a : m_vhka) {
313 for (auto k : keys) {
314 k->setOwner(this);
315 }
316 }
317 }

Member Data Documentation

◆ m_deltaEtaCut1

DoubleProperty LVL1TGCTrigger::TGCOutputModifier::m_deltaEtaCut1 {this,"DeltaEtaCut1", 0.09,"Delta eta cut for MuonSegment and RoI position in low-eta region"}
private

Definition at line 55 of file TGCOutputModifier.h.

55{this,"DeltaEtaCut1", 0.09,"Delta eta cut for MuonSegment and RoI position in low-eta region"};

◆ m_deltaEtaCut2

DoubleProperty LVL1TGCTrigger::TGCOutputModifier::m_deltaEtaCut2 {this,"DeltaEtaCut2", 0.16,"Delta eta cut for MuonSegment and RoI position in high-eta region"}
private

Definition at line 58 of file TGCOutputModifier.h.

58{this,"DeltaEtaCut2", 0.16,"Delta eta cut for MuonSegment and RoI position in high-eta region"};

◆ m_deltaPhiCut1

DoubleProperty LVL1TGCTrigger::TGCOutputModifier::m_deltaPhiCut1 {this,"DeltaPhiCut1", 0.16,"Delta phi cut for MuonSegment and RoI position in low-eta region"}
private

Definition at line 56 of file TGCOutputModifier.h.

56{this,"DeltaPhiCut1", 0.16,"Delta phi cut for MuonSegment and RoI position in low-eta region"};

◆ m_deltaPhiCut2

DoubleProperty LVL1TGCTrigger::TGCOutputModifier::m_deltaPhiCut2 {this,"DeltaPhiCut2", 0.19,"Delta phi cut for MuonSegment and RoI position in high-eta region"}
private

Definition at line 59 of file TGCOutputModifier.h.

59{this,"DeltaPhiCut2", 0.19,"Delta phi cut for MuonSegment and RoI position in high-eta region"};

◆ m_deltaThetaCut1

DoubleProperty LVL1TGCTrigger::TGCOutputModifier::m_deltaThetaCut1 {this,"DeltaThetaCut1", 0.008,"Delta theta cut for MuonSegment in low-eta region"}
private

Definition at line 54 of file TGCOutputModifier.h.

54{this,"DeltaThetaCut1", 0.008,"Delta theta cut for MuonSegment in low-eta region"};

◆ m_deltaThetaCut2

DoubleProperty LVL1TGCTrigger::TGCOutputModifier::m_deltaThetaCut2 {this,"DeltaThetaCut2", 0.001,"Delta theta cut for MuonSegment in high-eta region"}
private

Definition at line 57 of file TGCOutputModifier.h.

57{this,"DeltaThetaCut2", 0.001,"Delta theta cut for MuonSegment in high-eta region"};

◆ m_detStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_detStore
privateinherited

Pointer to StoreGate (detector store by default)

Definition at line 393 of file AthCommonDataStore.h.

◆ m_emulateA

BooleanProperty LVL1TGCTrigger::TGCOutputModifier::m_emulateA {this,"EmulateA", true,"Emulate A-side"}
private

Definition at line 62 of file TGCOutputModifier.h.

62{this,"EmulateA", true,"Emulate A-side"};

◆ m_emulateC

BooleanProperty LVL1TGCTrigger::TGCOutputModifier::m_emulateC {this,"EmulateC", true,"Emulate C-side"}
private

Definition at line 63 of file TGCOutputModifier.h.

63{this,"EmulateC", true,"Emulate C-side"};

◆ m_etaBoundary1

DoubleProperty LVL1TGCTrigger::TGCOutputModifier::m_etaBoundary1 {this,"EtaBoundary1", 1.9,"Eta boundary where the cuts1 are applied"}
private

Definition at line 60 of file TGCOutputModifier.h.

60{this,"EtaBoundary1", 1.9,"Eta boundary where the cuts1 are applied"};

◆ m_etaBoundary2

DoubleProperty LVL1TGCTrigger::TGCOutputModifier::m_etaBoundary2 {this,"EtaBoundary2", 2.1,"Eta boundary where the cuts2 are applied"}
private

Definition at line 61 of file TGCOutputModifier.h.

61{this,"EtaBoundary2", 2.1,"Eta boundary where the cuts2 are applied"};

◆ m_evtStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_evtStore
privateinherited

Pointer to StoreGate (event store by default)

Definition at line 390 of file AthCommonDataStore.h.

◆ m_extendedExtraObjects

DataObjIDColl AthCommonReentrantAlgorithm< Gaudi::Algorithm >::m_extendedExtraObjects
privateinherited

Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.

Empty if no symlinks were found.

Definition at line 114 of file AthCommonReentrantAlgorithm.h.

◆ m_inputKey

SG::ReadHandleKey<LVL1MUONIF::Lvl1MuCTPIInputPhase1> LVL1TGCTrigger::TGCOutputModifier::m_inputKey {this,"InputMuctpiLocation","L1MuctpiStoreTGC","Input Tgc2Muctpi interface container"}
private

Definition at line 50 of file TGCOutputModifier.h.

50{this,"InputMuctpiLocation","L1MuctpiStoreTGC","Input Tgc2Muctpi interface container"};

◆ m_musegKey

SG::ReadHandleKey<xAOD::MuonSegmentContainer> LVL1TGCTrigger::TGCOutputModifier::m_musegKey {this,"MuonSegmentContainer","xaodMuonSegments","MuonSegmentContainer"}
private

Definition at line 53 of file TGCOutputModifier.h.

53{this,"MuonSegmentContainer","xaodMuonSegments","MuonSegmentContainer"};

◆ m_nswVetoMode

BooleanProperty LVL1TGCTrigger::TGCOutputModifier::m_nswVetoMode {this,"NSWVetoMode", true,"NSW veto mode or monitoring mode"}
private

Definition at line 64 of file TGCOutputModifier.h.

64{this,"NSWVetoMode", true,"NSW veto mode or monitoring mode"};

◆ m_outputKey

SG::WriteHandleKey<LVL1MUONIF::Lvl1MuCTPIInputPhase1> LVL1TGCTrigger::TGCOutputModifier::m_outputKey {this, "OutputMuctpiLocation", "L1MuctpiStoreTGCmod", "Output Tgc2Muctpi interface container"}
private

Definition at line 51 of file TGCOutputModifier.h.

51{this, "OutputMuctpiLocation", "L1MuctpiStoreTGCmod", "Output Tgc2Muctpi interface container"};

◆ m_recTGCRoiTool

ToolHandle<LVL1::ITrigT1MuonRecRoiTool> LVL1TGCTrigger::TGCOutputModifier::m_recTGCRoiTool {this,"TrigT1TGCRecRoiTool","LVL1::TrigT1TGCRecRoiTool","hoge"}
private

Definition at line 52 of file TGCOutputModifier.h.

52{this,"TrigT1TGCRecRoiTool","LVL1::TrigT1TGCRecRoiTool","hoge"};

◆ m_varHandleArraysDeclared

bool AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_varHandleArraysDeclared
privateinherited

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

std::vector<SG::VarHandleKeyArray*> AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_vhka
privateinherited

Definition at line 398 of file AthCommonDataStore.h.


The documentation for this class was generated from the following files: