46 produces<MTDTrackingDetSetVector>();
54 descriptions.
add(
"mtdTrackingRecHitProducer",
desc);
68 std::array<edm::Handle<FTLClusterCollection>, 2> inputHandle{{inputBarrel, inputEndcap}};
70 auto outputhits = std::make_unique<MTDTrackingDetSetVector>();
71 auto& theoutputhits = *outputhits;
78 for (
auto const& theInput : inputHandle) {
79 if (!theInput.isValid()) {
80 edm::LogWarning(
"MTDTrackingRecHitProducer") <<
"MTDTrackingRecHitProducer: Invalid collection";
85 LogDebug(
"MTDTrackingRecHitProducer") <<
"inputCollection " <<
input.size();
86 for (
const auto& DSVit :
input) {
87 unsigned int detid = DSVit.detId();
89 const auto genericDet =
geom.idToDetUnit(detIdObject);
90 if (genericDet ==
nullptr) {
92 <<
"GeographicalID: " << std::hex <<
detid <<
" is invalid!" <<
std::dec << std::endl;
97 LogDebug(
"MTDTrackingRecHitProducer") <<
"MTD cluster DetId " <<
detid <<
" # cluster " << DSVit.size();
100 if ((
Hit.det() == 6) && (
Hit.subdetId() == 1) && (
Hit.mtdSubDetector() == 1)) {
102 LogDebug(
"MTDTrackingRecHitProducer") << btlHit;
103 }
else if ((
Hit.det() == 6) && (
Hit.subdetId() == 1) && (
Hit.mtdSubDetector() == 2)) {
105 LogDebug(
"MTDTrackingRecHitProducer") << etlHit;
109 for (
const auto& clustIt : DSVit) {
110 LogDebug(
"MTDTrackingRecHitProducer") <<
"Cluster: size " << clustIt.size() <<
" " << clustIt.x() <<
"," 111 << clustIt.y() <<
" " << clustIt.energy() <<
" " << clustIt.time();
120 LogDebug(
"MTDTrackingRecHitProducer")
121 <<
"MTD_TRH: " <<
hit.localPosition().
x() <<
"," <<
hit.localPosition().
y() <<
" : " 122 <<
hit.localPositionError().xx() <<
"," <<
hit.localPositionError().yy() <<
" : " <<
hit.time() <<
" : " 128 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
Detector identifier base class for the MIP Timing Layer.
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)
Detector identifier class for the Endcap Timing Layer.
Detector identifier class for the Barrel Timing Layer. The crystal count must start from 0...
const edm::ESGetToken< MTDGeometry, MTDDigiGeometryRecord > mtdgeoToken_
const edm::ESGetToken< MTDClusterParameterEstimator, MTDCPERecord > cpeToken_
Log< level::Warning, false > LogWarning
std::tuple< LocalPoint, LocalError, TimeValue, TimeValueError > ReturnType