40 #include <Math/VectorUtil.h> 154 :
isMC_ (iConfig.getParameter<
bool>(
"isMC"))
155 ,
deltaR_ (iConfig.getParameter<double>(
"deltaR"))
156 ,
ptThreshold_ (iConfig.getParameter<double>(
"ptThreshold"))
254 std::unique_ptr<noZS::EcalClusterLazyTools> lazyTools;
257 lazyTools = std::make_unique<noZS::EcalClusterLazyTools>(
271 int bx =
pu.getBunchCrossing();
299 for(
auto const& ele :
src->ptrs())
305 const auto&
seed = *(ele->superCluster()->seed());
310 eleQ_ = ele->charge();
311 ele3Q_ = ele->chargeInfo().isGsfCtfScPixConsistent;
313 for (
int iVar = 0; iVar <
nVars_; ++iVar) {
334 for (
size_t k = 0; k < nEleMaps_; ++k) mvaPasses_[k] = static_cast<int>((*decisions[
k])[ele]);
353 for(
auto const& particle : genParticles) {
355 if(
std::abs(particle.pdgId()) != 11 || particle.status() != 1 )
361 closestElectron = &particle;
393 desc.
add<
bool>(
"doEnergyMatrix",
false);
394 desc.
add<
int>(
"energyMatrixSize", 2)->setComment(
"extension of crystals in each direction away from the seed");
395 desc.
add<
bool>(
"isMC",
true);
396 desc.
add<
double>(
"deltaR", 0.1);
397 desc.
add<
double>(
"ptThreshold", 5.0);
398 desc.
add<std::vector<std::string>>(
"eleMVAs", {});
399 desc.
add<std::vector<std::string>>(
"eleMVALabels", {});
400 desc.
add<std::vector<std::string>>(
"eleMVAValMaps", {});
401 desc.
add<std::vector<std::string>>(
"eleMVAValMapLabels", {});
402 desc.
add<std::vector<std::string>>(
"eleMVACats", {});
403 desc.
add<std::vector<std::string>>(
"eleMVACatLabels", {});
static const std::string kSharedResource
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
EventNumber_t event() const
const double ptThreshold_
const std::string & getName(int index) const
const LorentzVector & p4(P4Kind kind) const
const MVAVariableHelper< reco::GsfElectron > variableHelper_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
bool isDirectHardProcessTauDecayProductFinalState() const
const MultiTokenT< edm::View< reco::GenParticle > > genParticles_
edm::LuminosityBlockNumber_t luminosityBlock() const
T * make(const Args &...args) const
make new ROOT object
const bool doEnergyMatrix_
float getValue(int index, const ParticleType &particle, const std::vector< float > &auxVariables) const
std::vector< edm::EDGetTokenT< edm::ValueMap< int > > > mvaCatTokens_
std::vector< float > mvaValues_
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
const MultiTokenT< EcalRecHitCollection > ebRecHits_
#define DEFINE_FWK_MODULE(type)
void addDefault(ParameterSetDescription const &psetDescription)
std::vector< float > energyMatrix_
ConsumesCollector consumesCollector()
Use a ConsumesCollector to gather consumes information from helper functions.
std::vector< int > mvaPasses_
const std::vector< std::string > valMapBranchNames_
Abs< T >::type abs(const T &t)
std::vector< int > mvaCats_
ElectronMVANtuplizer(const edm::ParameterSet &)
edm::Handle< T > getValidHandle(const edm::Event &iEvent) const
ParameterDescriptionBase * add(U const &iLabel, T const &value)
const std::vector< std::string > eleMapBranchNames_
bool fromHardProcessFinalState() const
const std::vector< float > getAuxVariables(edm::Ptr< ParticleType > const &particlePtr, const edm::Event &iEvent) const
std::vector< float > vars_
const MultiTokenT< std::vector< PileupSummaryInfo > > pileup_
MVAVariableManager< reco::GsfElectron > mvaVarMngr_
std::vector< edm::EDGetTokenT< edm::ValueMap< float > > > valMapTokens_
void analyze(const edm::Event &, const edm::EventSetup &) override
int matchToTruth(reco::GsfElectron const &electron, edm::View< reco::GenParticle > const &genParticles) const
edm::Handle< T > getHandle(const edm::Event &iEvent) const
const MultiTokenT< EcalRecHitCollection > eeRecHits_
const MultiTokenT< std::vector< reco::Vertex > > vertices_
const std::vector< std::string > mvaCatTags_
std::vector< edm::EDGetTokenT< edm::ValueMap< bool > > > eleMapTokens_
const MultiTokenT< edm::View< reco::GsfElectron > > src_
const int energyMatrixSize_
const std::vector< std::string > mvaCatBranchNames_
const std::vector< std::string > eleMapTags_
const std::vector< std::string > valMapTags_