00001 // -*- C++ -*- 00002 // 00003 // Package: TauNtuple 00004 // Class: TauDecay_CMSSW 00005 // 00013 // 00014 // Original Author: Ian Nugent 00015 // Created: Fri Nov 18 13:49:02 CET 2011 00016 // $Id: TauDecay_CMSSW.h,v 1.1 2012/02/10 10:08:22 inugent Exp $ 00017 // 00018 // 00019 #ifndef TauDecay_CMSSW_h 00020 #define TauDecay_CMSSW_h 00021 00022 #include "Validation/EventGenerator/interface/TauDecay.h" 00023 00024 #include "DataFormats/HepMCCandidate/interface/GenParticle.h" 00025 #include "DataFormats/HepMCCandidate/interface/GenParticleFwd.h" 00026 #include <SimDataFormats/GeneratorProducts/interface/HepMCProduct.h> 00027 00028 // 00029 // class declaration 00030 // 00031 class TauDecay_CMSSW : public TauDecay { 00032 public: 00033 TauDecay_CMSSW(); 00034 ~TauDecay_CMSSW(); 00035 00036 //Function to analyze the tau 00037 bool AnalyzeTau(HepMC::GenParticle *Tau,unsigned int &JAK_ID,unsigned int &TauBitMask,bool dores=true, bool dopi0=true); 00038 // Functions to get results 00039 std::vector<HepMC::GenParticle*> Get_TauDecayProducts(){return TauDecayProducts;} 00040 std::vector<unsigned int> Get_MotherIdx(){return MotherIdx;} 00041 00042 private: 00043 // recursive function to loop through tau decay products 00044 void Analyze(HepMC::GenParticle *Particle,unsigned int midx,bool dores, bool dopi0); 00045 void AddPi0Info(HepMC::GenParticle *Particle,unsigned int midx); 00046 //varibles 00047 std::vector<HepMC::GenParticle*> TauDecayProducts; 00048 std::vector<unsigned int> MotherIdx; 00049 unsigned int JAK_ID, TauBitMask; 00050 00051 }; 00052 #endif