| [1463] | 1 | // This may look like C code, but it is really -*- C++ -*-
 | 
|---|
| [1738] | 2 | 
 | 
|---|
 | 3 | // ArchTOIPipe           (C)     CEA/DAPNIA/SPP IN2P3/LAL
 | 
|---|
 | 4 | //                               Eric Aubourg
 | 
|---|
 | 5 | //                               Christophe Magneville
 | 
|---|
 | 6 | //                               Reza Ansari
 | 
|---|
| [2039] | 7 | // $Id: map2toi.h,v 1.8 2002-05-31 15:44:55 ansari Exp $
 | 
|---|
| [1738] | 8 | 
 | 
|---|
| [1463] | 9 | #ifndef MAP2TOI_H
 | 
|---|
 | 10 | #define MAP2TOI_H
 | 
|---|
 | 11 | 
 | 
|---|
 | 12 | #include "toiprocessor.h"
 | 
|---|
 | 13 | #include "spherehealpix.h"
 | 
|---|
| [1520] | 14 | #include "flagtoidef.h"
 | 
|---|
 | 15 | #include "xastropack.h"
 | 
|---|
| [1463] | 16 | 
 | 
|---|
| [1520] | 17 | //-- Un generateur de TOI a partir d'une sphere et de 2 TOIs coordin1,coordin2
 | 
|---|
 | 18 | // Lecture de 2 TOI coord1,coord2 et d'une Sphere Healpix
 | 
|---|
 | 19 | // Sortie de 3 TOI coord1,coord2,boloMuV
 | 
|---|
| [1463] | 20 | //
 | 
|---|
 | 21 | // Structure generale :
 | 
|---|
 | 22 | //             Sphere ---- |
 | 
|---|
 | 23 | //                         |
 | 
|---|
| [1520] | 24 | //                     -----------
 | 
|---|
 | 25 | //   toi CoordIn1 ---> |         | ---> toi CoordOut1
 | 
|---|
 | 26 | //                     | Map2TOI | ---> toi CoordOut2
 | 
|---|
 | 27 | //   toi CoordIn2 ---> |         | ---> toi BoloOut
 | 
|---|
 | 28 | //                     -----------
 | 
|---|
 | 29 | // Gestion du type de coordonnees :
 | 
|---|
 | 30 | // Coord1In,Coord2In : soit Equatoriales (Alpha,Delta)
 | 
|---|
 | 31 | //                     soit Galactiques  (GLong,GLat)
 | 
|---|
 | 32 | // La sphere peut avoir des coordonnees differentes des CoordIn
 | 
|---|
 | 33 | // Si les CoordIn et les CoordSphere sont equatoriales -> meme equinoxe!
 | 
|---|
 | 34 | // La sortie CoordOut aura les MEMES coordonnees que les CoordIn
 | 
|---|
| [1463] | 35 | 
 | 
|---|
 | 36 | class Map2TOI : public TOIProcessor {
 | 
|---|
 | 37 | public:
 | 
|---|
 | 38 |                  Map2TOI(SphereHEALPix<r_8>& sph);
 | 
|---|
 | 39 |   virtual       ~Map2TOI();
 | 
|---|
 | 40 | 
 | 
|---|
| [1520] | 41 |   virtual void  init(void);
 | 
|---|
| [1463] | 42 |   virtual void  run(void);
 | 
|---|
| [1520] | 43 | 
 | 
|---|
| [1809] | 44 |   // Flag pour les mauvais samples
 | 
|---|
 | 45 |   inline void SetBad(unsigned long long flg=FlgToiOut)
 | 
|---|
 | 46 |                     {mBadFlag = flg;}
 | 
|---|
 | 47 | 
 | 
|---|
 | 48 |   // Pour definir la partie astrometrie
 | 
|---|
| [1520] | 49 |   inline void SetEquinox(double actualyear=2000.)
 | 
|---|
 | 50 |               {mActualYear = actualyear;}
 | 
|---|
| [1809] | 51 | 
 | 
|---|
 | 52 |   inline void SetCoorIn(unsigned long mfg=TypCoordGalStd)
 | 
|---|
| [1520] | 53 |               {mTypCoorIn = mfg;}
 | 
|---|
| [1809] | 54 |   inline void SetCoorIn(char const *ctype)
 | 
|---|
 | 55 |               {mTypCoorIn = DecodeTypAstro(ctype);}
 | 
|---|
 | 56 | 
 | 
|---|
 | 57 |   inline void SetCoorMap(unsigned long mfg=TypCoordGal)
 | 
|---|
| [1520] | 58 |               {mTypCoorMap = mfg;}
 | 
|---|
| [1809] | 59 |   inline void SetCoorMap(char const *ctype)
 | 
|---|
 | 60 |               {mTypCoorMap = DecodeTypAstro(ctype);}
 | 
|---|
 | 61 | 
 | 
|---|
| [1530] | 62 |   // Print
 | 
|---|
| [1762] | 63 |   void Print(::ostream & os);
 | 
|---|
| [2039] | 64 |   inline int_8  ProcessedSampleCount() const { return totnscount; }
 | 
|---|
| [1520] | 65 | 
 | 
|---|
| [1463] | 66 | protected:
 | 
|---|
 | 67 |   SphereHEALPix<r_8>& mSph;
 | 
|---|
| [1809] | 68 |   unsigned long mTypCoorIn,mTypCoorMap;
 | 
|---|
 | 69 |   unsigned long long mBadFlag;
 | 
|---|
| [1520] | 70 |   double mActualYear;
 | 
|---|
| [2039] | 71 | 
 | 
|---|
 | 72 |   int_8 totnscount;   // Nombre total d'echantillon processe
 | 
|---|
| [1463] | 73 | };
 | 
|---|
 | 74 | 
 | 
|---|
 | 75 | #endif
 | 
|---|