CMS 3D CMS Logo

HistoMuon.h

Go to the documentation of this file.
00001 #ifndef StarterKit_HistoMuon_h
00002 #define StarterKit_HistoMuon_h
00003 
00004 //------------------------------------------------------------
00005 // Title: HistoMuon.h
00006 // Purpose: To histogram Muons
00007 //
00008 // Authors:
00009 // Liz Sexton-Kennedy <sexton@fnal.gov>
00010 // Eric Vaandering <ewv@fnal.gov >
00011 // Petar Maksimovic <petar@jhu.edu>
00012 // Sal Rappoccio <rappocc@fnal.gov>
00013 //------------------------------------------------------------
00014 //
00015 // Interface:
00016 //
00017 //   HistoMuon ( TFile * file );
00018 //   Description: Constructor.
00019 //
00020 //   void fill( TK::Muon * );
00021 //   Description: Fill object. Will fill relevant muon variables
00022 //
00023 //   void write();
00024 //   Description: Write object to file in question.
00025 //
00026 //   ~HistoMuon
00027 //    Description: Destructor. Deallocates memory.
00028 //
00029 //------------------------------------------------------------
00030 //
00031 // Modification History:
00032 //
00033 //   -29Nov07: Sal Rappoccio: Creation of the object
00034 //------------------------------------------------------------
00035 
00036 // This package's include files
00037 #include "PhysicsTools/StarterKit/interface/HistoGroup.h"
00038 
00039 // CMSSW include files
00040 #include "DataFormats/PatCandidates/interface/Muon.h"
00041 
00042 
00043 // STL include files
00044 #include <string>
00045 #include <vector>
00046 
00047 // ROOT include files
00048 #include <TH1D.h>
00049 
00050 namespace pat {
00051 
00052   class HistoMuon : public HistoGroup<Muon> {
00053 
00054   public:
00055     HistoMuon(std::string dir = "muon", std::string group = "Muon",
00056               std::string pre ="mu",
00057               double pt1=0, double pt2=200, double m1=0, double m2=200,
00058               TFileDirectory * parentDir=0);
00059     virtual ~HistoMuon() { } ;
00060 
00061     // fill a plain ol' muon:
00062     virtual void fill( const Muon *muon, uint iPart = 1, double weight = 1.0 );
00063     virtual void fill( const Muon &muon, uint iPart = 1, double weight = 1.0 ) { fill(&muon, iPart,weight); }
00064 
00065     // fill a muon that is a shallow clone, and take kinematics from 
00066     // shallow clone but detector plots from the muon itself
00067     virtual void fill( const reco::ShallowClonePtrCandidate *muon, uint iPart = 1, double weight = 1.0 );
00068     virtual void fill( const reco::ShallowClonePtrCandidate &muon, uint iPart = 1, double weight = 1.0 )
00069     { fill(&muon, iPart,weight); }
00070 
00071     virtual void fillCollection( const std::vector<Muon> & coll, double weight = 1.0 );
00072 
00073     // Clear ntuple cache
00074     void clearVec();
00075 
00076   protected:
00077     PhysVarHisto * h_trackIso_ ;   
00078     PhysVarHisto * h_caloIso_  ;   
00079     PhysVarHisto * h_leptonID_ ;   
00080     PhysVarHisto * h_calCompat_;   
00081     PhysVarHisto * h_caloE_    ;   
00082     PhysVarHisto * h_type_     ;   
00083     PhysVarHisto * h_nChambers_;   
00084 
00085 //muon energy deposit analyzer
00086     PhysVarHisto * ecalDepEnergy_;
00087     PhysVarHisto * ecalS9DepEnergy_ ;
00088     PhysVarHisto * hcalDepEnergy_ ;
00089     PhysVarHisto * hcalS9DepEnergy_ ;
00090     PhysVarHisto * hoDepEnergy_ ;
00091     PhysVarHisto * hoS9DepEnergy_ ;
00092 /*
00093 // muon seed analyzer
00094     PhysVarHisto * NumberOfRecHitsPerSeed_ ;
00095     PhysVarHisto * seedPhi_ ;
00096     PhysVarHisto * seedEta_ ;
00097     PhysVarHisto * seedTheta_ ;
00098     PhysVarHisto * seedPt_ ;
00099     PhysVarHisto * seedPx_ ;
00100     PhysVarHisto * seedPy_ ;
00101     PhysVarHisto * seedPz_ ;
00102     PhysVarHisto * seedPtErr_ ;
00103     PhysVarHisto * seedPtErrVsPhi_ ;
00104     PhysVarHisto * seedPtErrVsEta_ ;
00105     PhysVarHisto * seedPtErrVsPt_ ;
00106     PhysVarHisto * seedPxErr_ ;
00107     PhysVarHisto * seedPyErr_ ;
00108     PhysVarHisto * seedPzErr_ ;
00109     PhysVarHisto * seedPErr_ ;
00110     PhysVarHisto * seedPErrVsPhi_ ;
00111     PhysVarHisto * seedPErrVsEta_ ;
00112     PhysVarHisto * seedPErrVsPt_ ;
00113     PhysVarHisto * seedPhiErr_ ;
00114     PhysVarHisto * seedEtaErr_ ;
00115 */
00116 // muon reco analyzer
00117     PhysVarHisto * muReco_ ;
00118 // global muon
00119     std::vector<PhysVarHisto *> etaGlbTrack_ ;
00120     std::vector<PhysVarHisto *> etaResolution_ ;
00121     std::vector<PhysVarHisto *> thetaGlbTrack_ ;
00122     std::vector<PhysVarHisto *> thetaResolution_ ;
00123     std::vector<PhysVarHisto *> phiGlbTrack_ ;
00124     std::vector<PhysVarHisto *> phiResolution_ ;
00125     std::vector<PhysVarHisto *> pGlbTrack_ ;
00126     std::vector<PhysVarHisto *> ptGlbTrack_ ;
00127     std::vector<PhysVarHisto *> qGlbTrack_ ;
00128     std::vector<PhysVarHisto *> qOverpResolution_ ;
00129     std::vector<PhysVarHisto *> qOverptResolution_ ;
00130     std::vector<PhysVarHisto *> oneOverpResolution_ ;
00131     std::vector<PhysVarHisto *> oneOverptResolution_ ;
00132 
00133 // tracker muon
00134     PhysVarHisto * etaTrack_ ;
00135     PhysVarHisto * thetaTrack_ ;
00136     PhysVarHisto * phiTrack_ ;
00137     PhysVarHisto * pTrack_ ;
00138     PhysVarHisto * ptTrack_ ;
00139     PhysVarHisto * qTrack_ ;
00140 //sta muon
00141     PhysVarHisto * etaStaTrack_ ;
00142     PhysVarHisto * thetaStaTrack_ ;
00143     PhysVarHisto * phiStaTrack_ ;
00144     PhysVarHisto * pStaTrack_ ;
00145     PhysVarHisto * ptStaTrack_ ;
00146     PhysVarHisto * qStaTrack_ ;
00147 
00148 // segment track analyzer
00149 // GlbTrack
00150     PhysVarHisto * GlbhitsNotUsed_ ;
00151     PhysVarHisto * GlbhitsNotUsedPercentual_ ;
00152     PhysVarHisto * GlbTrackSegm_ ;
00153     PhysVarHisto * GlbhitStaProvenance_ ;
00154     PhysVarHisto * GlbhitTkrProvenance_ ;
00155     PhysVarHisto * GlbtrackHitPercentualVsEta_ ;
00156     PhysVarHisto * GlbtrackHitPercentualVsPhi_ ;
00157     PhysVarHisto * GlbtrackHitPercentualVsPt_ ;
00158     PhysVarHisto * GlbdtTrackHitPercentualVsEta_ ;
00159     PhysVarHisto * GlbdtTrackHitPercentualVsPhi_ ;
00160     PhysVarHisto * GlbdtTrackHitPercentualVsPt_ ;
00161     PhysVarHisto * GlbcscTrackHitPercentualVsEta_ ;
00162     PhysVarHisto * GlbcscTrackHitPercentualVsPhi_ ;
00163     PhysVarHisto * GlbcscTrackHitPercentualVsPt_ ;
00164 
00165 
00166 // StandAlone Muon
00167     PhysVarHisto * StahitsNotUsed_ ;
00168     PhysVarHisto * StahitsNotUsedPercentual_ ;
00169     PhysVarHisto * StaTrackSegm_ ;
00170     PhysVarHisto * StahitStaProvenance_ ;
00171     PhysVarHisto * StahitTkrProvenance_ ;
00172     PhysVarHisto * StatrackHitPercentualVsEta_ ;
00173     PhysVarHisto * StatrackHitPercentualVsPhi_ ;
00174     PhysVarHisto * StatrackHitPercentualVsPt_ ;
00175     PhysVarHisto * StadtTrackHitPercentualVsEta_ ;
00176     PhysVarHisto * StadtTrackHitPercentualVsPhi_ ;
00177     PhysVarHisto * StadtTrackHitPercentualVsPt_ ;
00178     PhysVarHisto * StacscTrackHitPercentualVsEta_ ;
00179     PhysVarHisto * StacscTrackHitPercentualVsPhi_ ;
00180     PhysVarHisto * StacscTrackHitPercentualVsPt_ ;
00181 
00182 
00183 
00184   };
00185 }
00186 #endif

Generated on Tue Jun 9 17:41:51 2009 for CMSSW by  doxygen 1.5.4