Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:11:29

0001 // -*- C++ -*-
0002 //
0003 // Package:     Calo
0004 // Class  :     thetaBins
0005 //
0006 // Implementation:
0007 //     <Notes on implementation>
0008 //
0009 // Original Author:  Chris Jones
0010 //         Created:  Thu Dec 11 22:59:38 EST 2008
0011 //
0012 
0013 // system include files
0014 #include <cmath>
0015 
0016 // user include files
0017 #include "Fireworks/Calo/interface/thetaBins.h"
0018 #include "Fireworks/Core/interface/fw3dlego_xbins.h"
0019 
0020 // NOTE:
0021 //       Here we assume 72 bins in phi. At high eta we have only 36 and at the
0022 //       very end 18 bins. These large bins are splited among smaller bins
0023 //       decreasing energy in each entry by factor of 2 and 4 for 36 and 18 bin
0024 //       cases. Other options will be implemented later
0025 //
0026 // http://ecal-od-software.web.cern.ch/ecal-od-software/documents/documents/cal_newedm_roadmap_v1_0.pdf
0027 // Eta mapping:
0028 //   ieta - [-41,-1]+[1,41] - total 82 bins
0029 //   calo tower gives eta of the ceneter of each bin
0030 //   size:
0031 //      0.087 - [-20,-1]+[1,20]
0032 //      the rest have variable size from 0.09-0.30
0033 // Phi mapping:
0034 //   iphi - [1-72]
0035 //   calo tower gives phi of the center of each bin
0036 //   for |ieta|<=20 phi bins are all of the same size
0037 //      iphi 36-37 transition corresponds to 3.1 -> -3.1 transition
0038 //   for 20 < |ieta| < 40
0039 //      there are only 36 active bins corresponding to odd numbers
0040 //      iphi 35->37, corresponds to 3.05 -> -3.05 transition
0041 //   for |ieta| >= 40
0042 //      there are only 18 active bins 3,7,11,15 etc
0043 //      iphi 31 -> 35, corresponds to 2.79253 -> -3.14159 transition
0044 
0045 namespace fireworks {
0046   std::vector<std::pair<double, double> > thetaBins() {
0047     const int n_bins = fw3dlego::xbins_n - 1;
0048     std::vector<std::pair<double, double> > thetaBins(n_bins);
0049     for (int i = 0; i < n_bins; ++i) {
0050       thetaBins[i].first = 2 * atan(exp(-fw3dlego::xbins[i]));
0051       thetaBins[i].second = 2 * atan(exp(-fw3dlego::xbins[i + 1]));
0052     }
0053     return thetaBins;
0054   }
0055 }  // namespace fireworks