/home/bes3soft/bes3soft/Boss/7.0.2/dist/7.0.2/Generator/BesEvtGen/BesEvtGen-00-03-58/src/EvtGen/EvtGenBase/EvtCyclic3.hh

Go to the documentation of this file.
00001 /*******************************************************************************
00002  * Project: BaBar detector at the SLAC PEP-II B-factory
00003  * Package: EvtGenBase
00004  *    File: $Id: EvtCyclic3.hh,v 1.2 2007/11/20 08:36:27 pingrg Exp $
00005  *  Author: Alexei Dvoretskii, dvoretsk@slac.stanford.edu, 2001-2002
00006  *
00007  * Copyright (C) 2002 Caltech
00008  *******************************************************************************/
00009 
00010 // Cyclic permutations of three indices A,B,C and their parings
00011 
00012 #ifndef EVT_CYCLIC3_HH
00013 #define EVT_CYCLIC3_HH
00014 
00015 #include <iosfwd>
00016 
00017 namespace EvtCyclic3 {
00018 
00019 
00020   enum Index {A=0,B=1,C=2};
00021   enum Pair  {BC=0,CB=BC,CA=1,AC=CA,AB=2,BA=AB}; 
00022   enum Perm {ABC=0,BCA=1,CAB=2,CBA=3,BAC=4,ACB=5};
00023 
00024   // Permutations (multiplication is not transitive)
00025 
00026   Index permute(Index i, Perm p);
00027   Perm  permutation(Index i1,Index i2,Index i3);
00028   Perm  permute(Perm i, Perm p);
00029   Pair permute(Pair i, Perm p); 
00030 
00031   Pair i2pair(int i);
00032   
00033   // Index-to-index
00034 
00035   Index prev(Index i); 
00036   Index next(Index i) ;
00037   Index other(Index i, Index j);
00038  
00039   // Index-to-pair
00040 
00041   Pair other(Index i); 
00042   Pair combine(Index i, Index j);
00043 
00044 
00045   // Pair-to-pair conversions
00046 
00047   Pair prev(Pair i);
00048   Pair next(Pair i);
00049   Pair other(Pair i, Pair j);
00050   
00051   // Pair-to-index conversions
00052 
00053 
00054   Index first(Pair i);
00055   Index second(Pair i); 
00056   Index other(Pair i) ;
00057   Index common(Pair i, Pair j);
00058 
00059   // String to Index, Pair
00060 
00061   Index strToIndex(const char* str);
00062   Pair   strToPair(const char* str);
00063 
00064   // To string conversions
00065 
00066   char* c_str(Index i);
00067   char* c_str(Pair i);
00068   char* c_str(Perm i);
00069 
00070   // Useful name strings
00071 
00072   char* append(const char* str, EvtCyclic3::Index i);
00073   char* append(const char* str, EvtCyclic3::Pair i);
00074 
00075 }
00076 
00077 //where should these go?
00078 //ostream& operator<<(ostream&, EvtCyclic3::Index);
00079 //ostream& operator<<(ostream&, EvtCyclic3::Pair);
00080 
00081 #endif

Generated on Tue Nov 29 23:12:12 2016 for BOSS_7.0.2 by  doxygen 1.4.7