71 std::vector<DetId> indexToStore;
72 indexToStore.reserve(100);
75 for(
auto& ele : *eles){
77 float scEt = ele.superCluster()->energy()*
std::sin(ele.superCluster()->position().theta());
82 for(
auto& pho : *phos){
83 float scEt = pho.superCluster()->energy()*
std::sin(pho.superCluster()->position().theta());
88 for(
auto&
sc : *superClusters){
95 std::sort(indexToStore.begin(),indexToStore.end());
96 std::unique(indexToStore.begin(),indexToStore.end());
98 auto detIdCollection = std::make_unique<DetIdCollection>(indexToStore);
112 const float scEta = superClus.
eta();
114 const float scPhi = superClus.
phi();
118 for (
size_t clusNr=0;clusNr<clusters.size();clusNr++){
124 const auto esClusters = std::equal_range(eeClusToESMap.begin(),eeClusToESMap.end(),keyVal,
127 bool{
return rhs.first<lhs.first;}
130 for(
auto esIt = esClusters.first;esIt!=esClusters.second;++esIt){
132 for(
const auto& hitAndFrac : esIt->second->hitsAndFractions()){
133 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)
std::vector< std::pair< CaloClusterPtr::key_type, edm::Ptr< PFCluster > > > EEtoPSAssociation
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())
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