ATLAS Offline Software
Loading...
Searching...
No Matches
MuonIdCutTool Class Reference

Implementation of an IMuonIdCutTool. More...

#include <MuonIdCutTool.h>

Inheritance diagram for MuonIdCutTool:
Collaboration diagram for MuonIdCutTool:

Public Member Functions

 MuonIdCutTool (const std::string &, const std::string &, const IInterface *)
 default AlgTool constructor
virtual ~MuonIdCutTool ()=default
 destructor
StatusCode initialize ()
 initialize method, method taken from bass-class AlgTool
virtual bool isCut (Identifier ID) const
virtual bool isCut (MuonCalib::MuonFixedId id) 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 sysInitialize () override
 Perform system initialization for an algorithm.
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

Static Public Member Functions

static const InterfaceID & interfaceID ()
 access to tool interface

Public Attributes

bool m_cutStationRegion
bool m_cutStationName
bool m_cutSubstation
bool m_cutEE
bool m_cutEta
bool m_cutPhi
std::vector< std::string > m_EELList
std::vector< int > m_mdtRegionList
std::vector< int > m_cscRegionList
std::vector< int > m_rpcRegionList
std::vector< int > m_tgcRegionList
std::vector< int > m_mdtStationNameList
std::vector< int > m_cscStationNameList
std::vector< int > m_rpcStationNameList
std::vector< int > m_tgcStationNameList
std::vector< int > m_mdtMultilayerList
std::vector< int > m_rpcDoubletRList
std::vector< int > m_rpcGasGapList
std::vector< int > m_tgcGasGapList
std::vector< int > m_mdtBarEtaList
std::vector< int > m_mdtEndEtaList
std::vector< int > m_mdtSectorList
std::vector< int > m_rpcEtaList
std::vector< int > m_rpcSectorList
std::vector< int > m_cscEtaList
std::vector< int > m_cscSectorList
std::vector< int > m_tgcEtaList
std::vector< int > m_tgcEndPhiList
std::vector< int > m_tgcForPhiList

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

Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey>

Static Private Member Functions

static int FindSector (unsigned int staName, unsigned int staPhi)

Private Attributes

