CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
L1TRate.cc
Go to the documentation of this file.
1 /*
2  * \file L1TRate.cc
3  *
4  * $Date: 2011/11/15 10:41:00 $
5  * $Revision: 1.11 $
6  * \author J. Pela, P. Musella
7  *
8  */
9 
10 // L1TMonitor includes
14 
16 
21 #include "DataFormats/Common/interface/ConditionsInEdm.h" // Parameters associated to Run, LS and Event
22 #include "DataFormats/Luminosity/interface/LumiDetails.h" // Luminosity Information
23 #include "DataFormats/Luminosity/interface/LumiSummary.h" // Luminosity Information
24 
32 
34 
35 #include "TList.h"
36 
37 using namespace edm;
38 using namespace std;
39 
40 //_____________________________________________________________________
42 
43  m_maxNbins = 2500; // Maximum LS for each run (for binning purposes)
44  m_parameters = ps;
45 
46  // Mapping parameter input variables
47  m_scalersSource = m_parameters.getParameter <InputTag>("inputTagScalersResults");
48  m_l1GtDataDaqInputTag = m_parameters.getParameter <InputTag>("inputTagL1GtDataDaq");
49  m_verbose = m_parameters.getUntrackedParameter<bool> ("verbose",false);
50  m_refPrescaleSet = m_parameters.getParameter <int> ("refPrescaleSet");
51  m_lsShiftGTRates = m_parameters.getUntrackedParameter<int> ("lsShiftGTRates",0);
52 
53  // Getting which categories to monitor
54  ParameterSet Categories = ps.getParameter<ParameterSet>("categories");
55  m_inputCategories["Mu"] = Categories.getUntrackedParameter<bool>("Mu");
56  m_inputCategories["EG"] = Categories.getUntrackedParameter<bool>("EG");
57  m_inputCategories["IsoEG"] = Categories.getUntrackedParameter<bool>("IsoEG");
58  m_inputCategories["Jet"] = Categories.getUntrackedParameter<bool>("Jet");
59  m_inputCategories["CenJet"] = Categories.getUntrackedParameter<bool>("CenJet");
60  m_inputCategories["ForJet"] = Categories.getUntrackedParameter<bool>("ForJet");
61  m_inputCategories["TauJet"] = Categories.getUntrackedParameter<bool>("TauJet");
62  m_inputCategories["ETM"] = Categories.getUntrackedParameter<bool>("ETM");
63  m_inputCategories["ETT"] = Categories.getUntrackedParameter<bool>("ETT");
64  m_inputCategories["HTT"] = Categories.getUntrackedParameter<bool>("HTT");
65  m_inputCategories["HTM"] = Categories.getUntrackedParameter<bool>("HTM");
66 
67  // Inicializing Variables
68  dbe = NULL;
69 
70  if (ps.getUntrackedParameter < bool > ("dqmStore", false)) {
71  dbe = Service < DQMStore > ().operator->();
72  dbe->setVerbose(0);
73  }
74 
75  // What to do if we want our output to be saved to a external file
76  m_outputFile = ps.getUntrackedParameter < string > ("outputFile", "");
77 
78  if (m_outputFile.size() != 0) {
79  cout << "L1T Monitoring histograms will be saved to " << m_outputFile.c_str() << endl;
80  }
81 
82  bool disable = ps.getUntrackedParameter < bool > ("disableROOToutput", false);
83  if (disable) {m_outputFile = "";}
84 
85  if (dbe != NULL) {dbe->setCurrentFolder("L1T/L1TRate");}
86 
87 }
88 
89 //_____________________________________________________________________
91 
92 //_____________________________________________________________________
93 void L1TRate::beginJob(void){
94 
95  if (m_verbose) {cout << "[L1TRate:] Called beginJob." << endl;}
96 
97  // get hold of back-end interface
98  DQMStore *dbe = 0;
99  dbe = Service < DQMStore > ().operator->();
100 
101  if (dbe) {
102  dbe->setCurrentFolder("L1T/L1TRate");
103  dbe->rmdir("L1T/L1TRate");
104  }
105 
106 }
107 
108 //_____________________________________________________________________
109 void L1TRate::endJob(void){
110 
111  if (m_verbose) {cout << "[L1TRate:] Called endJob." << endl;}
112 
113  if (m_outputFile.size() != 0 && dbe)
114  dbe->save(m_outputFile);
115 
116  return;
117 }
118 
119 //_____________________________________________________________________
120 // BeginRun
121 //_____________________________________________________________________
122 void L1TRate::beginRun(const edm::Run& run, const edm::EventSetup& iSetup){
123 
124  if (m_verbose) {cout << "[L1TRate:] Called beginRun." << endl;}
125 
128 
129  iSetup.get<L1GtTriggerMenuRcd>() .get(menuRcd);
130  iSetup.get<L1GtPrescaleFactorsAlgoTrigRcd>().get(l1GtPfAlgo);
131 
132  const L1GtTriggerMenu* menu = menuRcd .product();
133  const L1GtPrescaleFactors* m_l1GtPfAlgo = l1GtPfAlgo.product();
134 
135  // Initializing DQM Monitor Elements
136  dbe->setCurrentFolder("L1T/L1TRate");
137  m_ErrorMonitor = dbe->book1D("ErrorMonitor", "ErrorMonitor",5,0,5);
138  m_ErrorMonitor->setBinLabel(1,"WARNING_DB_CONN_FAILED"); // Errors from L1TOMDSHelper
139  m_ErrorMonitor->setBinLabel(2,"WARNING_DB_QUERY_FAILED"); // Errors from L1TOMDSHelper
140  m_ErrorMonitor->setBinLabel(3,"WARNING_DB_INCORRECT_NBUNCHES"); // Errors from L1TOMDSHelper
141  m_ErrorMonitor->setBinLabel(4,"WARNING_PY_MISSING_FIT");
142  m_ErrorMonitor->setBinLabel(5,"UNKNOWN");
143 
144  // Retriving the list of prescale sets
145  m_listsPrescaleFactors = &(m_l1GtPfAlgo->gtPrescaleFactors());
146 
147  // Getting Lowest Prescale Single Object Triggers from the menu
148  L1TMenuHelper myMenuHelper = L1TMenuHelper(iSetup);
149  m_selectedTriggers = myMenuHelper.getLUSOTrigger(m_inputCategories,m_refPrescaleSet);
150 
151  //-> Getting template fits for the algLo cross sections
152  int srcAlgoXSecFit = m_parameters.getParameter<int>("srcAlgoXSecFit");
153  if (srcAlgoXSecFit == 0){getXSexFitsOMDS (m_parameters);}
154  else if(srcAlgoXSecFit == 1){getXSexFitsPython(m_parameters);}
155 
156  for (CItAlgo algo = menu->gtAlgorithmMap().begin(); algo!=menu->gtAlgorithmMap().end(); ++algo){
157  m_algoBit[(algo->second).algoAlias()] = (algo->second).algoBitNumber();
158  }
159 
160  double minInstantLuminosity = m_parameters.getParameter<double>("minInstantLuminosity");
161  double maxInstantLuminosity = m_parameters.getParameter<double>("maxInstantLuminosity");
162 
163  // Initializing DQM Monitor Elements
164  for(map<string,string>::const_iterator i=m_selectedTriggers.begin() ; i!=m_selectedTriggers.end() ; i++){
165 
166  TString tCategory = (*i).first;
167  TString tTrigger = (*i).second;
168 
169  TString tErrorMessage = "";
170  TF1* tTestFunction;
171 
172  if(tTrigger != "Undefined" && m_templateFunctions.find(tTrigger) != m_templateFunctions.end()){
173  tTestFunction = m_templateFunctions[tTrigger];
174  }
175  else if(tTrigger == "Undefined"){
176  TString tFunc = "-1";
177  tTestFunction = new TF1("FitParametrization_"+tTrigger,tFunc,0,double(m_maxNbins)-0.5);
178  }
179  else if(m_templateFunctions.find(tTrigger) == m_templateFunctions.end()){
180  TString tFunc = "-1";
181  tTestFunction = new TF1("FitParametrization_"+tTrigger,tFunc,0,double(m_maxNbins)-0.5);
182  tErrorMessage = " (Undefined Test Function)";
183  }
184  else{
185  TString tFunc = "-1";
186  tTestFunction = new TF1("FitParametrization_"+tTrigger,tFunc,0,double(m_maxNbins)-0.5);
187  }
188 
189  if(tTrigger != "Undefined"){
190 
191  if(myMenuHelper.getPrescaleByAlias(tCategory,tTrigger) != 1){
192  tErrorMessage += " WARNING: Default Prescale = ";
193  tErrorMessage += myMenuHelper.getPrescaleByAlias(tCategory,tTrigger);
194  }
195 
196  if (tCategory == "Mu" && myMenuHelper.getEtaRangeByAlias(tCategory,tTrigger) != 4294967295){
197  tErrorMessage += " WARNING: Eta Range = ";
198  tErrorMessage += myMenuHelper.getEtaRangeByAlias(tCategory,tTrigger);
199  }
200  else if(tCategory == "EG" && myMenuHelper.getEtaRangeByAlias(tCategory,tTrigger) != 32639){
201  tErrorMessage += " WARNING: Eta Range = ";
202  tErrorMessage += myMenuHelper.getEtaRangeByAlias(tCategory,tTrigger);
203  }
204  else if(tCategory == "IsoEG" && myMenuHelper.getEtaRangeByAlias(tCategory,tTrigger) != 32639){
205  tErrorMessage += " WARNING: Eta Range = ";
206  tErrorMessage += myMenuHelper.getEtaRangeByAlias(tCategory,tTrigger);
207  }
208 
209  if(tCategory == "Mu" && myMenuHelper.getQualityAlias(tCategory,tTrigger) != 240){
210  tErrorMessage += " WARNING: Quality = ";
211  tErrorMessage += myMenuHelper.getQualityAlias(tCategory,tTrigger);
212  }
213 
214  }
215 
216 
217 
218  dbe->setCurrentFolder("L1T/L1TRate/TriggerCrossSections");
219  m_xSecVsInstLumi[tTrigger] = dbe->bookProfile(tCategory,
220  "Cross Sec. vs Inst. Lumi Algo: "+tTrigger+tErrorMessage,
221  m_maxNbins,
222  minInstantLuminosity,
223  maxInstantLuminosity,0,500);
224  m_xSecVsInstLumi[tTrigger] ->setAxisTitle("Instantaneous Luminosity [10^{30}cm^{-2}s^{-1}]" ,1);
225  m_xSecVsInstLumi[tTrigger] ->setAxisTitle("Algorithm #sigma [#mu b]" ,2);
226  m_xSecVsInstLumi[tTrigger] ->getTProfile()->GetListOfFunctions()->Add(tTestFunction);
227  m_xSecVsInstLumi[tTrigger] ->getTProfile()->SetMarkerStyle(23);
228 
229  dbe->setCurrentFolder("L1T/L1TRate/Certification");
230  m_xSecObservedToExpected[tTrigger] = dbe->book1D(tCategory, "Algo: "+tTrigger+tErrorMessage,m_maxNbins,-0.5,double(m_maxNbins)-0.5);
231  m_xSecObservedToExpected[tTrigger] ->setAxisTitle("Lumi Section" ,1);
232  m_xSecObservedToExpected[tTrigger] ->setAxisTitle("#sigma_{obs} / #sigma_{exp}" ,2);
233 
234  }
235 
236 }
237 
238 //_____________________________________________________________________
239 void L1TRate::endRun(const edm::Run& run, const edm::EventSetup& iSetup){
240  if (m_verbose) {cout << "[L1TRate:] Called endRun." << endl;}
241 }
242 
243 //_____________________________________________________________________
245 
246  if (m_verbose) {cout << "[L1TRate:] Called beginLuminosityBlock at LS=" << lumiBlock.id().luminosityBlock() << endl;}
247 
248 }
249 
250 //_____________________________________________________________________
251 void L1TRate::endLuminosityBlock(LuminosityBlock const& lumiBlock, EventSetup const& c) {
252 
253  int eventLS = lumiBlock.id().luminosityBlock();
254  if (m_verbose) {cout << "[L1TRate:] Called endLuminosityBlock at LS=" << eventLS << endl;}
255 
256  // We can certify LS -1 since we should have available:
257  // gt rates: (current LS)-1
258  // prescale: current LS
259  // lumi : current LS
260  //eventLS--;
261 
262  // Checking if all necessary quantities are defined for our calculations
263  bool isDefRate,isDefLumi,isDefPrescaleIndex;
264  map<TString,double>* rates=0;
265  double lumi=0;
266  int prescalesIndex=0;
267 
268  // Reseting MonitorElements so we can refill them
269  for(map<string,string>::const_iterator i=m_selectedTriggers.begin() ; i!=m_selectedTriggers.end() ; i++){
270  string tTrigger = (*i).second;
271  m_xSecObservedToExpected[tTrigger]->getTH1()->Reset("ICE");
272  m_xSecVsInstLumi [tTrigger]->getTH1()->Reset("ICE");
273  }
274 
275  for(map<int,map<TString,double> >::iterator i=m_lsRates.begin() ; i!=m_lsRates.end() ; i++){
276 
277  unsigned int ls = (*i).first;
278  rates = &(*i).second;
279  isDefRate=true;
280 
281  if(m_lsLuminosity.find(ls)==m_lsLuminosity.end()){isDefLumi=false;}
282  else{
283  isDefLumi=true;
284  lumi=m_lsLuminosity[ls];
285  }
286 
287  if(m_lsPrescaleIndex.find(ls)==m_lsPrescaleIndex.end()){isDefPrescaleIndex=false;}
288  else{
289  isDefPrescaleIndex=true;
290  prescalesIndex=m_lsPrescaleIndex[ls];
291  }
292 
293  if(isDefRate && isDefLumi && isDefPrescaleIndex){
294 
295  const vector<int>& currentPrescaleFactors = (*m_listsPrescaleFactors).at(prescalesIndex);
296 
297  for(map<string,string>::const_iterator i=m_selectedTriggers.begin() ; i!=m_selectedTriggers.end() ; i++){
298 
299  string tTrigger = (*i).second;
300  TF1* tTestFunction = (TF1*) m_xSecVsInstLumi[tTrigger]->getTProfile()->GetListOfFunctions()->First();
301 
302  // If trigger name is defined we get the rate fit parameters
303  if(tTrigger != "Undefined"){
304 
305  unsigned int trigBit = m_algoBit[tTrigger];
306  double trigPrescale = currentPrescaleFactors[trigBit];
307  double trigRate = (*rates)[tTrigger];
308 
309  if(lumi!=0 && trigPrescale!=0 && trigRate!=0){
310 
311  double AlgoXSec = (trigPrescale*trigRate)/lumi;
312  double TemplateFunctionValue = tTestFunction->Eval(lumi);
313 
314  // Checking against Template function
315  int ibin = m_xSecObservedToExpected[tTrigger]->getTH1()->FindBin(ls);
316  m_xSecObservedToExpected[tTrigger]->setBinContent(ibin,AlgoXSec/TemplateFunctionValue);
317  m_xSecVsInstLumi [tTrigger]->Fill(lumi,AlgoXSec);
318 
319  if(m_verbose){cout<<"[L1TRate:] ls="<<ls<<" Algo="<<tTrigger<<" XSec="<<AlgoXSec<<" Test="<<AlgoXSec/TemplateFunctionValue<<endl;}
320 
321  }
322  else{
323  int ibin = m_xSecObservedToExpected[tTrigger]->getTH1()->FindBin(ls);
324  m_xSecObservedToExpected[tTrigger]->setBinContent(ibin,0.000001);
325  if(m_verbose){cout << "[L1TRate:] Algo="<< tTrigger<< " XSec=Failed" << endl;}
326  }
327  }
328  }
329  }
330  }
331 }
332 
333 //_____________________________________________________________________
334 void L1TRate::analyze(const Event & iEvent, const EventSetup & eventSetup){
335 
336  edm::Handle<L1GlobalTriggerReadoutRecord> gtReadoutRecordData;
339 
340  iEvent.getByLabel(m_l1GtDataDaqInputTag, gtReadoutRecordData);
341  iEvent.getByLabel(m_scalersSource , colLScal);
342  iEvent.getByLabel(m_scalersSource , triggerScalers);
343 
344  // Integers
345  int EventRun = iEvent.id().run();
346  unsigned int eventLS = iEvent.id().luminosityBlock();
347 
348  // Getting the trigger trigger rates from GT and buffering it
349  if(triggerScalers.isValid()){
350 
351  Level1TriggerScalersCollection::const_iterator itL1TScalers = triggerScalers->begin();
352  Level1TriggerRates trigRates(*itL1TScalers,EventRun);
353 
354  int gtLS = (*itL1TScalers).lumiSegmentNr()+m_lsShiftGTRates;
355 
356  // If we haven't got the data from this LS yet get it
357  if(m_lsRates.find(gtLS)==m_lsRates.end()){
358 
359  if (m_verbose) {cout << "[L1TRate:] Buffering GT Rates for LS=" << gtLS << endl;}
360  map<TString,double> bufferRate;
361 
362  // Buffer the rate informations for all selected bits
363  for(map<string,string>::const_iterator i=m_selectedTriggers.begin() ; i!=m_selectedTriggers.end() ; i++){
364 
365  string tTrigger = (*i).second;
366 
367  // If trigger name is defined we store the rate
368  if(tTrigger != "Undefined"){
369 
370  unsigned int trigBit = m_algoBit[tTrigger];
371  double trigRate = trigRates.gtAlgoCountsRate()[trigBit];
372 
373  bufferRate[tTrigger] = trigRate;
374  }
375  }
376  m_lsRates[gtLS] = bufferRate;
377  }
378  }
379 
380  // Getting from the SCAL the luminosity information and buffering it
381  if(colLScal.isValid() && colLScal->size()){
382 
383  LumiScalersCollection::const_iterator itLScal = colLScal->begin();
384  unsigned int scalLS = itLScal->sectionNumber();
385 
386  // If we haven't got the data from this SCAL LS yet get it
387  if(m_lsLuminosity.find(scalLS)==m_lsLuminosity.end()){
388 
389  if (m_verbose) {cout << "[L1TRate:] Buffering SCAL-HF Lumi for LS=" << scalLS << endl;}
390  double instLumi = itLScal->instantLumi(); // Getting Instant Lumi from HF (via SCAL)
391  double deadTimeNormHF = itLScal->deadTimeNormalization(); // Getting Dead Time Normalization from HF (via SCAL)
392 
393  // If HF Dead Time Corrections is requested we apply it
394  // NOTE: By default this is assumed false since for now WbM fits do NOT assume this correction
395  if(m_parameters.getUntrackedParameter<bool>("useHFDeadTimeNormalization",false)){
396 
397  // Protecting for deadtime = 0
398  if(deadTimeNormHF==0){instLumi = 0;}
399  else {instLumi = instLumi/deadTimeNormHF;}
400  }
401  // Buffering the luminosity information
402  m_lsLuminosity[scalLS]=instLumi;
403  }
404  }
405 
406  // Getting the prescale index used when this event was triggered
407  if(gtReadoutRecordData.isValid()){
408 
409  // If we haven't got the data from this LS yet get it
410  if(m_lsPrescaleIndex.find(eventLS)==m_lsPrescaleIndex.end()){
411 
412  if (m_verbose) {cout << "[L1TRate:] Buffering Prescale Index for LS=" << eventLS << endl;}
413 
414  // Getting Final Decision Logic (FDL) Data from GT
415  const vector<L1GtFdlWord>& gtFdlVectorData = gtReadoutRecordData->gtFdlVector();
416 
417  // Getting the index for the fdl data for this event
418  int indexFDL=0;
419  for(unsigned int i=0; i<gtFdlVectorData.size(); i++){
420  if(gtFdlVectorData[i].bxInEvent()==0){indexFDL=i; break;}
421  }
422 
423  int CurrentPrescalesIndex = gtFdlVectorData[indexFDL].gtPrescaleFactorIndexAlgo();
424  m_lsPrescaleIndex[eventLS] = CurrentPrescalesIndex;
425  }
426  }
427 }
428 
429 //_____________________________________________________________________
430 // function: getXSexFitsOMDS
431 // Imputs:
432 // * const edm::ParameterSet& ps = ParameterSet contaning necessary
433 // information for the OMDS data extraction
434 // Outputs:
435 // * int error = Number of algos where you did not find a
436 // corresponding fit
437 //_____________________________________________________________________
439 
440  bool noError = true;
441 
442  string oracleDB = ps.getParameter<string>("oracleDB");
443  string pathCondDB = ps.getParameter<string>("pathCondDB");
444 
445  L1TOMDSHelper myOMDSHelper;
446  int conError;
447  myOMDSHelper.connect(oracleDB,pathCondDB,conError);
448 
449  map<string,WbMTriggerXSecFit> wbmFits;
450 
451  if(conError == L1TOMDSHelper::NO_ERROR){
452  int errorRetrive;
453  wbmFits = myOMDSHelper.getWbMAlgoXsecFits(errorRetrive);
454 
455  // Filling errors if they exist
456  if(errorRetrive != L1TOMDSHelper::NO_ERROR){
457  noError = false;
458  string eName = myOMDSHelper.enumToStringError(errorRetrive);
459  m_ErrorMonitor->Fill(eName);
460  }
461  }else{
462  noError = false;
463  string eName = myOMDSHelper.enumToStringError(conError);
464  m_ErrorMonitor->Fill(eName);
465  }
466 
467  double minInstantLuminosity = m_parameters.getParameter<double>("minInstantLuminosity");
468  double maxInstantLuminosity = m_parameters.getParameter<double>("maxInstantLuminosity");
469 
470  // Getting rate fit parameters for all input triggers
471  for(map<string,string>::const_iterator a=m_selectedTriggers.begin() ; a!=m_selectedTriggers.end() ; a++){
472 
473  string tTrigger = (*a).second;
474 
475  // If trigger name is defined we get the rate fit parameters
476  if(tTrigger != "Undefined"){
477 
478  if(wbmFits.find(tTrigger) != wbmFits.end()){
479 
480  WbMTriggerXSecFit tWbMParameters = wbmFits[tTrigger];
481 
482  vector<double> tParameters;
483  tParameters.push_back(tWbMParameters.pm1);
484  tParameters.push_back(tWbMParameters.p0);
485  tParameters.push_back(tWbMParameters.p1);
486  tParameters.push_back(tWbMParameters.p2);
487 
488  // Retriving and populating the m_templateFunctions array
489  m_templateFunctions[tTrigger] = new TF1("FitParametrization_"+tWbMParameters.bitName,
490  tWbMParameters.fitFunction,
491  minInstantLuminosity,maxInstantLuminosity);
492  m_templateFunctions[tTrigger] ->SetParameters(&tParameters[0]);
493  m_templateFunctions[tTrigger] ->SetLineWidth(1);
494  m_templateFunctions[tTrigger] ->SetLineColor(kRed);
495 
496  }else{noError = false;}
497  }
498  }
499 
500  return noError;
501 
502 }
503 
504 //_____________________________________________________________________
505 // function: getXSexFitsPython
506 // Imputs:
507 // * const edm::ParameterSet& ps = ParameterSet contaning the fit
508 // functions and parameters for the selected triggers
509 // Outputs:
510 // * int error = Number of algos where you did not find a
511 // corresponding fit
512 //_____________________________________________________________________
514 
515  // error meaning
516  bool noError = true;
517 
518  // Getting fit parameters
519  std::vector<edm::ParameterSet> m_fitParameters = ps.getParameter< vector<ParameterSet> >("fitParameters");
520 
521  double minInstantLuminosity = m_parameters.getParameter<double>("minInstantLuminosity");
522  double maxInstantLuminosity = m_parameters.getParameter<double>("maxInstantLuminosity");
523 
524  // Getting rate fit parameters for all input triggers
525  for(map<string,string>::const_iterator a=m_selectedTriggers.begin() ; a!=m_selectedTriggers.end() ; a++){
526 
527  string tTrigger = (*a).second;
528 
529  // If trigger name is defined we get the rate fit parameters
530  if(tTrigger != "Undefined"){
531 
532  bool foundFit = false;
533 
534  for(unsigned int b=0 ; b<m_fitParameters.size() ; b++){
535 
536  if(tTrigger == m_fitParameters[b].getParameter<string>("AlgoName")){
537 
538  TString tAlgoName = m_fitParameters[b].getParameter< string > ("AlgoName");
539  TString tTemplateFunction = m_fitParameters[b].getParameter< string > ("TemplateFunction");
540  vector<double> tParameters = m_fitParameters[b].getParameter< vector<double> >("Parameters");
541 
542  // Retriving and populating the m_templateFunctions array
543  m_templateFunctions[tTrigger] = new TF1("FitParametrization_"+tAlgoName,tTemplateFunction,
544  minInstantLuminosity,maxInstantLuminosity);
545  m_templateFunctions[tTrigger] ->SetParameters(&tParameters[0]);
546  m_templateFunctions[tTrigger] ->SetLineWidth(1);
547  m_templateFunctions[tTrigger] ->SetLineColor(kRed);
548 
549  foundFit = true;
550  break;
551  }
552 
553  if(!foundFit){
554  noError = false;
555  string eName = "WARNING_PY_MISSING_FIT";
556  m_ErrorMonitor->Fill(eName);
557  }
558  }
559  }
560  }
561 
562  return noError;
563 
564 }
565 
566 //define this as a plug-in
RunNumber_t run() const
Definition: EventID.h:42
LuminosityBlockID id() const
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
int i
Definition: DBlmapReader.cc:9
TProfile * getTProfile(std::string name, std::string process, std::string rootfolder, DQMStore *dbe_, bool verb, bool clone)
bool connect(std::string iOracleDB, std::string iPathCondDB, int &error)
void rmdir(const std::string &fullpath)
Definition: DQMStore.cc:2530
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:17
tuple lumi
Definition: fjr2json.py:35
void beginJob()
Definition: L1TRate.cc:93
std::map< std::string, std::string > getLUSOTrigger(std::map< std::string, bool > iCategories, int IndexRefPrescaleFactors)
#define NULL
Definition: scimark2.h:8
void beginRun(const edm::Run &run, const edm::EventSetup &iSetup)
Definition: L1TRate.cc:122
LuminosityBlockNumber_t luminosityBlock() const
Definition: EventID.h:43
int getPrescaleByAlias(TString iCategory, TString iAlias)
virtual ~L1TRate()
Definition: L1TRate.cc:90
unsigned int getQualityAlias(TString iCategory, TString iAlias)
AlgorithmMap::const_iterator CItAlgo
iterators through map containing the algorithms
std::vector< double > gtAlgoCountsRate() const
int iEvent
Definition: GenABIO.cc:243
bool getXSexFitsPython(const edm::ParameterSet &ps)
Definition: L1TRate.cc:513
L1TRate(const edm::ParameterSet &ps)
Definition: L1TRate.cc:41
bool getXSexFitsOMDS(const edm::ParameterSet &ps)
Definition: L1TRate.cc:438
bool isValid() const
Definition: HandleBase.h:76
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:356
unsigned int getEtaRangeByAlias(TString iCategory, TString iAlias)
void endRun(const edm::Run &run, const edm::EventSetup &iSetup)
Definition: L1TRate.cc:239
const std::vector< std::vector< int > > & gtPrescaleFactors() const
get the prescale factors by reference
const T & get() const
Definition: EventSetup.h:55
T const * product() const
Definition: ESHandle.h:62
double b
Definition: hdecay.h:120
LuminosityBlockNumber_t luminosityBlock() const
virtual void beginLuminosityBlock(edm::LuminosityBlock const &lumiBlock, edm::EventSetup const &c)
Definition: L1TRate.cc:244
edm::EventID id() const
Definition: EventBase.h:56
double a
Definition: hdecay.h:121
const AlgorithmMap & gtAlgorithmMap() const
get / set the algorithm map (by name)
tuple cout
Definition: gather_cfg.py:121
LimitAlgo * algo
Definition: Combine.cc:60
virtual void endLuminosityBlock(edm::LuminosityBlock const &lumiBlock, edm::EventSetup const &c)
Definition: L1TRate.cc:251
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:429
Definition: Run.h:33
void endJob()
Definition: L1TRate.cc:109
void analyze(const edm::Event &e, const edm::EventSetup &c)
Definition: L1TRate.cc:334