 |
ATLAS Offline Software
|
Go to the documentation of this file.
89 m_h_layerDisk =
new TH1F(
"h_layerDisk",
"Barrel layer or Endcap disk", 100, 0, 10);
136 m_h_belowThresh_brl =
new TH1F(
"h_belowThresh_brl",
"Below threshold pixels - Barrel; # below threshold pixels; layer", 8, -0.5, 7.5);
137 m_h_disabled_brl =
new TH1F(
"h_disabled_brl",
"Disabled pixels - Barrel; # disabled pixels; layer", 8, -0.5, 7.5);
139 m_h_belowThresh_ec =
new TH1F(
"h_belowThresh_ec",
"Below threshold pixels - Endcap; # below threshold pixels; layer", 8, -0.5, 7.5);
140 m_h_disabled_ec =
new TH1F(
"h_disabled_ec",
"Disabled pixels - Endcap; # disabled pixels; layer", 8, -0.5, 7.5);
320 m_h_globalXY =
new TH2F(
"h_globalXY",
"h_globalXY; x [mm]; y [mm]",700,-350.,350,700,-350.,350);
322 m_h_globalZR =
new TH2F(
"h_globalZR",
"h_globalZR; z [mm]; r [mm]",6800,-3400.,3400,350,0.,350);
324 m_h_globalX =
new TH1F(
"h_globalX",
"h_globalX; x [mm]",700,-350.,350.);
326 m_h_globalY =
new TH1F(
"h_globalY",
"h_globalY; y [mm]",700,-350.,350.);
328 m_h_globalZ =
new TH1F(
"h_globalZ",
"h_globalZ; z [mm]",6800,-3400.,3400.);
332 std::string xy_name =
"h_ITk_xy";
333 auto xy = std::make_unique<TH2D>(xy_name.c_str(), xy_name.c_str(), 2200, -1100, 1100, 2200, -1100, 1100);
337 std::string zr_name =
"h_ITk_zr";
338 auto zr = std::make_unique<TH2D>(zr_name.c_str(), zr_name.c_str(), 6800, -3400, 3400, 1100, 0, 1100);
343 TString truthMatchBinLables[4] = {
"All RDOs",
"Truth Matched",
"HS Matched",
"Unmatched" };
344 for(
unsigned int ibin = 1; ibin < 5; ibin++) {
348 return StatusCode::SUCCESS;
395 const EventContext& ctx{Gaudi::Hive::currentContext()};
404 bool doTruthMatching =
true;
405 const HepMC::GenEvent* hardScatterEvent(
nullptr);
407 if (mcEventCollection->size()==0){
408 ATH_MSG_WARNING(
"Failed to retrieve a nonzero sized truth event collection, disabling truthMatching");
409 doTruthMatching =
false;
411 if(doTruthMatching) hardScatterEvent = mcEventCollection->at(0);
413 if(p_pixelRDO_cont) {
417 for ( ; rdoCont_itr != rdoCont_end; ++rdoCont_itr ) {
427 const int pixIsInnermost(0);
428 const int pixIsNextToInnermost(0);
435 for ( ; rdo_itr != rdo_end; ++rdo_itr ) {
438 bool findMatch =
false;
440 InDetSimDataCollection::const_iterator
iter = (*simDataMapPixel).find((*rdo_itr)->identify());
442 if (
iter != (*simDataMapPixel).end() ) {
444 const std::vector< InDetSimData::Deposit >& deposits = sdo.
getdeposits();
445 std::vector< InDetSimData::Deposit >::const_iterator nextdeposit = deposits.begin();
446 std::vector< InDetSimData::Deposit >::const_iterator lastdeposit = deposits.end();
447 for( ; nextdeposit!=lastdeposit; ++nextdeposit) {
449 if(particleLink.
isValid() && !findMatch){
460 const Identifier rdoID((*rdo_itr)->identify());
461 const unsigned int rdoWord((*rdo_itr)->getWord());
464 const int pixToT((*rdo_itr)->getToT());
465 const int pixBCID((*rdo_itr)->getBCID());
466 const int pixLVL1A((*rdo_itr)->getLVL1A());
467 const int pixLVL1ID((*rdo_itr)->getLVL1ID());
492 const unsigned long long rdoID_int = rdoID.
get_compact();
503 m_ToT->push_back(pixToT);
504 m_BCID->push_back(pixBCID);
521 if (pixIsInnermost) {
524 }
else if (pixIsNextToInnermost) {
571 if(simDataMapPixel) {
573 InDetSimDataCollection::const_iterator sdo_itr(simDataMapPixel->begin());
574 const InDetSimDataCollection::const_iterator sdo_end(simDataMapPixel->end());
576 std::vector<int> barcode_vec;
577 std::vector<int> eventIndex_vec;
578 std::vector<float> charge_vec;
579 for ( ; sdo_itr != sdo_end; ++sdo_itr ) {
582 const unsigned long long sdoID_int = sdoID.
get_compact();
583 const int sdoWord(sdo.
word());
609 else if (abs(pixBrlEc_sdo)==2)
617 else if (abs(pixBrlEc_sdo)==2)
633 const std::vector<InDetSimData::Deposit>& deposits = sdo.
getdeposits();
634 std::vector<InDetSimData::Deposit>::const_iterator dep_itr(deposits.begin());
635 const std::vector<InDetSimData::Deposit>::const_iterator dep_end(deposits.end());
636 for ( ; dep_itr != dep_end; ++dep_itr ) {
640 const int charge((*dep_itr).second);
650 barcode_vec.push_back(
bar);
651 eventIndex_vec.push_back(eventIx);
652 charge_vec.push_back(
charge);
658 eventIndex_vec.clear();
665 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
const ServiceHandle< ITHistSvc > & histSvc() const
The standard THistSvc (for writing histograms and TTrees and more to a root file) Returns (kind of) a...
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
const T * get(const ReadCondHandleKey< T > &key, const EventContext &ctx)
Convenience function to retrieve an object given a ReadCondHandleKey.
double xEta() const
position along eta direction:
::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
std::vector< int > * m_LVL1A
std::vector< int > * m_LVL1ID
TH1 * m_h_barrelEndcap_sdo
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
This defines the McEventCollection, which is really just an ObjectVector of McEvent objects.
bool isValid() const
Validity check.
std::vector< int > * m_ToT
SG::ReadHandleKey< McEventCollection > m_inputMcEventCollectionKey
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)
virtual const SiDetectorElement * getDetectorElement(const Identifier &id) const override
access to individual elements : via Identifier
def TH1F(name, title, nxbins, bins_par2, bins_par3=None, path='', **kwargs)
TH1 * m_h_etaIndexInnermost
std::vector< TH1 * > m_h_ecPhiIndex_perLayer
Handle class for reading from StoreGate.
int phi_module(const Identifier &id) const
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