![]() |
![]() |
#include <MuScleFit.h>
Public Member Functions | |
void | beginOfJobInConstructor () |
virtual void | duringFastLoop () |
virtual edm::EDLooper::Status | duringLoop (const edm::Event &event, const edm::EventSetup &eventSetup) |
virtual void | endOfFastLoop (const unsigned int iLoop) |
virtual void | endOfJob () |
virtual edm::EDLooper::Status | endOfLoop (const edm::EventSetup &eventSetup, unsigned int iLoop) |
template<typename T > | |
std::vector< reco::LeafCandidate > | fillMuonCollection (const std::vector< T > &tracks) |
MuScleFit (const edm::ParameterSet &pset) | |
virtual void | startingNewLoop (unsigned int iLoop) |
virtual | ~MuScleFit () |
![]() | |
EDLooper () | |
virtual | ~EDLooper () |
![]() | |
virtual void | attachTo (ActivityRegistry &) |
Override this method if you need to monitor the state of the processing. More... | |
virtual void | beginOfJob (EventSetup const &) |
virtual void | beginOfJob () |
void | copyInfo (ScheduleInfo const &) |
void | doBeginLuminosityBlock (LuminosityBlockPrincipal &, EventSetup const &) |
void | doBeginRun (RunPrincipal &, EventSetup const &) |
Status | doDuringLoop (EventPrincipal &eventPrincipal, EventSetup const &es, ProcessingController &) |
void | doEndLuminosityBlock (LuminosityBlockPrincipal &, EventSetup const &) |
Status | doEndOfLoop (EventSetup const &es) |
void | doEndRun (RunPrincipal &, EventSetup const &) |
void | doStartingNewLoop () |
EDLooperBase () | |
virtual std::set < eventsetup::EventSetupRecordKey > | modifyingRecords () const |
void | prepareForNextLoop (eventsetup::EventSetupProvider *esp) |
void | setActionTable (ActionTable const *actionTable) |
void | setModuleChanger (ModuleChanger const *) |
virtual | ~EDLooperBase () |
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... | |
![]() | |
ModuleChanger const * | moduleChanger () const |
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::auto_ptr < MuScleFitMuonSelector > | muonSelector_ |
bool | negateTrigger_ |
int | numberOfEwkZ |
int | numberOfSimMuons |
int | numberOfSimTracks |
int | numberOfSimVertices |
std::string | outputRootTreeFileName_ |
bool | PATmuons_ |
MuScleFitPlotter * | plotter |
reco::Particle::LorentzVector | recMu1 |
reco::Particle::LorentzVector | recMu2 |
bool | saveAllToTree_ |
edm::InputTag | simTracksCollection_ |
MuonServiceProxy * | theService |
int | totalEvents_ |
std::string | triggerPath_ |
std::string | triggerResultsLabel_ |
std::string | triggerResultsProcess_ |
Additional Inherited Members | |
![]() | |
enum | Status { kContinue, kStop } |
![]() | |
MuScleFitBase (const edm::ParameterSet &iConfig) | |
virtual | ~MuScleFitBase () |
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... | |
![]() | |
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 50 of file MuScleFit.h.
MuScleFit::MuScleFit | ( | const edm::ParameterSet & | pset | ) |
Definition at line 148 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::doBackgroundFit, MuScleFitUtils::doCrossSectionFit, MuScleFitUtils::doResolFit, MuScleFitUtils::doScaleFit, cmsRelvalreport::exit, fastLoop, MuScleFitUtils::FitStrategy, genParticlesName_, edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), MuScleFitUtils::goodmuon, i, inputRootTreeFileName_, 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_, lumiNorm::norm, MuScleFitUtils::normalizeLikelihoodByEventNumber_, outputRootTreeFileName_, 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, PATmuons_, Pi, MuScleFitUtils::rapidityBinsForZ_, MuScleFitUtils::resfind, MuScleFitUtils::ResMass, MuScleFitUtils::ResolFitType, MuScleFitUtils::resolutionFunction, MuScleFitUtils::resolutionFunctionForVec, resolutionFunctionService(), resolutionFunctionVecService(), saveAllToTree_, MuScleFitUtils::ScaleFitType, MuScleFitUtils::scaleFunction, MuScleFitUtils::scaleFunctionForVec, scaleFunctionService(), scaleFunctionVecService(), MuScleFitUtils::sherpa_, simTracksCollection_, MuScleFitUtils::smearFunction, smearFunctionService(), MuScleFitUtils::SmearType, MuScleFitUtils::speedup, mathSSE::sqrt(), MuScleFitUtils::startWithSimplex_, MuScleFitBase::theMuonLabel_, MuScleFitBase::theMuonType_, triggerPath_, triggerResultsLabel_, triggerResultsProcess_, MuScleFitUtils::useProbsFile_, and MuScleFitUtils::x.
|
virtual |
Definition at line 357 of file MuScleFit.cc.
References gather_cfg::cout, MuScleFitBase::debug_, MuScleFitBase::genMuonPairs_, inputRootTreeFileName_, 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 948 of file MuScleFit.cc.
References MuScleFitUtils::applyBias(), MuScleFitUtils::BiasType, gather_cfg::cout, MuScleFitBase::debug_, and MuScleFitUtils::goodmuon.
Referenced by fillMuonCollection(), and selectMuons().
|
protected |
Apply the smearing if needed using the function in MuScleFitUtils.
Definition at line 939 of file MuScleFit.cc.
References MuScleFitUtils::applySmearing(), gather_cfg::cout, MuScleFitBase::debug_, MuScleFitUtils::goodmuon, and MuScleFitUtils::SmearType.
Referenced by fillMuonCollection(), and selectMuons().
void MuScleFit::beginOfJobInConstructor | ( | ) |
Definition at line 383 of file MuScleFit.cc.
References gather_cfg::cout, MuScleFitPlotter::debug, MuScleFitBase::debug_, i, maxLoopNumber, plotter, MuScleFitBase::readProbabilityDistributionsFromFile(), MuScleFitBase::theFiles_, MuScleFitBase::theGenInfoRootFileName_, MuScleFitBase::theRootFileName_, and MuScleFitUtils::useProbsFile_.
Referenced by MuScleFit().
|
protected |
Check if two lorentzVector are near in deltaR.
Definition at line 908 of file MuScleFit.cc.
References gather_cfg::cout, MuScleFitBase::debug_, MuScleFitUtils::deltaPhi(), 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 959 of file MuScleFit.cc.
References MuScleFitUtils::BiasType, gather_cfg::cout, MuScleFitUtils::doBackgroundFit, MuScleFitUtils::doCrossSectionFit, MuScleFitUtils::doResolFit, MuScleFitUtils::doScaleFit, 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 682 of file MuScleFit.cc.
References CrossSectionHandler::addParameters(), MuScleFitUtils::applyScale(), checkDeltaR(), compareToSimTracks_, MuScleFitUtils::computeWeight(), gather_cfg::cout, MuScleFitUtils::crossSectionHandler, MuScleFitBase::debug_, MuScleFitUtils::debugMassResol_, MuScleFitUtils::doScaleFit, fillComparisonHistograms(), first, MuScleFitUtils::genPair, i, iev, MuScleFitUtils::iev_, funct::log(), loopCounter, MuScleFitBase::mapHisto_, MuScleFitUtils::massProb(), MuScleFitUtils::massResolComponents, MuScleFitUtils::massResolution(), MuScleFitUtils::parBgr, MuScleFitUtils::parCrossSection, MuScleFitUtils::parResol, MuScleFitUtils::parScale, MuScleFitUtils::parvalue, funct::pow(), recMu1, recMu2, MuScleFitUtils::ResFound, MuScleFitUtils::resolutionFunctionForVec, MuScleFitUtils::SavedPair, edm::second(), MuScleFitUtils::simPair, findQualityFiles::size, MuScleFitUtils::speedup, funct::true, and CommonMethods::weight().
Referenced by duringLoop(), and endOfLoop().
|
virtual |
Called after all event modules have had a chance to process the edm::Event.
Implements edm::EDLooper.
Definition at line 528 of file MuScleFit.cc.
References gather_cfg::cout, MuScleFitBase::debug_, duringFastLoop(), fastLoop, edm::Event::getRun(), HltComparatorCreateWorkflow::hltConfig, HLTConfigProvider::init(), inputRootTreeFileName_, edm::EDLooperBase::kContinue, loopCounter, negateTrigger_, selectMuons(), findQualityFiles::size, totalEvents_, HLTConfigProvider::triggerIndex(), triggerPath_, triggerResultsLabel_, and triggerResultsProcess_.
|
virtual |
Definition at line 492 of file MuScleFit.cc.
References MuScleFitBase::clearHistoMap(), gather_cfg::cout, loopCounter, MuScleFitUtils::minimizeLikelihood(), plotter, MuScleFitBase::theFiles_, and MuScleFitBase::writeHistoMap().
Referenced by endOfLoop().
|
virtual |
Reimplemented from edm::EDLooperBase.
Definition at line 412 of file MuScleFit.cc.
References gather_cfg::cout, and MuScleFitBase::debug_.
|
virtual |
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 445 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 922 of file MuScleFit.cc.
References DeDxDiscriminatorTools::charge(), funct::cos(), MuScleFitUtils::deltaPhiNoFabs(), MuScleFitBase::mapHisto_, AlCaRecoCosmics_cfg::name, and funct::sin().
Referenced by duringFastLoop().
std::vector< reco::LeafCandidate > MuScleFit::fillMuonCollection | ( | const std::vector< T > & | tracks | ) |
Definition at line 174 of file MuScleFit.h.
References applyBias(), applySmearing(), gather_cfg::cout, MuScleFitBase::debug_, MuScleFitUtils::goodmuon, MuScleFitUtils::mMu2, metsig::muon, ExpressReco_HICollisions_FallBack::muons, mathSSE::sqrt(), and ExpressReco_HICollisions_FallBack::track.
|
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 590 of file MuScleFit.cc.
References prof2calltree::back, gather_cfg::cout, MuScleFitBase::debug_, MuScleFitPlotter::fillRec(), MuScleFitUtils::findBestRecoRes(), first, MuScleFitBase::genMuonPairs_, MuScleFitUtils::genPair, MuScleFitBase::muonPairs_, ExpressReco_HICollisions_FallBack::muons, muonSelector_, plotter, reco::tau::disc::Pt(), recMu1, recMu2, MuScleFitUtils::ResFound, edm::Event::run(), MuScleFitUtils::SavedPair, edm::second(), and MuScleFitUtils::simPair.
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 631 of file MuScleFit.cc.
References applyBias(), applySmearing(), MuScleFitUtils::BiasType, gather_cfg::cout, MuScleFitPlotter::fillGen(), MuScleFitPlotter::fillRec(), MuScleFitUtils::genPair, inputRootTreeFileName_, MuScleFitUtils::maxMuonEtaFirstRange_, MuScleFitUtils::maxMuonEtaSecondRange_, MuScleFitUtils::maxMuonPt_, MuScleFitUtils::minMuonEtaFirstRange_, MuScleFitUtils::minMuonEtaSecondRange_, MuScleFitUtils::minMuonPt_, plotter, RootTreeHandler::readTree(), MuScleFitUtils::SavedPair, MuScleFitUtils::SmearType, MuScleFitUtils::speedup, and MuScleFitBase::theMuonType_.
|
protected |
Function for onia selections.
Definition at line 1046 of file MuScleFit.cc.
References pat::Muon::globalTrack(), pat::Muon::innerTrack(), pat::Muon::muonID(), reco::HitPattern::numberOfValidMuonHits(), L1TEmulatorMonitor_cff::p, reco::HitPattern::pixelLayersWithMeasurement(), and lumiQueryAPI::q.
|
protected |
Definition at line 1067 of file MuScleFit.cc.
References pat::Muon::innerTrack(), pat::Muon::muonID(), L1TEmulatorMonitor_cff::p, and reco::HitPattern::pixelLayersWithMeasurement().
|
virtual |
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 418 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 201 of file MuScleFit.h.
References MuScleFitBase::theMuonType_.
|
protected |
Definition at line 152 of file MuScleFit.h.
Referenced by duringFastLoop(), and MuScleFit().
|
protected |
Definition at line 142 of file MuScleFit.h.
Referenced by duringLoop(), endOfLoop(), and MuScleFit().
|
protected |
Definition at line 155 of file MuScleFit.h.
Referenced by MuScleFit().
|
protected |
Definition at line 149 of file MuScleFit.h.
Referenced by duringFastLoop(), endOfLoop(), and startingNewLoop().
|
protected |
Definition at line 130 of file MuScleFit.h.
|
protected |
Definition at line 129 of file MuScleFit.h.
|
protected |
Definition at line 158 of file MuScleFit.h.
Referenced by duringLoop(), endOfLoop(), MuScleFit(), selectMuons(), and ~MuScleFit().
|
protected |
Definition at line 140 of file MuScleFit.h.
Referenced by duringFastLoop(), duringLoop(), endOfFastLoop(), MuScleFit(), and startingNewLoop().
|
protected |
Definition at line 162 of file MuScleFit.h.
Referenced by endOfLoop(), and MuScleFit().
|
protected |
Definition at line 139 of file MuScleFit.h.
Referenced by beginOfJobInConstructor(), checkParameters(), endOfLoop(), and MuScleFit().
|
protected |
Definition at line 135 of file MuScleFit.h.
Referenced by MuScleFit().
|
protected |
Definition at line 134 of file MuScleFit.h.
Referenced by MuScleFit().
|
protected |
Definition at line 170 of file MuScleFit.h.
Referenced by MuScleFit(), and selectMuons().
|
protected |
Definition at line 167 of file MuScleFit.h.
Referenced by duringLoop(), and MuScleFit().
|
protected |
Definition at line 127 of file MuScleFit.h.
|
protected |
Definition at line 125 of file MuScleFit.h.
|
protected |
Definition at line 124 of file MuScleFit.h.
|
protected |
Definition at line 126 of file MuScleFit.h.
|
protected |
Definition at line 160 of file MuScleFit.h.
Referenced by MuScleFit(), and ~MuScleFit().
|
protected |
Definition at line 154 of file MuScleFit.h.
Referenced by MuScleFit().
|
protected |
Definition at line 144 of file MuScleFit.h.
Referenced by beginOfJobInConstructor(), endOfFastLoop(), and selectMuons().
|
protected |
Definition at line 148 of file MuScleFit.h.
Referenced by duringFastLoop(), and selectMuons().
|
protected |
Definition at line 148 of file MuScleFit.h.
Referenced by duringFastLoop(), and selectMuons().
|
protected |
Definition at line 168 of file MuScleFit.h.
Referenced by MuScleFit(), and ~MuScleFit().
|
protected |
Definition at line 153 of file MuScleFit.h.
Referenced by MuScleFit().
|
protected |
Definition at line 120 of file MuScleFit.h.
|
protected |
Definition at line 150 of file MuScleFit.h.
Referenced by duringLoop(), endOfLoop(), and ~MuScleFit().
|
protected |
Definition at line 166 of file MuScleFit.h.
Referenced by duringLoop(), and MuScleFit().
|
protected |
Definition at line 164 of file MuScleFit.h.
Referenced by duringLoop(), and MuScleFit().
|
protected |
Definition at line 165 of file MuScleFit.h.
Referenced by duringLoop(), and MuScleFit().