| 1 | #ifndef LevSPtSrc_H
 | 
|---|
| 2 | #define LevSPtSrc_H
 | 
|---|
| 3 | 
 | 
|---|
| 4 | #include <ostream>
 | 
|---|
| 5 | #include "unitvector.h"
 | 
|---|
| 6 | 
 | 
|---|
| 7 | struct LevSPtSrc 
 | 
|---|
| 8 | {
 | 
|---|
| 9 |         /*      // Coordinates in Healpix convention, radians
 | 
|---|
| 10 |         double theta;   // 0 ---->M_PI
 | 
|---|
| 11 |         double phi;             // 0 ----> 2*M_PI
 | 
|---|
| 12 |         */
 | 
|---|
| 13 |         UnitVector VecPoint;
 | 
|---|
| 14 |         float flux30G;
 | 
|---|
| 15 |         float flux44G;
 | 
|---|
| 16 |         float flux70G;
 | 
|---|
| 17 |         float flux100G;
 | 
|---|
| 18 |         float flux143G;
 | 
|---|
| 19 |         float flux217G;
 | 
|---|
| 20 |         float flux352G;
 | 
|---|
| 21 |         float flux545G;
 | 
|---|
| 22 |         float flux857G;
 | 
|---|
| 23 |         LevSPtSrc(      double Phi, double Theta, 
 | 
|---|
| 24 |                                         float F30G, float F44G, float F70G, 
 | 
|---|
| 25 |                                         float F100G, float F143G, float F217G, float F352G, float F545G, float F857G
 | 
|---|
| 26 |                                         );                                      
 | 
|---|
| 27 |         LevSPtSrc();
 | 
|---|
| 28 |         LevSPtSrc(double theta, double phi);
 | 
|---|
| 29 |         ~LevSPtSrc() { }
 | 
|---|
| 30 |         double Phi() const      {       return VecPoint.Phi();  }
 | 
|---|
| 31 |         double Theta() const {  return VecPoint.Theta();}
 | 
|---|
| 32 |         LevSPtSrc& operator= (LevSPtSrc const & a); 
 | 
|---|
| 33 |         
 | 
|---|
| 34 |         void print(ostream& flux) const
 | 
|---|
| 35 |         {       flux<<VecPoint.Theta()<<'\t'<<VecPoint.Phi()<<'\t'<<flux30G;
 | 
|---|
| 36 |                 flux<<'\t'<<flux44G<<'\t'<<flux70G<<'\t'<<flux100G<<'\t'<<flux143G;
 | 
|---|
| 37 |                 flux<<'\t'<<flux217G<<'\t'<<flux352G<<'\t'<<flux545G<<'\t'<<flux857G<<endl;
 | 
|---|
| 38 |         }
 | 
|---|
| 39 |                 
 | 
|---|
| 40 |         void printHeader(ostream& flux) const
 | 
|---|
| 41 |         {       flux<<"theta\tphi\tflux30G\tflux44G\tflux70G\tflux100G\tflux143G\tflux217G\tflux352G\tflux545G\tflux857G"<<endl;
 | 
|---|
| 42 |                 return;
 | 
|---|
| 43 |         }       
 | 
|---|
| 44 | };
 | 
|---|
| 45 | 
 | 
|---|
| 46 | // Relation d'ordre sur la sphere a utiliser dans les contenaires.
 | 
|---|
| 47 | inline bool operator < (const LevSPtSrc& Vec1, const LevSPtSrc& Vec2)
 | 
|---|
| 48 | {       if ( Vec1.Theta() < Vec2.Theta() )  return true;
 | 
|---|
| 49 | /*      if ( Vec1.Theta() == Vec2.Theta() ) 
 | 
|---|
| 50 |         {       if ( Vec1.Phi() < Vec2.Phi() ) return true;
 | 
|---|
| 51 |         }
 | 
|---|
| 52 | */      
 | 
|---|
| 53 |         return false;
 | 
|---|
| 54 | }
 | 
|---|
| 55 | 
 | 
|---|
| 56 | /*
 | 
|---|
| 57 | // Pour utiliser dans le conteneur
 | 
|---|
| 58 | 
 | 
|---|
| 59 | struct lessThLevSPtSrc
 | 
|---|
| 60 | {
 | 
|---|
| 61 |         inline bool operator () (const LevSPtSrc& Vec1, const LevSPtSrc& Vec2) const
 | 
|---|
| 62 |         {       if ( Vec1.Theta() < Vec2.Theta() )  return true;
 | 
|---|
| 63 |                 if ( Vec1.Theta() == Vec2.Theta() ) 
 | 
|---|
| 64 |                 {       if ( Vec1.Phi() < Vec2.Phi() ) return true;
 | 
|---|
| 65 |                 }
 | 
|---|
| 66 |                 return false;
 | 
|---|
| 67 |         }
 | 
|---|
| 68 | };
 | 
|---|
| 69 | 
 | 
|---|
| 70 | */
 | 
|---|
| 71 | 
 | 
|---|
| 72 | #endif
 | 
|---|
| 73 | 
 | 
|---|