00001
00002
00003 #ifndef DETREGIONBINNING_H
00004 #define DETREGIONBINNING_H
00005
00006 #include "TLorentzVector.h"
00007 #include <iostream>
00008
00009 class DetRegionBinning {
00010
00011 public:
00012 DetRegionBinning() {
00013 }
00014 ;
00015 virtual ~DetRegionBinning() {
00016 ;
00017 }
00018 ;
00019
00020 virtual int bin(const TLorentzVector & m) const {
00021 if (m.Eta() > 0) {
00022 return this->symmetricBin(m);
00023 } else {
00024 return 1 - this->symmetricBin(m);
00025 }
00026 }
00027 virtual int symmetricBin(const TLorentzVector & m) const;
00028
00029 enum binregion {
00030 binUNKNOWN = 0, bin1BARRELLG = 1, bin1BARRELSM = 2, bin2BARREL = 3, binFEET = 4, binTRANSITION = 5, binENDCAPLG = 6, binENDCAPSM = 7, binBEE = 8, binFORWARDLG = 9, binFORWARDSM = 10, binCRACK = 11, nBINREGIONS
00031 };
00032 std::string GetRegionLabel(int region) const;
00033
00034 private:
00035 int getCoarseNSector(double phi) const;
00036 int getSector(double phi) const;
00037 int getECSector(double phi) const;
00038
00039 };
00040
00041 #endif // DETREGIONBINNING_H