Protected Member Functions | |
void | applyBias (reco::Particle::LorentzVector &mu, const int charge) |
Apply the bias if needed using the function in MuScleFitUtils. More... | |
void | applySmearing (reco::Particle::LorentzVector &mu) |
Apply the smearing if needed using the function in MuScleFitUtils. More... | |
bool | checkDeltaR (reco::Particle::LorentzVector &genMu, reco::Particle::LorentzVector &recMu) |
Check if two lorentzVector are near in deltaR. More... | |
void | checkParameters () |
void | fillComparisonHistograms (const reco::Particle::LorentzVector &genMu, const reco::Particle::LorentzVector &recoMu, const std::string &inputName, const int charge) |
Fill the reco vs gen and reco vs sim comparison histograms. More... | |
void | selectMuons (const edm::Event &event) |
void | selectMuons (const int maxEvents, const TString &treeFileName) |
bool | selGlobalMuon (const pat::Muon *aMuon) |
Function for onia selections. More... | |
bool | selTrackerMuon (const pat::Muon *aMuon) |
template<typename T > | |
void | takeSelectedMuonType (const T &muon, std::vector< reco::Track > &tracks) |
Template method used to fill the track collection starting from reco::muons or pat::muons. More... | |
Protected Member Functions inherited from edm::EDLooperBase | |
ModuleChanger * | moduleChanger () |
This only returns a non-zero value during the call to endOfLoop. More... | |
ScheduleInfo const * | scheduleInfo () const |
This returns a non-zero value after the constructor has been called. More... | |
Protected Attributes | |
bool | compareToSimTracks_ |
bool | fastLoop |
std::string | genParticlesName_ |
int | iev |
bool | ifGenPart |
bool | ifHepMC |
std::string | inputRootTreeFileName_ |
unsigned int | loopCounter |
int | maxEventsFromRootTree_ |
unsigned int | maxLoopNumber |
double | maxResMass_hwindow [6] |
double | minResMass_hwindow [6] |
std::unique_ptr< MuScleFitMuonSelector > | muonSelector_ |
bool | negateTrigger_ |
int | numberOfEwkZ |
int | numberOfSimMuons |
int | numberOfSimTracks |
int | numberOfSimVertices |
std::string | outputRootTreeFileName_ |
bool | PATmuons_ |
MuScleFitPlotter * | plotter |
edm::InputTag | puInfoSrc_ |
reco::Particle::LorentzVector | recMu1 |
reco::Particle::LorentzVector | recMu2 |
MuScleFitMuon | recMuScleMu1 |
MuScleFitMuon | recMuScleMu2 |
bool | saveAllToTree_ |
edm::InputTag | simTracksCollection_ |
MuonServiceProxy * | theService |
int | totalEvents_ |
std::vector< std::string > | triggerPath_ |
std::string | triggerResultsLabel_ |
std::string | triggerResultsProcess_ |
edm::InputTag | vertexSrc_ |
Additional Inherited Members | |
Public Types inherited from edm::EDLooperBase | |
enum | Status { kContinue, kStop } |
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 inherited from MuScleFitBase | |
int | debug_ |
std::vector< GenMuonPair > | genMuonPairs_ |
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< MuonPair > | muonPairs_ |
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_ |
Analyzer of the Global muon tracks
Definition at line 183 of file MuScleFit.cc.
MuScleFit::MuScleFit | ( | const edm::ParameterSet & | pset | ) |
Definition at line 371 of file MuScleFit.cc.
References MuScleFitUtils::backgroundHandler, beginOfJobInConstructor(), MuScleFitUtils::biasFunction, MuScleFitUtils::BiasType, checkParameters(), compareToSimTracks_, MuScleFitUtils::computeMinosErrors_, gather_cfg::cout, MuScleFitUtils::crossSectionHandler, MuScleFitUtils::debug, MuScleFitBase::debug_, MuScleFitUtils::debugMassResol_, MuScleFitUtils::deltaPhiMaxCut_, MuScleFitUtils::deltaPhiMinCut_, MuScleFitUtils::doBackgroundFit, MuScleFitUtils::doCrossSectionFit, MuScleFitUtils::doResolFit, MuScleFitUtils::doScaleFit, beamvalidation::exit(), fastLoop, MuScleFitUtils::FitStrategy, callgraph::G, genParticlesName_, MuScleFitUtils::goodmuon, mps_fire::i, inputRootTreeFileName_, HLT_2018_cff::InputTag, dqmiolumiharvest::j, loopCounter, MuScleFitUtils::massWindowHalfWidth, maxEventsFromRootTree_, maxLoopNumber, MuScleFitUtils::maxMuonEtaFirstRange_, MuScleFitUtils::maxMuonEtaSecondRange_, MuScleFitUtils::maxMuonPt_, maxResMass_hwindow, MuScleFitUtils::minimumShapePlots_, MuScleFitUtils::minMuonEtaFirstRange_, MuScleFitUtils::minMuonEtaSecondRange_, MuScleFitUtils::minMuonPt_, minResMass_hwindow, muonSelector_, MuScleFitUtils::MuonType, MuScleFitUtils::MuonTypeForCheckMassWindow, negateTrigger_, MuScleFitUtils::normalizeLikelihoodByEventNumber_, outputRootTreeFileName_, MuScleFitUtils::parBgr, MuScleFitUtils::parBgrFix, MuScleFitUtils::parBgrOrder, MuScleFitUtils::parBias, MuScleFitUtils::parCrossSection, MuScleFitUtils::parCrossSectionFix, MuScleFitUtils::parCrossSectionOrder, MuScleFitUtils::parResol, MuScleFitUtils::parResolFix, MuScleFitUtils::parResolMax, MuScleFitUtils::parResolMin, MuScleFitUtils::parResolOrder, MuScleFitUtils::parResolStep, MuScleFitUtils::parScale, MuScleFitUtils::parScaleFix, MuScleFitUtils::parScaleMax, MuScleFitUtils::parScaleMin, MuScleFitUtils::parScaleOrder, MuScleFitUtils::parScaleStep, MuScleFitUtils::parSmear, PATmuons_, Pi, muonDTDigis_cfi::pset, puInfoSrc_, MuScleFitUtils::rapidityBinsForZ_, MuScleFitUtils::resfind, MuScleFitUtils::ResMass, MuScleFitUtils::ResolFitType, MuScleFitUtils::resolutionFunction, MuScleFitUtils::resolutionFunctionForVec, resolutionFunctionService(), resolutionFunctionVecService(), saveAllToTree_, MuScleFitUtils::ScaleFitType, MuScleFitUtils::scaleFunction, MuScleFitUtils::scaleFunctionForVec, scaleFunctionService(), scaleFunctionVecService(), MuScleFitUtils::separateRanges_, MuScleFitUtils::sherpa_, simTracksCollection_, MuScleFitUtils::smearFunction, smearFunctionService(), MuScleFitUtils::SmearType, MuScleFitUtils::speedup, mathSSE::sqrt(), MuScleFitUtils::startWithSimplex_, AlCaHLTBitMon_QueryRunRegistry::string, tools::TF1, MuScleFitBase::theMuonLabel_, MuScleFitBase::theMuonType_, triggerPath_, triggerResultsLabel_, triggerResultsProcess_, MuScleFitUtils::useProbsFile_, vertexSrc_, and MuScleFitUtils::x.
|
override |
Definition at line 601 of file MuScleFit.cc.
References gather_cfg::cout, MuScleFitBase::debug_, MuScleFitBase::genMuonPairs_, inputRootTreeFileName_, createfilelist::int, MuScleFitBase::muonPairs_, outputRootTreeFileName_, saveAllToTree_, MuScleFitUtils::SavedPair, findQualityFiles::size, MuScleFitUtils::speedup, MuScleFitBase::theMuonType_, totalEvents_, and RootTreeHandler::writeTree().
|
protected |
Apply the bias if needed using the function in MuScleFitUtils.
Definition at line 1396 of file MuScleFit.cc.
References MuScleFitUtils::applyBias(), MuScleFitUtils::BiasType, ALCARECOTkAlJpsiMuMu_cff::charge, gather_cfg::cout, MuScleFitBase::debug_, MuScleFitUtils::goodmuon, and amptDefaultParameters_cff::mu.
Referenced by fillMuonCollection(), and selectMuons().
|
protected |
Apply the smearing if needed using the function in MuScleFitUtils.
Definition at line 1388 of file MuScleFit.cc.
References MuScleFitUtils::applySmearing(), gather_cfg::cout, MuScleFitBase::debug_, MuScleFitUtils::goodmuon, amptDefaultParameters_cff::mu, and MuScleFitUtils::SmearType.
Referenced by fillMuonCollection(), and selectMuons().
void MuScleFit::beginOfJobInConstructor | ( | ) |
Definition at line 637 of file MuScleFit.cc.
References gather_cfg::cout, MuScleFitPlotter::debug, MuScleFitBase::debug_, mps_fire::i, maxLoopNumber, plotter, MuScleFitBase::readProbabilityDistributionsFromFile(), CSCSkim_cfi::rootFileName, contentValuesCheck::ss, AlCaHLTBitMon_QueryRunRegistry::string, MuScleFitBase::theFiles_, MuScleFitBase::theGenInfoRootFileName_, MuScleFitBase::theRootFileName_, and MuScleFitUtils::useProbsFile_.
Referenced by MuScleFit().
|
protected |
Check if two lorentzVector are near in deltaR.
Definition at line 1355 of file MuScleFit.cc.
References gather_cfg::cout, MuScleFitBase::debug_, MuScleFitUtils::deltaPhi(), PbPb_ZMuSkimMuonDPG_cff::deltaR, and mathSSE::sqrt().
Referenced by duringFastLoop().
|
protected |
Simple method to check parameters consistency. It aborts the job if the parameters are not consistent.
Definition at line 1406 of file MuScleFit.cc.
References MuScleFitUtils::BiasType, gather_cfg::cout, MuScleFitUtils::doBackgroundFit, MuScleFitUtils::doCrossSectionFit, MuScleFitUtils::doResolFit, MuScleFitUtils::doScaleFit, relativeConstraints::empty, maxLoopNumber, MuScleFitUtils::parBgr, MuScleFitUtils::parBgrFix, MuScleFitUtils::parBgrOrder, MuScleFitUtils::parBias, MuScleFitUtils::parCrossSection, MuScleFitUtils::parCrossSectionFix, MuScleFitUtils::parCrossSectionOrder, MuScleFitUtils::parResol, MuScleFitUtils::parResolFix, MuScleFitUtils::parResolOrder, MuScleFitUtils::parScale, MuScleFitUtils::parScaleFix, MuScleFitUtils::parScaleOrder, MuScleFitUtils::parSmear, MuScleFitUtils::resfind, findQualityFiles::size, and MuScleFitUtils::SmearType.
Referenced by MuScleFit().
|
virtual |
This method performs all needed operations on the muon pair. It reads the muons from SavedPair and uses the iev counter to keep track of the event number. The iev is incremented internally and reset to 0 in startingNewLoop.
Definition at line 1080 of file MuScleFit.cc.
References CrossSectionHandler::addParameters(), MuScleFitUtils::applyScale(), checkDeltaR(), compareToSimTracks_, MuScleFitUtils::computeWeight(), gather_cfg::cout, MuScleFitUtils::crossSectionHandler, MuScleFitBase::debug_, MuScleFitUtils::debugMassResol_, MuScleFitUtils::doScaleFit, HLT_2018_cff::eta1, HLT_2018_cff::eta2, fillComparisonHistograms(), dqmdumpme::first, MuScleFitUtils::genPair, mps_fire::i, iev, MuScleFitUtils::iev_, createfilelist::int, dqm-mbProfile::log, loopCounter, MuScleFitBase::mapHisto_, EgHLTOffHistBins_cfi::mass, MuScleFitUtils::massProb(), MuScleFitUtils::massResolComponents, MuScleFitUtils::massResolution(), MuScleFitUtils::parBgr, MuScleFitUtils::parCrossSection, MuScleFitUtils::parResol, MuScleFitUtils::parScale, MuScleFitUtils::parvalue, funct::pow(), TtFullHadEvtBuilder_cfi::prob, HLT_2018_cff::pt1, HLT_2018_cff::pt2, recMu1, recMu2, MuScleFitUtils::ResFound, MuScleFitUtils::resolutionFunctionForVec, MuScleFitUtils::SavedPair, edm::second(), MuScleFitUtils::simPair, findQualityFiles::size, MuScleFitUtils::speedup, and mps_merge::weight.
Referenced by duringLoop(), and endOfLoop().
|
overridevirtual |
Called after all event modules have had a chance to process the edm::Event.
Implements edm::EDLooper.
Definition at line 782 of file MuScleFit.cc.
References gather_cfg::cout, MuScleFitBase::debug_, duringFastLoop(), relativeConstraints::empty, fastLoop, HltComparatorCreateWorkflow::hltConfig, mps_fire::i, inputRootTreeFileName_, edm::EDLooperBase::kContinue, loopCounter, negateTrigger_, selectMuons(), findQualityFiles::size, AlCaHLTBitMon_QueryRunRegistry::string, totalEvents_, L1TEGammaOffline_cfi::triggerNames, triggerPath_, triggerResults, triggerResultsLabel_, and triggerResultsProcess_.
|
virtual |
Definition at line 747 of file MuScleFit.cc.
References MuScleFitBase::clearHistoMap(), gather_cfg::cout, loopCounter, MuScleFitUtils::minimizeLikelihood(), plotter, MuScleFitBase::theFiles_, and MuScleFitBase::writeHistoMap().
Referenced by endOfLoop().
|
overridevirtual |
Reimplemented from edm::EDLooperBase.
Definition at line 669 of file MuScleFit.cc.
References gather_cfg::cout, and MuScleFitBase::debug_.
|
overridevirtual |
Called after the system has finished one loop over the events. Thar argument is a count of how many loops have been processed before this loo. For the first time through the events the argument will be 0.
Implements edm::EDLooperBase.
Definition at line 703 of file MuScleFit.cc.
References gather_cfg::cout, duringFastLoop(), endOfFastLoop(), fastLoop, iev, inputRootTreeFileName_, edm::EDLooperBase::kContinue, edm::EDLooperBase::kStop, maxEventsFromRootTree_, maxLoopNumber, MuScleFitUtils::SavedPair, selectMuons(), startingNewLoop(), and totalEvents_.
|
protected |
Fill the reco vs gen and reco vs sim comparison histograms.
Definition at line 1370 of file MuScleFit.cc.
References ALCARECOTkAlJpsiMuMu_cff::charge, funct::cos(), MuScleFitUtils::deltaPhiNoFabs(), MuScleFitBase::mapHisto_, Skims_PA_cff::name, funct::sin(), and AlCaHLTBitMon_QueryRunRegistry::string.
Referenced by duringFastLoop().
std::vector< MuScleFitMuon > MuScleFit::fillMuonCollection | ( | const std::vector< T > & | tracks | ) |
Definition at line 314 of file MuScleFit.cc.
References applyBias(), applySmearing(), gather_cfg::cout, MuScleFitBase::debug_, MuScleFitUtils::goodmuon, MuScleFitUtils::mMu2, amptDefaultParameters_cff::mu, HLT_2018_cff::muon, PDWG_BPHSkim_cff::muons, mathSSE::sqrt(), HLT_2018_cff::track, and PDWG_EXOHSCP_cff::tracks.
|
protected |
Selects the muon pairs and fills the SavedPair and (if needed) the genPair vector. This version reads the events from the edm root file and performs a selection of the muons according to the parameters in the cfg.
Definition at line 857 of file MuScleFit.cc.
References L1TStage2uGTEmulatorClient_cff::BX, gather_cfg::cout, MuScleFitBase::debug_, MuScleFitUtils::findBestRecoRes(), dqmdumpme::first, MuScleFitBase::genMuonPairs_, MuScleFitUtils::genPair, edm::HandleBase::isValid(), MuScleFitBase::muonPairs_, PDWG_BPHSkim_cff::muons, muonSelector_, plotter, puInfoSrc_, recMu1, recMu2, recMuScleMu1, recMuScleMu2, MuScleFitUtils::ResFound, MuScleFitUtils::SavedPair, MuScleFitUtils::SavedPairMuScleFitMuons, edm::second(), MuScleFitUtils::simPair, MuScleFitUtils::speedup, vertexSrc_, pwdgSkimBPark_cfi::vertices, and GenEventInfoProduct::weight().
Referenced by duringLoop(), and endOfLoop().
|
protected |
Selects the muon pairs and fills the SavedPair and (if needed) the genPair vector. This version reads the events from a tree in the file specified in the cfg. The tree only contains one muon pair per event. This means that no selection is performed and we use preselected muons.
Definition at line 963 of file MuScleFit.cc.
References applyBias(), applySmearing(), MuScleFitUtils::BiasType, gather_cfg::cout, SiPixelRawToDigiRegional_cfi::deltaPhi, MuScleFitUtils::deltaPhi(), MuScleFitUtils::deltaPhiMaxCut_, MuScleFitUtils::deltaPhiMinCut_, HLT_2018_cff::eta1, HLT_2018_cff::eta2, MuScleFitPlotter::fillTreeGen(), MuScleFitPlotter::fillTreeRec(), MuScleFitBase::genMuonPairs_, MuScleFitUtils::genMuscleFitPair, MuScleFitUtils::genPair, inputRootTreeFileName_, Data_TkAlMinBias_Run2018C_PromptReco_v3_cff::maxEvents, MuScleFitUtils::maxMuonEtaFirstRange_, MuScleFitUtils::maxMuonEtaSecondRange_, MuScleFitUtils::maxMuonPt_, MuScleFitUtils::minMuonEtaFirstRange_, MuScleFitUtils::minMuonEtaSecondRange_, MuScleFitUtils::minMuonPt_, MuScleFitBase::muonPairs_, plotter, HLT_2018_cff::pt1, HLT_2018_cff::pt2, RootTreeHandler::readTree(), MuScleFitUtils::SavedPair, MuScleFitUtils::SavedPairMuScleFitMuons, MuScleFitUtils::separateRanges_, MuScleFitUtils::SmearType, MuScleFitUtils::speedup, and MuScleFitBase::theMuonType_.
|
protected |
Function for onia selections.
Definition at line 1502 of file MuScleFit.cc.
References pat::Muon::globalTrack(), pat::Muon::innerTrack(), pat::Muon::muonID(), AlCaHLTBitMon_ParallelJobs::p, and data-class-funcs::q.
|
protected |
Definition at line 1517 of file MuScleFit.cc.
References pat::Muon::innerTrack(), pat::Muon::muonID(), and AlCaHLTBitMon_ParallelJobs::p.
|
overridevirtual |
Called before system starts to loop over the events. The argument is a count of how many loops have been processed. For the first time through the events the argument will be 0.
Implements edm::EDLooperBase.
Definition at line 676 of file MuScleFit.cc.
References MuScleFitUtils::counter_resprob, gather_cfg::cout, MuScleFitBase::debug_, MuScleFitBase::fillHistoMap(), MuScleFitUtils::goodmuon, iev, MuScleFitUtils::iev_, MuScleFitUtils::loopCounter, loopCounter, MuScleFitUtils::oldNormalization_, and MuScleFitBase::theFiles_.
Referenced by endOfLoop().
|
protected |
Template method used to fill the track collection starting from reco::muons or pat::muons.
Definition at line 350 of file MuScleFit.cc.
References MuScleFitBase::theMuonType_, and PDWG_EXOHSCP_cff::tracks.
|
protected |
Definition at line 288 of file MuScleFit.cc.
Referenced by duringFastLoop(), and MuScleFit().
|
protected |
Definition at line 277 of file MuScleFit.cc.
Referenced by duringLoop(), endOfLoop(), and MuScleFit().
|
protected |
Definition at line 291 of file MuScleFit.cc.
Referenced by MuScleFit().
|
protected |
Definition at line 285 of file MuScleFit.cc.
Referenced by duringFastLoop(), endOfLoop(), and startingNewLoop().
|
protected |
Definition at line 265 of file MuScleFit.cc.
|
protected |
Definition at line 264 of file MuScleFit.cc.
|
protected |
Definition at line 294 of file MuScleFit.cc.
Referenced by duringLoop(), endOfLoop(), MuScleFit(), selectMuons(), and ~MuScleFit().
|
protected |
Definition at line 275 of file MuScleFit.cc.
Referenced by duringFastLoop(), duringLoop(), endOfFastLoop(), MuScleFit(), and startingNewLoop().
|
protected |
Definition at line 298 of file MuScleFit.cc.
Referenced by endOfLoop(), and MuScleFit().
|
protected |
Definition at line 274 of file MuScleFit.cc.
Referenced by beginOfJobInConstructor(), checkParameters(), endOfLoop(), and MuScleFit().
|
protected |
Definition at line 270 of file MuScleFit.cc.
Referenced by MuScleFit().
|
protected |
Definition at line 269 of file MuScleFit.cc.
Referenced by MuScleFit().
|
protected |
Definition at line 310 of file MuScleFit.cc.
Referenced by MuScleFit(), and selectMuons().
|
protected |
Definition at line 303 of file MuScleFit.cc.
Referenced by duringLoop(), and MuScleFit().
|
protected |
Definition at line 262 of file MuScleFit.cc.
|
protected |
Definition at line 260 of file MuScleFit.cc.
|
protected |
Definition at line 259 of file MuScleFit.cc.
|
protected |
Definition at line 261 of file MuScleFit.cc.
|
protected |
Definition at line 296 of file MuScleFit.cc.
Referenced by MuScleFit(), and ~MuScleFit().
|
protected |
Definition at line 290 of file MuScleFit.cc.
Referenced by MuScleFit().
|
protected |
Definition at line 279 of file MuScleFit.cc.
Referenced by beginOfJobInConstructor(), endOfFastLoop(), and selectMuons().
|
protected |
Definition at line 307 of file MuScleFit.cc.
Referenced by MuScleFit(), and selectMuons().
|
protected |
Definition at line 283 of file MuScleFit.cc.
Referenced by duringFastLoop(), and selectMuons().
|
protected |
Definition at line 283 of file MuScleFit.cc.
Referenced by duringFastLoop(), and selectMuons().
|
protected |
Definition at line 284 of file MuScleFit.cc.
Referenced by selectMuons().
|
protected |
Definition at line 284 of file MuScleFit.cc.
Referenced by selectMuons().
|
protected |
Definition at line 304 of file MuScleFit.cc.
Referenced by MuScleFit(), and ~MuScleFit().
|
protected |
Definition at line 289 of file MuScleFit.cc.
Referenced by MuScleFit().
|
protected |
Definition at line 255 of file MuScleFit.cc.
|
protected |
Definition at line 286 of file MuScleFit.cc.
Referenced by duringLoop(), endOfLoop(), and ~MuScleFit().
|
protected |
Definition at line 302 of file MuScleFit.cc.
Referenced by duringLoop(), and MuScleFit().
|
protected |
Definition at line 300 of file MuScleFit.cc.
Referenced by duringLoop(), and MuScleFit().
|
protected |
Definition at line 301 of file MuScleFit.cc.
Referenced by duringLoop(), and MuScleFit().
|
protected |
Definition at line 308 of file MuScleFit.cc.
Referenced by MuScleFit(), and selectMuons().