]> git.uio.no Git - u/mrichter/AliRoot.git/blob - TEvtGen/Photos/PhotosBranch.h
Updates EvtGen Code
[u/mrichter/AliRoot.git] / TEvtGen / Photos / PhotosBranch.h
1 #ifndef _PhotosBranch_h_included_
2 #define _PhotosBranch_h_included_
3
4 /**
5  * @class PhotosBranch
6  *
7  * @brief Single branching point
8  *
9  * Contains information about daughters and mothers of a single branch.
10  * Each branch will be converted to HEPEVT and processed by photos.
11  *
12  * @author Tomasz Przedzinski
13  * @date 8 July 2010
14  */
15
16 #include <vector>
17 #include "PhotosParticle.h"
18 using std::vector;
19
20 namespace Photospp
21 {
22
23 class PhotosBranch
24 {
25 public:
26         /** Create branch out of decaying particle */
27         PhotosBranch(PhotosParticle* p);
28
29         /** Return decaying particle. NULL if branching does not have mid-particle */
30         PhotosParticle*          getDecayingParticle() { return particle;  }
31
32         /** Get list of mothers */
33         vector<PhotosParticle *> getMothers()          { return mothers;   }
34
35         /** Get list of daughters */
36         vector<PhotosParticle *> getDaughters()        { return daughters; }
37
38         /** Get list of all particles used by branch */
39         vector<PhotosParticle *> getParticles();
40
41         /** Check if branch is suppressed */
42         int getSuppressionStatus() { return suppression; }
43
44         /** Check if branch is forced */
45         int getForcingStatus()     { return forcing; }
46
47         /** Checks momentum conservation of decaying particle.
48             If it does not exist, checks momentum of first mother passed to photos */
49         bool checkMomentumConservation();
50
51         /** Process single branch */
52         void process();
53
54         /** Create branches from particles list */
55         static vector<PhotosBranch *> createBranches(vector<PhotosParticle *> particles);
56 private:
57         /** Checks if branching is suppressed by PHOTOS. */
58         int checkSuppressionLevel() { return checkList(false); }
59
60         /** Checks if branching is forced by PHOTOS. */
61         int checkForcingLevel()     { return checkList(true);  }
62
63         /** Algorithm used for suppression/forcing check */
64         int checkList(bool forceOrSuppress);
65 private:
66         /** State of branching suppression*/
67         int suppression;
68         /** State of branching forcing*/
69         int forcing;
70         /** Decaying particle */
71         PhotosParticle          *particle;
72         /** List of mothers   */
73         vector<PhotosParticle *> mothers;
74         /** List of daughters */
75         vector<PhotosParticle *> daughters;
76 };
77
78 } // namespace Photospp
79 #endif