30 #include <Math/VectorUtil.h>
35 namespace egammaisolation {
41 :
etMin_(par.getParameter<double>(
"etMin")),
42 conesize_(par.getParameter<double>(
"extRadius")),
43 scmatch_(par.getParameter<bool>(
"superClusterMatch")),
57 <<
"This extractor " << (
typeid(
this).
name()) <<
" is not made for tracks";
82 using namespace egammaisolation;
83 using namespace reco::isodeposit;
93 double delta1 = 1000.;
94 double deltacur = 1000.;
96 bool MATCHEDSC =
false;
98 Direction candDir(position.eta(), position.phi());
101 deposit.addCandEnergy(sc->energy() *
sin(2 * atan(
exp(-sc->eta()))));
103 for (
auto const& scItr : ev.
get(superClusterToken_)) {
106 if (supercluster->
seed()->algo() == 0) {
108 if (deltacur < delta1) {
110 matchedsupercluster = supercluster;
119 for (
auto const& cItr : ev.
get(basicClusterToken_)) {
122 int ebc_bcalgo = cluster->
algo();
123 double ebc_bce = cluster->
energy();
124 double ebc_bceta = cluster->
eta();
125 double ebc_bcet = ebc_bce *
sin(2 * atan(
exp(ebc_bceta)));
126 double newDelta = 0.;
128 if (ebc_bcet > etMin_ && ebc_bcalgo == 0) {
131 if (MATCHEDSC || !scmatch_) {
132 bool inSuperCluster =
false;
137 for (; theEclust != matchedsupercluster->
clustersEnd(); ++theEclust) {
138 if ((**theEclust) == (*cluster))
139 inSuperCluster =
true;
142 if (!inSuperCluster || !scmatch_) {
144 if (newDelta < conesize_) {
145 deposit.addDeposit(
Direction(cluster->
eta(), cluster->
phi()), ebc_bcet);
const math::XYZPoint & position() const
cluster centroid position
const edm::EventSetup & c
Sin< T >::type sin(const T &t)
std::vector< Track > TrackCollection
collection of Tracks
auto const & tracks
cannot be loose
Exp< T >::type exp(const T &t)
double eta() const
pseudorapidity of cluster centroid
AlgoId algo() const
algorithm identifier
std::vector< SuperCluster > SuperClusterCollection
collection of SuperCluser objectr
bool get(ProductID const &oid, Handle< PROD > &result) const
double energy() const
cluster energy
XYZPointD XYZPoint
point in space with cartesian internal representation
std::vector< BasicCluster > BasicClusterCollection
collection of BasicCluster objects
static int position[264][3]
CaloCluster_iterator clustersBegin() const
fist iterator over BasicCluster constituents
T get() const
get a component
#define DEFINE_EDM_PLUGIN(factory, type, name)
const CaloClusterPtr & seed() const
seed BasicCluster
double phi() const
azimuthal angle of cluster centroid
CaloCluster_iterator clustersEnd() const
last iterator over BasicCluster constituents