![]() |
![]() |
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< MuScleFitMuon > | 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 |
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 | |
![]() | |
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 185 of file MuScleFit.cc.
MuScleFit::MuScleFit | ( | const edm::ParameterSet & | pset | ) |
Definition at line 375 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, 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_, 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_, MuScleFitBase::theMuonLabel_, MuScleFitBase::theMuonType_, triggerPath_, triggerResultsLabel_, triggerResultsProcess_, MuScleFitUtils::useProbsFile_, vertexSrc_, and MuScleFitUtils::x.
|
virtual |
Definition at line 598 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 1351 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 1342 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 633 of file MuScleFit.cc.
References gather_cfg::cout, MuScleFitPlotter::debug, MuScleFitBase::debug_, i, maxLoopNumber, plotter, MuScleFitBase::readProbabilityDistributionsFromFile(), dtTPAnalyzer_cfg::rootFileName, MuScleFitBase::theFiles_, MuScleFitBase::theGenInfoRootFileName_, MuScleFitBase::theRootFileName_, and MuScleFitUtils::useProbsFile_.
Referenced by MuScleFit().
|
protected |
Check if two lorentzVector are near in deltaR.
Definition at line 1311 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 1362 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 1054 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_, create_public_lumi_plots::log, loopCounter, MuScleFitBase::mapHisto_, scaleCards::mass, 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 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 778 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, totalEvents_, HLTConfigProvider::triggerIndex(), edm::TriggerNames::triggerName(), edm::TriggerNames::triggerNames(), triggerPath_, patRefSel_triggerSelection_cff::triggerResults, triggerResultsLabel_, and triggerResultsProcess_.
|
virtual |
Definition at line 742 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 662 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 695 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 1325 of file MuScleFit.cc.
References DeDxDiscriminatorTools::charge(), funct::cos(), MuScleFitUtils::deltaPhiNoFabs(), MuScleFitBase::mapHisto_, mergeVDriftHistosByStation::name, and funct::sin().
Referenced by duringFastLoop().
std::vector< MuScleFitMuon > MuScleFit::fillMuonCollection | ( | const std::vector< T > & | tracks | ) |
Definition at line 315 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 855 of file MuScleFit.cc.
References prof2calltree::back, gather_cfg::cout, MuScleFitBase::debug_, MuScleFitUtils::findBestRecoRes(), 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, and vertexSrc_.
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 952 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 1449 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 1470 of file MuScleFit.cc.
References pat::Muon::innerTrack(), pat::Muon::muonID(), AlCaHLTBitMon_ParallelJobs::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 668 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 352 of file MuScleFit.cc.
References MuScleFitBase::theMuonType_.
|
protected |
Definition at line 289 of file MuScleFit.cc.
Referenced by duringFastLoop(), and MuScleFit().
|
protected |
Definition at line 278 of file MuScleFit.cc.
Referenced by duringLoop(), endOfLoop(), and MuScleFit().
|
protected |
Definition at line 292 of file MuScleFit.cc.
Referenced by MuScleFit().
|
protected |
Definition at line 286 of file MuScleFit.cc.
Referenced by duringFastLoop(), endOfLoop(), and startingNewLoop().
|
protected |
Definition at line 266 of file MuScleFit.cc.
|
protected |
Definition at line 265 of file MuScleFit.cc.
|
protected |
Definition at line 295 of file MuScleFit.cc.
Referenced by duringLoop(), endOfLoop(), MuScleFit(), selectMuons(), and ~MuScleFit().
|
protected |
Definition at line 276 of file MuScleFit.cc.
Referenced by duringFastLoop(), duringLoop(), endOfFastLoop(), MuScleFit(), and startingNewLoop().
|
protected |
Definition at line 299 of file MuScleFit.cc.
Referenced by endOfLoop(), and MuScleFit().
|
protected |
Definition at line 275 of file MuScleFit.cc.
Referenced by beginOfJobInConstructor(), checkParameters(), endOfLoop(), and MuScleFit().
|
protected |
Definition at line 271 of file MuScleFit.cc.
Referenced by MuScleFit().
|
protected |
Definition at line 270 of file MuScleFit.cc.
Referenced by MuScleFit().
|
protected |
Definition at line 311 of file MuScleFit.cc.
Referenced by MuScleFit(), and selectMuons().
|
protected |
Definition at line 304 of file MuScleFit.cc.
Referenced by duringLoop(), and MuScleFit().
|
protected |
Definition at line 263 of file MuScleFit.cc.
|
protected |
Definition at line 261 of file MuScleFit.cc.
|
protected |
Definition at line 260 of file MuScleFit.cc.
|
protected |
Definition at line 262 of file MuScleFit.cc.
|
protected |
Definition at line 297 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 280 of file MuScleFit.cc.
Referenced by beginOfJobInConstructor(), endOfFastLoop(), and selectMuons().
|
protected |
Definition at line 308 of file MuScleFit.cc.
Referenced by MuScleFit(), and selectMuons().
|
protected |
Definition at line 284 of file MuScleFit.cc.
Referenced by duringFastLoop(), and selectMuons().
|
protected |
Definition at line 284 of file MuScleFit.cc.
Referenced by duringFastLoop(), and selectMuons().
|
protected |
Definition at line 285 of file MuScleFit.cc.
Referenced by selectMuons().
|
protected |
Definition at line 285 of file MuScleFit.cc.
Referenced by selectMuons().
|
protected |
Definition at line 305 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 256 of file MuScleFit.cc.
|
protected |
Definition at line 287 of file MuScleFit.cc.
Referenced by duringLoop(), endOfLoop(), and ~MuScleFit().
|
protected |
Definition at line 303 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 302 of file MuScleFit.cc.
Referenced by duringLoop(), and MuScleFit().
|
protected |
Definition at line 309 of file MuScleFit.cc.
Referenced by MuScleFit(), and selectMuons().