CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes
TestCorrection Class Reference

#include <MuonAnalysis/MomentumScaleCalibration/plugins/TestCorrection.cc>

Inheritance diagram for TestCorrection:
edm::EDAnalyzer MuScleFitBase edm::EDAnalyzer MuScleFitBase edm::EDConsumerBase edm::EDConsumerBase

Public Member Functions

 TestCorrection (const edm::ParameterSet &)
 
 TestCorrection (const edm::ParameterSet &)
 
 ~TestCorrection ()
 
 ~TestCorrection () override
 
- Public Member Functions inherited from edm::EDAnalyzer
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzer ()
 
SerialTaskQueueglobalLuminosityBlocksQueue ()
 
SerialTaskQueueglobalRunsQueue ()
 
ModuleDescription const & moduleDescription () const
 
std::string workerType () const
 
 ~EDAnalyzer () override
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
void convertCurrentProcessAlias (std::string const &processName)
 Convert "@currentProcess" in InputTag process names to the actual current process name. More...
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase &&)=default
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
ESProxyIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector< ProductResolverIndexAndSkipBit > const & itemsToGetFrom (BranchType iType) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProxyIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

Private Member Functions

virtual void analyze (const edm::Event &, const edm::EventSetup &)
 
void analyze (const edm::Event &, const edm::EventSetup &) override
 
lorentzVector correctMuon (const lorentzVector &muon)
 
lorentzVector correctMuon (const lorentzVector &muon)
 
virtual void endJob ()
 
void endJob () override
 
template<typename T >
std::vector< MuScleFitMuonfillMuonCollection (const std::vector< T > &tracks)
 
template<typename T >
std::vector< MuScleFitMuonfillMuonCollection (const std::vector< T > &tracks)
 
virtual void initialize (const edm::EventSetup &)
 
virtual void initialize (const edm::EventSetup &)
 
- Private Member Functions inherited from MuScleFitBase
 MuScleFitBase (const edm::ParameterSet &iConfig)
 
virtual ~MuScleFitBase () noexcept(false)
 
void clearHistoMap ()
 Clean the histograms map. More...
 
void fillHistoMap (TFile *outputFile, unsigned int iLoop)
 Create the histograms map. More...
 
void readProbabilityDistributionsFromFile ()
 Read probability distributions from a local root file. More...
 
void writeHistoMap (const unsigned int iLoop)
 Save the histograms map to file. More...
 

Private Attributes

std::unique_ptr< BackgroundFunctionbackground_
 
TH1F * correctedPt_
 
TProfile * correctedPtVsEta_
 
std::unique_ptr< MomentumScaleCorrectorcorrector_
 
int eventCounter_
 
edm::EDGetTokenT< reco::MuonCollectionglbMuonsToken_
 
std::unique_ptr< ResolutionFunctionresolution_
 
edm::EDGetTokenT< reco::TrackCollectionsaMuonsToken_
 
edm::EDGetTokenT< reco::TrackCollectiontracksToken_
 
TH1F * uncorrectedPt_
 
TProfile * uncorrectedPtVsEta_
 
- Private Attributes inherited from MuScleFitBase
int debug_
 
std::vector< GenMuonPairgenMuonPairs_
 Stores the genMuon pairs and the motherId prior to the creation of the internal tree. More...
 
std::map< std::string, Histograms * > mapHisto_
 The map of histograms. More...
 
std::vector< MuonPairmuonPairs_
 Used to store the muon pairs plus run and event number prior to the creation of the internal tree. More...
 
std::string probabilitiesFile_
 
std::string probabilitiesFileInPath_
 
std::vector< TFile * > theFiles_
 The files were the histograms are saved. More...
 
std::string theGenInfoRootFileName_
 
edm::InputTag theMuonLabel_
 
int theMuonType_
 
std::string theRootFileName_
 

Additional Inherited Members

- Public Types inherited from edm::EDAnalyzer
typedef EDAnalyzer ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from edm::EDAnalyzer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &)
 
static bool wantsGlobalLuminosityBlocks ()
 
static bool wantsGlobalRuns ()
 
static bool wantsStreamLuminosityBlocks ()
 
static bool wantsStreamRuns ()
 
- Protected Member Functions inherited from edm::EDConsumerBase
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 

Detailed Description

Description: <one line="" class="" summary>="">

