18 #include "CLHEP/Random/RandGauss.h" 28 edm::LogInfo(
"SiStripGainRandomCalculator::SiStripGainRandomCalculator");
48 edm::LogInfo(
"SiStripGainRandomCalculator::~SiStripGainRandomCalculator");
65 edm::LogInfo(
"SiStripGainRandomCalculator::algoAnalyze - got new geometry ")<<std::endl;
69 edm::LogInfo(
"SiStripGainCalculator") <<
" There are "<<pDD->
detUnits().size() <<
" detectors"<<std::endl;
71 for(TrackerGeometry::DetUnitContainer::const_iterator it = pDD->
detUnits().begin(); it != pDD->
detUnits().end(); it++){
73 if( dynamic_cast<const StripGeomDetUnit*>((*it))!=0){
74 uint32_t detid=((*it)->geographicalId()).rawId();
76 unsigned short NAPVs = p.
nstrips()/128;
77 if(NAPVs<1 || NAPVs>6 ) {
78 edm::LogError(
"SiStripGainCalculator")<<
" Problem with Number of strips in detector.. "<< p.
nstrips() <<
" Exiting program"<<endl;
81 detid_apvs_.push_back( pair<uint32_t,unsigned short>(detid,NAPVs) );
83 edm::LogInfo(
"SiStripGainCalculator")<<
"detid " << detid <<
" apvs " << NAPVs;
94 std::cout<<
"SiStripGainRandomCalculator::getNewObject called"<<std::endl;
98 for(std::vector< pair<uint32_t,unsigned short> >::const_iterator it =
detid_apvs_.begin(); it !=
detid_apvs_.end(); it++){
100 std::vector<float> theSiStripVector;
101 for(
unsigned short j=0; j<it->second; j++){
111 edm::LogInfo(
"SiStripGainCalculator") <<
"detid " << it->first <<
" \t" 112 <<
" apv " << j <<
" \t" 115 theSiStripVector.push_back(gain);
120 if ( ! obj->
put(it->first,range) )
121 edm::LogError(
"SiStripGainCalculator")<<
"[SiStripGainCalculator::beginJob] detid already exists"<<std::endl;
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
~SiStripGainRandomCalculator()
bool put(const uint32_t &detID, Range input)
void algoAnalyze(const edm::Event &, const edm::EventSetup &)
std::pair< ContainerIterator, ContainerIterator > Range
SiStripGainRandomCalculator(const edm::ParameterSet &)
virtual int nstrips() const =0
std::vector< std::pair< uint32_t, unsigned short > > detid_apvs_
SiStripApvGain * getNewObject()
unsigned long long m_cacheID_
const DetUnitContainer & detUnits() const
Returm a vector of all GeomDetUnit.