|
ATLAS Offline Software
|
#include <TgcDataPreparator.h>
|
| TgcDataPreparator (const std::string &type, const std::string &name, const IInterface *parent) |
|
virtual StatusCode | initialize () override |
|
StatusCode | prepareData (const LVL1::RecMuonRoI *p_roi, TrigL2MuonSA::TgcHits &tgcHits) const |
|
StatusCode | prepareData (const xAOD::MuonRoI *p_roi, TrigL2MuonSA::TgcHits &tgcHits) const |
|
void | setOptions (const TrigL2MuonSA::TgcDataPreparatorOptions &options) |
|
void | setRoIBasedDataAccess (bool use_RoIBasedDataAccess) |
|
ServiceHandle< StoreGateSvc > & | evtStore () |
| The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
const ServiceHandle< StoreGateSvc > & | evtStore () const |
| The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
const ServiceHandle< StoreGateSvc > & | detStore () const |
| The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
virtual StatusCode | sysInitialize () override |
| Perform system initialization for an algorithm. More...
|
|
virtual StatusCode | sysStart () override |
| Handle START transition. More...
|
|
virtual std::vector< Gaudi::DataHandle * > | inputHandles () const override |
| Return this algorithm's input handles. More...
|
|
virtual std::vector< Gaudi::DataHandle * > | outputHandles () const override |
| Return this algorithm's output handles. More...
|
|
Gaudi::Details::PropertyBase & | declareProperty (Gaudi::Property< T > &t) |
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleKey &hndl, const std::string &doc, const SG::VarHandleKeyType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleBase &hndl, const std::string &doc, const SG::VarHandleType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleKeyArray &hndArr, const std::string &doc, const SG::VarHandleKeyArrayType &) |
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, T &property, const std::string &doc, const SG::NotHandleType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, T &property, const std::string &doc="none") |
| Declare a new Gaudi property. More...
|
|
void | updateVHKA (Gaudi::Details::PropertyBase &) |
|
MsgStream & | msg () const |
|
MsgStream & | msg (const MSG::Level lvl) const |
|
bool | msgLvl (const MSG::Level lvl) const |
|
Definition at line 29 of file TgcDataPreparator.h.
◆ StoreGateSvc_t
◆ TgcDataPreparator()
TrigL2MuonSA::TgcDataPreparator::TgcDataPreparator |
( |
const std::string & |
type, |
|
|
const std::string & |
name, |
|
|
const IInterface * |
parent |
|
) |
| |
◆ declareGaudiProperty() [1/4]
specialization for handling Gaudi::Property<SG::VarHandleKeyArray>
Definition at line 170 of file AthCommonDataStore.h.
175 hndl.documentation());
◆ declareGaudiProperty() [2/4]
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition at line 156 of file AthCommonDataStore.h.
161 hndl.documentation());
◆ declareGaudiProperty() [3/4]
specialization for handling Gaudi::Property<SG::VarHandleBase>
Definition at line 184 of file AthCommonDataStore.h.
189 hndl.documentation());
◆ declareGaudiProperty() [4/4]
◆ declareProperty() [1/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
hndl | Object holding the property value. |
doc | Documentation string for the property. |
This is the version for types that derive from SG::VarHandleBase
. The property value object is put on the input and output lists as appropriate; then we forward to the base class.
Definition at line 245 of file AthCommonDataStore.h.
250 this->declare(hndl.
vhKey());
251 hndl.
vhKey().setOwner(
this);
253 return PBASE::declareProperty(
name,hndl,
doc);
◆ declareProperty() [2/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
hndl | Object holding the property value. |
doc | Documentation string for the property. |
This is the version for types that derive from SG::VarHandleKey
. The property value object is put on the input and output lists as appropriate; then we forward to the base class.
Definition at line 221 of file AthCommonDataStore.h.
229 return PBASE::declareProperty(
name,hndl,
doc);
◆ declareProperty() [3/6]
◆ declareProperty() [4/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
property | Object holding the property value. |
doc | Documentation string for the property. |
This is the generic version, for types that do not derive from SG::VarHandleKey
. It just forwards to the base class version of declareProperty
.
Definition at line 333 of file AthCommonDataStore.h.
338 return PBASE::declareProperty(
name, property,
doc);
◆ declareProperty() [5/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
property | Object holding the property value. |
doc | Documentation string for the property. |
This dispatches to either the generic declareProperty
or the one for VarHandle/Key/KeyArray.
Definition at line 352 of file AthCommonDataStore.h.
◆ declareProperty() [6/6]
◆ detStore()
◆ evtStore() [1/2]
◆ evtStore() [2/2]
◆ extraDeps_update_handler()
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
◆ initialize()
StatusCode TrigL2MuonSA::TgcDataPreparator::initialize |
( |
| ) |
|
|
overridevirtual |
◆ inputHandles()
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.
◆ msg() [1/2]
◆ msg() [2/2]
◆ msgLvl()
◆ outputHandles()
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.
◆ prepareData() [1/2]
Definition at line 35 of file TgcDataPreparator.cxx.
38 float roi_eta = p_roi->
eta();
39 float roi_phi = p_roi->
phi();
40 if (roi_phi < 0) roi_phi += 2.0 *
M_PI;
58 tgcPrepContainer = tgcContainerHandle.cptr();
59 if (!tgcContainerHandle.isValid()) {
61 return StatusCode::FAILURE;
67 float min_dphi_wire=1000.;
68 float second_dphi_wire=1000.;
69 std::vector<float> ov_dphi;
78 if (stationNumWi==-1) stationNumWi=3;
79 if (stationNumWi<3 && std::abs(prepDataWi.
globalPosition().eta() - roi_eta) < mid_eta_test ) {
82 for (
unsigned int ov=0;
ov<ov_dphi.size();
ov++)
83 if (std::abs(dphi-ov_dphi[
ov])<1
e-5) overlap=
true;
84 if (overlap)
continue;
85 ov_dphi.push_back(dphi);
86 if (dphi<second_dphi_wire){
87 second_dphi_wire=dphi;
89 if (dphi<min_dphi_wire) {
90 second_dphi_wire=min_dphi_wire;
100 int num_second_hits=0;
104 if( !chit )
continue;
108 if (stationNumHit==-1) stationNumHit=3;
109 if (stationNumHit<3 && std::abs(prepDataHit.
globalPosition().eta() - roi_eta) < mid_eta_test ) {
111 if (std::abs(dphi-min_dphi_wire)<1
e-5) num_min_hits++;
112 if (std::abs(dphi-second_dphi_wire)<1
e-5) num_second_hits++;
118 float dphi_wire=min_dphi_wire;
119 bool useDefault=
false;
120 if (num_min_hits<5) {
121 if (num_second_hits>5) dphi_wire=second_dphi_wire;
122 else useDefault=
true;
131 bool isInRoad =
false;
133 if (stationNum==-1) stationNum=3;
135 double dphi = std::abs(prepData.
globalPosition().phi() - roi_phi);
136 if( dphi >
M_PI*2 ) dphi = dphi -
M_PI*2;
137 if( dphi >
M_PI ) dphi =
M_PI*2 - dphi;
139 if ( stationNum < 3 && dphi < mid_phi_test ) { isInRoad =
true; }
140 else if( stationNum == 3 && dphi < inn_phi_test ) { isInRoad =
true; }
145 if ( stationNum < 3 && std::abs(prepData.
globalPosition().eta() - roi_eta) < mid_eta_test ) {
146 if (useDefault) isInRoad =
true;
147 else if (std::abs(dphi-dphi_wire)<1
e-5) isInRoad =
true;
149 else if( stationNum == 3 && std::abs(prepData.
globalPosition().eta() - roi_eta) < inn_eta_test ) { isInRoad =
true; }
151 if( ! isInRoad )
continue;
163 lutDigit.
sta = stationNum;
175 tgcHits.push_back(lutDigit);
180 return StatusCode::SUCCESS;
◆ prepareData() [2/2]
Definition at line 186 of file TgcDataPreparator.cxx.
189 float roi_eta = p_roi->
eta();
190 float roi_phi = p_roi->
phi();
191 if (roi_phi < 0) roi_phi += 2.0 *
M_PI;
209 tgcPrepContainer = tgcContainerHandle.cptr();
210 if (!tgcContainerHandle.isValid()) {
212 return StatusCode::FAILURE;
218 float min_dphi_wire=1000.;
219 float second_dphi_wire=1000.;
220 std::vector<float> ov_dphi;
229 if (stationNumWi==-1) stationNumWi=3;
230 if (stationNumWi<3 && std::abs(prepDataWi.
globalPosition().eta() - roi_eta) < mid_eta_test ) {
233 for (
unsigned int ov=0;
ov<ov_dphi.size();
ov++)
234 if (std::abs(dphi-ov_dphi[
ov])<1
e-5) overlap=
true;
235 if (overlap)
continue;
236 ov_dphi.push_back(dphi);
237 if (dphi<second_dphi_wire){
238 second_dphi_wire=dphi;
240 if (dphi<min_dphi_wire) {
241 second_dphi_wire=min_dphi_wire;
251 int num_second_hits=0;
255 if( !chit )
continue;
259 if (stationNumHit==-1) stationNumHit=3;
260 if (stationNumHit<3 && std::abs(prepDataHit.
globalPosition().eta() - roi_eta) < mid_eta_test ) {
262 if (std::abs(dphi-min_dphi_wire)<1
e-5) num_min_hits++;
263 if (std::abs(dphi-second_dphi_wire)<1
e-5) num_second_hits++;
269 float dphi_wire=min_dphi_wire;
270 bool useDefault=
false;
271 if (num_min_hits<5) {
272 if (num_second_hits>5) dphi_wire=second_dphi_wire;
273 else useDefault=
true;
282 bool isInRoad =
false;
284 if (stationNum==-1) stationNum=3;
286 double dphi = std::abs(prepData.
globalPosition().phi() - roi_phi);
287 if( dphi >
M_PI*2 ) dphi = dphi -
M_PI*2;
288 if( dphi >
M_PI ) dphi =
M_PI*2 - dphi;
290 if ( stationNum < 3 && dphi < mid_phi_test ) { isInRoad =
true; }
291 else if( stationNum == 3 && dphi < inn_phi_test ) { isInRoad =
true; }
296 if ( stationNum < 3 && std::abs(prepData.
globalPosition().eta() - roi_eta) < mid_eta_test ) {
297 if (useDefault) isInRoad =
true;
298 else if (std::abs(dphi-dphi_wire)<1
e-5) isInRoad =
true;
300 else if( stationNum == 3 && std::abs(prepData.
globalPosition().eta() - roi_eta) < inn_eta_test ) { isInRoad =
true; }
302 if( ! isInRoad )
continue;
314 lutDigit.
sta = stationNum;
326 tgcHits.push_back(lutDigit);
331 return StatusCode::SUCCESS;
◆ renounce()
◆ renounceArray()
◆ setOptions()
◆ setRoIBasedDataAccess()
void TrigL2MuonSA::TgcDataPreparator::setRoIBasedDataAccess |
( |
bool |
use_RoIBasedDataAccess | ) |
|
|
inline |
◆ sysInitialize()
◆ sysStart()
Handle START transition.
We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.
◆ updateVHKA()
◆ m_detStore
◆ m_evtStore
◆ m_idHelperSvc
◆ m_options
◆ m_recMuonRoIUtils
◆ m_tgcContainerKey
Initial value:{
this, "TGCPrepDataContainer", "TGC_Measurements", "Name of the TGCContainer to read in"}
Definition at line 68 of file TgcDataPreparator.h.
◆ m_use_RoIBasedDataAccess
bool TrigL2MuonSA::TgcDataPreparator::m_use_RoIBasedDataAccess = false |
|
private |
◆ m_varHandleArraysDeclared
◆ m_vhka
The documentation for this class was generated from the following files:
Template for Muon PRD containers (which are basically collections of MuonPrepDataCollections).
bool m_use_RoIBasedDataAccess
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
float eta() const
The pseudorapidity ( ) of the muon candidate.
std::vector< SG::VarHandleKeyArray * > m_vhka
virtual const MuonGM::TgcReadoutElement * detectorElement() const override final
Returns the detector element corresponding to this PRD The pointer will be zero if the det el is not ...
virtual double eta() const
returns eta coord of ROI
double deltaPhiAtInner() const
virtual void setOwner(IDataHandleHolder *o)=0
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())
const TgcDataPreparatorRoadParameters & roadParameters() const
virtual size_t numberOfCollections() const override final
return number of collections
double stripWidth(int gasGap, int strip) const
Returns the width of a given strip in the gasGap i.
double deltaEtaAtMiddleForLowPt() const
A TgcReadoutElement corresponds to a single TGC chamber; therefore typically a TGC station contains s...
SG::ReadHandleKey< Muon::TgcPrepDataContainer > m_tgcContainerKey
double gangRadialLength(int gasGap, int gang) const
Returns the length of the wire gang along the radial direction [pitch x N_{wire}^{gang}].
double deltaEtaAtMiddleForHighPt() const
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
double deltaEtaAtInnerForLowPt() const
Template to hold collections of MuonPrepRawData objects.
double deltaPhiAtMiddle() const
virtual void renounce()=0
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
virtual double phi() const
returns phi coord of ROI
Identifier identify() const
return the identifier
TrigL2MuonSA::TgcDataPreparatorOptions m_options
double deltaEtaAtInnerForHighPt() const
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
TrigL2MuonSA::RecMuonRoIUtils m_recMuonRoIUtils
Class to represent TGC measurements.
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
virtual const Amg::Vector3D & globalPosition() const override final
Returns the global position.
bool isLowPt(const LVL1::RecMuonRoI *p_roi) const
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
float phi() const
The azimuthal angle ( ) of the muon candidate.