Implementation: <Notes on="" implementation>="">

Definition at line 60 of file TestCorrection.cc.

Constructor & Destructor Documentation

◆ TestCorrection() [1/2]

TestCorrection::TestCorrection ( const edm::ParameterSet iConfig)
explicit

Definition at line 139 of file TestCorrection.cc.

140  : MuScleFitBase(iConfig),
141  glbMuonsToken_(mayConsume<reco::MuonCollection>(theMuonLabel_)),
142  saMuonsToken_(mayConsume<reco::TrackCollection>(theMuonLabel_)),
143  tracksToken_(mayConsume<reco::TrackCollection>(theMuonLabel_)) {
144  //now do what ever initialization is needed
145  TFile* outputFile = new TFile(theRootFileName_.c_str(), "RECREATE");
146  theFiles_.push_back(outputFile);
147  // outputFile_ = new TFile(theRootFileName_.c_str(), "RECREATE");
148  // outputFile_->cd();
149  outputFile->cd();
150  MuScleFitUtils::resfind = iConfig.getParameter<std::vector<int> >("resfind");
152  uncorrectedPt_ = new TH1F("uncorrectedPt", "uncorrected pt", 1000, 0, 100);
153  uncorrectedPtVsEta_ = new TProfile("uncorrectedPtVsEta", "uncorrected pt vs eta", 1000, 0, 100, -3., 3.);
154  correctedPt_ = new TH1F("correctedPt", "corrected pt", 1000, 0, 100);
155  correctedPtVsEta_ = new TProfile("correctedPtVsEta", "corrected pt vs eta", 1000, 0, 100, -3., 3.);
156  eventCounter_ = 0;
157  // Create the corrector and set the parameters
158  corrector_.reset(new MomentumScaleCorrector(iConfig.getUntrackedParameter<std::string>("CorrectionsIdentifier")));
159  std::cout << "corrector_ = " << &*corrector_ << std::endl;
160  resolution_.reset(new ResolutionFunction(iConfig.getUntrackedParameter<std::string>("ResolutionsIdentifier")));
161  std::cout << "resolution_ = " << &*resolution_ << std::endl;
162  background_.reset(new BackgroundFunction(iConfig.getUntrackedParameter<std::string>("BackgroundIdentifier")));
163 
164  // Initialize the parameters of MuScleFitUtils from those saved in the functions.
165  // MuScleFitUtils::parScale = corrector_.getFunction(0)->parameters();
168 
169  MuScleFitUtils::parResol = resolution_->parameters();
170 }

References background_, correctedPt_, correctedPtVsEta_, corrector_, gather_cfg::cout, eventCounter_, MuScleFitBase::fillHistoMap(), edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), download_sqlite_cfg::outputFile, MuScleFitUtils::parResol, MuScleFitUtils::resfind, resolution_, MuScleFitUtils::resolutionFunction, MuScleFitUtils::resolutionFunctionForVec, resolutionFunctionVecService(), AlCaHLTBitMon_QueryRunRegistry::string, MuScleFitBase::theFiles_, MuScleFitBase::theRootFileName_, uncorrectedPt_, and uncorrectedPtVsEta_.

◆ ~TestCorrection() [1/2]

TestCorrection::~TestCorrection ( )
override

Definition at line 172 of file TestCorrection.cc.

172  {
173  theFiles_[0]->cd();
174  TCanvas canvas("ptComparison", "pt comparison", 1000, 800);
175  canvas.cd();
176  uncorrectedPt_->GetXaxis()->SetTitle("Pt(GeV)");
177  correctedPt_->SetLineColor(kRed);
178  TLegend* legend = new TLegend(0.7, 0.71, 0.98, 1.);
179  legend->SetTextSize(0.02);
180  legend->SetFillColor(0); // Have a white background
181  legend->AddEntry(uncorrectedPt_, "original pt");
182  legend->AddEntry(correctedPt_, "corrected pt");
183  uncorrectedPt_->Draw();
184  correctedPt_->Draw("same");
185  legend->Draw("same");
186 
187  canvas.Write();
188  uncorrectedPt_->Write();
189  uncorrectedPtVsEta_->Write();
190  correctedPt_->Write();
191  correctedPtVsEta_->Write();
192 
193  writeHistoMap(0);
194  theFiles_[0]->Close();
195 
196  std::cout << "Total analyzed events = " << eventCounter_ << std::endl;
197 }

