96 ,
m_path(
"/TRT_RDOAnalysis/")
165 m_h_rdoID =
new TH1F(
"h_rdoID",
"rdoID", 100, 0, 2e18);
169 m_h_rdoWord =
new TH1F(
"h_rdoWord",
"rdoWord", 100, 0, 1.5e8);
173 m_h_barrelEndcap =
new TH1F(
"h_barrelEndcap",
"Barrel or Endcap", 100, -3.5, 3.5);
177 m_h_phiModule =
new TH1F(
"h_phiModule",
"Phi module", 100, 0, 35);
181 m_h_layerWheel =
new TH1F(
"h_layerWheel",
"Barrel layer or Endcap wheel", 100, 0, 20);
185 m_h_strawLayer =
new TH1F(
"h_strawLayer",
"Straw layer", 100, 0, 35);
189 m_h_straw =
new TH1F(
"h_straw",
"Straw", 100, 0, 1000);
193 m_h_ToT =
new TH1F(
"h_ToT",
"Time over Threshold", 100, 0, 100);
197 m_h_ToT_HL =
new TH1F(
"h_ToT_HL",
"Time over Threshold (highLevel)", 100, 0, 100);
201 m_h_driftTimeBin =
new TH1F(
"h_driftTimeBin",
"Drift Time Bin", 100, 0, 30);
205 m_h_trailEdge =
new TH1F(
"h_trailEdge",
"Trailing Edge", 100, 0, 30);
209 m_h_brlPhiMod =
new TH1F(
"h_brlPhiMod",
"Barrel phi module", 100, 0, 35);
213 m_h_brlLayer =
new TH1F(
"h_brlLayer",
"Barrel layer", 100, 0, 20);
217 m_h_brlStrawLayer =
new TH1F(
"h_brlStrawLayer",
"Barrel straw layer", 100, 0, 35);
221 m_h_brlStraw =
new TH1F(
"h_brlStraw",
"Barrel straw", 100, 0, 1000);
225 m_h_brlToT =
new TH1F(
"h_brlToT",
"Barrel Time over Threshold", 100, 0, 100);
229 m_h_brlToT_HL =
new TH1F(
"h_brlToT_HL",
"Barrel Time over Threshold (highLevel)", 100, 0, 100);
237 m_h_brlTrailEdge =
new TH1F(
"h_brlTrailEdge",
"Barrel Trailing Edge", 100, 0, 30);
241 m_h_ecPhiMod =
new TH1F(
"h_ecPhiMod",
"Endcap phi module", 100, 0, 35);
245 m_h_ecWheel =
new TH1F(
"h_ecWheel",
"Endcap wheel", 100, 0, 20);
249 m_h_ecStrawLayer =
new TH1F(
"h_ecStrawLayer",
"Endcap straw layer", 100, 0, 35);
253 m_h_ecStraw =
new TH1F(
"h_ecStraw",
"Endcap straw", 100, 0, 1000);
257 m_h_ecToT =
new TH1F(
"h_ecToT",
"Endcap Time over Threshold", 100, 0, 100);
261 m_h_ecToT_HL =
new TH1F(
"h_ecToT_HL",
"Endcap Time over Threshold (highLevel)", 100, 0, 100);
265 m_h_ecDriftTimeBin =
new TH1F(
"h_ecDriftTimeBin",
"Endcap Drift Time Bin", 100, 0, 30);
269 m_h_ecTrailEdge =
new TH1F(
"h_ecTrailEdge",
"Endcap Trailing Edge", 100, 0, 30);
273 m_h_sdoID =
new TH1F(
"h_sdoID",
"sdoID", 100, 0, 2.5e18);
277 m_h_sdoWord =
new TH1F(
"h_sdoWord",
"sdoWord", 100, 0, 10);
281 m_h_barrelEndcap_sdo =
new TH1F(
"h_barrelEndcap_sdo",
"Barrel or Endcap (sdo)", 100, -3.5, 3.5);
289 m_h_layerWheel_sdo =
new TH1F(
"h_layerWheel_sdo",
"Barrel layer or Endcap wheel (sdo)", 100, 0, 20);
297 m_h_straw_sdo =
new TH1F(
"h_straw_sdo",
"Straw (sdo)", 100, 0, 1000);
301 m_h_barcode =
new TH1F(
"h_barcode",
"Barcode (sdo)", 100, 0, 2.2e5);
305 m_h_eventIndex =
new TH1F(
"h_eventIndex",
"Event index (sdo)", 100, 0, 10);
309 m_h_charge =
new TH1F(
"h_charge",
"Charge (sdo)", 100, 0, 500);
313 return StatusCode::SUCCESS;
358 for ( ; rdoCont_itr != rdoCont_end; ++rdoCont_itr ) {
363 for ( ; rdo_itr != rdo_end; ++rdo_itr ) {
364 const Identifier rdoID((*rdo_itr)->identify());
365 const unsigned int rdoWord((*rdo_itr)->getWord());
366 const int trtBrlEc(
m_trtID->barrel_ec(rdoID));
367 const int trtPhiMod(
m_trtID->phi_module(rdoID));
368 const int trtLayerWheel(
m_trtID->layer_or_wheel(rdoID));
369 const int trtStrawLayer(
m_trtID->straw_layer(rdoID));
370 const int trtStraw(
m_trtID->straw(rdoID));
371 const bool trtHL((*rdo_itr)->highLevel());
372 const double trtToT((*rdo_itr)->timeOverThreshold());
373 const int trtDriftTimeBin((*rdo_itr)->driftTimeBin());
378 const unsigned long long rdoID_int = rdoID.
get_compact();
407 if (abs(trtBrlEc) == 1) {
419 else if (abs(trtBrlEc) == 2) {
439 InDetSimDataCollection::const_iterator sdo_itr(simDataMapTRT->begin());
440 const InDetSimDataCollection::const_iterator sdo_end(simDataMapTRT->end());
442 std::vector<int> barcode_vec;
443 std::vector<int> eventIndex_vec;
444 std::vector<float> charge_vec;
445 for ( ; sdo_itr != sdo_end; ++sdo_itr ) {
449 const unsigned long long sdoID_int = sdoID.
get_compact();
450 const int sdoWord(sdo.
word());
451 const int trtBrlEc_sdo(
m_trtID->barrel_ec(sdoID));
452 const int trtPhiMod_sdo(
m_trtID->phi_module(sdoID));
453 const int trtLayerWheel_sdo(
m_trtID->layer_or_wheel(sdoID));
454 const int trtStrawLayer_sdo(
m_trtID->straw_layer(sdoID));
455 const int trtStraw_sdo(
m_trtID->straw(sdoID));
473 m_hit->push_back(hit);
485 const std::vector<InDetSimData::Deposit>& deposits = sdo.
getdeposits();
486 std::vector<InDetSimData::Deposit>::const_iterator dep_itr(deposits.begin());
487 const std::vector<InDetSimData::Deposit>::const_iterator dep_end(deposits.end());
489 for ( ; dep_itr != dep_end; ++dep_itr ) {
493 const float charge((*dep_itr).second);
503 barcode_vec.push_back(bar);
504 eventIndex_vec.push_back(eventIx);
505 charge_vec.push_back(
charge);
511 eventIndex_vec.clear();
520 return StatusCode::SUCCESS;
525 return StatusCode::SUCCESS;
#define ATH_CHECK
Evaluate an expression and check for errors.
double charge(const T &p)
Handle class for reading from StoreGate.
InDetRawDataCollection< TRT_RDORawData > TRT_RDO_Collection
AthAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor with parameters:
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
const ServiceHandle< StoreGateSvc > & detStore() const
DataModel_detail::const_iterator< DataVector > const_iterator
const_iterator end() const noexcept
const_iterator begin() const noexcept
a link optimized in size for a GenParticle in a McEventCollection
index_type eventIndex() const
Return the event number of the referenced GenEvent.
value_type get_compact() const
Get the compact id.
const std::vector< Deposit > & getdeposits() const
virtual bool isValid() override final
Can the handle be successfully dereferenced?
bool firstBinHigh() const
std::vector< unsigned long long > * m_sdoID
std::vector< int > * m_strawLayer
std::vector< bool > * m_RODdata
virtual StatusCode finalize() override final
std::string m_ntupleFileName
std::string m_ntupleTreeName
std::vector< bool > * m_aboveThresh
std::vector< bool > * m_highLevel
std::vector< int > * m_phiModule_sdo
std::string m_ntupleDirName
std::vector< int > * m_sdoWord
std::vector< unsigned long long > * m_rdoID
SG::ReadHandleKey< InDetSimDataCollection > m_inputTruthKey
std::vector< std::vector< int > > * m_eventIndex_vec
SG::ReadHandleKey< TRT_RDO_Container > m_inputKey
std::vector< std::vector< float > > * m_charge_vec
std::vector< bool > * m_hit
std::vector< int > * m_driftTimeBin
std::vector< int > * m_barrelEndcap
std::vector< double > * m_timeOverThreshold
std::vector< int > * m_eventIndex
std::vector< int > * m_straw_sdo
std::vector< bool > * m_deadChan
std::vector< bool > * m_validStraw
std::vector< std::vector< int > > * m_barcode_vec
std::vector< int > * m_straw
std::vector< unsigned int > * m_rdoWord
std::vector< int > * m_barrelEndcap_sdo
TH1 * m_h_brlDriftTimeBin
std::vector< int > * m_barcode
std::vector< int > * m_phiModule
std::vector< int > * m_strawLayer_sdo
TRT_RDOAnalysis(const std::string &name, ISvcLocator *pSvcLocator)
std::vector< int > * m_layerWheel
virtual StatusCode execute() override final
ServiceHandle< ITHistSvc > m_thistSvc
std::vector< int > * m_layerWheel_sdo
TH1 * m_h_barrelEndcap_sdo
std::vector< float > * m_charge
std::vector< bool > * m_firstBin
std::vector< int > * m_trailEdge
virtual StatusCode initialize() override final
std::vector< bool > * m_lastBin
static bool HasHit(const InDetSimData &sdo)
static bool isDeadChannel(const InDetSimData &sdo)
static bool isAboveTR_Thresh(const InDetSimData &sdo)
static bool isValidStraw(const InDetSimData &sdo)
static bool isRodData(const InDetSimData &sdo)