ToolHandle< MuonCalib::IIdToFixedIdToolm_idToFixedIdTool {this,"IdToFixedIdTool","MuonCalib::IdToFixedIdTool","tool to assist with Identifiers"}
ServiceHandle< Muon::IMuonIdHelperSvcm_idHelperSvc {this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"}
std::vector< int > m_EELeta
std::vector< int > m_EELsector
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

Implementation of an IMuonIdCutTool.

For more details look at the mainpage of this package.

Definition at line 28 of file MuonIdCutTool.h.

Member Typedef Documentation

◆ StoreGateSvc_t

typedef ServiceHandle<StoreGateSvc> AthCommonDataStore< AthCommonMsg< AlgTool > >::StoreGateSvc_t
privateinherited

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ MuonIdCutTool()

MuonIdCutTool::MuonIdCutTool ( const std::string & t,
const std::string & n,
const IInterface * p )

default AlgTool constructor

Definition at line 13 of file MuonIdCutTool.cxx.

13 :
14 AthAlgTool(t,n,p) {
15 declareInterface<IMuonIdCutTool>(this);
16
17 declareProperty("CutStationRegion",m_cutStationRegion = false ); //0 inner, 1 extra(BEE), 2 middle, 3 outer
18 declareProperty("CutStationName",m_cutStationName = true ); //integer which maps to BIL etc.
19 declareProperty("CutSubstation",m_cutSubstation = false ); //do you want to cut on gas-gap or multilayer
20 declareProperty("CutEta",m_cutEta = false );
21 declareProperty("CutPhi",m_cutPhi = false );
22 declareProperty("CutEE",m_cutEE = false ); //cut all EES, leave some EEL
23
24
25 declareProperty("CutMdtRegionList",m_mdtRegionList );
26 declareProperty("CutCscRegionList",m_cscRegionList );
27 declareProperty("CutRpcRegionList",m_rpcRegionList );
28 declareProperty("CutTgcRegionList",m_tgcRegionList );
29 declareProperty("CutMdtStationNameList",m_mdtStationNameList );//cut these station names
30 declareProperty("CutCscStationNameList",m_cscStationNameList );
31 declareProperty("CutRpcStationNameList",m_rpcStationNameList );
32 declareProperty("CutTgcStationNameList",m_tgcStationNameList );
33 declareProperty("CutMdtMultilayerList",m_mdtMultilayerList );//entries in these lists are matched
34 declareProperty("CutRpcDoubletRList",m_rpcDoubletRList );//to entries in the stationName list.
35 declareProperty("CutRpcGasGapList",m_rpcGasGapList );//the size of each list should be the same
36 declareProperty("CutTgcGasGapList",m_tgcGasGapList );
37 declareProperty("EELList",m_EELList ); //eta/sector to keep for EEL
38
39
40 //note that the following properties are the eta/phi sectors too keep
41 declareProperty("MdtBarrelEtaList",m_mdtBarEtaList );// -8 to 8, 0 would refer to eta = 0
42 declareProperty("MdtEndcapEtaList",m_mdtEndEtaList );// -6 to 6, abs value increases with |R|
43 declareProperty("MdtSectorList",m_mdtSectorList );// 1 to 8 for the whole detector, 1 points in +x
44
45 declareProperty("RpcEtaList",m_rpcEtaList );// -8 to 8, 0 would refer to eta = 0
46 declareProperty("RpcSectorList",m_rpcSectorList );// 1 to 8 for the whole detector, 1 points in +x
47
48 declareProperty("CscEtaList",m_cscEtaList );// 1 is the only value
49 declareProperty("CscSectorList",m_cscSectorList );// 1 to 8 for the whole detector, 1 points in +x
50
51 //tgcs go by a different eta/phi numbering scheme and so must be cut separately
52 declareProperty("TgcEtaList",m_tgcEtaList );// -5 to 5, [roughly] matches the endcap mdt naming scheme
53 declareProperty("TgcEndcapPhiList",m_tgcEndPhiList );// 1 to 48 endcap
54 declareProperty("TgcForwardPhiList",m_tgcForPhiList );// 1 to 24 forward
55
56
57 //The cuts are independent, but if you have both cutEta = true and cutPhi = true make
58 //sure to set either both eta and phi or neither lists for a given technology, otherwise, the program will
59 //cut the whole technology
60
61}
AthAlgTool()
Default constructor:
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
std::vector< int > m_mdtMultilayerList
std::vector< int > m_tgcRegionList
std::vector< int > m_tgcStationNameList
std::vector< int > m_rpcDoubletRList
std::vector< int > m_cscStationNameList
std::vector< int > m_tgcEndPhiList
std::vector< int > m_mdtEndEtaList
std::vector< int > m_rpcRegionList
std::vector< int > m_mdtStationNameList
std::vector< std::string > m_EELList
std::vector< int > m_rpcGasGapList
bool m_cutStationRegion
std::vector< int > m_tgcForPhiList
std::vector< int > m_cscEtaList
std::vector< int > m_mdtBarEtaList
std::vector< int > m_mdtSectorList
std::vector< int > m_tgcEtaList
std::vector< int > m_cscSectorList
std::vector< int > m_rpcSectorList
std::vector< int > m_rpcEtaList
std::vector< int > m_mdtRegionList
std::vector< int > m_tgcGasGapList
std::vector< int > m_rpcStationNameList
std::vector< int > m_cscRegionList

◆ ~MuonIdCutTool()

virtual MuonIdCutTool::~MuonIdCutTool ( )
virtualdefault

destructor

Member Function Documentation

◆ declareGaudiProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< AlgTool > >::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 }

◆ declareProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< AlgTool > >::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< AlgTool > >::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< AlgTool > >::evtStore ( )
inlineinherited

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

Definition at line 85 of file AthCommonDataStore.h.

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::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

◆ FindSector()

int MuonIdCutTool::FindSector ( unsigned int staName,
unsigned int staPhi )
staticprivate

Definition at line 365 of file MuonIdCutTool.cxx.