References svgfig::canvas(), correctedPt_, correctedPtVsEta_, gather_cfg::cout, eventCounter_, listHistos::legend, MuScleFitBase::theFiles_, uncorrectedPt_, uncorrectedPtVsEta_, and MuScleFitBase::writeHistoMap().

◆ TestCorrection() [2/2]

TestCorrection::TestCorrection ( const edm::ParameterSet )
explicit

◆ ~TestCorrection() [2/2]

TestCorrection::~TestCorrection ( )

Member Function Documentation

◆ analyze() [1/2]

virtual void TestCorrection::analyze ( const edm::Event ,
const edm::EventSetup  
)
privatevirtual

Implements edm::EDAnalyzer.

◆ analyze() [2/2]

void TestCorrection::analyze ( const edm::Event iEvent,
const edm::EventSetup iSetup 
)
overrideprivatevirtual

Implements edm::EDAnalyzer.

Definition at line 204 of file TestCorrection.cc.

204  {
205  using namespace edm;
206 
207  initialize(iSetup);
208 
209  ++eventCounter_;
210  if (eventCounter_ % 100 == 0) {
211  std::cout << "Event number " << eventCounter_ << std::endl;
212  }
213 
214  // Take the reco-muons, depending on the type selected in the cfg
215  // --------------------------------------------------------------
216 
217  std::vector<MuScleFitMuon> muons;
218 
219  if (theMuonType_ == 1) { // GlobalMuons
221  iEvent.getByToken(glbMuonsToken_, glbMuons);
222  muons = fillMuonCollection(*glbMuons);
223  } else if (theMuonType_ == 2) { // StandaloneMuons
225  iEvent.getByToken(saMuonsToken_, saMuons);
226  muons = fillMuonCollection(*saMuons);
227  } else if (theMuonType_ == 3) { // Tracker tracks
229  iEvent.getByToken(tracksToken_, tracks);
231  }
232 
233  // Find the two muons from the resonance, and set ResFound bool
234  // ------------------------------------------------------------
235  std::pair<MuScleFitMuon, MuScleFitMuon> recMuFromBestRes = MuScleFitUtils::findBestRecoRes(muons);
237  MuScleFitUtils::SavedPair.push_back(std::make_pair(recMuFromBestRes.first.p4(), recMuFromBestRes.second.p4()));
238  } else {
239  MuScleFitUtils::SavedPair.push_back(std::make_pair(lorentzVector(0., 0., 0., 0.), lorentzVector(0., 0., 0., 0.)));
240  }
241 
242  // If resonance found, do the hard work
243  // ------------------------------------
245  // Find weight and reference mass for this muon pair
246  // -------------------------------------------------
247  // double weight = MuScleFitUtils::computeWeight ((recMu1+recMu2).mass());
248 
249  // Use the correction function to correct the pt scale of the muons. Note that this takes into
250  // account the corrections from all iterations.
251  lorentzVector recMu1;
252  recMu1 = correctMuon(recMu1);
253  lorentzVector recMu2;
254  recMu2 = correctMuon(recMu2);
255 
256  reco::Particle::LorentzVector bestRecRes(recMu1 + recMu2);
257 
258  //Fill histograms
259  //------------------
260  mapHisto_["hRecBestMu"]->Fill(recMu1);
261  if ((std::abs(recMu1.eta()) < 2.5) && (recMu1.pt() > 2.5)) {
262  mapHisto_["hRecBestMu_Acc"]->Fill(recMu1);
263  }
264  mapHisto_["hRecBestMu"]->Fill(recMu2);
265  if ((std::abs(recMu2.eta()) < 2.5) && (recMu2.pt() > 2.5)) {
266  mapHisto_["hRecBestMu_Acc"]->Fill(recMu2);
267  }
268  mapHisto_["hDeltaRecBestMu"]->Fill(recMu1, recMu2);
269 
270  mapHisto_["hRecBestRes"]->Fill(bestRecRes);
271  if ((std::abs(recMu1.eta()) < 2.5) && (recMu1.pt() > 2.5) && (std::abs(recMu2.eta()) < 2.5) &&
272  (recMu2.pt() > 2.5)) {
273  mapHisto_["hRecBestRes_Acc"]->Fill(bestRecRes);
274  // Fill histogram of Res mass vs muon variable
275  mapHisto_["hRecBestResVSMu"]->Fill(recMu1, bestRecRes, -1);
276  mapHisto_["hRecBestResVSMu"]->Fill(recMu2, bestRecRes, +1);
277  }
278  }
279 
280  // Loop on the recMuons
281  std::vector<MuScleFitMuon>::const_iterator recMuon = muons.begin();
282  int muonCount = 0;
283  for (; recMuon != muons.end(); ++recMuon, ++muonCount) {
284  // Fill the histogram with uncorrected pt values
285  uncorrectedPt_->Fill(recMuon->pt());
286  uncorrectedPtVsEta_->Fill(recMuon->pt(), recMuon->eta());
287 
288  // Fill the histogram with corrected pt values
289  std::cout << "correcting muon[" << muonCount << "] with pt = " << recMuon->pt() << std::endl;
290  double corrPt = (*corrector_)(*recMuon);
291  std::cout << "to pt = " << corrPt << std::endl;
292  correctedPt_->Fill(corrPt);
293  correctedPtVsEta_->Fill(corrPt, recMuon->eta());
294  // correctedPt_->Fill(recMuon->pt());
295  }
296 }

