39 #include <Math/VectorUtil.h> 137 for (
auto & particle : genParticles) {
139 if(
abs(particle.pdgId()) != 22 || particle.status() != 1 )
continue;
144 closestPhoton = &particle;
169 ,
isMC_ (iConfig.getParameter<
bool>(
"isMC"))
170 ,
ptThreshold_ (iConfig.getParameter<double>(
"ptThreshold"))
171 ,
deltaR_ (iConfig.getParameter<double>(
"deltaR"))
255 std::unique_ptr<noZS::EcalClusterLazyTools> lazyTools;
258 lazyTools = std::make_unique<noZS::EcalClusterLazyTools>(
266 int bx =
pu.getBunchCrossing();
293 for(
auto const& pho :
src->ptrs())
302 const auto&
seed = *(pho->superCluster()->seed());
307 for (
int iVar = 0; iVar <
nVars_; ++iVar) {
317 for (
size_t k = 0; k < nPhoMaps_; ++k) mvaPasses_[k] = static_cast<int>((*decisions[
k])[pho]);
343 desc.
add<std::vector<std::string>>(
"phoMVAs", {});
344 desc.
add<std::vector<std::string>>(
"phoMVALabels", {});
345 desc.
add<std::vector<std::string>>(
"phoMVAValMaps", {});
346 desc.
add<std::vector<std::string>>(
"phoMVAValMapLabels", {});
347 desc.
add<std::vector<std::string>>(
"phoMVACats", {});
348 desc.
add<std::vector<std::string>>(
"phoMVACatLabels", {});
349 desc.
add<
bool>(
"doEnergyMatrix",
false);
350 desc.
add<
int>(
"energyMatrixSize", 2)->setComment(
"extension of crystals in each direction away from the seed");
351 desc.
add<
bool>(
"isMC",
true);
352 desc.
add<
double>(
"ptThreshold", 15.0);
353 desc.
add<
double>(
"deltaR", 0.1);
static const std::string kSharedResource
EventNumber_t event() const
const double ptThreshold_
bool isPromptFinalState() const
const std::string & getName(int index) const
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
const MVAVariableHelper< reco::Photon > variableHelper_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
MVAVariableManager< reco::Photon > mvaVarMngr_
edm::LuminosityBlockNumber_t luminosityBlock() const
const MultiTokenT< edm::View< reco::Photon > > src_
T * make(const Args &...args) const
make new ROOT object
float getValue(int index, const ParticleType &particle, const std::vector< float > &auxVariables) const
const MultiTokenT< EcalRecHitCollection > ebRecHits_
const bool doEnergyMatrix_
const std::vector< std::string > valMapBranchNames_
std::vector< int > mvaCats_
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
const std::vector< std::string > phoMapTags_
std::vector< int > mvaPasses_
const std::vector< std::string > valMapTags_
#define DEFINE_FWK_MODULE(type)
void addDefault(ParameterSetDescription const &psetDescription)
std::vector< float > mvaValues_
const MultiTokenT< EcalRecHitCollection > eeRecHits_
const MultiTokenT< std::vector< reco::Vertex > > vertices_
ConsumesCollector consumesCollector()
Use a ConsumesCollector to gather consumes information from helper functions.
Abs< T >::type abs(const T &t)
edm::Handle< T > getValidHandle(const edm::Event &iEvent) const
std::vector< edm::EDGetTokenT< edm::ValueMap< int > > > mvaCatTokens_
ParameterDescriptionBase * add(U const &iLabel, T const &value)
const std::vector< float > getAuxVariables(edm::Ptr< ParticleType > const &particlePtr, const edm::Event &iEvent) const
const LorentzVector & p4(P4type type) const
std::vector< edm::EDGetTokenT< edm::ValueMap< bool > > > phoMapTokens_
const MultiTokenT< edm::View< reco::GenParticle > > genParticles_
const std::vector< std::string > mvaCatBranchNames_
std::vector< edm::EDGetTokenT< edm::ValueMap< float > > > valMapTokens_
const int energyMatrixSize_
const MultiTokenT< std::vector< PileupSummaryInfo > > pileup_
const std::vector< std::string > phoMapBranchNames_
void analyze(const edm::Event &, const edm::EventSetup &) override
std::vector< float > energyMatrix_
std::vector< float > vars_
PhotonMVANtuplizer(const edm::ParameterSet &)
const std::vector< std::string > mvaCatTags_