365 {
366
367 int sector=-1;
368
369 //This strange looking array specifies whether the station is large or small
370 //999 specifies a number not used, or a tgc
371 //station name maps to BIL,EOS,etc
372 int isStationNameLarge[53] = {1,0,1,0,1,0,0,1,0,0,0,0,999,1,1,0,999,1,0,999,1,0,999,999,999,999,999,999,999,999,999,999,999,999,999,999,999,999,999,999,999,999,999,999,999,999,999,999,999,0,0,1,1};
373
374 if (staName < 53){
375 sector = staPhi*2 - isStationNameLarge[staName];
376 }
377
378 return sector;
379
380}

◆ initialize()

StatusCode MuonIdCutTool::initialize ( )

initialize method, method taken from bass-class AlgTool

Definition at line 63 of file MuonIdCutTool.cxx.

63 {
64 ATH_CHECK( m_idToFixedIdTool.retrieve() );
65 ATH_CHECK( m_idHelperSvc.retrieve() );
66
68 ATH_MSG_WARNING( "MuonIdCutTool invoked with no cuts performed" );
69 }
70
71 //interpret EEL cuts
72 int max = m_EELList.size();
73
74 for(int i=0;i<max;i++){
75 std::string_view cut = m_EELList[i];
76 ATH_MSG_DEBUG( "EEL String: " << cut );
77 size_t length = cut.size();
78 size_t loc = cut.find('/');
79 if (loc!=std::string::npos){
80 std::string_view etaString = cut.substr(0,loc);
81 std::string_view sectorString = cut.substr(loc+1,length-loc-1);
82 int eta = CxxUtils::atoi(etaString);
83 int sector = CxxUtils::atoi(sectorString);
84
85 ATH_MSG_DEBUG( "EEL eta/phi string: "<< etaString << " " << sectorString );
86 ATH_MSG_DEBUG( "EEL eta/phi int: "<< eta << " " << sector );
87
88
89 if(std::abs(eta) > 0 && std::abs(eta) < 3 && sector > 0 && sector < 17){
90 m_EELeta.push_back(eta);
91 m_EELsector.push_back(sector);
92
93 } else {
94 ATH_MSG_WARNING( "Improper EEL Cut Selected, this cut is skipped" );
95 }
96
97 } else {
98 ATH_MSG_WARNING( "Improperly formated EEL Cut Selected, this cut is skipped" );
99 }
100 }
101
102 for(unsigned int i=0; i < m_EELeta.size();i++){
103 ATH_MSG_DEBUG( "Eta: " << m_EELeta[i] << " Sector: " << m_EELsector[i] );
104 }
105
106 return StatusCode::SUCCESS;
107}
Scalar eta() const
pseudorapidity method
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_WARNING(x)
#define ATH_MSG_DEBUG(x)
double length(const pvec &v)
#define max(a, b)
Definition cfImp.cxx:41
std::vector< int > m_EELsector
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
ToolHandle< MuonCalib::IIdToFixedIdTool > m_idToFixedIdTool
std::vector< int > m_EELeta
cut
This script demonstrates how to call a C++ class from Python Also how to use PyROOT is shown.
int atoi(std::string_view str)
Helper functions to unpack numbers decoded in string into integers and doubles The strings are requir...

◆ inputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< AlgTool > >::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.

◆ interfaceID()

const InterfaceID & IMuonIdCutTool::interfaceID ( )
inlinestaticinherited

access to tool interface

Definition at line 34 of file IMuonIdCutTool.h.

35{
36 return IID_IMuonIdCutTool;
37}
static const InterfaceID IID_IMuonIdCutTool("IMuonIdCutTool", 1, 0)

◆ isCut() [1/2]

bool MuonIdCutTool::isCut ( Identifier ID) const
virtual

Implements IMuonIdCutTool.

Definition at line 109 of file MuonIdCutTool.cxx.

