CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Protected Member Functions | Protected Attributes
MuScleFit Class Reference
Inheritance diagram for MuScleFit:
edm::EDLooper MuScleFitBase edm::EDLooperBase

Public Member Functions

void beginOfJobInConstructor ()
 
virtual void duringFastLoop ()
 
virtual edm::EDLooper::Status duringLoop (const edm::Event &event, const edm::EventSetup &eventSetup) override
 
virtual void endOfFastLoop (const unsigned int iLoop)
 
virtual void endOfJob () override
 
virtual edm::EDLooper::Status endOfLoop (const edm::EventSetup &eventSetup, unsigned int iLoop) override
 
template<typename T >
std::vector< MuScleFitMuonfillMuonCollection (const std::vector< T > &tracks)
 
 MuScleFit (const edm::ParameterSet &pset)
 
virtual void startingNewLoop (unsigned int iLoop) override
 
virtual ~MuScleFit ()
 
- Public Member Functions inherited from edm::EDLooper
 EDLooper ()
 
 EDLooper (EDLooper const &)=delete
 
EDLooperoperator= (EDLooper const &)=delete
 
virtual ~EDLooper ()
 
- Public Member Functions inherited from edm::EDLooperBase
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 &, ProcessContext *)
 
void doBeginRun (RunPrincipal &, EventSetup const &, ProcessContext *)
 
Status doDuringLoop (EventPrincipal &eventPrincipal, EventSetup const &es, ProcessingController &, StreamContext *)
 
void doEndLuminosityBlock (LuminosityBlockPrincipal &, EventSetup const &, ProcessContext *)
 
Status doEndOfLoop (EventSetup const &es)
 
void doEndRun (RunPrincipal &, EventSetup const &, ProcessContext *)
 
void doStartingNewLoop ()
 
 EDLooperBase ()
 
 EDLooperBase (EDLooperBase const &)=delete
 
virtual std::set
< eventsetup::EventSetupRecordKey
modifyingRecords () const
 
EDLooperBaseoperator= (EDLooperBase const &)=delete
 
void prepareForNextLoop (eventsetup::EventSetupProvider *esp)
 
void setActionTable (ExceptionToActionTable const *actionTable)
 
void setModuleChanger (ModuleChanger *)
 
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...
 
- Protected Member Functions inherited from edm::EDLooperBase
ModuleChangermoduleChanger ()
 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_
 
MuScleFitPlotterplotter
 
edm::InputTag puInfoSrc_
 
reco::Particle::LorentzVector recMu1
 
reco::Particle::LorentzVector recMu2
 
MuScleFitMuon recMuScleMu1
 
MuScleFitMuon recMuScleMu2
 
bool saveAllToTree_
 
edm::InputTag simTracksCollection_
 
MuonServiceProxytheService
 
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< 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_
 

Detailed Description

Analyzer of the Global muon tracks

Definition at line 186 of file MuScleFit.cc.

Constructor & Destructor Documentation

MuScleFit::MuScleFit ( const edm::ParameterSet pset)

Definition at line 376 of file MuScleFit.cc.

MuScleFit::~MuScleFit ( )
virtual

Definition at line 599 of file MuScleFit.cc.

Member Function Documentation

void MuScleFit::applyBias ( reco::Particle::LorentzVector mu,
const int  charge 
)
protected

Apply the bias if needed using the function in MuScleFitUtils.

Definition at line 1371 of file MuScleFit.cc.

void MuScleFit::applySmearing ( reco::Particle::LorentzVector mu)
protected

Apply the smearing if needed using the function in MuScleFitUtils.

Definition at line 1362 of file MuScleFit.cc.

void MuScleFit::beginOfJobInConstructor ( )

Definition at line 634 of file MuScleFit.cc.

bool MuScleFit::checkDeltaR ( reco::Particle::LorentzVector genMu,
reco::Particle::LorentzVector recMu 
)
protected

Check if two lorentzVector are near in deltaR.

Definition at line 1331 of file MuScleFit.cc.

void MuScleFit::checkParameters ( )
protected

Simple method to check parameters consistency. It aborts the job if the parameters are not consistent.

Definition at line 1382 of file MuScleFit.cc.

void MuScleFit::duringFastLoop ( )
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 1074 of file MuScleFit.cc.

edm::EDLooper::Status MuScleFit::duringLoop ( const edm::Event ,
const edm::EventSetup  
)
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.

void MuScleFit::endOfFastLoop ( const unsigned int  iLoop)
virtual

Definition at line 743 of file MuScleFit.cc.

void MuScleFit::endOfJob ( )
overridevirtual

Reimplemented from edm::EDLooperBase.

Definition at line 663 of file MuScleFit.cc.

edm::EDLooper::Status MuScleFit::endOfLoop ( const edm::EventSetup ,
unsigned int  iCounter 
)
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.

