
    const char NameSHarm[10] = "CAVSHARM" ;
    const char NameHHarm[10] = "CAVHHARM" ;
    const char NameVLDevice[10] = "VLDEVICE" ;
    
    const char NameRFQM[10] = "RFQM" ;

class LDevice : public Element
{
  protected:
    char  Name[10] ;
    double Param1, Param2, Param3 ;
    double Tref ;
    int AccHarmonics ;

    double V0, Freq, Phase ;

  public:
    void InputData( LDeviceInput LDevIn ) ; 
    void SetData() ; 
    void PassBunch( Bunch* bunch ) ;

    void SetParameters() ;

    void PassVLSHarm( Bunch* bunch, double Time ) ;
    void PassVLHHarm( Bunch* bunch, double Time ) ;
    inline double VLHarm( double Time )
    {
       return( V0 * cos( 2*PI*Freq* Time + Phase ) ) ;
     };

    void PassVLDev( Bunch* bunch, double Time ) ;
    double VLDev( double Time ){ return( 0.0 ) ; } ; 
} ;

class TDevice : public Element
{
  protected:
    char  Name[10] ;
    double Param1, Param2, Param3 ;
    double Alpha, Beta, Gamma ;
    double NuBeta0 ;
    double Tref ;
    double m11, m12, m21, m22 ; 
    double U11, U12, U21, U22 ;
    double V11, V12, V21, V22 ;

    double Freq, Phase ;
    double K ;
    int Harmonics ;

public:
    void InputData( TDeviceInput TDevIn ) ; 
    void SetData() ; 
    void PassBunch( Bunch* bunch ) ; 

    void SetParameters() ; 
    void SetMatrix( double Time ) ; 
    void PassMatrix( Bunch* bucnh ) ; 

    void RFQMMatrix( double Time ) ;
} ;
