Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  

ElectronEcConfigurer.cxx

Go to the documentation of this file.
00001 #include "FastShowerUtils/ElectronEcConfigurer.h"
00002 
00003 
00004 #include "FastShowerUtils/Samplers/S0EmEcalEc1.h"
00005 #include "FastShowerUtils/Samplers/PeakMeanS0EmEcalEc1.h"
00006 #include "FastShowerUtils/Samplers/PeakSigmaS0EmEcalEc1.h"
00007 #include "FastShowerUtils/Samplers/TailFracS0EmEcalEc1.h"
00008 #include "FastShowerUtils/Samplers/TailAuxS0EmEcalEc1.h"
00009 //Cell0
00010 #include "FastShowerUtils/Samplers/C0EmEcalEc1.h"
00011 #include "FastShowerUtils/Samplers/PeakMeanC0EmEcalEc1.h"
00012 #include "FastShowerUtils/Samplers/PeakSigmaC0EmEcalEc1.h"
00013 #include "FastShowerUtils/Samplers/TailFracC0EmEcalEc1.h"
00014 #include "FastShowerUtils/Samplers/TailAuxC0EmEcalEc1.h"
00015 //SN1
00016 //#include "FastShowerUtils/SamplerRouterC0Sample.h"
00017 #include "FastShowerUtils/SNSamplerRouterC0Sample.h"
00018 //
00019 #include "FastShowerUtils/Samplers/SNEmEcalEc1.h"
00020 #include "FastShowerUtils/Samplers/PeakMeanSNEmEcalEc1.h"
00021 #include "FastShowerUtils/Samplers/PeakSigmaSNEmEcalEc1.h"
00022 #include "FastShowerUtils/Samplers/TailFracSNEmEcalEc1.h"
00023 //SN2
00024 #include "FastShowerUtils/Samplers/SNEmEcalEc2.h"
00025 #include "FastShowerUtils/Samplers/TailFracSNEmEcalEc2.h"
00026 //SN3 - as SN1
00027 #include "FastShowerUtils/Samplers/SNEmEcalEc3.h"
00028 //AN1
00029 //#include "FastShowerUtils/SamplerRouterSNSample.h"
00030 #include "FastShowerUtils/ANSamplerRouterSNSample.h"
00031 #
00032 #include "FastShowerUtils/Samplers/ANEmEcalEc1.h"
00033 #include "FastShowerUtils/Samplers/PeakMeanANEmEcalEc1.h"
00034 #include "FastShowerUtils/Samplers/PeakSigmaANEmEcalEc1.h"
00035 //AN2
00036 #include "FastShowerUtils/Samplers/ANEmEcalEc2.h"
00037 #include "FastShowerUtils/Samplers/PeakMeanANEmEcalEc2.h"
00038 #include "FastShowerUtils/Samplers/PeakSigmaANEmEcalEc2.h"
00039 //
00040 //Normalisers
00041 #include "FastShowerUtils/Normalisers/EmEtaResponse.h"
00042 #include "FastShowerUtils/Normalisers/EmHcalLeakageEc.h"
00043 //
00044 #include "FastShowerUtils/PtrConverter.h"
00045 #include "FastShowerUtils/ISampler.h"
00046 #include "FastShowerUtils/SamplerPtr.h"
00047 #include "FastShowerUtils/INormaliser.h"
00048 #include "FastShowerUtils/NormaliserPtr.h"
00049 #include "FastShowerUtils/IDepositor.h"
00050 #include "FastShowerUtils/DepositorPtr.h"
00051 #include "FastShowerUtils/CoreDepositor.h"
00052 #include "FastShowerUtils/HaloDepositor.h"
00053 #include "FastShowerUtils/PencilDepositor.h"
00054 //
00055 #include "FastShowerUtils/PtrAdapter.h"
00056 //
00057 #include "FastShowerUtils/Normalisers/EmEcalNormaliser.h"
00058 #include "FastShowerUtils/Normalisers/EmHcalNormaliser.h"
00059 //
00060 #include <string>
00061 #include <algorithm>
00062 
00063 namespace FastShower{
00064 
00065   //
00066   ElectronEcConfigurer::ElectronEcConfigurer(Moni m):ConfigurerBase(m){
00067     this->initialise();
00068   }
00069   ElectronEcConfigurer::ElectronEcConfigurer(NoMoni nm):ConfigurerBase(nm){
00070     this->initialise();
00071   }
00072   void ElectronEcConfigurer::initialise(){
00073     //Slice0
00074     this->addFn("S0PeakMean",        new  PeakMeanS0EmEcalEc1);
00075     this->addFn("S0PeakSigma",       new  PeakSigmaS0EmEcalEc1);
00076     this->addFn("S0TailFrac",        new  TailFracS0EmEcalEc1);
00077     this->addFn("S0TailLowerBound",  new  TailAuxS0EmEcalEc1);
00078     //Cell0
00079     this->addFn("C0PeakMean",        new  PeakMeanC0EmEcalEc1);
00080     this->addFn("C0PeakSigma",       new  PeakSigmaC0EmEcalEc1);
00081     this->addFn("C0TailFrac",        new  TailFracC0EmEcalEc1);
00082     this->addFn("C0TailLowerBound",  new  TailAuxC0EmEcalEc1);
00083     //SN1
00084     this->addFn("SN1PeakMean",       new  PeakMeanSNEmEcalEc1);
00085     this->addFn("SN1PeakSigma",      new  PeakSigmaSNEmEcalEc1);
00086     this->addFn("SN1TailFrac",       new  TailFracSNEmEcalEc1);
00087     //SN2 - uses SN1 functions for mean and sigma
00088     this->addFn("SN2PeakMean",       new  PeakMeanSNEmEcalEc1);
00089     this->addFn("SN2PeakSigma",      new  PeakSigmaSNEmEcalEc1);
00090     this->addFn("SN2TailFrac",       new  TailFracSNEmEcalEc2);
00091     //SN3 - uses SN1 functions for mean and sigma
00092     this->addFn("SN3PeakMean",       new  PeakMeanSNEmEcalEc1);
00093     this->addFn("SN3PeakSigma",      new  PeakSigmaSNEmEcalEc1);
00094     //AN1 
00095     this->addFn("AN1PeakMean",       new  PeakMeanANEmEcalEc1);
00096     this->addFn("AN1PeakSigma",      new  PeakSigmaANEmEcalEc1);
00097     //AN2 
00098     this->addFn("AN2PeakMean",       new  PeakMeanANEmEcalEc2);
00099     this->addFn("AN2PeakSigma",      new  PeakSigmaANEmEcalEc2);
00100     //
00101     //*******************************************************
00102     //*              Functions for Normalisers              *
00103     //*******************************************************
00104     this->addFnPP("EtaResponse",    new  EmEtaResponse);
00105     //*******************************************************
00106     //*              Functions2 for Normalisers             *
00107     //*******************************************************
00108     this->addFnPP2("E/HcalFractions", new  EmHcalLeakageEc);
00109     //
00110     //*******************************************************
00111     //*       IUpdating Gaussians (Peaks for Samplers)      *
00112     //*******************************************************
00113     this->addIUG("AN1Peak", this->makeUpdatingGaussian0LP("AN1") );
00114     this->addIUG("AN2Peak", this->makeUpdatingGaussian0LP("AN2") );
00115     this->addIUG("C0Peak",  this->makeUpdatingGaussian0LP("C0")  );
00116     this->addIUG("SN1Peak", this->makeUpdatingGaussian0LP("SN1") );
00117     this->addIUG("SN2Peak", this->makeUpdatingGaussian0LP("SN2") );
00118     this->addIUG("SN3Peak", this->makeUpdatingGaussian0LP("SN3") );
00119     this->addIUG("S0Peak",  this->makeUpdatingGaussian0LP("S0")  );
00120     //
00121     //*******************************************************
00122     //*       Samplers                                      *
00123     //*******************************************************
00124     this->addSampler("S0",  new S0EmEcalEc1(this, "")  );
00125     this->addSampler("C0",  new C0EmEcalEc1(this, "")  );
00126     this->addSampler("SN1", new SNEmEcalEc1(this, "") );
00127     this->addSampler("SN2", new SNEmEcalEc2(this, "") );
00128     this->addSampler("SN3", new SNEmEcalEc3(this, "") );
00129     this->addSampler("AN1", new ANEmEcalEc1(this, "") );
00130     this->addSampler("AN2", new ANEmEcalEc2(this, "") );
00131     this->addSampler("SN",  this->makeSN() );
00132     this->addSampler("AN",  this->makeAN() );
00133     //
00134     //*******************************************************
00135     //*       Depositors                                    *
00136     //*******************************************************
00137     this->addDepositorsE();
00138     this->addDepositorsH();
00139     //*******************************************************
00140     //*       Normalisers                                   *
00141     //*******************************************************
00142     this->normalisers();
00143    }
00144   //
00146   ISampler* ElectronEcConfigurer::makeSN() const {
00147     
00148     std::vector< std::pair<double, ISampler*> > v;
00149     v.push_back(std::pair<double, ISampler*>(0.50, this->findSampler("SN1"))); 
00150     v.push_back(std::pair<double, ISampler*>(0.95, this->findSampler("SN2"))); 
00151     v.push_back(std::pair<double, ISampler*>(1.00, this->findSampler("SN3"))); 
00152     //return new SamplerRouterC0Sample(v, 0.0, "SNRouter");
00153     return new SNSamplerRouterC0Sample(v, 0.0, "SNRouter");
00154     
00155   }
00157   ISampler* ElectronEcConfigurer::makeAN() const {
00158 
00159     std::vector< std::pair<double, ISampler*> > v;
00160     v.push_back(std::pair<double, ISampler*>(0.05, this->findSampler("AN1"))); 
00161     v.push_back(std::pair<double, ISampler*>(1.00, this->findSampler("AN2"))); 
00162     //return new SamplerRouterSNSample(v, 0.0, "ANRouter");
00163     return new ANSamplerRouterSNSample(v, 0.0, "ANRouter");
00164 
00165   }
00167   void ElectronEcConfigurer::addDepositorsE(){
00168     
00169     this->addEdepositor( "EcalCore",
00170                          new CoreDepositor(
00171                                            this->findSampler("S0"),
00172                                            this->findSampler("C0"),
00173                                            this->findSampler("SN"),
00174                                            this->findSampler("AN")
00175                                            )
00176                          );
00177 
00178   }
00180   void ElectronEcConfigurer::addDepositorsH(){
00181 
00182     this->addHdepositor( "HCalPencil", new PencilDepositor);
00183 
00184   }
00186   void ElectronEcConfigurer::normalisers(){
00187     this->addNormaliser("EcalNormaliser",   
00188                         new EmEcalNormaliser(this,"ElectronEcEcalNormaliser"));
00189     this->addNormaliser("HcalNormaliser",   
00190                         new EmHcalNormaliser(this,"ElectronEcHcalNormaliser"));
00191   }
00192 }//namespace
00193 
00194 
00195 
00196 
00197 
00198 
00199 
00200 
00201 

Generated on Tue Mar 18 11:49:56 2003 for FastShowerUtils by doxygen1.3-rc1