CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Classes | Functions
PhotonRegressionValueMapProducer.cc File Reference
#include "FWCore/Framework/interface/Frameworkfwd.h"
#include "FWCore/Framework/interface/stream/EDProducer.h"
#include "FWCore/Framework/interface/Event.h"
#include "FWCore/Framework/interface/MakerMacros.h"
#include "FWCore/ParameterSet/interface/ParameterSet.h"
#include "DataFormats/Common/interface/ValueMap.h"
#include "DataFormats/Common/interface/View.h"
#include "DataFormats/EgammaCandidates/interface/Photon.h"
#include "DataFormats/PatCandidates/interface/Photon.h"
#include "DataFormats/PatCandidates/interface/PackedCandidate.h"
#include "RecoEcal/EgammaCoreTools/interface/EcalClusterLazyTools.h"
#include <memory>
#include <vector>

Go to the source code of this file.

Classes

class  PhotonRegressionValueMapProducer
 

Functions

template<typename LazyTools , typename SeedType >
void calculateValues (EcalClusterLazyToolsBase *tools_tocast, const SeedType &the_seed, std::vector< float > &sigmaIPhiIPhi, std::vector< float > &sigmaIEtaIPhi, std::vector< float > &e2x5Max, std::vector< float > &e2x5Left, std::vector< float > &e2x5Right, std::vector< float > &e2x5Top, std::vector< float > &e2x5Bottom)
 
static const
edm::ParameterSetDescriptionFillerPluginFactory::PMaker
< edm::ParameterSetDescriptionFiller
< PhotonRegressionValueMapProducer > > 
s_filler__LINE__ ("PhotonRegressionValueMapProducer")
 
static const
edm::MakerPluginFactory::PMaker
< edm::WorkerMaker
< PhotonRegressionValueMapProducer > > 
s_maker__LINE__ ("PhotonRegressionValueMapProducer")
 

Function Documentation

template<typename LazyTools , typename SeedType >
void calculateValues ( EcalClusterLazyToolsBase tools_tocast,
const SeedType &  the_seed,
std::vector< float > &  sigmaIPhiIPhi,
std::vector< float > &  sigmaIEtaIPhi,
std::vector< float > &  e2x5Max,
std::vector< float > &  e2x5Left,
std::vector< float > &  e2x5Right,
std::vector< float > &  e2x5Top,
std::vector< float > &  e2x5Bottom 
)
inline

Definition at line 111 of file PhotonRegressionValueMapProducer.cc.

References edm::detail::isnan(), cmsHarvester::sep, and mathSSE::sqrt().

119  {
120  LazyTools* tools = static_cast<LazyTools*>(tools_tocast);
121 
122  float spp = -999;
123  std::vector<float> vCov = tools->localCovariances( the_seed );
124  spp = (isnan(vCov[2]) ? 0. : sqrt(vCov[2]));
125  float sep = vCov[1];
126  sigmaIPhiIPhi.push_back(spp);
127  sigmaIEtaIPhi.push_back(sep);
128  e2x5Max .push_back(tools->e2x5Max(the_seed) );
129  e2x5Left .push_back(tools->e2x5Left(the_seed) );
130  e2x5Right .push_back(tools->e2x5Right(the_seed) );
131  e2x5Top .push_back(tools->e2x5Top(the_seed) );
132  e2x5Bottom.push_back(tools->e2x5Bottom(the_seed) );
133 }
bool isnan(float x)
Definition: math.h:13
T sqrt(T t)
Definition: SSEVec.h:48
static const edm::ParameterSetDescriptionFillerPluginFactory::PMaker<edm::ParameterSetDescriptionFiller< PhotonRegressionValueMapProducer > > s_filler__LINE__ ( "PhotonRegressionValueMapProducer"  )
static
static const edm::MakerPluginFactory ::PMaker< edm::WorkerMaker< PhotonRegressionValueMapProducer > > s_maker__LINE__ ( "PhotonRegressionValueMapProducer"  )
static