Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2024-11-16 09:02:06

0001 /**
0002  \file
0003  Declaration of class erhic::hadronic::Event.
0004  
0005  \author    Thomas Burton
0006  \date      2012-05-02
0007  \copyright 2012 Brookhaven National Lab
0008  */
0009 
0010 #ifndef INCLUDE_EICSMEAR_HADRONIC_EVENTMC_H_
0011 #define INCLUDE_EICSMEAR_HADRONIC_EVENTMC_H_
0012 
0013 #include <vector>
0014 
0015 #include <TClonesArray.h>
0016 
0017 #include <eicsmear/hadronic/ParticleMC.h>
0018 #include "eicsmear/erhic/VirtualEvent.h"
0019 
0020 namespace erhic {
0021 namespace hadronic {
0022 
0023 class ParticleMC;
0024 
0025 /**
0026  A realisation of erhic::VirtualEvent for a hadron-hadron
0027  Monte Carlo event.
0028  */
0029 class EventMC : public erhic::VirtualEvent {
0030  public:
0031   /**
0032    Destructor.
0033    */
0034   virtual ~EventMC();
0035 
0036   /**
0037    Constructor.
0038    */
0039   EventMC();
0040 
0041   /**
0042    Returns the nth track from the event.
0043    Indices run from 0 to (n-1).
0044    */
0045   virtual const ParticleMC* GetTrack(UInt_t) const;
0046 
0047   /**
0048    Returns the nth track from the event.
0049    Indices run from 0 to (n-1).
0050    */
0051   virtual ParticleMC* GetTrack(UInt_t);
0052 
0053   /**
0054    Returns the number of tracks in the event.
0055    */
0056   virtual UInt_t GetNTracks() const;
0057 
0058   /**
0059    Add a track to the list.
0060    The track must be dynamically allocated and is owned by the event.
0061    Returns the new list size.
0062    */
0063   virtual UInt_t Add(ParticleMC* particle);
0064 
0065   /**
0066    Returns the centre-of-mass energy of the event (GeV)
0067    */
0068   virtual Double_t GetCentreOfMassEnergy() const;
0069 
0070   /**
0071    Clear the track list.
0072    */
0073   virtual void Clear(Option_t* = "");
0074 
0075  protected:
0076   TClonesArray mTracks;
0077 
0078   ClassDef(erhic::hadronic::EventMC, 1)
0079 };
0080 
0081 }  // namespace hadronic
0082 }  // namespace erhic
0083 
0084 #endif  // INCLUDE_EICSMEAR_HADRONIC_EVENTMC_H_