Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2024-07-03 07:05:11

0001 /**
0002  \file
0003  Declaration of class erhic::Pythia6EventBuilder.
0004 
0005  \author    Thomas Burton
0006  \date      2012-01-17
0007  \copyright 2012 Brookhaven National Lab
0008  */
0009 
0010 #ifndef INCLUDE_EICSMEAR_ERHIC_PYTHIA6EVENTBUILDER_H_
0011 #define INCLUDE_EICSMEAR_ERHIC_PYTHIA6EVENTBUILDER_H_
0012 
0013 #include <string>
0014 
0015 #include <Rtypes.h>  // For ClassDef macro
0016 
0017 #include "eicsmear/erhic/EventFactory.h"
0018 
0019 namespace erhic {
0020 
0021 class EventMCFilterABC;
0022 class EventPythia;
0023 
0024 /**
0025  Interface to PYTHIA 6.
0026  Builds EventPythia objects directly from PYTHIA output, without
0027  an intermediate text file.
0028  Configure PYTHIA options via the ROOT::TPythia6 class.
0029  \remark The following fields in EventPythia are not set:
0030          F1, F2, R, sigma_rad, SigRadCor, EBrems
0031  */
0032 class Pythia6EventBuilder : public VirtualEventFactory {
0033  public:
0034   /**
0035    Constructor.
0036    If a filter is provided, it will be applied so that all events
0037    yielded by Create() pass the filter.
0038    The filter should be allocated via new and is subsequently
0039    owned and deleted by the Pythia6EventBuilder.
0040    */
0041   explicit Pythia6EventBuilder(EventMCFilterABC* = NULL);
0042 
0043   /**
0044    Destructor
0045    */
0046   virtual ~Pythia6EventBuilder();
0047 
0048   /**
0049    Generates an event from the current state of ROOT::TPythia6.
0050    The returned event is dynamically allocated and must
0051    be deleted by the user.
0052    */
0053   virtual EventPythia* Create();
0054 
0055   virtual std::string EventName() const;
0056 
0057   virtual TBranch* Branch(TTree&, const std::string&);
0058 
0059   virtual void Fill(TBranch&);
0060 
0061  protected:
0062   EventPythia* BuildEvent();
0063   Long64_t mNGenerated;
0064   Long64_t mNTrials;
0065   EventMCFilterABC* mFilter;
0066   EventPythia* mEvent;
0067 
0068   ClassDef(erhic::Pythia6EventBuilder, 1)
0069 };
0070 
0071 }  // namespace erhic
0072 
0073 #endif  // INCLUDE_EICSMEAR_ERHIC_PYTHIA6EVENTBUILDER_H_