91 payload->
data.clear();
97 std::map<TString, std::vector<float>> gridOfBins;
98 for(TString binVariable : {
"eta",
"pt",
"rho"}){
100 edm::LogError(
"NoBins") <<
"Missing bin information for " << binVariable <<
" in input file" << std::endl;
108 std::map<std::vector<int>, TH1*> pdfs;
110 for(TString
type : {
"gluon",
"quark"}){
111 int qgIndex = (
type ==
"gluon");
112 for(TString likelihoodVar : {
"mult",
"ptD",
"axis2"}){
113 int varIndex = (likelihoodVar ==
"mult" ? 0 : (likelihoodVar ==
"ptD" ? 1 : 2));
114 for(
int i = 0;
i < (int)gridOfBins[
"eta"].
size() - 1; ++
i){
115 for(
int j = 0;
j < (int)gridOfBins[
"pt"].
size() - 1; ++
j){
116 for(
int k = 0;
k < (int)gridOfBins[
"rho"].
size() - 1; ++
k){
119 category.
EtaMin = gridOfBins[
"eta"][
i];
120 category.
EtaMax = gridOfBins[
"eta"][
i+1];
121 category.
PtMin = gridOfBins[
"pt"][
j];
122 category.
PtMax = gridOfBins[
"pt"][
j+1];
123 category.
RhoMin = gridOfBins[
"rho"][
k];
124 category.
RhoMax = gridOfBins[
"rho"][
k+1];
128 TString
key = TString::Format(likelihoodVar +
"/" + likelihoodVar +
"_" +
type +
"_eta%d_pt%d_rho%d",
i,
j,
k);
129 TH1* pdf = (TH1*) f->Get(key);
131 edm::LogError(
"NoPDF") <<
"Could not found pdf with key " << key <<
" in input file" << std::endl;
135 std::vector<int> binNumbers = {qgIndex, varIndex,
i,
j,
k};
136 pdfs[binNumbers] = pdf;
141 for(
int k = 0;
k < (int)gridOfBins[
"rho"].
size() - 1; ++
k){
142 std::vector<int> binNumbers = {qgIndex, varIndex,
i,
j,
k};
146 for(
int j = 0;
j < (int)gridOfBins[
"pt"].
size() - 1; ++
j){
147 for(
int k = 0;
k < (int)gridOfBins[
"rho"].
size() - 1; ++
k){
148 std::vector<int> binNumbers = {qgIndex, varIndex,
i,
j,
k};
164 payload->
data.push_back(entry);
167 sprintf(buff,
"%6d) var=%1d\t\tqg=%1d\t\teta={%5.2f,%5.2f}\t\tpt={%8.2f,%8.2f}\t\trho={%6.2f,%8.2f}", i++,
184 edm::LogInfo(
"UserOutput") <<
"Opening PoolDBOutputService" << std::endl;
188 edm::LogInfo(
"UserOutput") <<
"Setting up payload with " << payload->
data.size() <<
" entries and tag " <<
payloadTag << std::endl;
QGLikelihoodCategory category
QGLikelihoodCategory qgValidRange
void tryToMerge(std::map< std::vector< int >, QGLikelihoodCategory > &, std::map< std::vector< int >, TH1 * > &, std::vector< int > &, int)
void appendSinceTime(T *payloadObj, cond::Time_t sinceTime, const std::string &recordName, bool withlogging=false)
QGLikelihoodObject containing valid range and entries with category and histogram (mean is not used a...
bool isNewTagRequest(const std::string &recordName)
std::string inputRootFile
cond::Time_t beginOfTime() const
QGLikelihoodObject::Histogram transformToHistogramObject(TH1 *)
Category structure: ranges associated with QGLikelihood histograms.
string key
FastSim: produces sample of signal events, overlayed with premixed minbias events.
void createNewIOV(T *firstPayloadObj, cond::Time_t firstSinceTime, cond::Time_t firstTillTime, const std::string &recordName, bool withlogging=false)
cond::Time_t endOfTime() const
std::vector< Entry > data
bool getVectorFromFile(TFile *, std::vector< float > &, const TString &)
tuple size
Write out results.