109 { //false indicates all cuts are passed
110
111 //some checks to see if the tool is configured in a state that makes sense
113 ATH_MSG_WARNING( "MuonIdCutTool invoked with both Region Cuts and Station name cuts.Are you sure this is what you want?");
114 }
115
116 if (m_cutSubstation){
117 if ((m_mdtMultilayerList.size() != m_mdtStationNameList.size()) || (m_tgcGasGapList.size() != m_tgcStationNameList.size()) ){
118 ATH_MSG_WARNING( "Station and Substation cuts lists should match in length, no cut perfomed" );
119 return false;
120 }
121 else if ((m_rpcDoubletRList.size() != m_rpcStationNameList.size()) || ((m_rpcGasGapList.size() != m_rpcStationNameList.size()) && !m_rpcGasGapList.empty() )){
122 ATH_MSG_WARNING( "Station and Substation cuts lists should match in length, no cut perfomed" );
123 return false;
124 }
125 }
126
127 std::vector<int> cutList; //this will chose the correct cut list (StationName or Station Region)
128
129 unsigned int staName = m_idHelperSvc->stationName(ID);
130 unsigned int staPhi = m_idHelperSvc->stationPhi(ID);
131
132 int sector = FindSector(staName,staPhi);
133
134 //Routine for cutting all EES and some EEL chambers
135 if(m_cutEE && staName == 15) return true;
136 if(m_cutEE && staName == 14){
137 int listSize = m_EELeta.size();
138 for (int i=0;i<listSize;i++){
139 if(m_EELeta[i]==(m_idHelperSvc->stationEta(ID)) && m_EELsector[i]==sector) break;
140 if(i==(listSize-1)) return true; //if fails last entry, cut = true
141 }
142 }
143
144 //Routine for cutting on Station Region
145
146 if (m_cutStationRegion){
147 if (m_idHelperSvc->isMdt(ID)){
148 cutList = m_mdtRegionList;
149 }
150 else if (m_idHelperSvc->isCsc(ID)){
151 cutList = m_cscRegionList;
152 }
153 else if (m_idHelperSvc->isRpc(ID)){
154 cutList = m_rpcRegionList;
155 }
156 else if (m_idHelperSvc->isTgc(ID)){
157 cutList = m_tgcRegionList;
158 }
159 else{
160 ATH_MSG_ERROR( "Failure to determine technology type of ID#, returning false" );
161 return false;
162 }
163
164 int listSize = cutList.size();
165 for (int i=0; i<listSize;i++){
166 ATH_MSG_DEBUG( "Region " << m_idHelperSvc->stationRegion(ID)
167 << " compared with " << cutList[i] );
168 if( cutList[i] == m_idHelperSvc->stationRegion(ID)){
169 ATH_MSG_DEBUG( "Return True" );
170 return true;
171 }
172 }
173 ATH_MSG_DEBUG( "Passes Region Cut" );
174 }
175
176
177 //Routine for cutting on Station Name and optional sub-region cuts
178
179
180 if (m_cutStationName){
181 if (m_idHelperSvc->isMdt(ID)){
182 cutList = m_mdtStationNameList;
183 }
184 else if (m_idHelperSvc->isCsc(ID)){
185 cutList = m_cscStationNameList;
186 }
187 else if (m_idHelperSvc->isRpc(ID)){
188 cutList = m_rpcStationNameList;
189 }
190 else if (m_idHelperSvc->isTgc(ID)){
191 cutList = m_tgcStationNameList;
192 }
193 else{
194 ATH_MSG_ERROR( "Failure to determine technology type of ID#, returning false" );
195 return false;
196 }
197
198 int listSize = cutList.size();
199 for (int i=0; i<listSize;i++){
200 ATH_MSG_DEBUG( "Station Name " << m_idHelperSvc->stationName(ID) << " compared with "
201 <<cutList[i] );
202 if( cutList[i] == m_idHelperSvc->stationName(ID)){
203 if (!m_cutSubstation){
204 return true;
205 }
206
207 else { //proceed with more specific cuts
208
209 if (m_idHelperSvc->isMdt(ID)){
210 ATH_MSG_DEBUG( "MDT multilayer " <<m_idHelperSvc->mdtIdHelper().multilayer(ID)
211 << " compared with " << m_mdtMultilayerList[i] );
212 if(m_mdtMultilayerList[i] == m_idHelperSvc->mdtIdHelper().multilayer(ID))
213 return true;
214 }
215
216
217 else if (m_idHelperSvc->isRpc(ID)){
218 ATH_MSG_DEBUG( "RPC doublet R " <<m_idHelperSvc->rpcIdHelper().doubletR(ID)
219 << " compared with " << m_rpcDoubletRList[i] );
220 if( m_rpcDoubletRList[i] == m_idHelperSvc->rpcIdHelper().doubletR(ID) ){
221 if (m_rpcGasGapList.empty()){
222 return true;
223 }
224 else {
225 ATH_MSG_DEBUG( "RPC gasgap " <<m_idHelperSvc->rpcIdHelper().gasGap(ID)
226 << " compared with " << m_rpcGasGapList[i] );
227 if (m_rpcGasGapList[i] == m_idHelperSvc->rpcIdHelper().gasGap(ID))
228 return true;
229 }
230
231 }
232 }
233
234
235 else if (m_idHelperSvc->isTgc(ID)){
236 ATH_MSG_DEBUG( "TGC gasgap " <<m_idHelperSvc->tgcIdHelper().gasGap(ID)
237 << " compared with " << m_tgcGasGapList[i] );
238 if (m_tgcGasGapList[i] == m_idHelperSvc->tgcIdHelper().gasGap(ID))
239 return true;
240 }
241
242
243 } //end sub-region cuts
244 } //end if statement checking station name
245 } //end station name loop
246 } //end if m_cutStationName
247
248
249 //Routine for cutting on eta and phi
250 //this routine should always be last because its the only one that
251 //ever returns false
252
253 if (m_cutEta || m_cutPhi){
254
255 std::vector<int> genEtaList; //general eta list (can be tgc list)
256 std::vector<int> genPhiList; //general phi list (can be tgc list)
257 int etaListSize;
258 int phiListSize;
259 int phi; //this variable is the phi index for tgcs, the sector for everyone else
260 unsigned int staName = m_idHelperSvc->stationName(ID);
261 unsigned int staPhi = m_idHelperSvc->stationPhi(ID);
262 int sector = FindSector(staName,staPhi);
263 phi = sector;
264
265 ATH_MSG_DEBUG( "Phi Station is " << staPhi
266 << " and Station name is " << staName );
267
268 ATH_MSG_DEBUG( "Phi Sector is " << sector );
269
270 //Is it tgc?
271 if (m_idHelperSvc->isTgc(ID)){
272 //If no cuts specified, don't cut anything
273 if (m_tgcEtaList.empty() && m_tgcEndPhiList.empty() && m_tgcForPhiList.empty())
274 return false;
275 genEtaList = m_tgcEtaList;
276 phi = m_idHelperSvc->stationPhi(ID);
277 //Is it forward?
278 if (staName == 41 || staName == 43 || staName == 45 || staName == 47)
279 genPhiList = m_tgcForPhiList;
280 else
281 genPhiList = m_tgcEndPhiList;
282 }
283
284
285 //mdt?
286 else if(m_idHelperSvc->isMdt(ID)){
287 //If no cuts specified, don't cut anything
288 if (m_mdtSectorList.empty() && m_mdtEndEtaList.empty() && m_mdtBarEtaList.empty())
289 return false;
290 genPhiList = m_mdtSectorList;
291 if (m_idHelperSvc->isEndcap(ID)) {
292 genEtaList = m_mdtEndEtaList;
293 } else {
294 genEtaList = m_mdtBarEtaList;
295 }
296 }
297
298 //rpc?
299 else if(m_idHelperSvc->isRpc(ID)){
300 //If no cuts specified, don't cut anything
301 if (m_rpcSectorList.empty() && m_rpcEtaList.empty())
302 return false;
303 genPhiList = m_rpcSectorList;
304 genEtaList = m_rpcEtaList;
305 }
306
307 //csc?
308 else if(m_idHelperSvc->isCsc(ID)){
309 //If no cuts specified, don't cut anything
310 if (m_cscSectorList.empty() && m_cscEtaList.empty())
311 return false;
312 genPhiList = m_cscSectorList;
313 genEtaList = m_cscEtaList;
314 }
315
316 etaListSize = genEtaList.size();
317 phiListSize = genPhiList.size();
318
319 bool etapass = true;
320 bool phipass = true;
321
322 if(m_cutEta){
323 etapass = false;
324 for (int i=0; i<etaListSize;i++){
325 ATH_MSG_DEBUG( "Eta Station " << m_idHelperSvc->stationEta(ID)
326 << " compared with list to keep " << genEtaList[i] );
327 if( genEtaList[i] == m_idHelperSvc->stationEta(ID))
328 etapass = true;
329 }
330 }
331
332 if(m_cutPhi){
333 phipass = false;
334
335 for (int i=0; i<phiListSize;i++){
336 ATH_MSG_DEBUG( "Phi Station " << phi
337 << " compared with list to keep " << genPhiList[i] );
338 if( genPhiList[i] == phi)
339 phipass = true;
340 }
341 }
342
343 if (!etapass || !phipass) //if eta or phi fail it is cut
344 return true;
345
346 }
347
348
349
350
351 return false; //keep the event if none of the cuts removed the event
352}
Scalar phi() const
phi method
#define ATH_MSG_ERROR(x)
std::vector< Identifier > ID
static int FindSector(unsigned int staName, unsigned int staPhi)

