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){
89 float scEt = sc.energy()*
std::sin(sc.position().theta());
95 std::sort(indexToStore.begin(),indexToStore.end());
96 std::unique(indexToStore.begin(),indexToStore.end());
98 std::auto_ptr< DetIdCollection > detIdCollection (
new 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
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_
virtual void produce(edm::Event &, const edm::EventSetup &)
producer
double eta() const
pseudorapidity of cluster centroid
edm::EDGetTokenT< reco::PFCluster::EEtoPSAssociation > eeClusToESMapToken_
edm::EDGetTokenT< reco::PFClusterCollection > ecalPFClustersToken_
Container::value_type value_type
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
std::vector< std::pair< CaloClusterPtr::key_type, edm::Ptr< PFCluster > > > EEtoPSAssociation
T1 deltaR2(T1 eta1, T2 phi1, T3 eta2, T4 phi2)
edm::EDGetTokenT< reco::PhotonCollection > phosToken_
std::vector< PFCluster > PFClusterCollection
collection of PFCluster objects
edm::EDGetTokenT< reco::SuperClusterCollection > superClustersToken_
edm::EDCollection< DetId > DetIdCollection
double phi() const
azimuthal angle of cluster centroid
virtual void beginRun(edm::Run const &, const edm::EventSetup &) overridefinal
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