References funct::abs(), correctedPt_, correctedPtVsEta_, correctMuon(), gather_cfg::cout, eventCounter_, fillMuonCollection(), MuScleFitUtils::findBestRecoRes(), glbMuonsToken_, iEvent, initialize(), MuScleFitBase::mapHisto_, PDWG_BPHSkim_cff::muons, MuScleFitUtils::ResFound, saMuonsToken_, MuScleFitUtils::SavedPair, MuScleFitBase::theMuonType_, PDWG_EXOHSCP_cff::tracks, tracksToken_, uncorrectedPt_, and uncorrectedPtVsEta_.

◆ correctMuon() [1/2]

lorentzVector TestCorrection::correctMuon ( const lorentzVector muon)
private

Definition at line 298 of file TestCorrection.cc.

298  {
299  double corrPt = corrector_->correct(muon);
300  double ptEtaPhiE[4] = {corrPt, muon.Eta(), muon.Phi(), muon.E()};
301  return MuScleFitUtils::fromPtEtaPhiToPxPyPz(ptEtaPhiE);
302 }

References corrector_, and MuScleFitUtils::fromPtEtaPhiToPxPyPz().

Referenced by analyze().

◆ correctMuon() [2/2]

lorentzVector TestCorrection::correctMuon ( const lorentzVector muon)
private

◆ endJob() [1/2]

virtual void TestCorrection::endJob ( void  )
inlineprivatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 69 of file TestCorrection.h.

69 {};

◆ endJob() [2/2]

void TestCorrection::endJob ( void  )
inlineoverrideprivatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 68 of file TestCorrection.cc.

68 {};

◆ fillMuonCollection() [1/2]

template<typename T >
std::vector<MuScleFitMuon> TestCorrection::fillMuonCollection ( const std::vector< T > &  tracks)
inlineprivate

Definition at line 70 of file TestCorrection.cc.

70  {
71  std::vector<MuScleFitMuon> muons;
72  typename std::vector<T>::const_iterator track;
73  for (track = tracks.begin(); track != tracks.end(); ++track) {
76  track->px(), track->py(), track->pz(), sqrt(track->p() * track->p() + +0.011163612));
77 
78  Double_t hitsTk(0), hitsMuon(0), ptError(0);
79  if (const reco::Muon* myMu = dynamic_cast<const reco::Muon*>(&(*track))) {
80  hitsTk = myMu->innerTrack()->hitPattern().numberOfValidTrackerHits();
81  hitsMuon = myMu->innerTrack()->hitPattern().numberOfValidMuonHits();
82  ptError = myMu->innerTrack()->ptError();
83  } else if (const pat::Muon* myMu = dynamic_cast<const pat::Muon*>(&(*track))) {
84  hitsTk = myMu->innerTrack()->hitPattern().numberOfValidTrackerHits();
85  hitsMuon = myMu->innerTrack()->hitPattern().numberOfValidMuonHits();
86  ptError = myMu->innerTrack()->ptError();
87  } else if (const reco::Track* myMu = dynamic_cast<const reco::Track*>(&(*track))) {
88  hitsTk = myMu->hitPattern().numberOfValidTrackerHits();
89  hitsMuon = myMu->hitPattern().numberOfValidMuonHits();
90  ptError = myMu->ptError();
91  }
92 
93  MuScleFitMuon muon(mu, track->charge(), ptError, hitsTk, hitsMuon);
94 
95  if (debug_ > 0) {
96  std::cout << "[TestCorrection::fillMuonCollection] after MuScleFitMuon initialization" << std::endl;
97  std::cout << " muon = " << muon << std::endl;
98  }
99 
100  muons.push_back(muon);
101  }
102  return muons;
103  }

