SSO Logout

Subversion Repositories hepmc

Rev

Rev 103 | Rev 147 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 103 Rev 105
Line 36... Line 36...
36
    //     HepMC::copy_if( evt->particles_begin(), evt->particles_end(), 
36
    //     HepMC::copy_if( evt->particles_begin(), evt->particles_end(), 
37
    //                     back_inserter(thelist), is_photon() );
37
    //                     back_inserter(thelist), is_photon() );
38
    // where is_photon() is a predicate like:
38
    // where is_photon() is a predicate like:
39
    //     class is_photon {
39
    //     class is_photon {
40
    //       public:
40
    //       public:
41
    //         bool operator() ( const GenParticle* p ) {
-
 
-
 
41
    //         bool operator() ( GenParticle const * p ) {
42
    //             if ( p && p->pdg_id() == 22 ) return 1;
42
    //             if ( p && p->pdg_id() == 22 ) return 1;
43
    //             return 0;
43
    //             return 0;
44
    //         }
44
    //         }
45
    //     };
45
    //     };
46
    // which the user defines herself.
46
    // which the user defines herself.
Line 71... Line 71...
71
//                       a database. It is included anyway (tradition?) since
71
//                       a database. It is included anyway (tradition?) since
72
//                       we expect it may be useful for debugging. It can
72
//                       we expect it may be useful for debugging. It can
73
//                       be reset later by a database.
73
//                       be reset later by a database.
74
// mpi()                 The number of multi parton interactions in the event.
74
// mpi()                 The number of multi parton interactions in the event.
75
//                       This is NOT beam pileup.  Set to -1 by default.
75
//                       This is NOT beam pileup.  Set to -1 by default.
-
 
76
// beam_particles()      A pair of pointers to the incoming beam particles.
76
// signal_process_vertex() pointer to the vertex containing the signal process
77
// signal_process_vertex() pointer to the vertex containing the signal process
77
// weights()             Vector of doubles which specify th weight of the evnt,
78
// weights()             Vector of doubles which specify th weight of the evnt,
78
//                       the first entry will be the "event weight" used for
79
//                       the first entry will be the "event weight" used for
79
//                       hit and miss etc., but a general vector is used to
80
//                       hit and miss etc., but a general vector is used to
80
//                       allow for reweighting etc. We envision a list of
81
//                       allow for reweighting etc. We envision a list of
Line 173... Line 174...
173
        double event_scale() const; //!< energy scale, see hep-ph/0109068
174
        double event_scale() const; //!< energy scale, see hep-ph/0109068
174
        double alphaQCD() const; //!<  QCD coupling, see hep-ph/0109068
175
        double alphaQCD() const; //!<  QCD coupling, see hep-ph/0109068
175
        double alphaQED() const; //!<  QED coupling, see hep-ph/0109068
176
        double alphaQED() const; //!<  QED coupling, see hep-ph/0109068
176
        /// pointer to the vertex containing the signal process
177
        /// pointer to the vertex containing the signal process
177
        GenVertex* signal_process_vertex() const;
178
        GenVertex* signal_process_vertex() const;
-
 
179
        /// test to see if we have two valid beam particles
-
 
180
        bool valid_beam_particles() const;
-
 
181
        /// pair of pointers to the two incoming beam particles
-
 
182
        std::pair<GenParticle*,GenParticle*> beam_particles() const;
178
183
179
        /// direct access to the weights container is allowed. 
184
        /// direct access to the weights container is allowed. 
180
        /// Thus you can use myevt.weights()[2];
185
        /// Thus you can use myevt.weights()[2];
181
        /// to access element 2 of the weights.
186
        /// to access element 2 of the weights.
182
        /// or use myevt.weights().push_back( mywgt ); to add an element.
187
        /// or use myevt.weights().push_back( mywgt ); to add an element.
Line 201... Line 206...
201
        void set_alphaQCD( double a ); //!< set QCD coupling
206
        void set_alphaQCD( double a ); //!< set QCD coupling
202
        void set_alphaQED( double a ); //!< set QED coupling
207
        void set_alphaQED( double a ); //!< set QED coupling
203
208
204
        /// set pointer to the vertex containing the signal process
209
        /// set pointer to the vertex containing the signal process
