Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:22:40

0001 #ifndef MuScleFitPlotter_H
0002 #define MuScleFitPlotter_H
0003 
0004 /** \class MuScleFitPlotter
0005  *  Plotter of the muon info (sim,gen,rec)
0006  *
0007  *  \author C.Mariotti, S.Bolognesi - INFN Torino / T.Dorigo - INFN Padova
0008  * revised S. Casasso, E. Migliore - UniTo & INFN Torino
0009  */
0010 
0011 // #include "SimDataFormats/HepMCProduct/interface/HepMCProduct.h"
0012 #include "SimDataFormats/GeneratorProducts/interface/HepMCProduct.h"
0013 #include "DataFormats/HepMCCandidate/interface/GenParticleFwd.h"
0014 #include "SimDataFormats/Track/interface/SimTrackContainer.h"
0015 #include "Histograms.h"
0016 #include "MuonAnalysis/MomentumScaleCalibration/interface/Muon.h"
0017 
0018 namespace edm {
0019   class ParameterSet;
0020   class Event;
0021   class EventSetup;
0022 }  // namespace edm
0023 
0024 class TFile;
0025 class LeafCandidate;
0026 
0027 class MuScleFitPlotter {
0028 public:
0029   // Constructor
0030   // -----------
0031   MuScleFitPlotter(std::string);
0032 
0033   // Destructor
0034   // ----------
0035   virtual ~MuScleFitPlotter();
0036 
0037   // Operations
0038   // ----------
0039   void fillGen(const reco::GenParticleCollection& genParticles, bool = false);
0040   void fillGen(const edm::HepMCProduct& evtMC, bool sherpaFlag_);
0041   void fillSim(edm::Handle<edm::SimTrackContainer> simTracks);
0042   void fillGenSim(edm::Handle<edm::HepMCProduct> evtMC, edm::Handle<edm::SimTrackContainer> simTracks);
0043   //void fillRec(std::vector<reco::LeafCandidate>& muons);
0044   void fillRec(std::vector<MuScleFitMuon>& muons);
0045 
0046   // Root tree specific
0047   void fillTreeRec(
0048       const std::vector<std::pair<reco::Particle::LorentzVector, reco::Particle::LorentzVector> >& savedPairs);
0049   void fillTreeGen(
0050       const std::vector<std::pair<reco::Particle::LorentzVector, reco::Particle::LorentzVector> >& genPairs);
0051 
0052   void fillHistoMap();
0053   void writeHistoMap();
0054 
0055   bool debug;
0056 
0057 protected:
0058 private:
0059   // The map of histograms
0060   // ---------------------
0061   std::map<std::string, Histograms*> mapHisto;
0062   TFile* outputFile;
0063 };
0064 #endif