CMS 3D CMS Logo

EcalShowerContainmentCorrectionsESProducer Class Reference

Description: Trivial ESProducer to provide EventSetup with (hard coded) shower containment corrections. More...

Inheritance diagram for EcalShowerContainmentCorrectionsESProducer:

edm::ESProducer edm::ESProxyFactoryProducer edm::eventsetup::DataProxyProvider

List of all members.

Public Types

typedef std::auto_ptr
< EcalShowerContainmentCorrections
ReturnType

Public Member Functions

 EcalShowerContainmentCorrectionsESProducer (const edm::ParameterSet &)
ReturnType produce (const EcalShowerContainmentCorrectionsRcd &)
 ~EcalShowerContainmentCorrectionsESProducer ()


Detailed Description

Description: Trivial ESProducer to provide EventSetup with (hard coded) shower containment corrections.

Author:
Stefano Argiro Created: Mon Mar 5 08:39:12 CET 2007
Id
EcalShowerContainmentCorrectionsESProducer.cc,v 1.2 2007/07/13 17:44:28 meridian Exp

Definition at line 33 of file EcalShowerContainmentCorrectionsESProducer.cc.


Member Typedef Documentation

typedef std::auto_ptr<EcalShowerContainmentCorrections> EcalShowerContainmentCorrectionsESProducer::ReturnType

Definition at line 39 of file EcalShowerContainmentCorrectionsESProducer.cc.


Constructor & Destructor Documentation

EcalShowerContainmentCorrectionsESProducer::EcalShowerContainmentCorrectionsESProducer ( const edm::ParameterSet iConfig  ) 

Definition at line 48 of file EcalShowerContainmentCorrectionsESProducer.cc.

References edm::ESProducer::setWhatProduced().

00049 {   
00050    setWhatProduced(this);
00051 }

EcalShowerContainmentCorrectionsESProducer::~EcalShowerContainmentCorrectionsESProducer (  ) 

Definition at line 54 of file EcalShowerContainmentCorrectionsESProducer.cc.

00054 { }


Member Function Documentation

EcalShowerContainmentCorrectionsESProducer::ReturnType EcalShowerContainmentCorrectionsESProducer::produce ( const EcalShowerContainmentCorrectionsRcd iRecord  ) 

Definition at line 62 of file EcalShowerContainmentCorrectionsESProducer.cc.

References edmNew::copy(), EcalShowerContainmentCorrections::Coefficients::data, id, size, EBDetId::SMCRYSTALMODE, std, and values.

00063 {
00064 
00065    using namespace edm::es;
00066    using namespace std;
00067 
00068    auto_ptr<EcalShowerContainmentCorrections> pEcalShowerContainmentCorrections(new EcalShowerContainmentCorrections) ;
00069    int sm=1; // in testbeam data sw believes we always are on sm01
00070 
00071    // where is the n of xtals per sm coded ?
00072    for (int xtal=1; xtal<=1700 ; ++xtal){
00073 
00074      //     // from  /afs/cern.ch/user/h/h4ecal/h4ana/data/gapCorrections/parametres_pol6_X204_2_1.out
00075 
00076  // corrections computed on module3 - (sm16, 1run)
00077 
00078      double values[] = {   0.998959,       // 3x3 x right         
00079                            0.00124547,    
00080                           -0.000348259,
00081                            6.04065e-006,  
00082                            0.999032,       // 3x3 x left
00083                            7.90628e-005,
00084                           -0.000175699,
00085                            -2.60715e-007,
00086                            //
00087                            0.999983,       // 3x3 y right
00088                          -0.000132085,
00089                           2.04773e-005,
00090                          -1.21629e-005,
00091                            1.00002,        // 3x3 y left 
00092                           0.00016518,
00093                           5.36343e-005,
00094                           1.32094e-005, 
00095                            //
00096                            0.998944,      // 5x5
00097                            0.00100987,
00098                            -0.000223207,
00099                            2.15615e-006,
00100                            0.999127,   
00101                            0.000253437,
00102                            -9.80656e-005, 
00103                            1.48651e-006,
00104                            1.00006,
00105                            -0.000179675,
00106                            8.15627e-005,
00107                            -1.21549e-005,
00108                            1.00022,
00109                            0.000363728,
00110                            0.000128066,
00111                            1.54473e-005 };
00112 
00113 
00114 
00115 
00116      const size_t size = sizeof values / sizeof values[0];
00117      EcalShowerContainmentCorrections::Coefficients coeff;
00118      std::copy(values,values+size,coeff.data);
00119 
00120      EBDetId id(sm,xtal,EBDetId::SMCRYSTALMODE);
00121      
00122      // we are filling always the same group ...
00123      pEcalShowerContainmentCorrections->fillCorrectionCoefficients(id,3,coeff);
00124    }
00125 
00126    return pEcalShowerContainmentCorrections ;
00127 }


The documentation for this class was generated from the following file:
Generated on Tue Jun 9 18:19:53 2009 for CMSSW by  doxygen 1.5.4