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 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 |
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 () |
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 186 of file MuScleFit.cc.
MuScleFit::MuScleFit | ( | const edm::ParameterSet & | pset | ) |
Definition at line 376 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, cmsRelvalreport::exit, fastLoop, MuScleFitUtils::FitStrategy, callgraph::G, genParticlesName_, edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), MuScleFitUtils::goodmuon, i, inputRootTreeFileName_, HLT_25ns14e33_v1_cff::InputTag, 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, 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, MuScleFitBase::theMuonLabel_, MuScleFitBase::theMuonType_, triggerPath_, triggerResultsLabel_, triggerResultsProcess_, MuScleFitUtils::useProbsFile_, vertexSrc_, and MuScleFitUtils::x.
|
virtual |
Definition at line 599 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 1359 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 1350 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 634 of file MuScleFit.cc.
References gather_cfg::cout, MuScleFitPlotter::debug, MuScleFitBase::debug_, i, maxLoopNumber, plotter, MuScleFitBase::readProbabilityDistributionsFromFile(), dtT0Analyzer_cfg::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 1319 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 1370 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 1062 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(), plotBeamSpotDB::first, MuScleFitUtils::genPair, i, iev, MuScleFitUtils::iev_, create_public_lumi_plots::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, and histoStyle::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 779 of file MuScleFit.cc.
References gather_cfg::cout, MuScleFitBase::debug_, duringFastLoop(), fastLoop, edm::Event::getRun(), HltComparatorCreateWorkflow::hltConfig, i, HLTConfigProvider::init(), inputRootTreeFileName_, edm::EDLooperBase::kContinue, loopCounter, negateTrigger_, selectMuons(), edm::TriggerNames::size(), findQualityFiles::size, AlCaHLTBitMon_QueryRunRegistry::string, totalEvents_, HLTConfigProvider::triggerIndex(), edm::TriggerNames::triggerName(), edm::TriggerNames::triggerNames(), triggerPath_, triggerResults, triggerResultsLabel_, and triggerResultsProcess_.
|
virtual |
Definition at line 743 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 663 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 696 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 1333 of file MuScleFit.cc.
References RecoTauCleanerPlugins::charge, funct::cos(), MuScleFitUtils::deltaPhiNoFabs(), MuScleFitBase::mapHisto_, mergeVDriftHistosByStation::name, funct::sin(), and AlCaHLTBitMon_QueryRunRegistry::string.
Referenced by duringFastLoop().
std::vector< MuScleFitMuon > MuScleFit::fillMuonCollection | ( | const std::vector< T > & | tracks | ) |
Definition at line 316 of file MuScleFit.cc.
References applyBias(), applySmearing(), gather_cfg::cout, MuScleFitBase::debug_, MuScleFitUtils::goodmuon, MuScleFitUtils::mMu2, RPCpg::mu, metsig::muon, patZpeak::muons, and mathSSE::sqrt().
|
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 856 of file MuScleFit.cc.
References prof2calltree::back, rpcdqm::BX, gather_cfg::cout, MuScleFitBase::debug_, MuScleFitUtils::findBestRecoRes(), plotBeamSpotDB::first, MuScleFitBase::genMuonPairs_, MuScleFitUtils::genPair, edm::HandleBase::isValid(), MuScleFitBase::muonPairs_, patZpeak::muons, muonSelector_, plotter, reco::tau::disc::Pt(), puInfoSrc_, recMu1, recMu2, recMuScleMu1, recMuScleMu2, MuScleFitUtils::ResFound, edm::Event::run(), MuScleFitUtils::SavedPair, MuScleFitUtils::SavedPairMuScleFitMuons, edm::second(), MuScleFitUtils::simPair, MuScleFitUtils::speedup, vertexSrc_, and HLT_25ns14e33_v1_cff::vertices.
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 960 of file MuScleFit.cc.
References applyBias(), applySmearing(), MuScleFitUtils::BiasType, gather_cfg::cout, SiPixelRawToDigiRegional_cfi::deltaPhi, MuScleFitUtils::deltaPhi(), MuScleFitUtils::deltaPhiMaxCut_, MuScleFitUtils::deltaPhiMinCut_, MuScleFitPlotter::fillTreeGen(), MuScleFitPlotter::fillTreeRec(), MuScleFitBase::genMuonPairs_, MuScleFitUtils::genPair, inputRootTreeFileName_, MuScleFitUtils::maxMuonEtaFirstRange_, MuScleFitUtils::maxMuonEtaSecondRange_, MuScleFitUtils::maxMuonPt_, MuScleFitUtils::minMuonEtaFirstRange_, MuScleFitUtils::minMuonEtaSecondRange_, MuScleFitUtils::minMuonPt_, MuScleFitBase::muonPairs_, plotter, RootTreeHandler::readTree(), MuScleFitUtils::SavedPair, MuScleFitUtils::separateRanges_, MuScleFitUtils::SmearType, MuScleFitUtils::speedup, and MuScleFitBase::theMuonType_.
|
protected |
Function for onia selections.
Definition at line 1457 of file MuScleFit.cc.
References pat::Muon::globalTrack(), pat::Muon::innerTrack(), pat::Muon::muonID(), reco::HitPattern::numberOfValidMuonHits(), AlCaHLTBitMon_ParallelJobs::p, reco::HitPattern::pixelLayersWithMeasurement(), and lumiQueryAPI::q.
|
protected |
Definition at line 1478 of file MuScleFit.cc.
References pat::Muon::innerTrack(), pat::Muon::muonID(), AlCaHLTBitMon_ParallelJobs::p, and reco::HitPattern::pixelLayersWithMeasurement().
|
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 669 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 353 of file MuScleFit.cc.
References MuScleFitBase::theMuonType_.
|
protected |
Definition at line 290 of file MuScleFit.cc.
Referenced by duringFastLoop(), and MuScleFit().
|
protected |
Definition at line 279 of file MuScleFit.cc.
Referenced by duringLoop(), endOfLoop(), and MuScleFit().
|
protected |
Definition at line 293 of file MuScleFit.cc.
Referenced by MuScleFit().
|
protected |
Definition at line 287 of file MuScleFit.cc.
Referenced by duringFastLoop(), endOfLoop(), and startingNewLoop().
|
protected |
Definition at line 267 of file MuScleFit.cc.
|
protected |
Definition at line 266 of file MuScleFit.cc.
|
protected |
Definition at line 296 of file MuScleFit.cc.
Referenced by duringLoop(), endOfLoop(), MuScleFit(), selectMuons(), and ~MuScleFit().
|
protected |
Definition at line 277 of file MuScleFit.cc.
Referenced by duringFastLoop(), duringLoop(), endOfFastLoop(), MuScleFit(), and startingNewLoop().
|
protected |
Definition at line 300 of file MuScleFit.cc.
Referenced by endOfLoop(), and MuScleFit().
|
protected |
Definition at line 276 of file MuScleFit.cc.
Referenced by beginOfJobInConstructor(), checkParameters(), endOfLoop(), and MuScleFit().
|
protected |
Definition at line 272 of file MuScleFit.cc.
Referenced by MuScleFit().
|
protected |
Definition at line 271 of file MuScleFit.cc.
Referenced by MuScleFit().
|
protected |
Definition at line 312 of file MuScleFit.cc.
Referenced by MuScleFit(), and selectMuons().
|
protected |
Definition at line 305 of file MuScleFit.cc.
Referenced by duringLoop(), and MuScleFit().
|
protected |
Definition at line 264 of file MuScleFit.cc.
|
protected |
Definition at line 262 of file MuScleFit.cc.
|
protected |
Definition at line 261 of file MuScleFit.cc.
|
protected |
Definition at line 263 of file MuScleFit.cc.
|
protected |
Definition at line 298 of file MuScleFit.cc.
Referenced by MuScleFit(), and ~MuScleFit().
|
protected |
Definition at line 292 of file MuScleFit.cc.
Referenced by MuScleFit().
|
protected |
Definition at line 281 of file MuScleFit.cc.
Referenced by beginOfJobInConstructor(), endOfFastLoop(), and selectMuons().
|
protected |
Definition at line 309 of file MuScleFit.cc.
Referenced by MuScleFit(), and selectMuons().
|
protected |
Definition at line 285 of file MuScleFit.cc.
Referenced by duringFastLoop(), and selectMuons().
|
protected |
Definition at line 285 of file MuScleFit.cc.
Referenced by duringFastLoop(), and selectMuons().
|
protected |
Definition at line 286 of file MuScleFit.cc.
Referenced by selectMuons().
|
protected |
Definition at line 286 of file MuScleFit.cc.
Referenced by selectMuons().
|
protected |
Definition at line 306 of file MuScleFit.cc.
Referenced by MuScleFit(), and ~MuScleFit().
|
protected |
Definition at line 291 of file MuScleFit.cc.
Referenced by MuScleFit().
|
protected |
Definition at line 257 of file MuScleFit.cc.
|
protected |
Definition at line 288 of file MuScleFit.cc.
Referenced by duringLoop(), endOfLoop(), and ~MuScleFit().
|
protected |
Definition at line 304 of file MuScleFit.cc.
Referenced by duringLoop(), and MuScleFit().
|
protected |
Definition at line 302 of file MuScleFit.cc.
Referenced by duringLoop(), and MuScleFit().
|
protected |
Definition at line 303 of file MuScleFit.cc.
Referenced by duringLoop(), and MuScleFit().
|
protected |
Definition at line 310 of file MuScleFit.cc.
Referenced by MuScleFit(), and selectMuons().