205
        void set_signal_process_vertex( GenVertex* );
210
        void set_signal_process_vertex( GenVertex* );
-
 
211
        /// set incoming beam particles
-
 
212
        bool set_beam_particles(GenParticle*, GenParticle*);
-
 
213
        /// use a pair of GenParticle*'s to set incoming beam particles
-
 
214
        bool set_beam_particles(std::pair<GenParticle*,GenParticle*> const &);
206
        /// provide random state information
215
        /// provide random state information
207
        void set_random_states( const std::vector<long int>& randomstates );
216
        void set_random_states( const std::vector<long int>& randomstates );
208
217
209
        /// provide a pointer to the HeavyIon container
218
        /// provide a pointer to the HeavyIon container
210
        void set_heavy_ion( const HeavyIon& ion );
219
        void set_heavy_ion( const HeavyIon& ion );
Line 218... Line 227...
218
        /// how many vertex barcodes exist?
227
        /// how many vertex barcodes exist?
219
        int     vertices_size() const;
228
        int     vertices_size() const;
220
        /// return true if there are no vertex barcodes
229
        /// return true if there are no vertex barcodes
221
        bool    vertices_empty() const;
230
        bool    vertices_empty() const;
222
231
223
        ////////////////////
-
 
224
        // change methods //
-
 
225
        ////////////////////
-
 
-
 
232
        /////////////////////
-
 
233
        // mutator methods //
-
 
234
        /////////////////////
226
235
227
        bool    add_vertex( GenVertex* vtx );    //!< adds to evt and adopts
236
        bool    add_vertex( GenVertex* vtx );    //!< adds to evt and adopts
228
        bool    remove_vertex( GenVertex* vtx ); //!< erases vtx from evt
237
        bool    remove_vertex( GenVertex* vtx ); //!< erases vtx from evt
229
        void    clear();                         //!< empties the entire event
238
        void    clear();                         //!< empties the entire event
230
239
Line 482... Line 491...
482
        int                   m_mpi;        // number of multi paricle interactions
491
        int                   m_mpi;        // number of multi paricle interactions
483
        double                m_event_scale;// energy scale, see hep-ph/0109068
492
        double                m_event_scale;// energy scale, see hep-ph/0109068
484
        double                m_alphaQCD;   // QCD coupling, see hep-ph/0109068
493
        double                m_alphaQCD;   // QCD coupling, see hep-ph/0109068
485
        double                m_alphaQED;   // QED coupling, see hep-ph/0109068
494
        double                m_alphaQED;   // QED coupling, see hep-ph/0109068
486
        GenVertex*            m_signal_process_vertex;
495
        GenVertex*            m_signal_process_vertex;
-
 
496
        GenParticle*          m_beam_particle_1;
-
 
497
        GenParticle*          m_beam_particle_2;
487
        WeightContainer       m_weights; // weights for this event first weight
498
        WeightContainer       m_weights; // weights for this event first weight
488
                                         // is used by default for hit and miss
499
                                         // is used by default for hit and miss
489
        std::vector<long int> m_random_states; // container of rndm num 
500
        std::vector<long int> m_random_states; // container of rndm num 
490
                                               // generator states
501
                                               // generator states
491
502
Line 637... Line 648...
637
    inline int GenEvent::vertices_size() const {
648
    inline int GenEvent::vertices_size() const {
638
        return (int)m_vertex_barcodes.size();
649
        return (int)m_vertex_barcodes.size();
639
    }
650
    }
640
    inline bool GenEvent::vertices_empty() const {
651
    inline bool GenEvent::vertices_empty() const {
641
        return (bool)m_vertex_barcodes.empty();
652
        return (bool)m_vertex_barcodes.empty();
-
 
653
    }
-
 
654
   
-
 
655
    // beam particles
-
 
656
    inline std::pair<GenParticle *,GenParticle *> GenEvent::beam_particles() const {
-
 
657
        return std::pair<GenParticle *,GenParticle *> (m_beam_particle_1, m_beam_particle_2);
642
    }
658
    }
643
659
644
} // HepMC
660
} // HepMC
645
661
646
#endif  // HEPMC_GEN_EVENT_H
662
#endif  // HEPMC_GEN_EVENT_H