00001 #ifndef TauValidation_H
00002 #define TauValidation_H
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
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
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 #include "Validation/EventGenerator/interface/WeightManager.h"
00035
00036 class TauValidation : public edm::EDAnalyzer
00037 {
00038 public:
00039
00040 enum {undetermined,
00041 electron,
00042 muon,
00043 pi,
00044 rho,
00045 a1,
00046 K,
00047 Kstar,
00048 pi1pi0,
00049 pinpi0,
00050 tripi,
00051
00052 stable};
00053
00054 enum {other,
00055 B,
00056 D,
00057 gamma,
00058 Z,
00059 W,
00060 HSM,
00061 H0,
00062 A0,
00063 Hpm};
00064
00065 public:
00066 explicit TauValidation(const edm::ParameterSet&);
00067 virtual ~TauValidation();
00068 virtual void beginJob();
00069 virtual void endJob();
00070 virtual void analyze(const edm::Event&, const edm::EventSetup&);
00071 virtual void beginRun(const edm::Run&, const edm::EventSetup&);
00072 virtual void endRun(const edm::Run&, const edm::EventSetup&);
00073
00074 private:
00075 int tauMother(const HepMC::GenParticle*, double weight);
00076 int tauProngs(const HepMC::GenParticle*, double weight);
00077 int tauDecayChannel(const HepMC::GenParticle*, double weight);
00078 int findMother(const HepMC::GenParticle*);
00079 int findTauDecayChannel(const HepMC::GenParticle*);
00080 void rtau(const HepMC::GenParticle*,int,int, double weight);
00081 void spinEffects(const HepMC::GenParticle*,int,int, double weight);
00082 void spinEffectsZ(const HepMC::GenParticle*, double weight);
00083 double leadingPionMomentum(const HepMC::GenParticle*, double weight);
00084 double visibleTauEnergy(const HepMC::GenParticle*);
00085 TLorentzVector leadingPionP4(const HepMC::GenParticle*);
00086 TLorentzVector motherP4(const HepMC::GenParticle*);
00087 void photons(const HepMC::GenParticle*, double weight);
00088
00089 WeightManager _wmanager;
00090
00091 edm::InputTag hepmcCollection_;
00092
00093 double tauEtCut;
00094
00096 edm::ESHandle<HepPDT::ParticleDataTable> fPDGTable ;
00097
00099 DQMStore *dbe;
00100
00101 MonitorElement *nEvt;
00102 MonitorElement *TauPt, *TauEta, *TauPhi, *TauProngs, *TauDecayChannels, *TauMothers,
00103 *TauRtauW, *TauRtauHpm,
00104 *TauSpinEffectsW, *TauSpinEffectsHpm, *TauSpinEffectsZ,
00105 *TauPhotonsN,*TauPhotonsPt;
00106 unsigned int NJAKID;
00107 MonitorElement *JAKID;
00108 std::vector<std::vector<MonitorElement *> > JAKInvMass;
00109
00110 };
00111
00112 #endif
00113