References gather_cfg::cout, MuScleFitBase::debug_, amptDefaultParameters_cff::mu, HLT_2018_cff::muon, PDWG_BPHSkim_cff::muons, mathSSE::sqrt(), HLT_2018_cff::track, and PDWG_EXOHSCP_cff::tracks.

Referenced by analyze().

◆ fillMuonCollection() [2/2]

template<typename T >
std::vector<MuScleFitMuon> TestCorrection::fillMuonCollection ( const std::vector< T > &  tracks)
inlineprivate

Definition at line 71 of file TestCorrection.h.

72  {
73  std::vector<MuScleFitMuon> muons;
74  typename std::vector<T>::const_iterator track;
75  for( track = tracks.begin(); track != tracks.end(); ++track ) {
77  mu = reco::Particle::LorentzVector(track->px(),track->py(),track->pz(),
78  sqrt(track->p()*track->p() + + 0.011163612));
79 
80  Double_t hitsTk(0), hitsMuon(0), ptError(0);
81  if ( const reco::Muon* myMu = dynamic_cast<const reco::Muon*>(&(*track)) ){
82  hitsTk = myMu->innerTrack()->hitPattern().numberOfValidTrackerHits();
83  hitsMuon = myMu->innerTrack()->hitPattern().numberOfValidMuonHits();
84  ptError = myMu->innerTrack()->ptError();
85  }
86  else if ( const pat::Muon* myMu = dynamic_cast<const pat::Muon*>(&(*track)) ) {
87  hitsTk = myMu->innerTrack()->hitPattern().numberOfValidTrackerHits();
88  hitsMuon = myMu->innerTrack()->hitPattern().numberOfValidMuonHits();
89  ptError = myMu->innerTrack()->ptError();
90  }
91  else if (const reco::Track* myMu = dynamic_cast<const reco::Track*>(&(*track))){
92  hitsTk = myMu->hitPattern().numberOfValidTrackerHits();
93  hitsMuon = myMu->hitPattern().numberOfValidMuonHits();
94  ptError = myMu->ptError();
95  }
96 
97  MuScleFitMuon muon(mu,track->charge(),ptError,hitsTk,hitsMuon,false);
98 
99  if (debug_>0) {
100  std::cout<<"[TestCorrection::fillMuonCollection] after MuScleFitMuon initialization"<<std::endl;
101  std::cout<<" muon = "<<muon<<std::endl;
102  }
103 
104  muons.push_back(muon);
105  }
106  return muons;
107  }

References gather_cfg::cout, MuScleFitBase::debug_, amptDefaultParameters_cff::mu, HLT_2018_cff::muon, PDWG_BPHSkim_cff::muons, mathSSE::sqrt(), HLT_2018_cff::track, and PDWG_EXOHSCP_cff::tracks.

◆ initialize() [1/2]

void TestCorrection::initialize ( const edm::EventSetup )
privatevirtual

Definition at line 305 of file TestCorrection.cc.

305  {
306  // Read the pdf from root file. They are used by massProb when finding the muon pair, needed
307  // for the mass histograms.
309 }

References MuScleFitBase::readProbabilityDistributionsFromFile().

Referenced by analyze().

◆ initialize() [2/2]

virtual void TestCorrection::initialize ( const edm::EventSetup )
privatevirtual

Member Data Documentation

◆ background_

std::unique_ptr< BackgroundFunction > TestCorrection::background_
private

Definition at line 120 of file TestCorrection.cc.

Referenced by TestCorrection().

◆ correctedPt_

TH1F * TestCorrection::correctedPt_
private

Definition at line 113 of file TestCorrection.cc.

Referenced by analyze(), TestCorrection(), and ~TestCorrection().

◆ correctedPtVsEta_

