CMS 3D CMS Logo

/data/doxygen/doxygen-1.7.3/gen/CMSSW_4_2_8/src/Validation/EventGenerator/interface/TauValidation.h

Go to the documentation of this file.
00001 #ifndef TauValidation_H
00002 #define TauValidation_H
00003 
00004 /*class TauValidation
00005  *  
00006  *  Class to fill Event Generator dqm monitor elements; works on HepMCProduct
00007  *
00008  *  $Date: 2010/12/06 14:05:50 $
00009  *  $Revision: 1.4 $
00010  *
00011  */
00012 
00013 // framework & common header files
00014 #include "FWCore/Framework/interface/EDAnalyzer.h"
00015 #include "FWCore/Framework/interface/Event.h"
00016 #include "FWCore/Framework/interface/EventSetup.h"
00017 #include "FWCore/Framework/interface/Run.h"
00018 
00019 #include "DataFormats/Common/interface/Handle.h"
00020 #include "FWCore/Framework/interface/ESHandle.h"
00021 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00022 #include "FWCore/Utilities/interface/InputTag.h"
00023 
00024 //DQM services
00025 #include "DQMServices/Core/interface/DQMStore.h"
00026 #include "FWCore/ServiceRegistry/interface/Service.h"
00027 #include "DQMServices/Core/interface/MonitorElement.h"
00028 
00029 #include "SimDataFormats/GeneratorProducts/interface/HepMCProduct.h"
00030 
00031 #include "SimGeneral/HepPDTRecord/interface/ParticleDataTable.h"
00032 #include "TLorentzVector.h"
00033 
00034 class TauValidation : public edm::EDAnalyzer
00035 {
00036     public:
00037         // tau decays
00038         enum  {undetermined,
00039                electron,
00040                muon,
00041                pi,
00042                K,
00043                pi1pi0,
00044                pinpi0,
00045                tripi,
00046                tripinpi0,
00047                stable};
00048         // tau mother particles 
00049         enum  {other,
00050                gamma,
00051                Z,
00052                W,
00053                HSM,
00054                H0,
00055                A0,
00056                Hpm};
00057 
00058     public:
00059         explicit TauValidation(const edm::ParameterSet&);
00060         virtual ~TauValidation();
00061         virtual void beginJob();
00062         virtual void endJob();  
00063         virtual void analyze(const edm::Event&, const edm::EventSetup&);
00064         virtual void beginRun(const edm::Run&, const edm::EventSetup&);
00065         virtual void endRun(const edm::Run&, const edm::EventSetup&);
00066 
00067     private:
00068         int tauMother(const HepMC::GenParticle*);
00069         int tauProngs(const HepMC::GenParticle*);
00070         int tauDecayChannel(const HepMC::GenParticle*);
00071         void rtau(const HepMC::GenParticle*,int,int);
00072         void spinEffects(const HepMC::GenParticle*,int,int);
00073         double leadingPionMomentum(const HepMC::GenParticle*);
00074         double visibleTauEnergy(const HepMC::GenParticle*);
00075         TLorentzVector leadingPionP4(const HepMC::GenParticle*);
00076         TLorentzVector motherP4(const HepMC::GenParticle*);
00077         void photons(const HepMC::GenParticle*);
00078 
00079         edm::InputTag hepmcCollection_;
00080 
00081         double tauEtCut;
00082 
00083         double tauPtSum,photonFromTauPtSum;
00084         int    nTaus,nTausWithPhotons;
00085 
00087         edm::ESHandle<HepPDT::ParticleDataTable> fPDGTable ;
00088   
00090         DQMStore *dbe;
00091 
00092         MonitorElement *nEvt;
00093         MonitorElement *TauPt, *TauEta, *TauProngs, *TauDecayChannels, *TauMothers, 
00094                        *TauRtauW, *TauRtauHpm,
00095                        *TauSpinEffectsW, *TauSpinEffectsHpm,
00096                        *TauPhotons;
00097 };
00098 
00099 #endif
00100