void MuScleFit::fillComparisonHistograms ( const reco::Particle::LorentzVector genMu,
const reco::Particle::LorentzVector recoMu,
const std::string &  inputName,
const int  charge 
)
protected

Fill the reco vs gen and reco vs sim comparison histograms.

Definition at line 1345 of file MuScleFit.cc.

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

Definition at line 316 of file MuScleFit.cc.

void MuScleFit::selectMuons ( const edm::Event event)
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.

void MuScleFit::selectMuons ( const int  maxEvents,
const TString &  treeFileName 
)
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.

bool MuScleFit::selGlobalMuon ( const pat::Muon aMuon)
protected

Function for onia selections.

Definition at line 1469 of file MuScleFit.cc.

bool MuScleFit::selTrackerMuon ( const pat::Muon aMuon)
protected

Definition at line 1490 of file MuScleFit.cc.

void MuScleFit::startingNewLoop ( unsigned int  int)
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.

template<typename T >
void MuScleFit::takeSelectedMuonType ( const T muon,
std::vector< reco::Track > &  tracks 
)
protected

Template method used to fill the track collection starting from reco::muons or pat::muons.

Definition at line 353 of file MuScleFit.cc.

Member Data Documentation

bool MuScleFit::compareToSimTracks_
protected

Definition at line 290 of file MuScleFit.cc.

bool MuScleFit::fastLoop
protected

Definition at line 279 of file MuScleFit.cc.

std::string MuScleFit::genParticlesName_
protected

Definition at line 293 of file MuScleFit.cc.

int MuScleFit::iev
protected

Definition at line 287 of file MuScleFit.cc.

bool MuScleFit::ifGenPart
protected

Definition at line 267 of file MuScleFit.cc.

bool MuScleFit::ifHepMC
protected

Definition at line 266 of file MuScleFit.cc.

std::string MuScleFit::inputRootTreeFileName_
protected

Definition at line 296 of file MuScleFit.cc.

unsigned int MuScleFit::loopCounter
protected

Definition at line 277 of file MuScleFit.cc.

int MuScleFit::maxEventsFromRootTree_
protected

Definition at line 300 of file MuScleFit.cc.

unsigned int MuScleFit::maxLoopNumber
protected

Definition at line 276 of file MuScleFit.cc.

double MuScleFit::maxResMass_hwindow[6]
protected

Definition at line 272 of file MuScleFit.cc.

double MuScleFit::minResMass_hwindow[6]
protected

Definition at line 271 of file MuScleFit.cc.

std::auto_ptr<MuScleFitMuonSelector> MuScleFit::muonSelector_
protected

Definition at line 312 of file MuScleFit.cc.

bool MuScleFit::negateTrigger_
protected

Definition at line 305 of file MuScleFit.cc.

int MuScleFit::numberOfEwkZ
protected

Definition at line 264 of file MuScleFit.cc.

int MuScleFit::numberOfSimMuons
protected

Definition at line 262 of file MuScleFit.cc.

int MuScleFit::numberOfSimTracks
protected

Definition at line 261 of file MuScleFit.cc.

int MuScleFit::numberOfSimVertices
protected

Definition at line 263 of file MuScleFit.cc.

std::string MuScleFit::outputRootTreeFileName_
protected

Definition at line 298 of file MuScleFit.cc.

bool MuScleFit::PATmuons_
protected

Definition at line 292 of file MuScleFit.cc.

MuScleFitPlotter* MuScleFit::plotter
protected

Definition at line 281 of file MuScleFit.cc.

edm::InputTag MuScleFit::puInfoSrc_
protected

Definition at line 309 of file MuScleFit.cc.

reco::Particle::LorentzVector MuScleFit::recMu1
protected

Definition at line 285 of file MuScleFit.cc.

reco::Particle::LorentzVector MuScleFit::recMu2
protected

Definition at line 285 of file MuScleFit.cc.

MuScleFitMuon MuScleFit::recMuScleMu1
protected

Definition at line 286 of file MuScleFit.cc.

MuScleFitMuon MuScleFit::recMuScleMu2
protected

Definition at line 286 of file MuScleFit.cc.

bool MuScleFit::saveAllToTree_
protected

Definition at line 306 of file MuScleFit.cc.

edm::InputTag MuScleFit::simTracksCollection_
protected

Definition at line 291 of file MuScleFit.cc.

MuonServiceProxy* MuScleFit::theService
protected

Definition at line 257 of file MuScleFit.cc.

int MuScleFit::totalEvents_
protected

Definition at line 288 of file MuScleFit.cc.

std::vector<std::string> MuScleFit::triggerPath_
protected

Definition at line 304 of file MuScleFit.cc.

std::string MuScleFit::triggerResultsLabel_
protected

Definition at line 302 of file MuScleFit.cc.

std::string MuScleFit::triggerResultsProcess_
protected

Definition at line 303 of file MuScleFit.cc.

edm::InputTag MuScleFit::vertexSrc_
protected

Definition at line 310 of file MuScleFit.cc.