◆ isCut() [2/2]

bool MuonIdCutTool::isCut ( MuonCalib::MuonFixedId id) const
virtual

Implements IMuonIdCutTool.

Definition at line 357 of file MuonIdCutTool.cxx.

357 {
358// std::cout << "testing if IdCuts called" << std::endl;
359Identifier ID = m_idToFixedIdTool->fixedIdToId(mfid);
360bool iscut = MuonIdCutTool::isCut(ID);
361return iscut;
362}
virtual bool isCut(Identifier ID) const

◆ msg()

MsgStream & AthCommonMsg< AlgTool >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

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

◆ msgLvl()

bool AthCommonMsg< AlgTool >::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< AlgTool > >::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< AlgTool > >::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< AlgTool > >::renounceArray ( SG::VarHandleKeyArray & handlesArray)
inlineprotectedinherited

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364 {
366 }

◆ sysInitialize()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysInitialize ( )
overridevirtualinherited

Perform system initialization for an algorithm.

We override this to declare all the elements of handle key arrays at the end of initialization. See comments on updateVHKA.

Reimplemented in asg::AsgMetadataTool, AthCheckedComponent< AthAlgTool >, AthCheckedComponent<::AthAlgTool >, and DerivationFramework::CfAthAlgTool.

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::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.

