10 _useKDTree(conf.getParameter<bool>(
"useKDTree")),
11 _debug(conf.getUntrackedParameter<bool>(
"debug",
false)) {}
25 "PreshowerAndECALLinker");
31 switch( elem1->
type() ){
52 if( elem1->
type() < elem2->
type() ) {
63 <<
"PFBlockElementCluster's refs are null!";
67 if (
_useKDTree && pselem->isMultilinksValide() ) {
72 const double ecalPhi = ecalreppos.Phi();
73 const double ecalEta = ecalreppos.Eta();
76 reco::PFMultilinksType::const_iterator mlit = multilinks.begin();
77 for (; mlit != multilinks.end(); ++mlit)
78 if ((mlit->first == ecalPhi) && (mlit->second == ecalEta))
82 if (mlit != multilinks.end()){
85 psxyzpos.X()/1000. ,psxyzpos.Y()/1000.,
std::vector< std::pair< double, double > > PFMultilinksType
Abstract This class is used by the KDTree Track / Ecal Cluster linker to store all found links...
Abstract base class for a PFBlock element (track, cluster...)
static double computeDist(double eta1, double phi1, double eta2, double phi2, bool etaPhi=true)
computes a chisquare
static double testECALAndPSByRecHit(const reco::PFCluster &clusterECAL, const reco::PFCluster &clusterPS, bool debug=false)
const PFClusterRef & clusterRef() const
bool linkPrefilter(const reco::PFBlockElement *, const reco::PFBlockElement *) const override
bool isNull() const
Checks for null.
PreshowerAndECALLinker(const edm::ParameterSet &conf)
double testLink(const reco::PFBlockElement *, const reco::PFBlockElement *) const override
XYZPointD XYZPoint
point in space with cartesian internal representation
bool isMultilinksValide() const
ROOT::Math::PositionVector3D< ROOT::Math::CylindricalEta3D< double > > REPPoint
#define DEFINE_EDM_PLUGIN(factory, type, name)
volatile std::atomic< bool > shutdown_flag false
const PFMultilinksType & getMultilinks() const