93 ,
m_path(
"/TRT_RDOAnalysis/")
162 m_h_rdoID =
new TH1F(
"h_rdoID",
"rdoID", 100, 0, 2e18);
166 m_h_rdoWord =
new TH1F(
"h_rdoWord",
"rdoWord", 100, 0, 1.5e8);
170 m_h_barrelEndcap =
new TH1F(
"h_barrelEndcap",
"Barrel or Endcap", 100, -3.5, 3.5);
174 m_h_phiModule =
new TH1F(
"h_phiModule",
"Phi module", 100, 0, 35);
178 m_h_layerWheel =
new TH1F(
"h_layerWheel",
"Barrel layer or Endcap wheel", 100, 0, 20);
182 m_h_strawLayer =
new TH1F(
"h_strawLayer",
"Straw layer", 100, 0, 35);
186 m_h_straw =
new TH1F(
"h_straw",
"Straw", 100, 0, 1000);
190 m_h_ToT =
new TH1F(
"h_ToT",
"Time over Threshold", 100, 0, 100);
194 m_h_ToT_HL =
new TH1F(
"h_ToT_HL",
"Time over Threshold (highLevel)", 100, 0, 100);
198 m_h_driftTimeBin =
new TH1F(
"h_driftTimeBin",
"Drift Time Bin", 100, 0, 30);
202 m_h_trailEdge =
new TH1F(
"h_trailEdge",
"Trailing Edge", 100, 0, 30);
206 m_h_brlPhiMod =
new TH1F(
"h_brlPhiMod",
"Barrel phi module", 100, 0, 35);
210 m_h_brlLayer =
new TH1F(
"h_brlLayer",
"Barrel layer", 100, 0, 20);
214 m_h_brlStrawLayer =
new TH1F(
"h_brlStrawLayer",
"Barrel straw layer", 100, 0, 35);
218 m_h_brlStraw =
new TH1F(
"h_brlStraw",
"Barrel straw", 100, 0, 1000);
222 m_h_brlToT =
new TH1F(
"h_brlToT",
"Barrel Time over Threshold", 100, 0, 100);
226 m_h_brlToT_HL =
new TH1F(
"h_brlToT_HL",
"Barrel Time over Threshold (highLevel)", 100, 0, 100);
234 m_h_brlTrailEdge =
new TH1F(
"h_brlTrailEdge",
"Barrel Trailing Edge", 100, 0, 30);
238 m_h_ecPhiMod =
new TH1F(
"h_ecPhiMod",
"Endcap phi module", 100, 0, 35);
242 m_h_ecWheel =
new TH1F(
"h_ecWheel",
"Endcap wheel", 100, 0, 20);
246 m_h_ecStrawLayer =
new TH1F(
"h_ecStrawLayer",
"Endcap straw layer", 100, 0, 35);
250 m_h_ecStraw =
new TH1F(
"h_ecStraw",
"Endcap straw", 100, 0, 1000);
254 m_h_ecToT =
new TH1F(
"h_ecToT",
"Endcap Time over Threshold", 100, 0, 100);
258 m_h_ecToT_HL =
new TH1F(
"h_ecToT_HL",
"Endcap Time over Threshold (highLevel)", 100, 0, 100);
262 m_h_ecDriftTimeBin =
new TH1F(
"h_ecDriftTimeBin",
"Endcap Drift Time Bin", 100, 0, 30);
266 m_h_ecTrailEdge =
new TH1F(
"h_ecTrailEdge",
"Endcap Trailing Edge", 100, 0, 30);
270 m_h_sdoID =
new TH1F(
"h_sdoID",
"sdoID", 100, 0, 2.5e18);
274 m_h_sdoWord =
new TH1F(
"h_sdoWord",
"sdoWord", 100, 0, 10);
278 m_h_barrelEndcap_sdo =
new TH1F(
"h_barrelEndcap_sdo",
"Barrel or Endcap (sdo)", 100, -3.5, 3.5);
286 m_h_layerWheel_sdo =
new TH1F(
"h_layerWheel_sdo",
"Barrel layer or Endcap wheel (sdo)", 100, 0, 20);
294 m_h_straw_sdo =
new TH1F(
"h_straw_sdo",
"Straw (sdo)", 100, 0, 1000);
298 m_h_barcode =
new TH1F(
"h_barcode",
"Barcode (sdo)", 100, 0, 2.2e5);
302 m_h_eventIndex =
new TH1F(
"h_eventIndex",
"Event index (sdo)", 100, 0, 10);
306 m_h_charge =
new TH1F(
"h_charge",
"Charge (sdo)", 100, 0, 500);
310 return StatusCode::SUCCESS;
355 for ( ; rdoCont_itr != rdoCont_end; ++rdoCont_itr ) {
360 for ( ; rdo_itr != rdo_end; ++rdo_itr ) {
361 const Identifier rdoID((*rdo_itr)->identify());
362 const unsigned int rdoWord((*rdo_itr)->getWord());
363 const int trtBrlEc(
m_trtID->barrel_ec(rdoID));
364 const int trtPhiMod(
m_trtID->phi_module(rdoID));
365 const int trtLayerWheel(
m_trtID->layer_or_wheel(rdoID));
366 const int trtStrawLayer(
m_trtID->straw_layer(rdoID));
367 const int trtStraw(
m_trtID->straw(rdoID));
368 const bool trtHL((*rdo_itr)->highLevel());
369 const double trtToT((*rdo_itr)->timeOverThreshold());
370 const int trtDriftTimeBin((*rdo_itr)->driftTimeBin());
375 const unsigned long long rdoID_int = rdoID.
get_compact();
404 if (std::abs(trtBrlEc) == 1) {
416 else if (std::abs(trtBrlEc) == 2) {
436 InDetSimDataCollection::const_iterator sdo_itr(simDataMapTRT->begin());
437 const InDetSimDataCollection::const_iterator sdo_end(simDataMapTRT->end());
439 std::vector<int> barcode_vec;
440 std::vector<int> eventIndex_vec;
441 std::vector<float> charge_vec;
442 for ( ; sdo_itr != sdo_end; ++sdo_itr ) {
446 const unsigned long long sdoID_int = sdoID.
get_compact();
447 const int sdoWord(sdo.
word());
448 const int trtBrlEc_sdo(
m_trtID->barrel_ec(sdoID));
449 const int trtPhiMod_sdo(
m_trtID->phi_module(sdoID));
450 const int trtLayerWheel_sdo(
m_trtID->layer_or_wheel(sdoID));
451 const int trtStrawLayer_sdo(
m_trtID->straw_layer(sdoID));
452 const int trtStraw_sdo(
m_trtID->straw(sdoID));
470 m_hit->push_back(hit);
482 const std::vector<InDetSimData::Deposit>& deposits = sdo.
getdeposits();
483 std::vector<InDetSimData::Deposit>::const_iterator dep_itr(deposits.begin());
484 const std::vector<InDetSimData::Deposit>::const_iterator dep_end(deposits.end());
486 for ( ; dep_itr != dep_end; ++dep_itr ) {
490 const float charge((*dep_itr).second);
500 barcode_vec.push_back(bar);
501 eventIndex_vec.push_back(eventIx);
502 charge_vec.push_back(
charge);
508 eventIndex_vec.clear();
517 return StatusCode::SUCCESS;
522 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)