Attachment 'PdfTreeMaker.h'

Download

   1 #ifndef SINGLETOPDPDMAKER_PDFTREEMAKER_H
   2 #define SINGLETOPDPDMAKER_PDFTREEMAKER_H
   3 
   4 /********************************************************************
   5 
   6 NAME:     PdfTreeMaker.h
   7 PACKAGE:  offline/PhysicsAnalysis/TopPhys/SingleTopDPDMaker/
   8 
   9 AUTHOR:   Clemens Lange <clemens.lange@SPAMNOTdesy.de>
  10 CREATED:  October 2009
  11 
  12 EDITED :  --
  13 
  14 PURPOSE:  SingleTopDPDMaker Tool that inserts PdfInfo using two 
  15           different methods for mc08 and mc09.
  16           mc09: uses genEvt->pdf_info()
  17           mc08: as pdf_info not available, fall-back method fills
  18                 first two partons (usually barcode 3 & 4) from 
  19                 TruthParticleContainer
  20 
  21 ********************************************************************/
  22 
  23 #include <string>
  24 
  25 #include "GaudiKernel/Algorithm.h"
  26 #include "GaudiKernel/MsgStream.h"
  27 #include "GaudiKernel/ITHistSvc.h"
  28 #include "StoreGate/StoreGate.h"
  29 
  30 #include "McParticleEvent/TruthParticleContainer.h"
  31 #include "McParticleEvent/TruthParticle.h"
  32 // #include "McParticleEvent/TruthParticleParamDefs.h"
  33 
  34 #include "GeneratorObjects/McEventCollection.h"
  35 #include "HepMC/GenEvent.h"
  36 // #include "HepMC/WeightContainer.h"
  37 
  38 #include "TTree.h"
  39 
  40 class PdfTreeMaker : public Algorithm
  41 {
  42 
  43 public:
  44 
  45   PdfTreeMaker(const std::string& name, ISvcLocator* pSvcLocator);
  46   virtual ~PdfTreeMaker();
  47   
  48   StatusCode initialize();
  49   StatusCode finalize();
  50   StatusCode execute();
  51     
  52   void SetBranches();
  53   void ClearBranches();
  54   void FillBranches();
  55   void DeleteBranches();
  56     
  57 private:
  58 
  59   StoreGateSvc * m_StoreGateSvc;
  60   ITHistSvc    * m_THistSvc;
  61   TTree        * m_Tree;
  62   
  63   int m_InputEventNumber;
  64           
  65   // jobOptions
  66   std::string m_TreeName;
  67   std::string m_McEventContainerName;
  68   std::string m_TruthParticleContainerName;
  69   std::string m_PdfMethod;
  70   std::vector<double> m_Mc08_barcode;
  71   std::vector<double> m_Mc08_pdgId;
  72                     
  73   // containers
  74   const McEventCollection * m_McEventContainer;
  75   const TruthParticleContainer * m_TruthParticleContainer;
  76   
  77   // internal sets, because declareProperty doesn't know sets
  78   std::set<double> m_set_Mc08_barcode;
  79   std::set<double> m_set_Mc08_pdgId;
  80   
  81   // genEvent pdfInfo variables (mc09)
  82   int m_id1;        // flavour code of first parton
  83   int m_id2;        // flavour code of second parton 
  84   double m_x1;      // fraction of beam momentum carried by first parton ("beam side") 
  85   double m_x2;      // fraction of beam momentum carried by second parton ("target side") 
  86   double m_scalePDF;  //  Q-scale used in evaluation of PDF's   (in GeV) 
  87    
  88   // fall-back method for mc08 samples
  89   std::vector<double>* m_InitialParton_px;
  90   std::vector<double>* m_InitialParton_py;
  91   std::vector<double>* m_InitialParton_pz;
  92   std::vector<double>* m_InitialParton_pt;
  93   std::vector<double>* m_InitialParton_e;
  94   std::vector<double>* m_InitialParton_pdgId;
  95   std::vector<double>* m_InitialParton_barcode;
  96   int m_InitialParton_N;
  97   
  98               
  99 };
 100 
 101 #endif
 102 

Attached Files

To refer to attachments on a page, use attachment:filename, as shown below in the list of files. Do NOT use the URL of the [get] link, since this is subject to change and can break easily.
  • [get | view] (2009-10-07 14:40:02, 8.1 KB) [[attachment:PdfTreeMaker.cxx]]
  • [get | view] (2009-10-07 14:40:14, 2.9 KB) [[attachment:PdfTreeMaker.h]]
 All files | Selected Files: delete move to page copy to page

You are not allowed to attach a file to this page.