00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014 #include "HLTriggerOffline/Egamma/interface/EmDQMFeeder.h"
00015
00017
00019 EmDQMFeeder::EmDQMFeeder(const edm::ParameterSet& iConfig_) :
00020 iConfig(iConfig_)
00021 {
00022
00023
00024 triggerObject_ = iConfig_.getParameter<edm::InputTag>("triggerobject");
00025 verbosity_ = iConfig_.getUntrackedParameter<unsigned int>("verbosity",0);
00026 }
00027
00028
00029 EmDQMFeeder::~EmDQMFeeder()
00030 {
00031
00032
00033
00034
00035 }
00036
00037
00039
00041
00042
00043 void
00044 EmDQMFeeder::analyze(const edm::Event& iEvent, const edm::EventSetup& iSetup)
00045 {
00046 using namespace edm;
00047
00048 for (unsigned i = 0; i < emDQMmodules.size(); ++i) {
00049 emDQMmodules[i]->analyze(iEvent, iSetup);
00050 }
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061 }
00062
00063
00064
00065 void
00066 EmDQMFeeder::beginJob()
00067 {
00068
00069
00070 }
00071
00072
00073 void
00074 EmDQMFeeder::endJob()
00075 {
00076 for (unsigned i = 0; i < emDQMmodules.size(); ++i)
00077 emDQMmodules[i]->endJob();
00078 }
00079
00080
00081 void
00082 EmDQMFeeder::beginRun(edm::Run const& iRun, edm::EventSetup const& iSetup)
00083 {
00084 bool changed(true);
00085
00086 if (hltConfig_.init(iRun, iSetup, triggerObject_.process(), changed)) {
00087
00088
00089
00090 if (verbosity_ >= OUTPUT_ALL) {
00091
00092 edm::LogPrint("EmDQMFeeder") << "inited=" << hltConfig_.inited();
00093 edm::LogPrint("EmDQMFeeder") << "changed=" << hltConfig_.changed();
00094 edm::LogPrint("EmDQMFeeder") << "processName=" << hltConfig_.processName();
00095 edm::LogPrint("EmDQMFeeder") << "tableName=" << hltConfig_.tableName();
00096 edm::LogPrint("EmDQMFeeder") << "size=" << hltConfig_.size();
00097 }
00098
00099
00100 std::vector<std::vector<std::string> > egammaPaths = findEgammaPaths();
00101
00102
00103
00104
00105
00106
00107 std::vector<std::string> filterModules;
00108
00109 for (unsigned int j=0; j < egammaPaths.size() ; j++) {
00110
00111 for (unsigned int i=0; i < egammaPaths.at(j).size() ; i++) {
00112
00113 const std::string pathName = egammaPaths.at(j).at(i);
00114 if (verbosity_ >= OUTPUT_ALL)
00115 edm::LogPrint("EmDQMFeeder") << "Path: " << pathName;
00116
00117
00118 filterModules = getFilterModules(pathName);
00119
00120
00121 edm::ParameterSet paramSet;
00122
00123 paramSet.addUntrackedParameter("pathIndex", hltConfig_.triggerIndex(pathName));
00124 paramSet.addParameter("@module_label", hltConfig_.removeVersion(pathName) + "_DQM");
00125
00126
00127 paramSet.addParameter("triggerobject", triggerObject_);
00128 paramSet.addParameter("genEtaAcc", iConfig.getParameter<double>("genEtaAcc"));
00129 paramSet.addParameter("genEtAcc", iConfig.getParameter<double>("genEtAcc"));
00130
00131
00132 double genEtMin = getPrimaryEtCut(pathName);
00133 if (genEtMin >= 0) {
00134 paramSet.addUntrackedParameter("genEtMin", genEtMin);
00135 } else {
00136 if (verbosity_ >= OUTPUT_WARNINGS)
00137 edm::LogWarning("EmDQMFeeder") << "Pathname: '" << pathName << "': Unable to determine a minimum Et. Will not include this path in the validation.";
00138 continue;
00139 }
00140
00141
00142
00143 double ptMax = iConfig.getUntrackedParameter<double>("PtMax",1000.);
00144 double ptMin = iConfig.getUntrackedParameter<double>("PtMin",0.);
00145 if (ptMax < (1.2*genEtMin)) {
00146 paramSet.addUntrackedParameter<double>("PtMax", (10*ceil(0.12 * genEtMin)));
00147 paramSet.addUntrackedParameter<double>("PtMin", (10*ceil(0.12 * genEtMin) - ptMax + ptMin));
00148 }
00149 else {
00150 paramSet.addUntrackedParameter<double>("PtMax", ptMax);
00151 paramSet.addUntrackedParameter<double>("PtMin", ptMin);
00152 }
00153
00154 paramSet.addUntrackedParameter("EtaMax", iConfig.getUntrackedParameter<double>("EtaMax", 2.7));
00155 paramSet.addUntrackedParameter("PhiMax", iConfig.getUntrackedParameter<double>("PhiMax", 3.15));
00156 paramSet.addUntrackedParameter("Nbins", iConfig.getUntrackedParameter<unsigned int>("Nbins",40));
00157 paramSet.addUntrackedParameter("minEtForEtaEffPlot", iConfig.getUntrackedParameter<unsigned int>("minEtForEtaEffPlot", 15));
00158 paramSet.addUntrackedParameter("useHumanReadableHistTitles", iConfig.getUntrackedParameter<bool>("useHumanReadableHistTitles", false));
00159 paramSet.addUntrackedParameter("mcMatchedOnly", iConfig.getUntrackedParameter<bool>("mcMatchedOnly", true));
00160 paramSet.addUntrackedParameter("noPhiPlots", iConfig.getUntrackedParameter<bool>("noPhiPlots", true));
00161 paramSet.addUntrackedParameter("noIsolationPlots", iConfig.getUntrackedParameter<bool>("noIsolationPlots", true));
00162
00163
00164 paramSet.addUntrackedParameter<unsigned int>("verbosity", verbosity_);
00165
00166
00167 switch (j) {
00168 case TYPE_SINGLE_ELE:
00169 paramSet.addParameter<unsigned>("reqNum", 1);
00170 paramSet.addParameter<int>("pdgGen", 11);
00171 paramSet.addParameter<edm::InputTag>("cutcollection", edm::InputTag("fiducialWenu"));
00172 paramSet.addParameter<int>("cutnum", 1);
00173 break;
00174 case TYPE_DOUBLE_ELE:
00175 paramSet.addParameter<unsigned>("reqNum", 2);
00176 paramSet.addParameter<int>("pdgGen", 11);
00177 paramSet.addParameter<edm::InputTag>("cutcollection", edm::InputTag("fiducialZee"));
00178 paramSet.addParameter<int>("cutnum", 2);
00179 break;
00180 case TYPE_TRIPLE_ELE:
00181 paramSet.addParameter<unsigned>("reqNum", 3);
00182 paramSet.addParameter<int>("pdgGen", 11);
00183 paramSet.addParameter<edm::InputTag>("cutcollection", edm::InputTag("fiducialZee"));
00184 paramSet.addParameter<int>("cutnum", 3);
00185 break;
00186 case TYPE_SINGLE_PHOTON:
00187 paramSet.addParameter<unsigned>("reqNum", 1);
00188 paramSet.addParameter<int>("pdgGen", 22);
00189 paramSet.addParameter<edm::InputTag>("cutcollection", edm::InputTag("fiducialGammaJet"));
00190 paramSet.addParameter<int>("cutnum", 1);
00191 break;
00192 case TYPE_DOUBLE_PHOTON:
00193 paramSet.addParameter<unsigned>("reqNum", 2);
00194 paramSet.addParameter<int>("pdgGen", 22);
00195 paramSet.addParameter<edm::InputTag>("cutcollection", edm::InputTag("fiducialDiGamma"));
00196 paramSet.addParameter<int>("cutnum", 2);
00197 }
00198
00199
00200
00201 if (iConfig.getParameter<bool>("isData")) paramSet.addParameter<edm::InputTag>("cutcollection", edm::InputTag("gsfElectrons"));
00202
00203 std::vector<edm::ParameterSet> filterVPSet;
00204 edm::ParameterSet filterPSet;
00205 std::string moduleLabel;
00206
00207
00208 for (std::vector<std::string>::iterator filter = filterModules.begin(); filter != filterModules.end(); ++filter) {
00209 std::string moduleType = hltConfig_.modulePSet(*filter).getParameter<std::string>("@module_type");
00210 moduleLabel = hltConfig_.modulePSet(*filter).getParameter<std::string>("@module_label");
00211
00212
00213 if (moduleType == "Pythia6GeneratorFilter" ||
00214 moduleType == "HLTTriggerTypeFilter" ||
00215 moduleType == "HLTLevel1Activity" ||
00216 moduleType == "HLTPrescaler" ||
00217 moduleType == "HLTBool")
00218 continue;
00219
00220
00221 if (moduleType == "HLTLevel1GTSeed") {
00222 filterPSet = makePSetForL1SeedFilter(moduleLabel);
00223 }
00224 else if (moduleType == "HLTEgammaL1MatchFilterRegional") {
00225 filterPSet = makePSetForL1SeedToSuperClusterMatchFilter(moduleLabel);
00226 }
00227 else if (moduleType == "HLTEgammaEtFilter") {
00228 filterPSet = makePSetForEtFilter(moduleLabel);
00229 }
00230 else if (moduleType == "HLTElectronOneOEMinusOneOPFilterRegional") {
00231 filterPSet = makePSetForOneOEMinusOneOPFilter(moduleLabel);
00232 }
00233 else if (moduleType == "HLTElectronPixelMatchFilter") {
00234 filterPSet = makePSetForPixelMatchFilter(moduleLabel);
00235 }
00236 else if (moduleType == "HLTEgammaGenericFilter") {
00237 filterPSet = makePSetForEgammaGenericFilter(moduleLabel);
00238 }
00239 else if (moduleType == "HLTEgammaGenericQuadraticFilter") {
00240 filterPSet = makePSetForEgammaGenericQuadraticFilter(moduleLabel);
00241 }
00242 else if (moduleType == "HLTElectronGenericFilter") {
00243 filterPSet = makePSetForElectronGenericFilter(moduleLabel);
00244 }
00245 else if (moduleType == "HLTEgammaDoubleEtDeltaPhiFilter") {
00246 filterPSet = makePSetForEgammaDoubleEtDeltaPhiFilter(moduleLabel);
00247 }
00248 else if (moduleType == "HLTGlobalSumsMET"
00249 || moduleType == "HLTMhtHtFilter"
00250 || moduleType == "HLTJetTag"
00251 || moduleType == "HLT1CaloJet"
00252 || moduleType == "HLT1CaloBJet"
00253 || moduleType == "HLT1Tau"
00254 || moduleType == "PFTauSelector"
00255 || moduleType == "EtMinCaloJetSelector"
00256 || moduleType == "LargestEtCaloJetSelector"
00257 || moduleType == "HLTEgammaTriggerFilterObjectWrapper"
00258 || moduleType == "HLTEgammaDoubleLegCombFilter"
00259
00260 || moduleType == "HLTPMMassFilter"
00261 || moduleType == "HLTHcalTowerFilter"
00262
00263 )
00264 continue;
00265 else {
00266 if (verbosity_ >= OUTPUT_WARNINGS)
00267 edm::LogWarning("EmDQMFeeder") << "No parameter set for filter '" << moduleLabel << "' with filter type '" << moduleType << "' added. Module will not be analyzed.";
00268 continue;
00269 }
00270
00271
00272 if (!filterPSet.empty()) {
00273 if (!hltConfig_.modulePSet(moduleLabel).exists("saveTags")) {
00274
00275
00276 if (moduleLabel.find("Unseeded") != std::string::npos && (j == TYPE_DOUBLE_PHOTON || j == TYPE_SINGLE_PHOTON)) {
00277 filterVPSet.back().addParameter<int>("theHLTOutputTypes", trigger::TriggerPhoton);
00278 }
00279 }
00280
00281
00282 if (filterPSet.getParameter<int>("ncandcut") < 0) filterPSet.addParameter<int>("ncandcut", paramSet.getParameter<int>("cutnum"));
00283 else if (filterPSet.getParameter<int>("ncandcut") > paramSet.getParameter<int>("cutnum")) {
00284 paramSet.addParameter<int>("cutnum", filterPSet.getParameter<int>("ncandcut"));
00285 paramSet.addParameter<unsigned>("reqNum", (unsigned)filterPSet.getParameter<int>("ncandcut"));
00286 }
00287
00288 filterVPSet.push_back(filterPSet);
00289 }
00290 else
00291 break;
00292
00293 }
00294
00295
00296 if (!filterPSet.empty()) {
00297 std::string lastModuleName = filterPSet.getParameter<edm::InputTag>("HLTCollectionLabels").label();
00298 if (!hltConfig_.modulePSet(lastModuleName).exists("saveTags")) {
00299
00300
00301 if ((j == TYPE_SINGLE_PHOTON || j == TYPE_DOUBLE_PHOTON) && pathName.rfind("Ele") == std::string::npos) {
00302 filterVPSet.back().addParameter<int>("theHLTOutputTypes", trigger::TriggerPhoton);
00303 }
00304 }
00305 paramSet.addParameter<std::vector<edm::ParameterSet> >("filters", filterVPSet);
00306 }
00307 else {
00308 if (verbosity_ >= OUTPUT_ALL)
00309 edm::LogPrint("EmDQMFeeder") << "Will not include this path in the validation due to errors while generating the parameter set.";
00310 continue;
00311 }
00312
00313
00314
00315
00316 emDQMmodules.push_back(new EmDQM(paramSet));
00317
00318 emDQMmodules.back()->beginJob();
00319 emDQMmodules.back()->beginRun(iRun, iSetup);
00320 }
00321
00322 }
00323
00324 if (changed) {
00325
00326
00327 }
00328 } else {
00329
00330
00331 if (verbosity_ >= OUTPUT_ERRORS)
00332 edm::LogError("EmDQMFeeder") << " HLT config extraction failure with process name '" << triggerObject_.process() << "'.";
00333
00334 }
00335 }
00336
00337
00338 void
00339 EmDQMFeeder::endRun(edm::Run const&iEvent, edm::EventSetup const&iSetup)
00340 {
00341 for (unsigned i = 0; i < emDQMmodules.size(); ++i)
00342 emDQMmodules[i]->endRun(iEvent, iSetup);
00343 }
00344
00345
00346 void
00347 EmDQMFeeder::beginLuminosityBlock(edm::LuminosityBlock const&lumi, edm::EventSetup const&iSetup)
00348 {
00349
00350
00351 }
00352
00353
00354 void
00355 EmDQMFeeder::endLuminosityBlock(edm::LuminosityBlock const& lumi, edm::EventSetup const& iSetup)
00356 {
00357
00358
00359 }
00360
00361
00362 void
00363 EmDQMFeeder::fillDescriptions(edm::ConfigurationDescriptions& descriptions) {
00364
00365
00366
00367
00368 edm::ParameterSetDescription desc;
00369 desc.setUnknown();
00370 descriptions.addDefault(desc);
00371 }
00372
00373
00374
00375 std::vector<std::vector<std::string> >
00376 EmDQMFeeder::findEgammaPaths()
00377 {
00378 std::vector<std::vector<std::string> > Paths(5);
00379
00380 for (unsigned int i=0; i<hltConfig_.size(); i++) {
00381
00382 std::string path = hltConfig_.triggerName(i);
00383
00384
00385 if (int(path.find("HLT_")) == 0) {
00386 if (path.find("HLT_Ele") != std::string::npos && path.rfind("Ele") == 4 && path.find("SC") == std::string::npos) {
00387 Paths[TYPE_SINGLE_ELE].push_back(path);
00388
00389 }
00390 if (path.find("HLT_Ele") != std::string::npos && path.find("EleId") != std::string::npos && path.rfind("Ele") == path.find("EleId")) {
00391 Paths[TYPE_SINGLE_ELE].push_back(path);
00392
00393 }
00394 else if (path.find("HLT_Ele") != std::string::npos && path.rfind("Ele") > 4) {
00395 Paths[TYPE_DOUBLE_ELE].push_back(path);
00396
00397 }
00398 else if (path.find("HLT_DoubleEle") != std::string::npos && path.find("Ele") == path.rfind("Ele")) {
00399 Paths[TYPE_DOUBLE_ELE].push_back(path);
00400
00401 }
00402 else if (path.find("HLT_Ele") != std::string::npos && path.find("SC") != std::string::npos) {
00403 Paths[TYPE_DOUBLE_ELE].push_back(path);
00404
00405 }
00406 else if (path.find("HLT_DoubleEle") != std::string::npos && path.find("Ele") != path.rfind("Ele")) {
00407 Paths[TYPE_TRIPLE_ELE].push_back(path);
00408
00409 }
00410 else if (path.find("HLT_TripleEle") != std::string::npos && path.find("Ele") == path.rfind("Ele")) {
00411 Paths[TYPE_TRIPLE_ELE].push_back(path);
00412
00413 }
00414 else if (path.find("HLT_Photon") != std::string::npos && path.find("Ele") != std::string::npos) {
00415 Paths[TYPE_DOUBLE_PHOTON].push_back(path);
00416
00417 }
00418 else if (path.find("HLT_Photon") != std::string::npos && path.rfind("Photon") == 4) {
00419 Paths[TYPE_SINGLE_PHOTON].push_back(path);
00420
00421 }
00422 else if (path.find("HLT_Photon") != std::string::npos && path.rfind("Photon") > 4) {
00423 Paths[TYPE_DOUBLE_PHOTON].push_back(path);
00424
00425 }
00426 else if (path.find("HLT_DoublePhoton") != std::string::npos) {
00427 Paths[TYPE_DOUBLE_PHOTON].push_back(path);
00428
00429 }
00430 }
00431
00432 }
00433 return Paths;
00434 }
00435
00436
00437
00438 std::vector<std::string>
00439 EmDQMFeeder::getFilterModules(const std::string& path)
00440 {
00441 std::vector<std::string> filters;
00442
00443
00444
00445
00446 for (unsigned int i=0; i<hltConfig_.size(path); i++) {
00447
00448 std::string module = hltConfig_.moduleLabel(path, i);
00449 std::string moduleType = hltConfig_.moduleType(module);
00450 std::string moduleEDMType = hltConfig_.moduleEDMType(module);
00451
00452
00453 if (moduleEDMType == "EDFilter" || moduleType.find("Filter") != std::string::npos) {
00454 filters.push_back(module);
00455
00456 }
00457 }
00458 return filters;
00459 }
00460
00461
00462
00463 double
00464 EmDQMFeeder::getPrimaryEtCut(const std::string& path)
00465 {
00466 double minEt = -1;
00467
00468 boost::regex reg("^HLT_.*?([[:digit:]]+).*");
00469
00470 boost::smatch what;
00471 if (boost::regex_match(path, what, reg, boost::match_extra))
00472 {
00473 minEt = boost::lexical_cast<double>(what[1]);
00474 }
00475
00476 return minEt;
00477 }
00478
00479
00480
00481 edm::ParameterSet
00482 EmDQMFeeder::makePSetForL1SeedFilter(const std::string& moduleName)
00483 {
00484
00485
00486
00487
00488 edm::ParameterSet retPSet;
00489
00490 retPSet.addParameter<std::vector<double> >("PlotBounds", std::vector<double>(2, 0.0));
00491
00492 retPSet.addParameter<edm::InputTag>("HLTCollectionLabels", edm::InputTag(moduleName, "", triggerObject_.process()));
00493 retPSet.addParameter<std::vector<edm::InputTag> >("IsoCollections", std::vector<edm::InputTag>(1, std::string("none")));
00494 retPSet.addParameter<int>("theHLTOutputTypes", trigger::TriggerL1NoIsoEG);
00495
00496
00497 if (moduleName.find("Single") != std::string::npos)
00498 retPSet.addParameter<int>("ncandcut", 1);
00499 else if (moduleName.find("Double") != std::string::npos)
00500 retPSet.addParameter<int>("ncandcut", 2);
00501 else if (moduleName.find("Triple") != std::string::npos)
00502 retPSet.addParameter<int>("ncandcut", 3);
00503 else
00504 retPSet.addParameter<int>("ncandcut", -1);
00505
00506 return retPSet;
00507 }
00508
00509
00510
00511 edm::ParameterSet
00512 EmDQMFeeder::makePSetForL1SeedToSuperClusterMatchFilter(const std::string& moduleName)
00513 {
00514
00515
00516
00517
00518
00519 edm::ParameterSet retPSet;
00520
00521 retPSet.addParameter<std::vector<double> >("PlotBounds", std::vector<double>(2, 0.0));
00522
00523 retPSet.addParameter<edm::InputTag>("HLTCollectionLabels", edm::InputTag(moduleName, "", triggerObject_.process()));
00524 retPSet.addParameter<std::vector<edm::InputTag> >("IsoCollections", std::vector<edm::InputTag>(1, std::string("none")));
00525 retPSet.addParameter<int>("theHLTOutputTypes", trigger::TriggerCluster);
00526 retPSet.addParameter<int>("ncandcut", hltConfig_.modulePSet(moduleName).getParameter<int>("ncandcut"));
00527
00528 return retPSet;
00529 }
00530
00531
00532
00533 edm::ParameterSet
00534 EmDQMFeeder::makePSetForEtFilter(const std::string& moduleName)
00535 {
00536 edm::ParameterSet retPSet;
00537
00538 retPSet.addParameter<std::vector<double> >("PlotBounds", std::vector<double>(2, 0.0));
00539
00540 retPSet.addParameter<edm::InputTag>("HLTCollectionLabels", edm::InputTag(moduleName, "", triggerObject_.process()));
00541 retPSet.addParameter<std::vector<edm::InputTag> >("IsoCollections", std::vector<edm::InputTag>(1, std::string("none")));
00542 retPSet.addParameter<int>("theHLTOutputTypes", trigger::TriggerCluster);
00543 retPSet.addParameter<int>("ncandcut", hltConfig_.modulePSet(moduleName).getParameter<int>("ncandcut"));
00544
00545 return retPSet;
00546 }
00547
00548
00549
00550 edm::ParameterSet
00551 EmDQMFeeder::makePSetForOneOEMinusOneOPFilter(const std::string& moduleName)
00552 {
00553 edm::ParameterSet retPSet;
00554
00555 retPSet.addParameter<std::vector<double> >("PlotBounds", std::vector<double>(2, 0.0));
00556
00557 retPSet.addParameter<edm::InputTag>("HLTCollectionLabels", edm::InputTag(moduleName, "", triggerObject_.process()));
00558 retPSet.addParameter<std::vector<edm::InputTag> >("IsoCollections", std::vector<edm::InputTag>(1, std::string("none")));
00559 retPSet.addParameter<int>("theHLTOutputTypes", trigger::TriggerElectron);
00560 retPSet.addParameter<int>("ncandcut", hltConfig_.modulePSet(moduleName).getParameter<int>("ncandcut"));
00561
00562 return retPSet;
00563 }
00564
00565
00566
00567 edm::ParameterSet
00568 EmDQMFeeder::makePSetForPixelMatchFilter(const std::string& moduleName)
00569 {
00570 edm::ParameterSet retPSet;
00571
00572 retPSet.addParameter<std::vector<double> >("PlotBounds", std::vector<double>(2, 0.0));
00573
00574 retPSet.addParameter<edm::InputTag>("HLTCollectionLabels", edm::InputTag(moduleName, "", triggerObject_.process()));
00575 retPSet.addParameter<std::vector<edm::InputTag> >("IsoCollections", std::vector<edm::InputTag>(1, std::string("none")));
00576 retPSet.addParameter<int>("theHLTOutputTypes", trigger::TriggerCluster);
00577 retPSet.addParameter<int>("ncandcut", hltConfig_.modulePSet(moduleName).getParameter<int>("ncandcut"));
00578
00579 return retPSet;
00580 }
00581
00582
00583
00584 edm::ParameterSet
00585 EmDQMFeeder::makePSetForEgammaDoubleEtDeltaPhiFilter(const std::string& moduleName)
00586 {
00587 edm::ParameterSet retPSet;
00588
00589 retPSet.addParameter<std::vector<double> >("PlotBounds", std::vector<double>(2, 0.0));
00590
00591 retPSet.addParameter<edm::InputTag>("HLTCollectionLabels", edm::InputTag(moduleName, "", triggerObject_.process()));
00592 retPSet.addParameter<std::vector<edm::InputTag> >("IsoCollections", std::vector<edm::InputTag>(1, std::string("none")));
00593 retPSet.addParameter<int>("theHLTOutputTypes", trigger::TriggerCluster);
00594 retPSet.addParameter<int>("ncandcut", 2);
00595
00596 return retPSet;
00597 }
00598
00599
00600
00601 edm::ParameterSet
00602 EmDQMFeeder::makePSetForEgammaGenericFilter(const std::string& moduleName)
00603 {
00604 edm::ParameterSet retPSet;
00605
00606
00607
00608
00609
00610
00611
00612
00613
00614
00615 edm::InputTag isoTag = hltConfig_.modulePSet(moduleName).getParameter<edm::InputTag>("isoTag");
00616 edm::InputTag nonIsoTag = hltConfig_.modulePSet(moduleName).getParameter<edm::InputTag>("nonIsoTag");
00617
00618
00619 std::string inputType = hltConfig_.moduleType(isoTag.label());
00620
00621
00622
00623
00624
00625
00626
00627
00628
00629
00630
00631
00632
00633
00634
00635
00636
00637
00638 if (hltConfig_.saveTags(moduleName))
00639 retPSet.addParameter<int>("theHLTOutputTypes", trigger::TriggerPhoton);
00640 else
00641 retPSet.addParameter<int>("theHLTOutputTypes", trigger::TriggerCluster);
00642
00643 std::vector<edm::InputTag> isoCollections;
00644 isoCollections.push_back(isoTag);
00645 if (!nonIsoTag.label().empty())
00646 isoCollections.push_back(nonIsoTag);
00647
00648
00649
00650
00651
00652 if (inputType == "EgammaHLTR9Producer" ||
00653 inputType == "EgammaHLTR9IDProducer" ||
00654 inputType == "EgammaHLTClusterShapeProducer" ||
00655 inputType == "EgammaHLTEcalRecIsolationProducer" ||
00656 inputType == "EgammaHLTHcalIsolationProducersRegional" ||
00657 inputType == "EgammaHLTGsfTrackVarProducer"
00658 ) {
00659 retPSet.addParameter<std::vector<double> >("PlotBounds", std::vector<double>(2, 0.0));
00660
00661 retPSet.addParameter<edm::InputTag>("HLTCollectionLabels", edm::InputTag(moduleName, "", triggerObject_.process()));
00662 retPSet.addParameter<std::vector<edm::InputTag> >("IsoCollections", isoCollections);
00663 retPSet.addParameter<int>("ncandcut", hltConfig_.modulePSet(moduleName).getParameter<int>("ncandcut"));
00664
00665 return retPSet;
00666 }
00667
00668 if (verbosity_ >= OUTPUT_ERRORS)
00669 edm::LogError("EmDQMFeeder") << "Can't determine what the HLTEgammaGenericFilter '" << moduleName << "' should do: uses a collection produced by a module of C++ type '" << inputType << "'.";
00670 return edm::ParameterSet();
00671 }
00672
00673
00674
00675 edm::ParameterSet
00676 EmDQMFeeder::makePSetForEgammaGenericQuadraticFilter(const std::string& moduleName)
00677 {
00678 edm::ParameterSet retPSet;
00679
00680
00681
00682
00683
00684
00685
00686
00687
00688
00689 edm::InputTag isoTag = hltConfig_.modulePSet(moduleName).getParameter<edm::InputTag>("isoTag");
00690 edm::InputTag nonIsoTag = hltConfig_.modulePSet(moduleName).getParameter<edm::InputTag>("nonIsoTag");
00691
00692
00693 std::string inputType = hltConfig_.moduleType(isoTag.label());
00694
00695
00696
00697
00698
00699
00700
00701
00702
00703
00704
00705
00706
00707
00708
00709
00710
00711
00712 if (hltConfig_.saveTags(moduleName))
00713 retPSet.addParameter<int>("theHLTOutputTypes", trigger::TriggerPhoton);
00714 else
00715 retPSet.addParameter<int>("theHLTOutputTypes", trigger::TriggerCluster);
00716
00717 std::vector<edm::InputTag> isoCollections;
00718 isoCollections.push_back(isoTag);
00719 if (!nonIsoTag.label().empty())
00720 isoCollections.push_back(nonIsoTag);
00721
00722
00723
00724
00725
00726 if (inputType == "EgammaHLTR9Producer" ||
00727 inputType == "EgammaHLTR9IDProducer" ||
00728 inputType == "EgammaHLTClusterShapeProducer" ||
00729 inputType == "EgammaHLTEcalRecIsolationProducer" ||
00730 inputType == "EgammaHLTHcalIsolationProducersRegional" ||
00731 inputType == "EgammaHLTPhotonTrackIsolationProducersRegional"
00732 ) {
00733 retPSet.addParameter<std::vector<double> >("PlotBounds", std::vector<double>(2, 0.0));
00734
00735 retPSet.addParameter<edm::InputTag>("HLTCollectionLabels", edm::InputTag(moduleName, "", triggerObject_.process()));
00736 retPSet.addParameter<std::vector<edm::InputTag> >("IsoCollections", isoCollections);
00737 retPSet.addParameter<int>("ncandcut", hltConfig_.modulePSet(moduleName).getParameter<int>("ncandcut"));
00738
00739 return retPSet;
00740 }
00741
00742 if (verbosity_ >= OUTPUT_ERRORS)
00743 edm::LogError("EmDQMFeeder") << "Can't determine what the HLTEgammaGenericQuadraticFilter '" << moduleName << "' should do: uses a collection produced by a module of C++ type '" << inputType << "'.";
00744 return edm::ParameterSet();
00745 }
00746
00747
00748
00749
00750 edm::ParameterSet
00751 EmDQMFeeder::makePSetForElectronGenericFilter(const std::string& moduleName)
00752 {
00753 edm::ParameterSet retPSet;
00754
00755
00756
00757
00758
00759
00760
00761
00762
00763 edm::InputTag isoTag = hltConfig_.modulePSet(moduleName).getParameter<edm::InputTag>("isoTag");
00764 edm::InputTag nonIsoTag = hltConfig_.modulePSet(moduleName).getParameter<edm::InputTag>("nonIsoTag");
00765
00766
00767 std::string inputType = hltConfig_.moduleType(isoTag.label());
00768
00769
00770
00771
00772
00773
00774
00775
00776
00777
00778
00779
00780
00781
00782
00783
00784
00785 retPSet.addParameter<int>("theHLTOutputTypes", trigger::TriggerElectron);
00786
00787 std::vector<edm::InputTag> isoCollections;
00788 isoCollections.push_back(isoTag);
00789 if (!nonIsoTag.label().empty())
00790 isoCollections.push_back(nonIsoTag);
00791
00792
00793
00794
00795
00796
00797
00798 if (inputType == "EgammaHLTElectronDetaDphiProducer" ||
00799 inputType == "EgammaHLTElectronTrackIsolationProducers"
00800 ) {
00801 retPSet.addParameter<std::vector<double> >("PlotBounds", std::vector<double>(2, 0.0));
00802
00803 retPSet.addParameter<edm::InputTag>("HLTCollectionLabels", edm::InputTag(moduleName, "", triggerObject_.process()));
00804 retPSet.addParameter<std::vector<edm::InputTag> >("IsoCollections", isoCollections);
00805 retPSet.addParameter<int>("ncandcut", hltConfig_.modulePSet(moduleName).getParameter<int>("ncandcut"));
00806
00807 return retPSet;
00808 }
00809
00810 if (verbosity_ >= OUTPUT_ERRORS)
00811 edm::LogError("EmDQMFeeder") << "Can't determine what the HLTElectronGenericFilter '" << moduleName << "' should do: uses a collection produced by a module of C++ type '" << inputType << "'.";
00812 return edm::ParameterSet();
00813 }
00814
00815
00816
00817 DEFINE_FWK_MODULE(EmDQMFeeder);