|
ATLAS Offline Software
|
Go to the documentation of this file.
19 , m_inputKey(
"MDTCSM")
20 , m_inputTruthKey(
"MDT_SDO")
68 , m_ntupleFileName(
"/ntuples/file1")
69 , m_ntupleDirName(
"/MDT_RDOAnalysis/")
71 , m_ntupleTreeName(
"MDT_RDOAna")
72 ,
m_path(
"/MDT_RDOAnalysis/")
73 , m_thistSvc(
"THistSvc",
name)
133 m_h_subID =
new TH1F(
"h_subID",
"Sub-detector ID", 100, 0, 150);
153 m_h_coarse =
new TH1F(
"h_coarse",
"Drift time (coarse)", 100, 0, 100);
157 m_h_fine =
new TH1F(
"h_fine",
"Drift time (fine)", 100, 0, 50);
173 m_h_xPos =
new TH1F(
"h_xPos",
"Global x-position (SDO)", 100, -13000, 13000);
177 m_h_yPos =
new TH1F(
"h_yPos",
"Global y-position (SDO)", 100, -15000, 15000);
181 m_h_zPos =
new TH1F(
"h_zPos",
"Global z-position (SDO)", 100, -22000, 22000);
197 m_h_localZ =
new TH1F(
"h_localZ",
"Local z-position (SDO)", 100, -3200, 3200);
201 return StatusCode::SUCCESS;
239 for ( ; mdtCont_itr != mdtCont_end; ++mdtCont_itr ) {
240 const Identifier mdtID((*mdtCont_itr)->identify());
242 const uint16_t subID((*mdtCont_itr)->SubDetId());
243 const uint16_t mrodID((*mdtCont_itr)->MrodId());
244 const uint16_t csmID((*mdtCont_itr)->CsmId());
246 unsigned long long mdtID_int = mdtID.
get_compact();
247 unsigned int mdtIDhash_int = mdtIDhash.
value();
259 const MdtCsm* p_mdtAmt(*mdtCont_itr);
262 for ( ; mdt_itr != mdt_end; ++mdt_itr ) {
264 const uint16_t tdcID((*mdt_itr)->tdcId());
265 const uint16_t chanID((*mdt_itr)->channelId());
266 const uint16_t coarseTime((*mdt_itr)->coarse());
267 const uint16_t fineTime((*mdt_itr)->fine());
268 const uint16_t widthComb((*mdt_itr)->width());
269 const bool lead((*mdt_itr)->leading());
270 const bool masked((*mdt_itr)->isMasked());
271 const std::vector<uint32_t>* dataWords_vec = (*mdt_itr)->dataWords();
276 m_fine->push_back(fineTime);
280 for (std::vector<uint32_t>::size_type
i = 0;
i != dataWords_vec->size(); ++
i) {
297 MuonSimDataCollection::const_iterator sdo_itr(simDataMapMDT->begin());
298 const MuonSimDataCollection::const_iterator sdo_end(simDataMapMDT->end());
300 std::vector<int> barcode_vec;
301 std::vector<int> eventIndex_vec;
302 std::vector<double> radius_vec;
303 std::vector<float> localZ_vec;
304 for ( ; sdo_itr != sdo_end; ++sdo_itr ) {
307 const unsigned long long sdoID_int = sdoID.
get_compact();
308 const int sdoWord(sdo.
word());
310 const float xPos(
gPos.x());
311 const float yPos(
gPos.y());
312 const float zPos(
gPos.z());
327 const std::vector<MuonSimData::Deposit>& deposits = sdo.
getdeposits();
328 std::vector<MuonSimData::Deposit>::const_iterator dep_itr(deposits.begin());
329 const std::vector<MuonSimData::Deposit>::const_iterator dep_end(deposits.end());
330 for ( ; dep_itr != dep_end; ++dep_itr ) {
336 const float localZ(
data.secondEntry());
348 barcode_vec.push_back(
bar);
349 eventIndex_vec.push_back(eventIx);
350 radius_vec.push_back(
radius);
351 localZ_vec.push_back(localZ);
358 eventIndex_vec.clear();
368 return StatusCode::SUCCESS;
372 return StatusCode::SUCCESS;
virtual StatusCode execute() override final
SG::ReadHandleKey< MdtCsmContainer > m_inputKey
char data[hepevt_bytes_allocation_ATLAS]
Const iterator class for DataVector/DataList.
MDT_RDOAnalysis(const std::string &name, ISvcLocator *pSvcLocator)
SG::ReadHandleKey< MuonSimDataCollection > m_inputTruthKey
std::vector< int > * m_barcode
std::vector< unsigned long long > * m_mdtID
unsigned int value() const
std::string m_ntupleTreeName
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
std::vector< double > * m_radius
value_type get_compact() const
Get the compact id.
const std::vector< Deposit > & getdeposits() const
std::vector< int > * m_eventIndex
std::vector< std::vector< int > > * m_barcode_vec
std::vector< uint16_t > * m_fine
MDT RDOs : Chamber Service Module, container of AmtHits of a single Mdt chamber.
std::vector< int > * m_sdoWord
std::vector< unsigned long long > * m_sdoID
a link optimized in size for a GenParticle in a McEventCollection
virtual StatusCode finalize() override final
std::vector< std::vector< float > > * m_localZ_vec
std::string m_ntupleDirName
::StatusCode StatusCode
StatusCode definition for legacy code.
std::vector< float > * m_zPos
std::string m_path
the path being used
const_iterator end() const
return const_iterator for end of container
const_iterator begin() const
return const_iterator for first entry
std::vector< uint16_t > * m_mrodID
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
virtual bool isValid() override final
Can the handle be successfully dereferenced?
std::vector< uint16_t > * m_coarse
std::vector< uint16_t > * m_width
std::vector< std::vector< int > > * m_eventIndex_vec
index_type eventIndex() const
Return the event number of the referenced GenEvent.
std::vector< unsigned int > * m_mdtIDhash
std::vector< uint16_t > * m_csmID
std::vector< std::vector< double > > * m_radius_vec
std::vector< bool > * m_leading
Eigen::Matrix< double, 3, 1 > Vector3D
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
std::vector< bool > * m_isMasked
std::vector< uint16_t > * m_chanID
virtual StatusCode initialize() override final
std::vector< uint32_t > * m_dataWords
std::string m_ntupleFileName
std::vector< uint16_t > * m_tdcID
ServiceHandle< ITHistSvc > m_thistSvc
std::vector< float > * m_localZ
def TH1F(name, title, nxbins, bins_par2, bins_par3=None, path='', **kwargs)
Handle class for reading from StoreGate.
This is a "hash" representation of an Identifier. This encodes a 32 bit index which can be used to lo...
std::vector< float > * m_xPos
std::vector< uint16_t > * m_subID
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
std::vector< float > * m_yPos
const Amg::Vector3D globalPosition() const