Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-09-27 09:20:26

0001 #ifndef _PhotosBranch_h_included_
0002 #define _PhotosBranch_h_included_
0003 
0004 /**
0005  * @class PhotosBranch
0006  *
0007  * @brief Single branching point
0008  *
0009  * Contains information about daughters and mothers of a single branch.
0010  * Each branch will be converted to HEPEVT and processed by photos.
0011  *
0012  * @author Tomasz Przedzinski
0013  * @date 8 July 2010
0014  */
0015 
0016 #include <vector>
0017 #include "PhotosParticle.h"
0018 using std::vector;
0019 
0020 namespace Photospp
0021 {
0022 
0023 class PhotosBranch
0024 {
0025 public:
0026     /** Create branch out of decaying particle */
0027     PhotosBranch(PhotosParticle* p);
0028 
0029     /** Return decaying particle. NULL if branching does not have mid-particle */
0030     PhotosParticle*          getDecayingParticle() { return particle;  }
0031 
0032     /** Get list of mothers */
0033     vector<PhotosParticle *> getMothers()          { return mothers;   }
0034 
0035     /** Get list of daughters */
0036     vector<PhotosParticle *> getDaughters()        { return daughters; }
0037 
0038     /** Get list of all particles used by branch */
0039     vector<PhotosParticle *> getParticles();
0040 
0041     /** Check if branch is suppressed */
0042     int getSuppressionStatus() { return suppression; }
0043 
0044     /** Check if branch is forced */
0045     int getForcingStatus()     { return forcing; }
0046 
0047     /** Checks momentum conservation of decaying particle.
0048         If it does not exist, checks momentum of first mother passed to photos */
0049     bool checkMomentumConservation();
0050 
0051     /** Process single branch */
0052     void process();
0053 
0054     /** Create branches from particles list */
0055     static vector<PhotosBranch *> createBranches(vector<PhotosParticle *> particles);
0056 private:
0057     /** Checks if branching is suppressed by PHOTOS. */
0058     int checkSuppressionLevel() { return checkList(false); }
0059 
0060     /** Checks if branching is forced by PHOTOS. */
0061     int checkForcingLevel()     { return checkList(true);  }
0062 
0063     /** Algorithm used for suppression/forcing check */
0064     int checkList(bool forceOrSuppress);
0065 private:
0066     /** State of branching suppression*/
0067     int suppression;
0068     /** State of branching forcing*/
0069     int forcing;
0070     /** Decaying particle */
0071     PhotosParticle          *particle;
0072     /** List of mothers   */
0073     vector<PhotosParticle *> mothers;
0074     /** List of daughters */
0075     vector<PhotosParticle *> daughters;
0076 };
0077 
0078 } // namespace Photospp
0079 #endif