|
![CMS Logo](/cmsdoxygen/common/rightImage.jpg) |
Go to the documentation of this file.
39 }
else if (
pdgId == 11) {
41 }
else if (
pdgId == 13) {
69 const bool doNose_ =
false;
84 : detector_(ps.getParameter<
std::
string>(
"detector")),
85 doNose_(detector_ ==
"HFNose"),
91 associatorLayerClusterSimCluster_(ps.getUntrackedParameter<
edm::
InputTag>(
"layerClusterSimClusterAssociator")),
92 associatorMapSimToReco_token_(
95 produces<std::vector<Trackster>>();
96 produces<std::vector<float>>();
109 descriptions.
add(
"trackstersFromSimClustersProducer",
desc);
113 auto result = std::make_unique<std::vector<Trackster>>();
114 auto output_mask = std::make_unique<std::vector<float>>();
126 result->reserve(num_simclusters);
127 for (
const auto& [
key,
values] : simToRecoColl) {
128 auto const& sc = *(
key);
135 for (
auto const& [lc, energyScorePair] :
values) {
136 if (inputClusterMask[lc.index()] > 0) {
137 tmpTrackster.
vertices().push_back(lc.index());
138 double fraction = energyScorePair.first / lc->energy();
139 (*output_mask)[lc.index()] -=
fraction;
143 tmpTrackster.
setIdProbability(tracksterParticleTypeFromPdgId(sc.pdgId(), sc.charge()), 1.
f);
144 tmpTrackster.
setSeed(
key.id(), simClusterIndex);
145 result->emplace_back(tmpTrackster);
const edm::EDGetTokenT< std::vector< float > > filtered_layerclusters_mask_token_
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
void setSeed(edm::ProductID pid, int index)
void produce(edm::Event &, const edm::EventSetup &) override
edm::EDGetTokenT< std::vector< SimCluster > > simclusters_token_
Monte Carlo truth information used for tracking validation.
TrackstersFromSimClustersProducer(const edm::ParameterSet &)
~TrackstersFromSimClustersProducer() override
void assignPCAtoTracksters(std::vector< Trackster > &, const std::vector< reco::CaloCluster > &, const edm::ValueMap< std::pair< float, float >> &, double, bool energyWeight=true)
#define DEFINE_FWK_MODULE(type)
void add(std::string const &label, ParameterSetDescription const &psetDescription)
std::vector< uint8_t > & vertex_multiplicity()
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
edm::InputTag associatorLayerClusterSimCluster_
const edm::EDGetTokenT< edm::ValueMap< std::pair< float, float > > > clustersTime_token_
edm::AssociationMap< edm::OneToManyWithQualityGeneric< SimClusterCollection, reco::CaloClusterCollection, std::pair< float, float > > > SimToRecoCollectionWithSimClusters
edm::ESGetToken< CaloGeometry, CaloGeometryRecord > geom_token_
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
bool getData(T &iHolder) const
const edm::EDGetTokenT< std::vector< reco::CaloCluster > > clusters_token_
edm::EDGetTokenT< hgcal::SimToRecoCollectionWithSimClusters > associatorMapSimToReco_token_
std::vector< unsigned int > & vertices()
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e< void, edm::EventID const &, edm::Timestamp const & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
hgcal::RecHitTools rhtools_
Abs< T >::type abs(const T &t)
bool get(ProductID const &oid, Handle< PROD > &result) const
void setIdProbability(ParticleType type, float value)