10 using namespace RecoBTag;
13 etaRanges(pSet.getParameter< vector<double> >(
"etaRanges")),
14 ptRanges(pSet.getParameter< vector<double> >(
"ptRanges")),
15 produceEps(pSet.getParameter< bool >(
"produceEps")),
16 producePs(pSet.getParameter< bool >(
"producePs")),
17 moduleConfig(pSet.getParameter< vector<edm::
ParameterSet> >(
"tagConfig")),
18 flavPlots_(pSet.getParameter< std::
string >(
"flavPlots")),
19 makeDiffPlots_(pSet.getParameter< bool >(
"differentialPlots"))
32 for (vector<edm::ParameterSet>::const_iterator iModule =
moduleConfig.begin();
34 const string& dataFormatType = iModule->exists(
"type") ?
35 iModule->getParameter<
string>(
"type") :
37 if (dataFormatType ==
"JetTag") {
45 else if(dataFormatType ==
"TagCorrelation") {
63 bool etaActive_ , ptActive_;
64 double etaMin_, etaMax_, ptMin_, ptMax_ ;
87 return EtaPtBin(etaActive_ , etaMin_ , etaMax_ ,
88 ptActive_ , ptMin_ , ptMax_ );
93 for (vector<vector<JetTagPlotter*> >::iterator iJetLabel =
binJetTagPlotters.begin();
95 for (vector<JetTagPlotter*>::iterator iPlotter = iJetLabel->begin(); iPlotter != iJetLabel->end(); ++iPlotter)
99 for(vector<vector<BTagDifferentialPlot*> >::iterator iJetLabel =
differentialPlots.begin();
101 for (vector<BTagDifferentialPlot *>::iterator iPlotter = iJetLabel->begin();
102 iPlotter != iJetLabel->end(); ++ iPlotter)
108 for (vector<TagCorrelationPlotter* >::iterator iPlotter = iJetLabel->begin(); iPlotter != iJetLabel->end(); ++iPlotter)
112 for (vector<vector<BaseTagInfoPlotter*> >::iterator iJetLabel =
binTagInfoPlotters.begin();
114 for (vector<BaseTagInfoPlotter*>::iterator iPlotter = iJetLabel->begin(); iPlotter != iJetLabel->end(); ++iPlotter)
127 const int iEtaStart = -1 ;
128 const int iEtaEnd =
etaRanges.size() - 1 ;
129 const int iPtStart = -1 ;
130 const int iPtEnd =
ptRanges.size() - 1 ;
134 int iTag = -1;
int iTagCorr = -1;
int iInfoTag = -1;
135 for (vector<edm::ParameterSet>::const_iterator iModule =
moduleConfig.begin();
138 const string& dataFormatType = iModule->exists(
"type") ?
139 iModule->getParameter<
string>(
"type") :
141 if (dataFormatType ==
"JetTag") {
143 const string& folderName = iModule->getParameter<
string>(
"folder");
146 vector<BTagDifferentialPlot*> * differentialPlotsConstantEta =
new vector<BTagDifferentialPlot*> () ;
147 vector<BTagDifferentialPlot*> * differentialPlotsConstantPt =
new vector<BTagDifferentialPlot*> () ;
150 const double& effBConst =
151 iModule->getParameter<
edm::ParameterSet>(
"parameters").getParameter<double>(
"effBConst");
154 for (
int iEta = iEtaStart ; iEta < iEtaEnd ; iEta++ ) {
157 differentialPlotsConstantEta->push_back ( etaConstDifferentialPlot );
160 for (
int iPt = iPtStart ; iPt < iPtEnd ; iPt++ ) {
164 differentialPlotsConstantPt->push_back ( ptConstDifferentialPlot );
168 for (
int iEta = iEtaStart ; iEta < iEtaEnd ; iEta++ ) {
170 for (
int iPt = iPtStart ; iPt < iPtEnd ; iPt++ ) {
181 (*differentialPlotsConstantEta)[iEta+1]->addBinPlotter ( jetTagPlotter ) ;
182 (*differentialPlotsConstantPt )[iPt+1] ->addBinPlotter ( jetTagPlotter ) ;
188 differentialPlots.at(iTag).reserve(differentialPlotsConstantEta->size()+differentialPlotsConstantPt->size()) ;
196 delete differentialPlotsConstantEta ;
197 delete differentialPlotsConstantPt ;
199 }
else if(dataFormatType ==
"TagCorrelation") {
205 for (
int iEta = iEtaStart ; iEta != iEtaEnd ; ++iEta) {
207 for(
int iPt = iPtStart ; iPt != iPtEnd ; ++iPt) {
220 const string& folderName = iModule->getParameter<
string>(
"folder");
222 for (
int iEta = iEtaStart ; iEta < iEtaEnd ; iEta++ ) {
224 for (
int iPt = iPtStart ; iPt < iPtEnd ; iPt++ ) {
244 for (
unsigned int iJetLabel = 0; iJetLabel !=
binJetTagPlotters.size(); ++iJetLabel) {
246 for (
int iPlotter = 0; iPlotter != plotterSize; ++iPlotter) {
255 (*iPlotter)->process(ibook);
261 for (vector<vector<BaseTagInfoPlotter*> >::iterator iJetLabel =
binTagInfoPlotters.begin();
263 for (vector<BaseTagInfoPlotter*>::iterator iPlotter = iJetLabel->begin(); iPlotter != iJetLabel->end(); ++iPlotter) {
264 (*iPlotter)->finalize(ibook, iget);
BaseTagInfoPlotter * buildPlotter(const std::string &dataFormatType, const std::string &tagName, const EtaPtBin &etaPtBin, const edm::ParameterSet &pSet, const std::string &folderName, const unsigned int &mc, const bool &wf, DQMStore::IBooker &ibook)
#define DEFINE_FWK_MODULE(type)
volatile std::atomic< bool > shutdown_flag false