43 produces<MTDTrackingDetSetVector>();
51 descriptions.
add(
"mtdTrackingRecHitProducer",
desc);
65 std::array<edm::Handle<FTLClusterCollection>, 2> inputHandle{{inputBarrel, inputEndcap}};
67 auto outputhits = std::make_unique<MTDTrackingDetSetVector>();
68 auto& theoutputhits = *outputhits;
75 for (
auto const& theInput : inputHandle) {
76 if (!theInput.isValid()) {
77 edm::LogWarning(
"MTDTrackingRecHitProducer") <<
"MTDTrackingRecHitProducer: Invalid collection";
82 LogDebug(
"MTDTrackingRecHitProducer") <<
"inputCollection " <<
input.size();
83 for (
const auto& DSVit :
input) {
84 unsigned int detid = DSVit.detId();
85 DetId detIdObject(detid);
86 const auto genericDet =
geom.idToDetUnit(detIdObject);
87 if (genericDet ==
nullptr) {
89 <<
"GeographicalID: " << std::hex << detid <<
" is invalid!" <<
std::dec << std::endl;
94 LogDebug(
"MTDTrackingRecHitProducer") <<
"MTD cluster DetId " << detid <<
" # cluster " << DSVit.size();
96 for (
const auto& clustIt : DSVit) {
97 LogDebug(
"MTDTrackingRecHitProducer") <<
"Cluster: size " << clustIt.size() <<
" " << clustIt.x() <<
"," 98 << clustIt.y() <<
" " << clustIt.energy() <<
" " << clustIt.time();
107 LogDebug(
"MTDTrackingRecHitProducer")
108 <<
"MTD_TRH: " <<
hit.localPosition().
x() <<
"," <<
hit.localPosition().
y() <<
" : " 109 <<
hit.localPositionError().xx() <<
"," <<
hit.localPositionError().yy() <<
" : " <<
hit.time() <<
" : " 115 LogDebug(
"MTDTrackingRecHitProducer") <<
"outputCollection " << theoutputhits.size();
edm::Ref< typename HandleT::element_type, typename HandleT::element_type::value_type::value_type > makeRefTo(const HandleT &iHandle, typename HandleT::element_type::value_type::const_iterator itIter)
void push_back(data_type const &d)
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
T const & getData(const ESGetToken< T, R > &iToken) const noexcept(false)
const edm::EDGetTokenT< FTLClusterCollection > ftlbClusters_
const edm::EDGetTokenT< FTLClusterCollection > ftleClusters_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
~MTDTrackingRecHitProducer() override=default
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
static std::string const input
#define DEFINE_FWK_MODULE(type)
void produce(edm::StreamID, edm::Event &evt, const edm::EventSetup &es) const override
MTDTrackingRecHitProducer(const edm::ParameterSet &ps)
A 2D TrackerRecHit with time and time error information.
void add(std::string const &label, ParameterSetDescription const &psetDescription)
const edm::ESGetToken< MTDGeometry, MTDDigiGeometryRecord > mtdgeoToken_
const edm::ESGetToken< MTDClusterParameterEstimator, MTDCPERecord > cpeToken_
Log< level::Warning, false > LogWarning
std::tuple< LocalPoint, LocalError, TimeValue, TimeValueError > ReturnType