00001 #ifndef gen_ExternalDecays_PhotosInterface_h 00002 #define gen_ExternalDecays_PhotosInterface_h 00003 00004 // #include "HepPDT/ParticleDataTable.hh" 00005 00006 #include "FWCore/ParameterSet/interface/ParameterSet.h" 00007 #include "FWCore/Framework/interface/ESHandle.h" 00008 #include "FWCore/Framework/interface/EventSetup.h" 00009 00010 #include "HepMC/SimpleVector.h" 00011 00012 namespace HepMC 00013 { 00014 class GenEvent; 00015 class GenVertex; 00016 } 00017 00018 namespace gen { 00019 00020 class PhotosInterface 00021 { 00022 public: 00023 00024 // ctor & dtor 00025 PhotosInterface(); 00026 PhotosInterface( const edm::ParameterSet& ); 00027 ~PhotosInterface() {} 00028 00029 void init(); 00030 const std::vector<std::string>& specialSettings() { return fSpecialSettings; } 00031 HepMC::GenEvent* apply( HepMC::GenEvent* ); 00032 void configureOnlyFor( int ); 00033 void avoidTauLeptonicDecays() { fAvoidTauLeptonicDecays=true; return; } 00034 bool isTauLeptonicDecay( HepMC::GenVertex* ); 00035 00036 private: 00037 00038 struct Scaling { 00039 HepMC::ThreeVector weights; 00040 int flag; 00041 Scaling( HepMC::ThreeVector vec, int flg ) 00042 : weights(HepMC::ThreeVector(1.,1.,1)), flag(1) { weights=vec; flag=flg; } 00043 }; 00044 00045 int fOnlyPDG; 00046 std::vector<std::string> fSpecialSettings; 00047 bool fAvoidTauLeptonicDecays; 00048 std::vector<int> fBarcodes; 00049 std::vector<int> fSecVtxStore; 00050 bool fIsInitialized; 00051 00052 void applyToVertex( HepMC::GenEvent*, int ); 00053 void applyToBranch( HepMC::GenEvent*, int ); 00054 void attachParticles( HepMC::GenEvent*, HepMC::GenVertex*, int ); 00055 00056 }; 00057 00058 } 00059 00060 #endif