|
ATLAS Offline Software
|
Go to the documentation of this file.
29 ATH_MSG_INFO(
"=======================================" );
45 ATH_MSG_INFO(
"=======================================" );
51 return StatusCode::SUCCESS;
59 ATH_MSG_ERROR(
"Cannot retrieve LVL1MUONIF::Lvl1MuCTPIInputPhase1");
60 return StatusCode::FAILURE;
64 std::vector<const xAOD::MuonSegment*> muSegDataColl;
69 return StatusCode::FAILURE;
72 for(
auto seg : *muSegContainer){
77 muSegDataColl.push_back(seg);
82 ATH_CHECK(wh_muctpiTgc.
record(std::make_unique<LVL1MUONIF::Lvl1MuCTPIInputPhase1>()));
87 LVL1MUONIF::Lvl1MuCTPIInputPhase1::MuonSystem::Forward};
88 for(
auto isys : tgc_systems){
90 for(
auto bcmu : *
data){
91 int bcid = bcmu.first;
92 auto muvec = bcmu.second;
93 for(
size_t i = 0 ;
i < muvec.size() ;
i++){
94 auto sectorData = muvec.at(
i).get();
101 size_t isub = (
i<numberOfSectors)
102 ?(LVL1MUONIF::Lvl1MuCTPIInputPhase1::MuonSubSystem::C_side):(LVL1MUONIF::Lvl1MuCTPIInputPhase1::MuonSubSystem::A_side);
103 size_t isec =
i % numberOfSectors;
109 Copy(sectorData,sldata);
110 Update(muSegDataColl,sldata,isys,isub,isec);
112 }
else if(isys==LVL1MUONIF::Lvl1MuCTPIInputPhase1::MuonSystem::Forward){
114 size_t isub = (
i<numberOfSectors)
115 ?(LVL1MUONIF::Lvl1MuCTPIInputPhase1::MuonSubSystem::C_side):(LVL1MUONIF::Lvl1MuCTPIInputPhase1::MuonSubSystem::A_side);
116 size_t isec =
i % numberOfSectors;
122 Copy(sectorData,sldata);
123 Update(muSegDataColl,sldata,isys,isub,isec);
132 return StatusCode::SUCCESS;
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));
158 size_t sectorId)
const
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);
174 roiPos.SetPtEtaPhi(10,roiData.
eta(),roiData.
phi());
175 if( std::abs(roiPos.Eta()) < 1.3 )
continue;
177 <<
" roiEta=" << roiPos.Eta()
178 <<
" roiPhi=" << roiPos.Phi()
179 <<
" flagF=" << sldata.
bw2or3(icand)
181 <<
" flagH=" << sldata.
goodmf(icand) );
183 double deltaEtaCut=0,deltaPhiCut=0,deltaThetaCut=0;
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 &&
203 deltaTheta < deltaThetaCut);
205 <<
" RoI pT=" << sldata.
pt(icand)
206 <<
" roiEta=" << roiPos.Eta()
207 <<
" roiPhi=" << roiPos.Phi()
208 <<
" segEta=" << segPos.Eta()
209 <<
" segPhi=" << segPos.Phi()
210 <<
" segEtaVec=" << segVec.Eta()
211 <<
" segPhiVec=" << segVec.Phi()
212 <<
" chi2=" << seg->chiSquared()
213 <<
" ndof=" << seg->numberDoF()
214 <<
" sector=" << seg->sector()
215 <<
" etaIndex=" << seg->etaIndex()
216 <<
" technology=" << seg->technology()
217 <<
" nPrecisionHits=" << seg->nPrecisionHits()
218 <<
" nPhiLayers=" << seg->nPhiLayers()
219 <<
" nTrigEtaLayers=" << seg->nTrigEtaLayers()
222 <<
" deltaTheta=" << deltaTheta);
char data[hepevt_bytes_allocation_ATLAS]
SG::WriteHandleKey< LVL1MUONIF::Lvl1MuCTPIInputPhase1 > m_outputKey
virtual ~TGCOutputModifier()
const_pointer_type cptr()
Dereference the pointer.
int innercoin(size_t id) const
setSAddress setEtaMS setDirPhiMS setDirZMS setBarrelRadius setEndcapAlpha setEndcapRadius setInterceptInner setEtaMap setEtaBin setIsTgcFailure setDeltaPt deltaPhi
void Update(const std::vector< const xAOD::MuonSegment * > &segs, LVL1MUONIF::Lvl1MuSectorLogicDataPhase1 &sldata, size_t systemAddress, size_t subSystemAddress, size_t sectorAddress) const
DoubleProperty m_deltaThetaCut2
BooleanProperty m_emulateC
int bw2or3(size_t id) const
BooleanProperty m_emulateA
const std::string & key() const
Return the StoreGate ID for the referenced object.
Class representing data from an endcap SL board.
DoubleProperty m_etaBoundary1
An algorithm that can be simultaneously executed in multiple threads.
void Copy(const LVL1MUONIF::Lvl1MuSectorLogicDataPhase1 *sldataOrg, LVL1MUONIF::Lvl1MuSectorLogicDataPhase1 &sldataNew) const
void set2candidatesInSector()
double deltaEta(const I4Momentum &p1, const I4Momentum &p2)
Computes efficiently .
::StatusCode StatusCode
StatusCode definition for legacy code.
pointer_type ptr()
Dereference the pointer.
DoubleProperty m_deltaThetaCut1
TGCOutputModifier(const std::string &name, ISvcLocator *pSvcLocator)
void clear2candidates(size_t id)
Base class for the data coming from one SL board.
int charge(size_t id) const
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
virtual bool isValid() override final
Can the handle be successfully dereferenced?
void set2candidates(size_t id)
BooleanProperty m_nswVetoMode
virtual StatusCode initialize() override
Regular Gaudi algorithm initialization function.
SG::ReadHandleKey< xAOD::MuonSegmentContainer > m_musegKey
SG::ReadHandleKey< LVL1MUONIF::Lvl1MuCTPIInputPhase1 > m_inputKey
DoubleProperty m_deltaEtaCut2
Class representing data from an forward SL board.
DoubleProperty m_deltaPhiCut1
setEventNumber setTimeStamp bcid
int goodmf(size_t id) const
DoubleProperty m_deltaEtaCut1
StatusCode record(std::unique_ptr< T > data)
Record a const object to the store.
#define ATH_MSG_WARNING(x)
bool is2candidates(size_t id) const
DoubleProperty m_etaBoundary2
ToolHandle< LVL1::ITrigT1MuonRecRoiTool > m_recTGCRoiTool
virtual StatusCode execute(const EventContext &eventContext) const override
Regular Gaudi algorithm execute function.
void clear2candidatesInSector()
DoubleProperty m_deltaPhiCut2
bool is2candidatesInSector() const