PhotosBranch.h

00001 #ifndef _PhotosBranch_h_included_
00002 #define _PhotosBranch_h_included_
00003 
00004 /**
00005  * @class PhotosBranch
00006  *
00007  * @brief Single branching point
00008  *
00009  * Contains information about daughters and mothers of a single branch.
00010  * Each branch will be converted to HEPEVT and processed by photos.
00011  *
00012  * @author Tomasz Przedzinski
00013  * @date 8 July 2010
00014  */
00015 
00016 #include <vector>
00017 #include "PhotosParticle.h"
00018 using std::vector;
00019 
00020 namespace Photospp
00021 {
00022 
00023 class PhotosBranch
00024 {
00025 public:
00026         /** Create branch out of decaying particle */
00027         PhotosBranch(PhotosParticle* p);
00028 
00029         /** Return decaying particle. NULL if branching does not have mid-particle */
00030         PhotosParticle*          getDecayingParticle() { return particle;  }
00031 
00032         /** Get list of mothers */
00033         vector<PhotosParticle *> getMothers()          { return mothers;   }
00034 
00035         /** Get list of daughters */
00036         vector<PhotosParticle *> getDaughters()        { return daughters; }
00037 
00038         /** Get list of all particles used by branch */
00039         vector<PhotosParticle *> getParticles();
00040 
00041         /** Check if branch is suppressed */
00042         int getSuppressionStatus() { return suppression; }
00043 
00044         /** Check if branch is forced */
00045         int getForcingStatus()     { return forcing; }
00046 
00047         /** Checks momentum conservation of decaying particle.
00048             If it does not exist, checks momentum of first mother passed to photos */
00049         bool checkMomentumConservation();
00050 
00051         /** Process single branch */
00052         void process();
00053 
00054         /** Create branches from particles list */
00055         static vector<PhotosBranch *> createBranches(vector<PhotosParticle *> particles);
00056 private:
00057         /** Checks if branching is suppressed by PHOTOS. */
00058         int checkSuppressionLevel() { return checkList(false); }
00059 
00060         /** Checks if branching is forced by PHOTOS. */
00061         int checkForcingLevel()     { return checkList(true);  }
00062 
00063         /** Algorithm used for suppression/forcing check */
00064         int checkList(bool forceOrSuppress);
00065 private:
00066         /** State of branching suppression*/
00067         int suppression;
00068         /** State of branching forcing*/
00069         int forcing;
00070         /** Decaying particle */
00071         PhotosParticle          *particle;
00072         /** List of mothers   */
00073         vector<PhotosParticle *> mothers;
00074         /** List of daughters */
00075         vector<PhotosParticle *> daughters;
00076 };
00077 
00078 } // namespace Photospp
00079 #endif
Generated on Sun Oct 20 20:23:56 2013 for C++InterfacetoPHOTOS by  doxygen 1.6.3