Back to home page

Project CMSSW displayed by LXR

 
 

    


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

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