|
ATLAS Offline Software
|
#include <PixelRDOAnalysis.h>
|
| PixelRDOAnalysis (const std::string &name, ISvcLocator *pSvcLocator) |
|
| ~PixelRDOAnalysis () |
|
virtual StatusCode | initialize () override final |
|
virtual StatusCode | execute () override final |
|
virtual StatusCode | finalize () override final |
|
virtual StatusCode | sysInitialize () override |
| Override sysInitialize. More...
|
|
virtual const DataObjIDColl & | extraOutputDeps () const override |
| Return the list of extra output dependencies. More...
|
|
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 | 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 PixelRDOAnalysis.h.
◆ StoreGateSvc_t
◆ PixelRDOAnalysis()
PixelRDOAnalysis::PixelRDOAnalysis |
( |
const std::string & |
name, |
|
|
ISvcLocator * |
pSvcLocator |
|
) |
| |
◆ ~PixelRDOAnalysis()
PixelRDOAnalysis::~PixelRDOAnalysis |
( |
| ) |
|
|
inline |
◆ 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]
◆ execute()
StatusCode PixelRDOAnalysis::execute |
( |
| ) |
|
|
finaloverridevirtual |
Definition at line 334 of file PixelRDOAnalysis.cxx.
373 bool doTruthMatching =
true;
374 const HepMC::GenEvent* hardScatterEvent(
nullptr);
376 if ((!mcEventCollection.isValid())||mcEventCollection->size()==0){
377 ATH_MSG_WARNING(
"Failed to retrieve a nonzero sized truth event collection, disabling truthMatching");
378 doTruthMatching =
false;
380 if(doTruthMatching) hardScatterEvent = mcEventCollection->at(0);
382 if(p_pixelRDO_cont.isValid()) {
386 for ( ; rdoCont_itr != rdoCont_end; ++rdoCont_itr ) {
390 for ( ; rdo_itr != rdo_end; ++rdo_itr ) {
393 bool findMatch =
false;
394 if(simDataMapPixel.isValid()){
395 InDetSimDataCollection::const_iterator iter = (*simDataMapPixel).find((*rdo_itr)->identify());
397 if ( iter != (*simDataMapPixel).end() ) {
399 const std::vector< InDetSimData::Deposit >& deposits = sdo.
getdeposits();
400 std::vector< InDetSimData::Deposit >::const_iterator nextdeposit = deposits.begin();
401 std::vector< InDetSimData::Deposit >::const_iterator lastdeposit = deposits.end();
402 for( ; nextdeposit!=lastdeposit; ++nextdeposit) {
404 if(particleLink.
isValid() && !findMatch){
415 const Identifier rdoID((*rdo_itr)->identify());
417 const unsigned int rdoWord((*rdo_itr)->getWord());
423 const int pixToT((*rdo_itr)->getToT());
424 const int pixBCID((*rdo_itr)->getBCID());
425 const int pixLVL1A((*rdo_itr)->getLVL1A());
426 const int pixLVL1ID((*rdo_itr)->getLVL1ID());
428 const unsigned long long rdoID_int = rdoID.get_compact();
437 m_ToT->push_back(pixToT);
438 m_BCID->push_back(pixBCID);
466 else if (abs(pixBrlEc) == 4) {
482 if(simDataMapPixel.isValid()) {
484 InDetSimDataCollection::const_iterator sdo_itr(simDataMapPixel->begin());
485 const InDetSimDataCollection::const_iterator sdo_end(simDataMapPixel->end());
487 std::vector<int> barcode_vec;
488 std::vector<int> eventIndex_vec;
489 std::vector<float> charge_vec;
490 for ( ; sdo_itr != sdo_end; ++sdo_itr ) {
493 const unsigned long long sdoID_int = sdoID.get_compact();
494 const int sdoWord(sdo.
word());
529 const std::vector<InDetSimData::Deposit>& deposits = sdo.
getdeposits();
530 std::vector<InDetSimData::Deposit>::const_iterator dep_itr(deposits.begin());
531 const std::vector<InDetSimData::Deposit>::const_iterator dep_end(deposits.end());
532 for ( ; dep_itr != dep_end; ++dep_itr ) {
536 const int charge((*dep_itr).second);
546 barcode_vec.push_back(
bar);
547 eventIndex_vec.push_back(eventIx);
548 charge_vec.push_back(
charge);
554 eventIndex_vec.clear();
563 return StatusCode::SUCCESS;
◆ 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
◆ extraOutputDeps()
const DataObjIDColl & AthAlgorithm::extraOutputDeps |
( |
| ) |
const |
|
overridevirtualinherited |
Return the list of extra output dependencies.
This list is extended to include symlinks implied by inheritance relations.
Definition at line 50 of file AthAlgorithm.cxx.
57 return Algorithm::extraOutputDeps();
◆ finalize()
StatusCode PixelRDOAnalysis::finalize |
( |
| ) |
|
|
finaloverridevirtual |
◆ initialize()
StatusCode PixelRDOAnalysis::initialize |
( |
| ) |
|
|
finaloverridevirtual |
Definition at line 102 of file PixelRDOAnalysis.cxx.
171 m_h_layerDisk =
new TH1F(
"h_layerDisk",
"Barrel layer or Endcap disk", 100, 0, 3);
324 TString truthMatchBinLables[4] = {
"All RDOs",
"Truth Matched",
"HS Matched",
"Unmatched" };
325 for(
unsigned int ibin = 1; ibin < 5; ibin++) {
331 return StatusCode::SUCCESS;
◆ 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.
◆ renounce()
◆ renounceArray()
◆ sysInitialize()
StatusCode AthAlgorithm::sysInitialize |
( |
| ) |
|
|
overridevirtualinherited |
◆ 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_badTOT
std::vector<bool>* PixelRDOAnalysis::m_badTOT |
|
private |
◆ m_barcode
std::vector<int>* PixelRDOAnalysis::m_barcode |
|
private |
◆ m_barcode_vec
std::vector< std::vector<int> >* PixelRDOAnalysis::m_barcode_vec |
|
private |
◆ m_barrelEndcap
std::vector<int>* PixelRDOAnalysis::m_barrelEndcap |
|
private |
◆ m_barrelEndcap_sdo
std::vector<int>* PixelRDOAnalysis::m_barrelEndcap_sdo |
|
private |
◆ m_BCID
std::vector<int>* PixelRDOAnalysis::m_BCID |
|
private |
◆ m_belowThresh
std::vector<bool>* PixelRDOAnalysis::m_belowThresh |
|
private |
◆ m_charge
std::vector<int>* PixelRDOAnalysis::m_charge |
|
private |
◆ m_charge_vec
std::vector< std::vector<float> >* PixelRDOAnalysis::m_charge_vec |
|
private |
◆ m_detStore
◆ m_disabled
std::vector<bool>* PixelRDOAnalysis::m_disabled |
|
private |
◆ m_etaIndex
std::vector<int>* PixelRDOAnalysis::m_etaIndex |
|
private |
◆ m_etaIndex_sdo
std::vector<int>* PixelRDOAnalysis::m_etaIndex_sdo |
|
private |
◆ m_etaModule
std::vector<int>* PixelRDOAnalysis::m_etaModule |
|
private |
◆ m_etaModule_sdo
std::vector<int>* PixelRDOAnalysis::m_etaModule_sdo |
|
private |
◆ m_eventIndex
std::vector<int>* PixelRDOAnalysis::m_eventIndex |
|
private |
◆ m_eventIndex_vec
std::vector< std::vector<int> >* PixelRDOAnalysis::m_eventIndex_vec |
|
private |
◆ m_evtStore
◆ m_extendedExtraObjects
DataObjIDColl AthAlgorithm::m_extendedExtraObjects |
|
privateinherited |
◆ m_h_barcode
TH1* PixelRDOAnalysis::m_h_barcode = nullptr |
|
private |
◆ m_h_barrelEndcap
TH1* PixelRDOAnalysis::m_h_barrelEndcap |
|
private |
◆ m_h_barrelEndcap_sdo
TH1* PixelRDOAnalysis::m_h_barrelEndcap_sdo = nullptr |
|
private |
◆ m_h_BCID
TH1* PixelRDOAnalysis::m_h_BCID |
|
private |
◆ m_h_brlBCID
TH1* PixelRDOAnalysis::m_h_brlBCID |
|
private |
◆ m_h_brlEtaIndex
TH1* PixelRDOAnalysis::m_h_brlEtaIndex |
|
private |
◆ m_h_brlEtaMod
TH1* PixelRDOAnalysis::m_h_brlEtaMod |
|
private |
◆ m_h_brlLayer
TH1* PixelRDOAnalysis::m_h_brlLayer |
|
private |
◆ m_h_brlLVL1A
TH1* PixelRDOAnalysis::m_h_brlLVL1A |
|
private |
◆ m_h_brlLVL1ID
TH1* PixelRDOAnalysis::m_h_brlLVL1ID |
|
private |
◆ m_h_brlPhiIndex
TH1* PixelRDOAnalysis::m_h_brlPhiIndex |
|
private |
◆ m_h_brlPhiMod
TH1* PixelRDOAnalysis::m_h_brlPhiMod |
|
private |
◆ m_h_brlToT
TH1* PixelRDOAnalysis::m_h_brlToT |
|
private |
◆ m_h_charge
TH1* PixelRDOAnalysis::m_h_charge = nullptr |
|
private |
◆ m_h_ecBCID
TH1* PixelRDOAnalysis::m_h_ecBCID |
|
private |
◆ m_h_ecDisk
TH1* PixelRDOAnalysis::m_h_ecDisk |
|
private |
◆ m_h_ecEtaIndex
TH1* PixelRDOAnalysis::m_h_ecEtaIndex |
|
private |
◆ m_h_ecEtaMod
TH1* PixelRDOAnalysis::m_h_ecEtaMod |
|
private |
◆ m_h_ecLVL1A
TH1* PixelRDOAnalysis::m_h_ecLVL1A |
|
private |
◆ m_h_ecLVL1ID
TH1* PixelRDOAnalysis::m_h_ecLVL1ID |
|
private |
◆ m_h_ecPhiIndex
TH1* PixelRDOAnalysis::m_h_ecPhiIndex |
|
private |
◆ m_h_ecPhiMod
TH1* PixelRDOAnalysis::m_h_ecPhiMod |
|
private |
◆ m_h_ecToT
TH1* PixelRDOAnalysis::m_h_ecToT |
|
private |
◆ m_h_etaIndex
TH1* PixelRDOAnalysis::m_h_etaIndex |
|
private |
◆ m_h_etaIndex_sdo
TH1* PixelRDOAnalysis::m_h_etaIndex_sdo = nullptr |
|
private |
◆ m_h_etaModule
TH1* PixelRDOAnalysis::m_h_etaModule |
|
private |
◆ m_h_etaModule_sdo
TH1* PixelRDOAnalysis::m_h_etaModule_sdo = nullptr |
|
private |
◆ m_h_eventIndex
TH1* PixelRDOAnalysis::m_h_eventIndex = nullptr |
|
private |
◆ m_h_layerDisk
TH1* PixelRDOAnalysis::m_h_layerDisk |
|
private |
◆ m_h_layerDisk_sdo
TH1* PixelRDOAnalysis::m_h_layerDisk_sdo = nullptr |
|
private |
◆ m_h_LVL1A
TH1* PixelRDOAnalysis::m_h_LVL1A |
|
private |
◆ m_h_LVL1ID
TH1* PixelRDOAnalysis::m_h_LVL1ID |
|
private |
◆ m_h_phiIndex
TH1* PixelRDOAnalysis::m_h_phiIndex |
|
private |
◆ m_h_phiIndex_sdo
TH1* PixelRDOAnalysis::m_h_phiIndex_sdo = nullptr |
|
private |
◆ m_h_phiModule
TH1* PixelRDOAnalysis::m_h_phiModule |
|
private |
◆ m_h_phiModule_sdo
TH1* PixelRDOAnalysis::m_h_phiModule_sdo = nullptr |
|
private |
◆ m_h_rdoID
TH1* PixelRDOAnalysis::m_h_rdoID |
|
private |
◆ m_h_rdoWord
TH1* PixelRDOAnalysis::m_h_rdoWord |
|
private |
◆ m_h_sdoID
TH1* PixelRDOAnalysis::m_h_sdoID = nullptr |
|
private |
◆ m_h_sdoWord
TH1* PixelRDOAnalysis::m_h_sdoWord = nullptr |
|
private |
◆ m_h_ToT
TH1* PixelRDOAnalysis::m_h_ToT |
|
private |
◆ m_h_TruthMatchedRDOs
TH1* PixelRDOAnalysis::m_h_TruthMatchedRDOs |
|
private |
◆ m_inputKey
◆ m_inputMcEventCollectionKey
◆ m_inputTruthKey
◆ m_layerDisk
std::vector<int>* PixelRDOAnalysis::m_layerDisk |
|
private |
◆ m_layerDisk_sdo
std::vector<int>* PixelRDOAnalysis::m_layerDisk_sdo |
|
private |
◆ m_LVL1A
std::vector<int>* PixelRDOAnalysis::m_LVL1A |
|
private |
◆ m_LVL1ID
std::vector<int>* PixelRDOAnalysis::m_LVL1ID |
|
private |
◆ m_noise
std::vector<bool>* PixelRDOAnalysis::m_noise |
|
private |
◆ m_ntupleDirName
std::string PixelRDOAnalysis::m_ntupleDirName |
|
private |
◆ m_ntupleFileName
std::string PixelRDOAnalysis::m_ntupleFileName |
|
private |
◆ m_ntupleTreeName
std::string PixelRDOAnalysis::m_ntupleTreeName |
|
private |
◆ m_path
std::string PixelRDOAnalysis::m_path |
|
private |
◆ m_phiIndex
std::vector<int>* PixelRDOAnalysis::m_phiIndex |
|
private |
◆ m_phiIndex_sdo
std::vector<int>* PixelRDOAnalysis::m_phiIndex_sdo |
|
private |
◆ m_phiModule
std::vector<int>* PixelRDOAnalysis::m_phiModule |
|
private |
◆ m_phiModule_sdo
std::vector<int>* PixelRDOAnalysis::m_phiModule_sdo |
|
private |
◆ m_pixelID
◆ m_rdoID
std::vector<unsigned long long>* PixelRDOAnalysis::m_rdoID |
|
private |
◆ m_rdoWord
std::vector<unsigned int>* PixelRDOAnalysis::m_rdoWord |
|
private |
◆ m_sdoID
std::vector<unsigned long long>* PixelRDOAnalysis::m_sdoID |
|
private |
◆ m_sdoWord
std::vector<int>* PixelRDOAnalysis::m_sdoWord |
|
private |
◆ m_thistSvc
◆ m_ToT
std::vector<int>* PixelRDOAnalysis::m_ToT |
|
private |
◆ m_tree
TTree* PixelRDOAnalysis::m_tree |
|
private |
◆ m_varHandleArraysDeclared
◆ m_vhka
The documentation for this class was generated from the following files:
def retrieve(aClass, aKey=None)
std::vector< unsigned long long > * m_rdoID
std::vector< bool > * m_noise
Const iterator class for DataVector/DataList.
int phi_index(const Identifier &id) const
const std::vector< Deposit > & getdeposits() const
std::vector< std::vector< int > > * m_barcode_vec
SG::ReadHandleKey< McEventCollection > m_inputMcEventCollectionKey
std::vector< unsigned int > * m_rdoWord
int barrel_ec(const Identifier &id) const
Values of different levels (failure returns 0)
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
std::vector< int > * m_eventIndex
SG::ReadHandleKey< InDetSimDataCollection > m_inputTruthKey
std::vector< std::vector< int > > * m_eventIndex_vec
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
static bool isNoise(const InDetSimData &sdo)
std::vector< int > * m_etaModule_sdo
std::vector< unsigned long long > * m_sdoID
std::vector< int > * m_etaModule
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
virtual void setOwner(IDataHandleHolder *o)=0
static bool hasBadTOT(const InDetSimData &sdo)
HepMC::ConstGenParticlePtr cptr() const
Dereference.
a link optimized in size for a GenParticle in a McEventCollection
std::vector< int > * m_phiModule_sdo
virtual StatusCode sysInitialize() override
Override sysInitialize.
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override
Return this algorithm's output handles.
std::vector< int > * m_phiIndex
std::vector< bool > * m_badTOT
::StatusCode StatusCode
StatusCode definition for legacy code.
std::string m_ntupleDirName
std::vector< int > * m_barcode
static bool isBelowThreshold(const InDetSimData &sdo)
int eta_index(const Identifier &id) const
std::vector< int > * m_barrelEndcap
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
std::string m_ntupleFileName
bool isValid() const
Validity check.
std::vector< int > * m_etaIndex_sdo
std::vector< int > * m_ToT
std::vector< int > * m_LVL1ID
std::vector< int > * m_sdoWord
std::vector< std::vector< float > > * m_charge_vec
std::vector< int > * m_barrelEndcap_sdo
SG::ReadHandleKey< PixelRDO_Container > m_inputKey
virtual void renounce()=0
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
TH1 * m_h_barrelEndcap_sdo
int layer_disk(const Identifier &id) const
index_type eventIndex() const
Return the event number of the referenced GenEvent.
const GenParticle * ConstGenParticlePtr
int eta_module(const Identifier &id) const
std::vector< int > * m_BCID
double charge(const T &p)
std::vector< int > * m_etaIndex
std::string m_ntupleTreeName
ServiceHandle< ITHistSvc > m_thistSvc
std::vector< int > * m_phiModule
DataObjIDColl m_extendedExtraObjects
std::vector< bool > * m_disabled
#define ATH_MSG_WARNING(x)
std::vector< int > * m_LVL1A
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
const PixelID * m_pixelID
AthAlgorithm()
Default constructor:
static bool isDisabled(const InDetSimData &sdo)
def TH1F(name, title, nxbins, bins_par2, bins_par3=None, path='', **kwargs)
TH1 * m_h_TruthMatchedRDOs
std::vector< int > * m_layerDisk_sdo
std::vector< int > * m_phiIndex_sdo
int phi_module(const Identifier &id) const
std::vector< int > * m_charge
std::vector< bool > * m_belowThresh
std::vector< int > * m_layerDisk
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>