|
ATLAS Offline Software
|
Go to the documentation of this file.
101 m_h_layerDisk =
new TH1F(
"h_layerDisk",
"Barrel layer or Endcap disk", 100, 0, 10);
148 m_h_belowThresh_brl =
new TH1F(
"h_belowThresh_brl",
"Below threshold pixels - Barrel; # below threshold pixels; layer", 8, -0.5, 7.5);
149 m_h_disabled_brl =
new TH1F(
"h_disabled_brl",
"Disabled pixels - Barrel; # disabled pixels; layer", 8, -0.5, 7.5);
151 m_h_belowThresh_ec =
new TH1F(
"h_belowThresh_ec",
"Below threshold pixels - Endcap; # below threshold pixels; layer", 8, -0.5, 7.5);
152 m_h_disabled_ec =
new TH1F(
"h_disabled_ec",
"Disabled pixels - Endcap; # disabled pixels; layer", 8, -0.5, 7.5);
332 m_h_globalXY =
new TH2F(
"h_globalXY",
"h_globalXY; x [mm]; y [mm]",700,-350.,350,700,-350.,350);
334 m_h_globalZR =
new TH2F(
"h_globalZR",
"h_globalZR; z [mm]; r [mm]",6800,-3400.,3400,350,0.,350);
336 m_h_globalX =
new TH1F(
"h_globalX",
"h_globalX; x [mm]",700,-350.,350.);
338 m_h_globalY =
new TH1F(
"h_globalY",
"h_globalY; y [mm]",700,-350.,350.);
340 m_h_globalZ =
new TH1F(
"h_globalZ",
"h_globalZ; z [mm]",6800,-3400.,3400.);
344 std::string xy_name =
"h_ITk_xy";
345 auto xy = std::make_unique<TH2D>(xy_name.c_str(), xy_name.c_str(), 2200, -1100, 1100, 2200, -1100, 1100);
349 std::string zr_name =
"h_ITk_zr";
350 auto zr = std::make_unique<TH2D>(zr_name.c_str(), zr_name.c_str(), 6800, -3400, 3400, 1100, 0, 1100);
355 TString truthMatchBinLables[4] = {
"All RDOs",
"Truth Matched",
"HS Matched",
"Unmatched" };
356 for(
unsigned int ibin = 1; ibin < 5; ibin++) {
360 return StatusCode::SUCCESS;
411 bool doTruthMatching =
true;
412 const HepMC::GenEvent* hardScatterEvent(
nullptr);
414 if (mcEventCollection->
size()==0){
415 ATH_MSG_WARNING(
"Failed to retrieve a nonzero sized truth event collection, disabling truthMatching");
416 doTruthMatching =
false;
418 if(doTruthMatching) hardScatterEvent = mcEventCollection->
at(0);
420 if(p_pixelRDO_cont.
isValid()) {
424 for ( ; rdoCont_itr != rdoCont_end; ++rdoCont_itr ) {
434 const int pixIsInnermost(0);
435 const int pixIsNextToInnermost(0);
442 for ( ; rdo_itr != rdo_end; ++rdo_itr ) {
445 bool findMatch =
false;
447 InDetSimDataCollection::const_iterator iter = (*simDataMapPixel).find((*rdo_itr)->identify());
449 if ( iter != (*simDataMapPixel).end() ) {
451 const std::vector< InDetSimData::Deposit >& deposits = sdo.
getdeposits();
452 std::vector< InDetSimData::Deposit >::const_iterator nextdeposit = deposits.begin();
453 std::vector< InDetSimData::Deposit >::const_iterator lastdeposit = deposits.end();
454 for( ; nextdeposit!=lastdeposit; ++nextdeposit) {
456 if(particleLink.
isValid() && !findMatch){
467 const Identifier rdoID((*rdo_itr)->identify());
468 const unsigned int rdoWord((*rdo_itr)->getWord());
471 const int pixToT((*rdo_itr)->getToT());
472 const int pixBCID((*rdo_itr)->getBCID());
473 const int pixLVL1A((*rdo_itr)->getLVL1A());
474 const int pixLVL1ID((*rdo_itr)->getLVL1ID());
499 const unsigned long long rdoID_int = rdoID.
get_compact();
510 m_ToT->push_back(pixToT);
511 m_BCID->push_back(pixBCID);
528 if (pixIsInnermost) {
531 }
else if (pixIsNextToInnermost) {
578 if(simDataMapPixel.
isValid()) {
580 InDetSimDataCollection::const_iterator sdo_itr(simDataMapPixel->begin());
581 const InDetSimDataCollection::const_iterator sdo_end(simDataMapPixel->end());
583 std::vector<int> barcode_vec;
584 std::vector<int> eventIndex_vec;
585 std::vector<float> charge_vec;
586 for ( ; sdo_itr != sdo_end; ++sdo_itr ) {
589 const unsigned long long sdoID_int = sdoID.
get_compact();
590 const int sdoWord(sdo.
word());
616 else if (abs(pixBrlEc_sdo)==2)
624 else if (abs(pixBrlEc_sdo)==2)
640 const std::vector<InDetSimData::Deposit>& deposits = sdo.
getdeposits();
641 std::vector<InDetSimData::Deposit>::const_iterator dep_itr(deposits.begin());
642 const std::vector<InDetSimData::Deposit>::const_iterator dep_end(deposits.end());
643 for ( ; dep_itr != dep_end; ++dep_itr ) {
647 const int charge((*dep_itr).second);
657 barcode_vec.push_back(
bar);
658 eventIndex_vec.push_back(eventIx);
659 charge_vec.push_back(
charge);
665 eventIndex_vec.clear();
674 return StatusCode::SUCCESS;
std::vector< TH1 * > m_h_ecEtaIndex_perLayer
def retrieve(aClass, aKey=None)
std::vector< double > * m_globalZ
const InDetDD::PixelDetectorManager * m_pixelManager
std::vector< int > * m_BCID
Gaudi::Property< std::string > m_detectorName
std::vector< int > * m_etaIndex_sdo
Const iterator class for DataVector/DataList.
std::vector< double > * m_localX
int phi_index(const Identifier &id) const
std::vector< unsigned int > * m_rdoWord
TH1 * m_h_phiIndexNextToInnermost
const std::vector< Deposit > & getdeposits() const
int barrel_ec(const Identifier &id) const
Values of different levels (failure returns 0)
std::vector< bool > * m_disabled
std::vector< TH1 * > m_h_brlinclEtaIndex_perLayer
std::vector< unsigned long long > * m_sdoID
std::vector< int > * m_eventIndex
std::vector< bool > * m_belowThresh
std::vector< int > * m_barrelEndcap_sdo
std::vector< int > * m_etaModule
virtual Identifier identify() const override final
std::vector< double > * m_globalX
const PixelID * m_pixelID
value_type get_compact() const
Get the compact id.
static bool isNoise(const InDetSimData &sdo)
std::vector< int > * m_phiIndex_sdo
std::vector< int > * m_phiModule_sdo
TH1 * m_h_phiIndexInnermost
std::vector< int > * m_sdoWord
std::vector< int > * m_etaIndex
def TH2F(name, title, nxbins, bins_par2, bins_par3, bins_par4, bins_par5=None, bins_par6=None, path='', **kwargs)
std::vector< std::vector< int > > * m_barcode_vec
Gaudi::Property< std::string > m_ntupleName
std::vector< int > * m_isNextToInnermost
Gaudi::Property< std::string > m_sharedHistPath
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
std::vector< double > * m_localY
static bool hasBadTOT(const InDetSimData &sdo)
TH1 * m_h_truthMatchedRDOs
double xPhi() const
position along phi direction:
std::vector< TH1 * > m_h_brlflatEtaIndex_perLayer
TH1 * m_h_belowThresh_brl
HepMC::ConstGenParticlePtr cptr() const
Dereference.
a link optimized in size for a GenParticle in a McEventCollection
Gaudi::Property< std::string > m_pixelIDName
std::vector< bool > * m_noise
std::vector< TH1 * > m_h_brlinclPhiIndex_perLayer
std::vector< std::vector< int > > * m_eventIndex_vec
std::vector< double > * m_globalY
std::vector< int > * m_barrelEndcap
double xEta() const
position along eta direction:
ServiceHandle< ITHistSvc > m_thistSvc
::StatusCode StatusCode
StatusCode definition for legacy code.
LockedHandle< TH2 > m_h_globalZR_shared
SG::ReadHandleKey< InDetSimDataCollection > m_inputTruthKey
static bool isBelowThreshold(const InDetSimData &sdo)
int eta_index(const Identifier &id) const
const_iterator end() const
return const_iterator for end of container
std::vector< int > * m_LVL1A
std::vector< int > * m_LVL1ID
TH1 * m_h_barrelEndcap_sdo
const_iterator begin() const
return const_iterator for first entry
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
bool isValid() const
Validity check.
std::vector< int > * m_ToT
SG::ReadHandleKey< McEventCollection > m_inputMcEventCollectionKey
virtual bool isValid() override final
Can the handle be successfully dereferenced?
std::vector< int > * m_charge
std::vector< int > * m_layerDisk_sdo
int layer_disk(const Identifier &id) const
index_type eventIndex() const
Return the event number of the referenced GenEvent.
double xDepth() const
position along depth direction:
const GenParticle * ConstGenParticlePtr
int eta_module(const Identifier &id) const
virtual StatusCode initialize() override final
LockedHandle< TH2 > m_h_globalXY_shared
std::vector< unsigned long long > * m_rdoID
std::string to_string(const DetectorType &type)
std::vector< std::vector< float > > * m_charge_vec
double charge(const T &p)
std::vector< int > * m_isInnermost
std::vector< int > * m_phiModule
SG::ReadHandleKey< PixelRDO_Container > m_inputKey
Eigen::Matrix< double, 3, 1 > Vector3D
std::vector< TH1 * > m_h_brlflatPhiIndex_perLayer
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
std::vector< int > * m_barcode
Amg::Vector2D rawLocalPositionOfCell(const SiCellId &cellId) const
Returns position (center) of cell.
#define ATH_MSG_WARNING(x)
HepGeom::Point3D< double > globalPosition(const HepGeom::Point3D< double > &localPos) const
transform a reconstruction local position into a global position (inline):
std::vector< int > * m_phiIndex
std::vector< int > * m_etaModule_sdo
static bool isDisabled(const InDetSimData &sdo)
PixelRDOAnalysis(const std::string &name, ISvcLocator *pSvcLocator)
def TH1F(name, title, nxbins, bins_par2, bins_par3=None, path='', **kwargs)
TH1 * m_h_etaIndexInnermost
std::vector< TH1 * > m_h_ecPhiIndex_perLayer
const T * at(size_type n) const
Access an element, as an rvalue.
Handle class for reading from StoreGate.
int phi_module(const Identifier &id) const
size_type size() const noexcept
Returns the number of elements in the collection.
std::vector< int > * m_layerDisk
Gaudi::Property< std::string > m_histPath
std::vector< bool > * m_badTOT
virtual StatusCode execute() override final
TH1 * m_h_etaIndexNextToInnermost
std::vector< double > * m_localZ
Gaudi::Property< std::string > m_ntuplePath
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
Gaudi::Property< bool > m_doPosition
virtual SiDetectorElement * getDetectorElement(const Identifier &id) const override
access to individual elements : via Identifier