00001 // -*- C++ -*- 00002 // 00003 // Package: Calo 00004 // Class : thetaBins 00005 // 00006 // Implementation: 00007 // <Notes on implementation> 00008 // 00009 // Original Author: Chris Jones 00010 // Created: Thu Dec 11 22:59:38 EST 2008 00011 // $Id: thetaBins.cc,v 1.4 2010/06/07 18:58:16 matevz Exp $ 00012 // 00013 00014 // system include files 00015 #include <math.h> 00016 00017 // user include files 00018 #include "Fireworks/Calo/interface/thetaBins.h" 00019 #include "Fireworks/Core/interface/fw3dlego_xbins.h" 00020 00021 00022 // NOTE: 00023 // Here we assume 72 bins in phi. At high eta we have only 36 and at the 00024 // very end 18 bins. These large bins are splited among smaller bins 00025 // decreasing energy in each entry by factor of 2 and 4 for 36 and 18 bin 00026 // cases. Other options will be implemented later 00027 // 00028 // https://ecal-od-software.web.cern.ch/ecal-od-software/documents/documents/cal_newedm_roadmap_v1_0.pdf 00029 // Eta mapping: 00030 // ieta - [-41,-1]+[1,41] - total 82 bins 00031 // calo tower gives eta of the ceneter of each bin 00032 // size: 00033 // 0.087 - [-20,-1]+[1,20] 00034 // the rest have variable size from 0.09-0.30 00035 // Phi mapping: 00036 // iphi - [1-72] 00037 // calo tower gives phi of the center of each bin 00038 // for |ieta|<=20 phi bins are all of the same size 00039 // iphi 36-37 transition corresponds to 3.1 -> -3.1 transition 00040 // for 20 < |ieta| < 40 00041 // there are only 36 active bins corresponding to odd numbers 00042 // iphi 35->37, corresponds to 3.05 -> -3.05 transition 00043 // for |ieta| >= 40 00044 // there are only 18 active bins 3,7,11,15 etc 00045 // iphi 31 -> 35, corresponds to 2.79253 -> -3.14159 transition 00046 00047 namespace fireworks { 00048 std::vector<std::pair<double,double> > 00049 thetaBins() 00050 { 00051 const int n_bins = fw3dlego::xbins_n - 1; 00052 std::vector<std::pair<double,double> > thetaBins(n_bins); 00053 for (int i = 0; i < n_bins; ++i ) 00054 { 00055 thetaBins[i].first = 2*atan( exp(-fw3dlego::xbins[i]) ); 00056 thetaBins[i].second = 2*atan( exp(-fw3dlego::xbins[i+1]) ); 00057 } 00058 return thetaBins; 00059 } 00060 }