Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:32:09

0001 // -*- C++ -*-
0002 //
0003 // Package:    TauNtuple
0004 // Class:      TauDecay_CMSSW
0005 //
0006 /**\class TauDecay TauDecay_CMSSW.cc TauDataFormat/TauNtuple/src/TauDecay_CMSSW.cc
0007 
0008  Description: Bridge class for TauDecay when using HepMC
0009 
0010  Implementation:
0011      [Notes on implementation]
0012 */
0013 //
0014 // Original Author:  Ian Nugent
0015 //         Created:  Fri Nov 18 13:49:02 CET 2011
0016 //
0017 //
0018 #ifndef TauDecay_CMSSW_h
0019 #define TauDecay_CMSSW_h
0020 
0021 #include "Validation/EventGenerator/interface/TauDecay.h"
0022 
0023 #include "DataFormats/HepMCCandidate/interface/GenParticle.h"
0024 #include "DataFormats/HepMCCandidate/interface/GenParticleFwd.h"
0025 #include <SimDataFormats/GeneratorProducts/interface/HepMCProduct.h>
0026 
0027 //
0028 // class declaration
0029 //
0030 class TauDecay_CMSSW : public TauDecay {
0031 public:
0032   TauDecay_CMSSW();
0033   ~TauDecay_CMSSW();
0034 
0035   //Function to analyze the tau
0036   bool AnalyzeTau(
0037       HepMC::GenParticle *Tau, unsigned int &MODE_ID, unsigned int &TauBitMask, bool dores = true, bool dopi0 = true);
0038   // Functions to get results
0039   std::vector<HepMC::GenParticle *> Get_TauDecayProducts() { return TauDecayProducts; }
0040   std::vector<unsigned int> Get_MotherIdx() { return MotherIdx; }
0041 
0042 private:
0043   // recursive function to loop through tau decay products
0044   void Analyze(HepMC::GenParticle *Particle, unsigned int midx, bool dores, bool dopi0);
0045   void AddPi0Info(HepMC::GenParticle *Particle, unsigned int midx);
0046   //varibles
0047   std::vector<HepMC::GenParticle *> TauDecayProducts;
0048   std::vector<unsigned int> MotherIdx;
0049   unsigned int MODE_ID, TauBitMask;
0050 };
0051 #endif