CMS 3D CMS Logo

PatternOptimizerBase.h
Go to the documentation of this file.
1 /*
2  * PatternOptimizerBase.h
3  *
4  * Created on: Oct 17, 2018
5  * Author: kbunkow
6  */
7 
8 #ifndef L1T_OmtfP1_PATTERNOPTIMIZERBASE_H_
9 #define L1T_OmtfP1_PATTERNOPTIMIZERBASE_H_
10 
13 
18 
19 #include "TH1I.h"
20 #include "TH2I.h"
21 #include "TFile.h"
22 
23 #include <functional>
24 
26 public:
27  static double vxMuRate(double pt_GeV);
28  static double vxIntegMuRate(double pt_GeV, double dpt, double etaFrom, double etaTo);
29 
33 
34  ~PatternOptimizerBase() override;
35 
36  void observeEventEnd(const edm::Event& iEvent,
37  std::unique_ptr<l1t::RegionalMuonCandBxCollection>& finalCandidates) override;
38 
39  void endJob() override;
40 
41 protected:
43 
44  void printPatterns();
45 
46  virtual double getEventRateWeight(double pt) { return 1; }
47 
48  virtual void saveHists(TFile& outfile) {}
49 
51 
52  TH1I* simMuPt = nullptr;
53  TH1I* simMuFoundByOmtfPt = nullptr;
54  TH1I* simMuEta = nullptr;
55 
56  TH1I* candEta = nullptr;
57 
58  TH1F* simMuPtSpectrum = nullptr;
59  TH2I* simMuPtVsDispl = nullptr;
60  TH2I* simMuPtVsRho = nullptr;
61 
62  bool writeLayerStat = false;
63 };
64 
65 #endif /* L1T_OmtfP1_PATTERNOPTIMIZERBASE_H_ */
static double vxIntegMuRate(double pt_GeV, double dpt, double etaFrom, double etaTo)
int iEvent
Definition: GenABIO.cc:224
void observeEventEnd(const edm::Event &iEvent, std::unique_ptr< l1t::RegionalMuonCandBxCollection > &finalCandidates) override
virtual double getEventRateWeight(double pt)
static double vxMuRate(double pt_GeV)
virtual void saveHists(TFile &outfile)
std::vector< std::unique_ptr< GoldenPatternType > > GoldenPatternVec
GoldenPatternVec< GoldenPatternWithStat > & goldenPatterns
PatternOptimizerBase(const edm::ParameterSet &edmCfg, const OMTFConfiguration *omtfConfig, GoldenPatternVec< GoldenPatternWithStat > &gps)
void savePatternsInRoot(std::string rootFileName)
const OMTFConfiguration * omtfConfig