19 #include "FWCore/Framework/interface/Event.h" 20 #include "FWCore/ParameterSet/interface/ParameterSet.h" 24 #include "SimDataFormats/GeneratorProducts/interface/GenRunInfoProduct.h" 42 Metadata::Metadata(edm::Service<TFileService> & fs,
const bool & is_mc,
const std::string & dir )
62 treeXS_ -> Branch(
"myCrossSection" , &
myXSec_ ,
"myCrossSection/D");
63 treeXS_ -> Branch(
"crossSection" , &
XSec_ ,
"crossSection_generator/D");
90 definitions ->
Fill();
107 void Metadata::AddDefinitions(
const std::vector<std::string> & names,
const std::vector<std::string> & aliases,
const std::string & category)
115 std::vector<std::string> names;
116 std::vector<std::string> aliases;
117 for (
auto & ta : tas )
119 names.push_back(ta.title);
120 aliases.push_back(ta.alias);
168 edm::Handle<GenRunInfoProduct> genRunInfo;
169 run.getByLabel( inputTag, genRunInfo );
171 XSec_ = genRunInfo -> crossSection();