From 00cd1ee3f0cfd9b6fb44ad9f3f333128b4f2848a Mon Sep 17 00:00:00 2001 From: Oleksandr Viazlo Date: Tue, 21 Mar 2017 23:46:08 +0100 Subject: [PATCH] Replace ILDCellID0 with LCTrackerCellID --- Tracking/src/ClicEfficiencyCalculator.cc | 22 +++++++++++----------- Tracking/src/HitResiduals.cc | 10 +++++----- Tracking/src/TrackChecker.cc | 2 +- 3 files changed, 17 insertions(+), 17 deletions(-) diff --git a/Tracking/src/ClicEfficiencyCalculator.cc b/Tracking/src/ClicEfficiencyCalculator.cc index 42db381..6e9318a 100644 --- a/Tracking/src/ClicEfficiencyCalculator.cc +++ b/Tracking/src/ClicEfficiencyCalculator.cc @@ -20,7 +20,7 @@ #include #include -#include +#include #include #include @@ -273,7 +273,7 @@ void ClicEfficiencyCalculator::processEvent( LCEvent* evt ) { // First pick up all of the collections that will be used - tracks, MCparticles, hits from relevent subdetectors - and their relations // Initialise CELLID encoder to get the subdetector ID from a hit - UTIL::BitField64 m_encoder( lcio::ILDCellID0::encoder_string ) ; + UTIL::BitField64 m_encoder( lcio::LCTrackerCellID::encoding_string() ) ; std::vector m_collections; // Get the collection of tracks @@ -651,7 +651,7 @@ int ClicEfficiencyCalculator::getSubdetector(LCCollection* collection, UTIL::Bit TrackerHitPlane* hit = dynamic_cast( collection->getElementAt(0) ) ; const int celId = hit->getCellID0() ; encoder.setValue(celId) ; - int subdet = encoder[lcio::ILDCellID0::subdet]; + int subdet = encoder[lcio::LCTrackerCellID::subdet()]; return subdet; } @@ -659,14 +659,14 @@ int ClicEfficiencyCalculator::getSubdetector(LCCollection* collection, UTIL::Bit int ClicEfficiencyCalculator::getSubdetector(TrackerHit* hit, UTIL::BitField64 &encoder){ const int celId = hit->getCellID0() ; encoder.setValue(celId) ; - int subdet = encoder[lcio::ILDCellID0::subdet]; + int subdet = encoder[lcio::LCTrackerCellID::subdet()]; return subdet; } int ClicEfficiencyCalculator::getLayer(TrackerHit* hit, UTIL::BitField64 &encoder){ const int celId = hit->getCellID0() ; encoder.setValue(celId) ; - int layer = encoder[lcio::ILDCellID0::layer]; + int layer = encoder[lcio::LCTrackerCellID::layer()]; return layer; } @@ -687,7 +687,7 @@ bool ClicEfficiencyCalculator::isReconstructable(MCParticle*& particle, std::str // Only make tracks with 4 or more hits in the vertex detector std::vector trackHits = particleHits[particle]; int nVXDHits = 0; - UTIL::BitField64 encoder( lcio::ILDCellID0::encoder_string ) ; + UTIL::BitField64 encoder( lcio::LCTrackerCellID::encoding_string() ) ; for (size_t ihit=0; ihit= 6) passNHits = true; // int nVXDHits = 0; - // UTIL::BitField64 encoder( lcio::ILDCellID0::encoder_string ) ; + // UTIL::BitField64 encoder( lcio::LCTrackerCellID::encoding_string() ) ; // for (size_t ihit=0; ihit= 4) passNHits = true; int nVXDHits = 0; - UTIL::BitField64 encoder( lcio::ILDCellID0::encoder_string ) ; + UTIL::BitField64 encoder( lcio::LCTrackerCellID::encoding_string() ) ; std::vector vec_hit_subdet; std::vector vec_hit_layer; for (size_t ihit=0; ihit trackHits, // Get the subdetector information encoder.setValue(celId) ; - int subdet = encoder[lcio::ILDCellID0::subdet]; - int side = encoder[lcio::ILDCellID0::side]; - int layer = encoder[lcio::ILDCellID0::layer]; + int subdet = encoder[lcio::LCTrackerCellID::subdet()]; + int side = encoder[lcio::LCTrackerCellID::side()]; + int layer = encoder[lcio::LCTrackerCellID::layer()]; // Make a unique id int id = ((subdet & 0xFF) << 16) + ((side & 0xFF) << 8) + (layer & 0xFF); diff --git a/Tracking/src/HitResiduals.cc b/Tracking/src/HitResiduals.cc index 1bbc844..7a635e2 100644 --- a/Tracking/src/HitResiduals.cc +++ b/Tracking/src/HitResiduals.cc @@ -11,7 +11,7 @@ #include "MarlinTrk/IMarlinTrack.h" #include -#include +#include #include "DD4hep/LCDD.h" #include "DD4hep/DD4hepUnits.h" @@ -192,8 +192,8 @@ void HitResiduals::processEvent( LCEvent * evt ) { - UTIL::BitField64 cellid_decoder( lcio::ILDCellID0::encoder_string ) ; - UTIL::BitField64 encoder( lcio::ILDCellID0::encoder_string ) ; + UTIL::BitField64 cellid_decoder( lcio::LCTrackerCellID::encoding_string() ) ; + UTIL::BitField64 encoder( lcio::LCTrackerCellID::encoding_string() ) ; encoder.reset() ; // reset to 0 int layerID = encoder.lowWord() ; int elementID = 0 ; @@ -233,8 +233,8 @@ void HitResiduals::processEvent( LCEvent * evt ) { streamlog_out(DEBUG1) << "layer = " << layer << std::endl; streamlog_out(DEBUG1) << "subdet = " << subdet << std::endl; - encoder[lcio::ILDCellID0::subdet] = subdet; - encoder[lcio::ILDCellID0::layer] = layer; + encoder[lcio::LCTrackerCellID::subdet()] = subdet; + encoder[lcio::LCTrackerCellID::layer()] = layer; layerID = encoder.lowWord(); streamlog_out(DEBUG1) << "layerID = " << layerID << std::endl; diff --git a/Tracking/src/TrackChecker.cc b/Tracking/src/TrackChecker.cc index 0015754..7561e98 100644 --- a/Tracking/src/TrackChecker.cc +++ b/Tracking/src/TrackChecker.cc @@ -23,7 +23,7 @@ #include #include -#include +#include #include #include