59 const std::vector<reco::CaloCluster> &
EE,
60 const std::vector<reco::CaloCluster> &HSi,
61 const std::vector<reco::CaloCluster> &HSci);
70 size_t size = vm.size();
71 for (
size_t i = 0;
i <
size; ++
i) {
72 to.push_back(vm.get(
i));
105 template <
typename T>
121 : timeClname_(ps.getParameter<
std::
string>(
"timeClname")),
122 clustersTimeEE_token_(
124 clustersTimeHSi_token_(
126 clustersTimeHSci_token_(
132 produces<std::vector<float>>(
"InitialLayerClustersMask");
133 produces<std::vector<reco::BasicCluster>>();
134 produces<std::vector<reco::BasicCluster>>(
"sharing");
136 produces<edm::ValueMap<std::pair<float, float>>>(
timeClname_);
153 descriptions.
add(
"hgcalMergeLayerClusters",
desc);
158 std::unique_ptr<std::vector<reco::BasicCluster>>
clusters(
new std::vector<reco::BasicCluster>);
164 std::unique_ptr<std::vector<float>> layerClustersMask(
new std::vector<float>);
165 layerClustersMask->resize(clusterHandle->size(), 1.0);
167 evt.
put(
std::move(layerClustersMask),
"InitialLayerClustersMask");
170 std::vector<std::pair<float, float>> times;
173 auto timeCl = std::make_unique<edm::ValueMap<std::pair<float, float>>>();
175 filler.insert(clusterHandle, times.begin(), times.end());
181 const std::vector<reco::CaloCluster> &
EE,
182 const std::vector<reco::CaloCluster> &HSi,
183 const std::vector<reco::CaloCluster> &HSci) {
188 merge.insert(
merge.end(), HSi.begin(), HSi.end());
189 merge.insert(
merge.end(), HSci.begin(), HSci.end());
const edm::EDGetTokenT< edm::ValueMap< std::pair< float, float > > > clustersTimeHSi_token_
edm::EDGetTokenT< std::vector< reco::CaloCluster > > HSiclusters_token_
T getParameter(std::string const &) const
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
MergeClusterProducer(const edm::ParameterSet &)
Constructor with parameter settings - which can be changed in ...todo. Constructor will set all varia...
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
Method fill description which will be used in pyhton file.
void addTo(std::vector< std::pair< float, float >> &to, const edm::ValueMap< std::pair< float, float >> &vm)
copy all values from vm to to
~MergeClusterProducer() override
bool getByToken(EDGetToken token, Handle< PROD > &result) const
const edm::EDGetTokenT< edm::ValueMap< std::pair< float, float > > > clustersTimeHSci_token_
edm::EDGetTokenT< std::vector< reco::CaloCluster > > EEclusters_token_
void produce(edm::Event &, const edm::EventSetup &) override
Method will merge the producers and put them back to event.
void mergeTogether(std::vector< reco::CaloCluster > &merge, const std::vector< reco::CaloCluster > &EE, const std::vector< reco::CaloCluster > &HSi, const std::vector< reco::CaloCluster > &HSci)
method merge three vectors of reco::CaloCluster to one
void mergeTime(edm::Event &evt, size_t size, std::vector< std::pair< float, float >> ×)
Merge value map of time for all parts of detector together to vector times.
edm::EDGetTokenT< std::vector< reco::CaloCluster > > HSciclusters_token_
#define DEFINE_FWK_MODULE(type)
void add(std::string const &label, ParameterSetDescription const &psetDescription)
const edm::EDGetTokenT< edm::ValueMap< std::pair< float, float > > > clustersTimeEE_token_
void createMerge(edm::Event &evt, const edm::EDGetTokenT< T > &EE_token, const edm::EDGetTokenT< T > &HSi_token, const edm::EDGetTokenT< T > &HSci_token, T &merge)
get info form event and then call merge