◆ updateVHKA()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::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 }
std::vector< SG::VarHandleKeyArray * > m_vhka

Member Data Documentation

◆ m_cscEtaList

std::vector<int> MuonIdCutTool::m_cscEtaList

Definition at line 72 of file MuonIdCutTool.h.

◆ m_cscRegionList

std::vector<int> MuonIdCutTool::m_cscRegionList

Definition at line 53 of file MuonIdCutTool.h.

◆ m_cscSectorList

std::vector<int> MuonIdCutTool::m_cscSectorList

Definition at line 73 of file MuonIdCutTool.h.

◆ m_cscStationNameList

std::vector<int> MuonIdCutTool::m_cscStationNameList

Definition at line 58 of file MuonIdCutTool.h.

◆ m_cutEE

bool MuonIdCutTool::m_cutEE

Definition at line 47 of file MuonIdCutTool.h.

◆ m_cutEta

bool MuonIdCutTool::m_cutEta

Definition at line 48 of file MuonIdCutTool.h.

◆ m_cutPhi

bool MuonIdCutTool::m_cutPhi

Definition at line 49 of file MuonIdCutTool.h.

◆ m_cutStationName

bool MuonIdCutTool::m_cutStationName

Definition at line 45 of file MuonIdCutTool.h.

◆ m_cutStationRegion

bool MuonIdCutTool::m_cutStationRegion

Definition at line 44 of file MuonIdCutTool.h.

◆ m_cutSubstation

bool MuonIdCutTool::m_cutSubstation

Definition at line 46 of file MuonIdCutTool.h.

◆ m_detStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
privateinherited

Pointer to StoreGate (detector store by default)

Definition at line 393 of file AthCommonDataStore.h.

◆ m_EELeta

std::vector<int> MuonIdCutTool::m_EELeta
private

Definition at line 87 of file MuonIdCutTool.h.

◆ m_EELList

std::vector<std::string> MuonIdCutTool::m_EELList

Definition at line 51 of file MuonIdCutTool.h.

