/home/bes3soft/bes3soft/Boss/7.0.2/dist/7.0.2/DetectorDescription/Identifier/Identifier-00-02-17/Identifier/HltID.h

Go to the documentation of this file.
00001 #ifndef __HltID_h__
00002 #define __HltID_h__
00003 
00004 #include "Identifier/BesDetectorID.h"
00005 //#include <string>
00006 //#include <assert.h>
00007 
00008 class HltID : public BesDetectorID
00009 {
00010  public:
00011   typedef Identifier::size_type size_type; 
00012   typedef Identifier::value_type value_type; 
00013     
00015   HltID(void);
00016 
00018   ~HltID(void);
00019 
00020   enum Header {EVENTTYPE =0,ALGORITHM,CRITERIA,VERSION,ENERGY,NUMSUB,NUMCON};
00021   enum SubID {HLT =0,MDC,TOF,EMC,MUC,CON};
00022   enum MdcData{ NMDC =0x100, NTRK, PMAX1, COST1, VZ1, PHI1, VR1, TRKHIT1, TRKSHIT1,
00023                 PMAX2, COST2, VZ2, PHI2, VR2, TRKHIT2, TRKSHIT2, ACOL};
00024   enum TofData{ NTOF =0x200, DELTAT, DELTAPHI };
00025   enum EmcData{ NEMC =0x300, ETOT, EBAR, EEND, EBAL, EEAST, EWEST, NSEC, NSHW,
00026                 EMAX1, ECOST1, EPHI1, EMAX2, ECOST2, EPHI2, EACOP, EACOL, EMAX12,
00027                 EMAX3, ECOST3, EPHI3 };
00028   enum MucData{ NMUC =0x400 };
00029   enum ConData{ NCON =0x500 };
00030 
00032   static Identifier convert(const unsigned int id,const int nmdc=0,const int ntof=0,
00033                             const int nemc=0,const int nmuc=0);
00034 
00036   static Identifier data_type_id (const unsigned int detector,const unsigned int id_in_sub=0);
00037   static unsigned int getIntID (const unsigned int detector,const unsigned int id_in_sub=0);
00038   static bool values_ok (const unsigned int detector, const unsigned int id_in_sub=0);
00039 
00041   static bool is_ef_result  (const Identifier& id);
00042   static bool is_eventtype  (const Identifier& id);
00043   static bool is_algorithm  (const Identifier& id);
00044   static bool is_criteria   (const Identifier& id);
00045   static bool is_version    (const Identifier& id);
00046   static bool is_energy     (const Identifier& id);
00047   static bool is_number     (const Identifier& id);
00048   static bool is_ncon       (const Identifier& id);
00049 
00050   static bool is_mdc_inf    (const Identifier& id);
00051   static bool is_tof_inf    (const Identifier& id);
00052   static bool is_emc_inf    (const Identifier& id);
00053   static bool is_muc_inf    (const Identifier& id);
00054   static bool is_con_inf    (const Identifier& id);
00055   static bool is_hlt_inf    (const Identifier& id){ return is_ef_result(id);};
00056 
00058   static unsigned int detector  (const Identifier& id) ;
00059   static unsigned int id_sub    (const Identifier& id) ;
00060 
00061   static unsigned int id_sub_max       (const Identifier& id) ; 
00062 
00063   static unsigned int getID_MDC_MAX (){return ID_MDC_MAX;};
00064   static unsigned int getID_TOF_MAX (){return ID_TOF_MAX;};
00065   static unsigned int getID_EMC_MAX (){return ID_EMC_MAX;};
00066   static unsigned int getID_MUC_MAX (){return ID_MUC_MAX;};
00067   static unsigned int getID_HLT_MAX (){return ID_HLT_MAX;};
00068 
00069   static unsigned int getDETECTOR_MIN(){return DETECTOR_MIN;};
00070   static unsigned int getDETECTOR_MAX(){return DETECTOR_MAX;};
00071   //static unsigned int getHLT() {return HLT;};
00072   //static unsigned int getMDC() {return MDC;};
00073   //static unsigned int getTOF() {return TOF;};
00074   //static unsigned int getEMC() {return EMC;};
00075   //static unsigned int getMUC() {return MUC;};
00076   //static unsigned int getCON() {return CON;};
00077 
00078  private:
00079   static const unsigned int DETECTOR_INDEX      = 8;
00080   static const unsigned int DETECTOR_MASK       = 0x00000F00;
00081 
00082   static const unsigned int ID_SUB_INDEX      = 0;
00083   static const unsigned int ID_SUB_MASK       = 0x000000FF;
00084   static const unsigned int ID_MDC_MAX        = 19;   //20
00085   static const unsigned int ID_TOF_MAX        = 4;   //5
00086   static const unsigned int ID_EMC_MAX        = 21;   //22
00087   static const unsigned int ID_MUC_MAX        = 2;   //3
00088   static const unsigned int ID_HLT_MAX        = 5;   //6
00089 
00090   static const unsigned int DETECTOR_MAX      = 5;
00091   static const unsigned int DETECTOR_MIN      = 0;
00092 };
00093 
00094 #endif

Generated on Tue Nov 29 22:58:00 2016 for BOSS_7.0.2 by  doxygen 1.4.7