TProfile * TestCorrection::correctedPtVsEta_
private

Definition at line 114 of file TestCorrection.cc.

Referenced by analyze(), TestCorrection(), and ~TestCorrection().

◆ corrector_

std::unique_ptr< MomentumScaleCorrector > TestCorrection::corrector_
private

Definition at line 118 of file TestCorrection.cc.

Referenced by correctMuon(), and TestCorrection().

◆ eventCounter_

int TestCorrection::eventCounter_
private

Definition at line 116 of file TestCorrection.cc.

Referenced by analyze(), TestCorrection(), and ~TestCorrection().

◆ glbMuonsToken_

edm::EDGetTokenT<reco::MuonCollection> TestCorrection::glbMuonsToken_
private

Definition at line 122 of file TestCorrection.cc.

Referenced by analyze().

◆ resolution_

std::unique_ptr< ResolutionFunction > TestCorrection::resolution_
private

Definition at line 119 of file TestCorrection.cc.

Referenced by TestCorrection().

◆ saMuonsToken_

edm::EDGetTokenT<reco::TrackCollection> TestCorrection::saMuonsToken_
private

Definition at line 123 of file TestCorrection.cc.

Referenced by analyze().

◆ tracksToken_

edm::EDGetTokenT<reco::TrackCollection> TestCorrection::tracksToken_
private

Definition at line 124 of file TestCorrection.cc.

Referenced by analyze().

◆ uncorrectedPt_

TH1F * TestCorrection::uncorrectedPt_
private

Definition at line 111 of file TestCorrection.cc.

Referenced by analyze(), TestCorrection(), and ~TestCorrection().

◆ uncorrectedPtVsEta_

TProfile * TestCorrection::uncorrectedPtVsEta_
private

Definition at line 112 of file TestCorrection.cc.

Referenced by analyze(), TestCorrection(), and ~TestCorrection().

