CMS 3D CMS Logo

/afs/cern.ch/work/a/aaltunda/public/www/CMSSW_6_2_5/src/Geometry/TrackerNumberingBuilder/plugins/TrackerTopologyEP.cc

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 //
00003 // Package:    TrackerTopologyEP
00004 // Class:      TrackerTopologyEP
00005 // 
00006 
00007 #include "TrackerTopologyEP.h"
00008 #include "FWCore/Utilities/interface/Exception.h"
00009 #include "FWCore/MessageLogger/interface/MessageLogger.h"
00010 #include "FWCore/ParameterSet/interface/ConfigurationDescriptions.h"
00011 #include "FWCore/ParameterSet/interface/ParameterSetDescription.h"
00012 
00013 //
00014 // constants, enums and typedefs
00015 //
00016 
00017 //
00018 // static data member definitions
00019 //
00020 
00021 //
00022 // constructors and destructor
00023 //
00024 TrackerTopologyEP::TrackerTopologyEP(const edm::ParameterSet& conf)
00025 {
00026   edm::LogInfo("TRACKER") << "TrackerTopologyIdealEP::TrackerTopologyIdealEP";
00027 
00028   pxbVals_.layerStartBit_=conf.getParameter<unsigned int>("pxb_layerStartBit");
00029   pxbVals_.ladderStartBit_=conf.getParameter<unsigned int>("pxb_ladderStartBit");
00030   pxbVals_.moduleStartBit_=conf.getParameter<unsigned int>("pxb_moduleStartBit");
00031   pxbVals_.layerMask_=conf.getParameter<unsigned int>("pxb_layerMask");
00032   pxbVals_.ladderMask_=conf.getParameter<unsigned int>("pxb_ladderMask");
00033   pxbVals_.moduleMask_=conf.getParameter<unsigned int>("pxb_moduleMask");
00034   pxfVals_.sideStartBit_=conf.getParameter<unsigned int>("pxf_sideStartBit");
00035   pxfVals_.diskStartBit_=conf.getParameter<unsigned int>("pxf_diskStartBit");
00036   pxfVals_.bladeStartBit_=conf.getParameter<unsigned int>("pxf_bladeStartBit");
00037   pxfVals_.panelStartBit_=conf.getParameter<unsigned int>("pxf_panelStartBit");
00038   pxfVals_.moduleStartBit_=conf.getParameter<unsigned int>("pxf_moduleStartBit");
00039   pxfVals_.sideMask_=conf.getParameter<unsigned int>("pxf_sideMask");
00040   pxfVals_.diskMask_=conf.getParameter<unsigned int>("pxf_diskMask");
00041   pxfVals_.bladeMask_=conf.getParameter<unsigned int>("pxf_bladeMask");
00042   pxfVals_.panelMask_=conf.getParameter<unsigned int>("pxf_panelMask");
00043   pxfVals_.moduleMask_=conf.getParameter<unsigned int>("pxf_moduleMask");
00044   tecVals_.sideStartBit_=conf.getParameter<unsigned int>("tec_sideStartBit");
00045   tecVals_.wheelStartBit_=conf.getParameter<unsigned int>("tec_wheelStartBit");
00046   tecVals_.petal_fw_bwStartBit_=conf.getParameter<unsigned int>("tec_petal_fw_bwStartBit");
00047   tecVals_.petalStartBit_=conf.getParameter<unsigned int>("tec_petalStartBit");
00048   tecVals_.ringStartBit_=conf.getParameter<unsigned int>("tec_ringStartBit");
00049   tecVals_.moduleStartBit_=conf.getParameter<unsigned int>("tec_moduleStartBit");
00050   tecVals_.sterStartBit_=conf.getParameter<unsigned int>("tec_sterStartBit");
00051   tecVals_.sideMask_=conf.getParameter<unsigned int>("tec_sideMask");
00052   tecVals_.wheelMask_=conf.getParameter<unsigned int>("tec_wheelMask");
00053   tecVals_.petal_fw_bwMask_=conf.getParameter<unsigned int>("tec_petal_fw_bwMask");
00054   tecVals_.petalMask_=conf.getParameter<unsigned int>("tec_petalMask");
00055   tecVals_.ringMask_=conf.getParameter<unsigned int>("tec_ringMask");
00056   tecVals_.moduleMask_=conf.getParameter<unsigned int>("tec_moduleMask");
00057   tecVals_.sterMask_=conf.getParameter<unsigned int>("tec_sterMask");
00058   tibVals_.layerStartBit_=conf.getParameter<unsigned int>("tib_layerStartBit");
00059   tibVals_.str_fw_bwStartBit_=conf.getParameter<unsigned int>("tib_str_fw_bwStartBit");
00060   tibVals_.str_int_extStartBit_=conf.getParameter<unsigned int>("tib_str_int_extStartBit");
00061   tibVals_.strStartBit_=conf.getParameter<unsigned int>("tib_strStartBit");
00062   tibVals_.moduleStartBit_=conf.getParameter<unsigned int>("tib_moduleStartBit");
00063   tibVals_.sterStartBit_=conf.getParameter<unsigned int>("tib_sterStartBit");
00064   tibVals_.layerMask_=conf.getParameter<unsigned int>("tib_layerMask");
00065   tibVals_.str_fw_bwMask_=conf.getParameter<unsigned int>("tib_str_fw_bwMask");
00066   tibVals_.str_int_extMask_=conf.getParameter<unsigned int>("tib_str_int_extMask");
00067   tibVals_.strMask_=conf.getParameter<unsigned int>("tib_strMask");
00068   tibVals_.moduleMask_=conf.getParameter<unsigned int>("tib_moduleMask");
00069   tibVals_.sterMask_=conf.getParameter<unsigned int>("tib_sterMask");
00070   tidVals_.sideStartBit_=conf.getParameter<unsigned int>("tid_sideStartBit");
00071   tidVals_.wheelStartBit_=conf.getParameter<unsigned int>("tid_wheelStartBit");
00072   tidVals_.ringStartBit_=conf.getParameter<unsigned int>("tid_ringStartBit");
00073   tidVals_.module_fw_bwStartBit_=conf.getParameter<unsigned int>("tid_module_fw_bwStartBit");
00074   tidVals_.moduleStartBit_=conf.getParameter<unsigned int>("tid_moduleStartBit");
00075   tidVals_.sterStartBit_=conf.getParameter<unsigned int>("tid_sterStartBit");
00076   tidVals_.sideMask_=conf.getParameter<unsigned int>("tid_sideMask");
00077   tidVals_.wheelMask_=conf.getParameter<unsigned int>("tid_wheelMask");
00078   tidVals_.ringMask_=conf.getParameter<unsigned int>("tid_ringMask");
00079   tidVals_.module_fw_bwMask_=conf.getParameter<unsigned int>("tid_module_fw_bwMask");
00080   tidVals_.moduleMask_=conf.getParameter<unsigned int>("tid_moduleMask");
00081   tidVals_.sterMask_=conf.getParameter<unsigned int>("tid_sterMask");
00082   tobVals_.layerStartBit_=conf.getParameter<unsigned int>("tob_layerStartBit");
00083   tobVals_.rod_fw_bwStartBit_=conf.getParameter<unsigned int>("tob_rod_fw_bwStartBit");
00084   tobVals_.rodStartBit_=conf.getParameter<unsigned int>("tob_rodStartBit");
00085   tobVals_.moduleStartBit_=conf.getParameter<unsigned int>("tob_moduleStartBit");
00086   tobVals_.sterStartBit_=conf.getParameter<unsigned int>("tob_sterStartBit");
00087   tobVals_.layerMask_=conf.getParameter<unsigned int>("tob_layerMask");
00088   tobVals_.rod_fw_bwMask_=conf.getParameter<unsigned int>("tob_rod_fw_bwMask");
00089   tobVals_.rodMask_=conf.getParameter<unsigned int>("tob_rodMask");
00090   tobVals_.moduleMask_=conf.getParameter<unsigned int>("tob_moduleMask");
00091   tobVals_.sterMask_=conf.getParameter<unsigned int>("tob_sterMask");
00092   
00093   setWhatProduced(this);
00094 }
00095 
00096 
00097 TrackerTopologyEP::~TrackerTopologyEP()
00098 { 
00099 }
00100 
00101 void
00102 TrackerTopologyEP::fillDescriptions( edm::ConfigurationDescriptions & descriptions ) 
00103 {
00104   edm::ParameterSetDescription ttc;
00105   ttc.add<unsigned int>("pxb_layerStartBit",16);
00106   ttc.add<unsigned int>("pxb_ladderStartBit",8);
00107   ttc.add<unsigned int>("pxb_moduleStartBit",2);
00108   ttc.add<unsigned int>("pxb_layerMask",0xF);
00109   ttc.add<unsigned int>("pxb_ladderMask",0xFF);
00110   ttc.add<unsigned int>("pxb_moduleMask",0x3F);
00111   
00112   ttc.add<unsigned int>("pxf_sideStartBit",23);
00113   ttc.add<unsigned int>("pxf_diskStartBit",16);
00114   ttc.add<unsigned int>("pxf_bladeStartBit",10); 
00115   ttc.add<unsigned int>("pxf_panelStartBit",8);
00116   ttc.add<unsigned int>("pxf_moduleStartBit",2);
00117   ttc.add<unsigned int>("pxf_sideMask",0x3);
00118   ttc.add<unsigned int>("pxf_diskMask",0xF);
00119   ttc.add<unsigned int>("pxf_bladeMask",0x3F);
00120   ttc.add<unsigned int>("pxf_panelMask",0x3);
00121   ttc.add<unsigned int>("pxf_moduleMask",0x3F);
00122   
00123   ttc.add<unsigned int>("tec_sideStartBit",18);
00124   ttc.add<unsigned int>("tec_wheelStartBit",14);
00125   ttc.add<unsigned int>("tec_petal_fw_bwStartBit",12);
00126   ttc.add<unsigned int>("tec_petalStartBit",8);
00127   ttc.add<unsigned int>("tec_ringStartBit",5);
00128   ttc.add<unsigned int>("tec_moduleStartBit",2);
00129   ttc.add<unsigned int>("tec_sterStartBit",0);  
00130   ttc.add<unsigned int>("tec_sideMask",0x3);
00131   ttc.add<unsigned int>("tec_wheelMask",0xF);
00132   ttc.add<unsigned int>("tec_petal_fw_bwMask",0x3);
00133   ttc.add<unsigned int>("tec_petalMask",0xF);
00134   ttc.add<unsigned int>("tec_ringMask",0x7);  
00135   ttc.add<unsigned int>("tec_moduleMask",0x7);
00136   ttc.add<unsigned int>("tec_sterMask",0x3);
00137   
00138   ttc.add<unsigned int>("tib_layerStartBit",14);
00139   ttc.add<unsigned int>("tib_str_fw_bwStartBit",12);
00140   ttc.add<unsigned int>("tib_str_int_extStartBit",10);
00141   ttc.add<unsigned int>("tib_strStartBit",4);
00142   ttc.add<unsigned int>("tib_moduleStartBit",2);
00143   ttc.add<unsigned int>("tib_sterStartBit",0);
00144   ttc.add<unsigned int>("tib_layerMask",0x7);
00145   ttc.add<unsigned int>("tib_str_fw_bwMask",0x3);
00146   ttc.add<unsigned int>("tib_str_int_extMask",0x3);
00147   ttc.add<unsigned int>("tib_strMask",0x3F);
00148   ttc.add<unsigned int>("tib_moduleMask",0x3);
00149   ttc.add<unsigned int>("tib_sterMask",0x3);
00150   
00151   ttc.add<unsigned int>("tid_sideStartBit",13); 
00152   ttc.add<unsigned int>("tid_wheelStartBit",11);
00153   ttc.add<unsigned int>("tid_ringStartBit",9);
00154   ttc.add<unsigned int>("tid_module_fw_bwStartBit",7);
00155   ttc.add<unsigned int>("tid_moduleStartBit",2);
00156   ttc.add<unsigned int>("tid_sterStartBit",0);
00157   ttc.add<unsigned int>("tid_sideMask",0x3);
00158   ttc.add<unsigned int>("tid_wheelMask",0x3);
00159   ttc.add<unsigned int>("tid_ringMask",0x3);
00160   ttc.add<unsigned int>("tid_module_fw_bwMask",0x3);
00161   ttc.add<unsigned int>("tid_moduleMask",0x1F);
00162   ttc.add<unsigned int>("tid_sterMask",0x3);
00163   
00164   ttc.add<unsigned int>("tob_layerStartBit",14);
00165   ttc.add<unsigned int>("tob_rod_fw_bwStartBit",12);
00166   ttc.add<unsigned int>("tob_rodStartBit",5);  
00167   ttc.add<unsigned int>("tob_moduleStartBit",2);
00168   ttc.add<unsigned int>("tob_sterStartBit",0);
00169   ttc.add<unsigned int>("tob_layerMask",0x7);
00170   ttc.add<unsigned int>("tob_rod_fw_bwMask",0x3);
00171   ttc.add<unsigned int>("tob_rodMask",0x7F);
00172   ttc.add<unsigned int>("tob_moduleMask",0x7);
00173   ttc.add<unsigned int>("tob_sterMask",0x3);
00174   
00175   descriptions.add( "trackerTopologyConstants", ttc );
00176 }
00177 
00178 //
00179 // member functions
00180 //
00181 
00182 // ------------ method called to produce the data  ------------
00183 TrackerTopologyEP::ReturnType
00184 TrackerTopologyEP::produce(const IdealGeometryRecord& iRecord)
00185 {
00186   edm::LogInfo("TrackerTopologyEP") <<  "TrackerTopologyIdealEP::produce(const IdealGeometryRecord& iRecord)";
00187     
00188   ReturnType myTopo(new TrackerTopology(pxbVals_, pxfVals_, tecVals_, tibVals_, tidVals_, tobVals_));
00189 
00190   return myTopo ;
00191 }
00192 
00193 
00194 DEFINE_FWK_EVENTSETUP_MODULE( TrackerTopologyEP);
00195