src/IntRank2/IntRank2A.cc
/* These functions are used to obtain the tensor asymmetry value, eta, from
   a parameter set. Note that the parameter read, "Pbase" is generic so that
   derived classes may supply their own parameter acceptable parameter names.  
   The default parameter name base of this class is "IR2", so IR2eta is one
   possible parameter name. The eta values must be unitless and restricted 
   between the range [0, 1]. Usually we're happy if no eta value is specified,
   it's just set to zero then, but this is controlled by the warnings flag.

   There are a few ways to set the asymmetry value. The easiest way is directly
   with use of a double value, parameter name "IR2eta". Since this is a 
   spherical tensor component, we must also allow for a Cartesian tensor 
   specification of eta. This is tied up in the PAS values {Axx, Ayy, Azz}.
   Lastly, if the user chooses to input a Cartesian tensor that is NOT in the
   PAS, i.e. { Axx, Axy, Axz, Ayy, Ayz, Azz }, the asymmetry and orientation
   are both tied into the same set of values so they must both be determined
   simultaneously.  Worse, this often demands an iterative proceedure to
   determine the Euler angles.                                               */
These functions are used to obtain the tensor asymmetry value, eta, from
a parameter set. Note that the parameter read, "Pbase" is generic so that
derived classes may supply their own parameter acceptable parameter names.
The default parameter name base of this class is "IR2", so IR2eta is one
possible parameter name. The eta values must be unitless and restricted
between the range [0, 1]. Usually we're happy if no eta value is specified,
it's just set to zero then, but this is controlled by the warnings flag.

There are a few ways to set the asymmetry value. The easiest way is directly
with use of a double value, parameter name "IR2eta". Since this is a
spherical tensor component, we must also allow for a Cartesian tensor
specification of eta. This is tied up in the PAS values {Axx, Ayy, Azz}.
Lastly, if the user chooses to input a Cartesian tensor that is NOT in the
PAS, i.e. { Axx, Axy, Axz, Ayy, Ayz, Azz }, the asymmetry and orientation
are both tied into the same set of values so they must both be determined
simultaneously.  Worse, this often demands an iterative proceedure to
determine the Euler angles.
These functions are used to obtain the tensor asymmetry value eta from a parameter set . Note that the parameter read " Pbase " is generic so that derived classes may supply their own parameter acceptable parameter names . The default parameter name base of this class is " IR2 " so IR2eta is one possible parameter name . The eta values must be unitless and restricted between the range [ 0 1 ] . Usually we ' re happy if no eta value is specified it ' s just set to zero then but this is controlled by the warnings flag . There are a few ways to set the asymmetry value . The easiest way is directly with use of a double value parameter name " IR2eta " . Since this is a spherical tensor component we must also allow for a Cartesian tensor specification of eta . This is tied up in the PAS values { Axx Ayy Azz } . Lastly if the user chooses to input a Cartesian tensor that is NOT in the PAS i . e . { Axx Axy Axz Ayy Ayz Azz } the asymmetry and orientation are both tied into the same set of values so they must both be determined simultaneously . Worse this often demands an iterative proceedure to determine the Euler angles .
bool IntRank2A::getAeta(const ParameterSet& pset, const string& A,
                            double& Aeta, int idxI, int idxS, bool warn) const
  {
  Aeta = 0.0;					
  string Nidx("");                              
  if(idxI >= 0)                                 
    {                                           
    Nidx  = string("(") + Gdec(idxI);            
    if(idxS > 0)                                
      Nidx += string(",")+Gdec(idxS);            
    Nidx += string(")");                        
    }
  string pname = A + "eta" + Nidx;		
  string pstate;                                
  ParameterSet::const_iterator item;         
  item = pset.seek(pname);                      
  if(item == pset.end())                        
    {                                           
    if(warn) IR2Aerror(111,pname,1);
    return false;
    }
  (*item).parse(pname,Aeta,pstate);		
  return true;                                  
  }
bool IntRank2A :: getAeta ( const ParameterSet & pset , const string & A , double & Aeta , int idxI , int idxS , bool warn ) const { Aeta = 0.0 ; string Nidx ( " " ) ; if ( idxI >= 0 ) { Nidx = string ( " " ) + Gdec ( idxI ) ; if ( idxS > 0 ) Nidx += string ( " " ) + Gdec ( idxS ) ; Nidx += string ( " " ) ; } string pname = A + " " + Nidx ; string pstate ; ParameterSet :: const_iterator item ; item = pset . seek ( pname ) ; if ( item == pset . end ( ) ) { if ( warn ) IR2Aerror ( 111 , pname , 1 ) ; return false ; } ( * item ) . parse ( pname , Aeta , pstate ) ; return true ; }
These functions are used to obtain the tensor asymmetry value, eta, from
a parameter set.
These functions are used to obtain the tensor asymmetry value eta from a parameter set .
// Begin with no asymmetry // Parameter name suffix // Suffix only if idxI > -1 //   Add idxI index to name //   as (# //   If idxS > 0 add it to //   to suffix as ,# (#,# //   Finish suffix (#) or (#,#) // String for parameter name // Temp string for parsing // A pix into parameter list // Seek parameter in pset // If not found, warn if // desired, return fail // If found, parse/set Aeta // Return we found it OK