55 std::vector<DetId> indexToStore;
56 indexToStore.reserve(100);
59 for (
auto& ele : *eles) {
60 float scEt = ele.superCluster()->energy() *
std::sin(ele.superCluster()->position().theta());
62 addDetIds(*ele.superCluster(), *ecalPFClusters, *eeClusToESMap, indexToStore);
66 for (
auto& pho : *phos) {
67 float scEt = pho.superCluster()->energy() *
std::sin(pho.superCluster()->position().theta());
69 addDetIds(*pho.superCluster(), *ecalPFClusters, *eeClusToESMap, indexToStore);
73 for (
auto&
sc : *superClusters) {
76 addDetIds(
sc, *ecalPFClusters, *eeClusToESMap, indexToStore);
81 std::sort(indexToStore.begin(), indexToStore.end());
82 std::unique(indexToStore.begin(), indexToStore.end());
84 auto detIdCollection = std::make_unique<DetIdCollection>(indexToStore);
93 std::vector<DetId>& detIdsToStore) {
94 const float scEta = superClus.
eta();
96 const float scPhi = superClus.
phi();
100 for (
size_t clusNr = 0; clusNr < clusters.size(); clusNr++) {
104 const auto esClusters = std::equal_range(
105 eeClusToESMap.begin(),
111 for (
auto esIt = esClusters.first; esIt != esClusters.second; ++esIt) {
113 for (
const auto& hitAndFrac : esIt->second->hitsAndFractions()) {
114 detIdsToStore.push_back(hitAndFrac.first);
PFLayer::Layer layer() const
cluster layer, see PFLayer.h in this directory
T getParameter(std::string const &) const
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
void produce(edm::Event &, const edm::EventSetup &) override
producer
Particle flow cluster, see clustering algorithm in PFClusterAlgo.
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Sin< T >::type sin(const T &t)
edm::EDGetTokenT< reco::GsfElectronCollection > elesToken_
double eta() const
pseudorapidity of cluster centroid
edm::EDGetTokenT< reco::PFCluster::EEtoPSAssociation > eeClusToESMapToken_
edm::EDGetTokenT< reco::PFClusterCollection > ecalPFClustersToken_
Container::value_type value_type
def unique(seq, keepstr=True)
void beginRun(edm::Run const &, const edm::EventSetup &) final
float energy() const
Energy. Note this is taken from the first SimTrack only.
float theta() const
Momentum polar angle. Note this is taken from the first SimTrack only.
constexpr auto deltaR2(const T1 &t1, const T2 &t2) -> decltype(t1.eta())
std::vector< std::pair< CaloClusterPtr::key_type, edm::Ptr< PFCluster > > > EEtoPSAssociation
edm::EDGetTokenT< reco::PhotonCollection > phosToken_
std::vector< PFCluster > PFClusterCollection
collection of PFCluster objects
edm::EDGetTokenT< reco::SuperClusterCollection > superClustersToken_
double phi() const
azimuthal angle of cluster centroid
std::string interestingDetIdCollection_
void addDetIds(const reco::SuperCluster &superClus, reco::PFClusterCollection clusters, const reco::PFCluster::EEtoPSAssociation &eeClusToESMap, std::vector< DetId > &detIdsToStore)
EgammaIsoESDetIdCollectionProducer(const edm::ParameterSet &)
ctor