◆ m_EELsector

std::vector<int> MuonIdCutTool::m_EELsector
private

Definition at line 88 of file MuonIdCutTool.h.

◆ m_evtStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_evtStore
privateinherited

Pointer to StoreGate (event store by default)

Definition at line 390 of file AthCommonDataStore.h.

◆ m_idHelperSvc

ServiceHandle<Muon::IMuonIdHelperSvc> MuonIdCutTool::m_idHelperSvc {this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"}
private

Definition at line 85 of file MuonIdCutTool.h.

85{this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"};

◆ m_idToFixedIdTool

ToolHandle<MuonCalib::IIdToFixedIdTool> MuonIdCutTool::m_idToFixedIdTool {this,"IdToFixedIdTool","MuonCalib::IdToFixedIdTool","tool to assist with Identifiers"}
private

Definition at line 83 of file MuonIdCutTool.h.

83{this,"IdToFixedIdTool","MuonCalib::IdToFixedIdTool","tool to assist with Identifiers"};

◆ m_mdtBarEtaList

std::vector<int> MuonIdCutTool::m_mdtBarEtaList

Definition at line 67 of file MuonIdCutTool.h.

◆ m_mdtEndEtaList

std::vector<int> MuonIdCutTool::m_mdtEndEtaList

Definition at line 68 of file MuonIdCutTool.h.

◆ m_mdtMultilayerList

std::vector<int> MuonIdCutTool::m_mdtMultilayerList

Definition at line 62 of file MuonIdCutTool.h.

◆ m_mdtRegionList

std::vector<int> MuonIdCutTool::m_mdtRegionList

Definition at line 52 of file MuonIdCutTool.h.

◆ m_mdtSectorList

std::vector<int> MuonIdCutTool::m_mdtSectorList

Definition at line 69 of file MuonIdCutTool.h.

◆ m_mdtStationNameList

std::vector<int> MuonIdCutTool::m_mdtStationNameList

Definition at line 57 of file MuonIdCutTool.h.

◆ m_rpcDoubletRList

std::vector<int> MuonIdCutTool::m_rpcDoubletRList

Definition at line 63 of file MuonIdCutTool.h.

◆ m_rpcEtaList

std::vector<int> MuonIdCutTool::m_rpcEtaList

Definition at line 70 of file MuonIdCutTool.h.

◆ m_rpcGasGapList

std::vector<int> MuonIdCutTool::m_rpcGasGapList

Definition at line 64 of file MuonIdCutTool.h.

◆ m_rpcRegionList

std::vector<int> MuonIdCutTool::m_rpcRegionList

Definition at line 54 of file MuonIdCutTool.h.

◆ m_rpcSectorList

std::vector<int> MuonIdCutTool::m_rpcSectorList

Definition at line 71 of file MuonIdCutTool.h.

◆ m_rpcStationNameList

std::vector<int> MuonIdCutTool::m_rpcStationNameList

Definition at line 59 of file MuonIdCutTool.h.

◆ m_tgcEndPhiList

std::vector<int> MuonIdCutTool::m_tgcEndPhiList

Definition at line 76 of file MuonIdCutTool.h.

◆ m_tgcEtaList

std::vector<int> MuonIdCutTool::m_tgcEtaList

Definition at line 75 of file MuonIdCutTool.h.

◆ m_tgcForPhiList

std::vector<int> MuonIdCutTool::m_tgcForPhiList

Definition at line 77 of file MuonIdCutTool.h.

◆ m_tgcGasGapList

std::vector<int> MuonIdCutTool::m_tgcGasGapList

Definition at line 65 of file MuonIdCutTool.h.

◆ m_tgcRegionList

std::vector<int> MuonIdCutTool::m_tgcRegionList

Definition at line 55 of file MuonIdCutTool.h.

◆ m_tgcStationNameList

std::vector<int> MuonIdCutTool::m_tgcStationNameList

Definition at line 60 of file MuonIdCutTool.h.

◆ m_varHandleArraysDeclared

bool AthCommonDataStore< AthCommonMsg< AlgTool > >::m_varHandleArraysDeclared
privateinherited

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

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

Definition at line 398 of file AthCommonDataStore.h.


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