svgfig.canvas
def canvas(*sub, **attr)
Definition: svgfig.py:482
PDWG_BPHSkim_cff.muons
muons
Definition: PDWG_BPHSkim_cff.py:47
TestCorrection::corrector_
std::unique_ptr< MomentumScaleCorrector > corrector_
Definition: TestCorrection.cc:118
PDWG_EXOHSCP_cff.tracks
tracks
Definition: PDWG_EXOHSCP_cff.py:28
MuScleFitUtils::findBestRecoRes
static std::pair< MuScleFitMuon, MuScleFitMuon > findBestRecoRes(const std::vector< MuScleFitMuon > &muons)
Definition: MuScleFitUtils.cc:315
TestCorrection::correctedPt_
TH1F * correctedPt_
Definition: TestCorrection.cc:113
MomentumScaleCorrector
Definition: MomentumScaleCorrector.h:25
TestCorrection::eventCounter_
int eventCounter_
Definition: TestCorrection.cc:116
muon
Definition: MuonCocktails.h:17
TestCorrection::uncorrectedPtVsEta_
TProfile * uncorrectedPtVsEta_
Definition: TestCorrection.cc:112
amptDefaultParameters_cff.mu
mu
Definition: amptDefaultParameters_cff.py:16
TestCorrection::initialize
virtual void initialize(const edm::EventSetup &)
Definition: TestCorrection.cc:305
edm
HLT enums.
Definition: AlignableModifier.h:19
BackgroundFunction
Definition: BackgroundFunction.h:15
gather_cfg.cout
cout
Definition: gather_cfg.py:144
TestCorrection::saMuonsToken_
edm::EDGetTokenT< reco::TrackCollection > saMuonsToken_
Definition: TestCorrection.cc:123
TestCorrection::resolution_
std::unique_ptr< ResolutionFunction > resolution_
Definition: TestCorrection.cc:119
TestCorrection::uncorrectedPt_
TH1F * uncorrectedPt_
Definition: TestCorrection.cc:111
MuScleFitMuon
Definition: Muon.h:14
edm::ParameterSet::getUntrackedParameter
T getUntrackedParameter(std::string const &, T const &) const
pat::Muon
Analysis-level muon class.
Definition: Muon.h:51
HLT_2018_cff.muon
muon
Definition: HLT_2018_cff.py:10349
edm::Handle< reco::MuonCollection >
MuScleFitBase::readProbabilityDistributionsFromFile
void readProbabilityDistributionsFromFile()
Read probability distributions from a local root file.
Definition: MuScleFitBase.cc:159
MuScleFitUtils::resfind
static std::vector< int > resfind
Definition: MuScleFitUtils.h:210
reco::Particle::LorentzVector
math::XYZTLorentzVector LorentzVector
Lorentz vector.
Definition: Particle.h:21
reco::Muon
Definition: Muon.h:27
resolutionFunctionVecService
resolutionFunctionBase< std::vector< double > > * resolutionFunctionVecService(const int identifier)
Service to build the resolution functor corresponding to the passed identifier when receiving a std::...
Definition: Functions.cc:92
MuScleFitBase::theFiles_
std::vector< TFile * > theFiles_
The files were the histograms are saved.
Definition: MuScleFitBase.h:74
download_sqlite_cfg.outputFile
outputFile
Definition: download_sqlite_cfg.py:5
MuScleFitUtils::parResol
static std::vector< double > parResol
Definition: MuScleFitUtils.h:192
mathSSE::sqrt
T sqrt(T t)
Definition: SSEVec.h:19
MuScleFitUtils::ResFound
static bool ResFound
Definition: MuScleFitUtils.h:131
reco::Track
Definition: Track.h:27
TestCorrection::fillMuonCollection
std::vector< MuScleFitMuon > fillMuonCollection(const std::vector< T > &tracks)
Definition: TestCorrection.cc:70
MuScleFitBase::theMuonLabel_
edm::InputTag theMuonLabel_
Definition: MuScleFitBase.h:47
MuScleFitUtils::resolutionFunctionForVec
static resolutionFunctionBase< std::vector< double > > * resolutionFunctionForVec
Definition: MuScleFitUtils.h:154
MuScleFitBase::theRootFileName_
std::string theRootFileName_
Definition: MuScleFitBase.h:48
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
MuScleFitBase::theMuonType_
int theMuonType_
Definition: MuScleFitBase.h:46
lorentzVector
reco::Particle::LorentzVector lorentzVector
Definition: GenMuonPair.h:9
TestCorrection::glbMuonsToken_
edm::EDGetTokenT< reco::MuonCollection > glbMuonsToken_
Definition: TestCorrection.cc:122
MuScleFitBase::fillHistoMap
void fillHistoMap(TFile *outputFile, unsigned int iLoop)
Create the histograms map.
Definition: MuScleFitBase.cc:9
MuScleFitBase::MuScleFitBase
MuScleFitBase(const edm::ParameterSet &iConfig)
Definition: MuScleFitBase.h:20
ResolutionFunction
Definition: ResolutionFunction.h:15
TestCorrection::correctedPtVsEta_
TProfile * correctedPtVsEta_
Definition: TestCorrection.cc:114
TestCorrection::correctMuon
lorentzVector correctMuon(const lorentzVector &muon)
Definition: TestCorrection.cc:298
listHistos.legend
legend
Definition: listHistos.py:41
MuScleFitUtils::SavedPair
static std::vector< std::pair< lorentzVector, lorentzVector > > SavedPair
Definition: MuScleFitUtils.h:231
iEvent
int iEvent
Definition: GenABIO.cc:224
MuScleFitBase::debug_
int debug_
Definition: MuScleFitBase.h:51
TestCorrection::tracksToken_
edm::EDGetTokenT< reco::TrackCollection > tracksToken_
Definition: TestCorrection.cc:124
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
MuScleFitUtils::fromPtEtaPhiToPxPyPz
static lorentzVector fromPtEtaPhiToPxPyPz(const double *ptEtaPhiE)
Definition: MuScleFitUtils.cc:502
HLT_2018_cff.track
track
Definition: HLT_2018_cff.py:10352
funct::abs
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
MuScleFitBase::mapHisto_
std::map< std::string, Histograms * > mapHisto_
The map of histograms.
Definition: MuScleFitBase.h:77
MuScleFitUtils::resolutionFunction
static resolutionFunctionBase< double * > * resolutionFunction
Definition: MuScleFitUtils.h:153
TestCorrection::background_
std::unique_ptr< BackgroundFunction > background_
Definition: TestCorrection.cc:120
MuScleFitBase::writeHistoMap
void writeHistoMap(const unsigned int iLoop)
Save the histograms map to file.
Definition: MuScleFitBase.cc:150