75 using namespace edm::eventsetup;
77 std::cout <<
">>> EcalTrivialObjectAnalyzer: processing run "<<e.
id().
run() <<
" event: " << e.
id().
event() << std::endl;
86 std::cout <<
"Global ADC->GeV scale: EB " << std::setprecision(6) << agc->getEBValue() <<
" GeV/ADC count"
87 " EE " << std::setprecision(6) << agc->getEEValue() <<
" GeV/ADC count" << std::endl;
90 double r1 = (double)
std::rand()/( double(RAND_MAX)+double(1) );
91 int ieta = int( 1 + r1*85 );
92 r1 = (double)
std::rand()/( double(RAND_MAX)+double(1) );
93 int iphi = int( 1 + r1*20 );
96 std::cout <<
"EcalTrivialObjectAnalyzer: using EBDetId: " << ebid << std::endl;
100 if( it!=myped->end() ){
102 <<
" mean_x1: " << std::setprecision(8) << (*it).mean_x1 <<
" rms_x1: " << (*it).rms_x1
103 <<
" mean_x6: " <<(*it).mean_x6 <<
" rms_x6: " << (*it).rms_x6
104 <<
" mean_x12: " <<(*it).mean_x12 <<
" rms_x12: " << (*it).rms_x12
107 std::cout <<
"No pedestal found for this xtal! something wrong with EcalPedestals in your DB? "
118 if( git != grp->getMap().end() ) {
119 std::cout <<
"XtalGroupId.id() = " << std::setprecision(3) << (*git).id() << std:: endl;
122 std::cout <<
"No group id found for this crystal. something wrong with EcalWeightXtalGroups in your DB?"
133 if( grit!=gr->getMap().end() ){
137 <<
"gain 12/6 : " << std::setprecision(4) << mgpa.gain12Over6() <<
" gain 6/1: " << mgpa.gain6Over1()
140 std::cout <<
"No MGPA Gain Ratio found for this xtal! something wrong with EcalGainRatios in your DB? "
151 if( icalit!=ical->getMap().end() ){
152 icalconst = (*icalit);
155 <<std::setprecision(6)
159 std::cout <<
"No intercalib const found for this xtal! something wrong with EcalIntercalibConstants in your DB? "
170 if( icalitErr!=icalErr->getMap().end() ){
171 icalconstErr = (*icalitErr);
174 <<std::setprecision(6)
178 std::cout <<
"No intercalib const found for this xtal! something wrong with EcalIntercalibErrors in your DB? "
193 icalconst = (*icalit);
196 <<std::setprecision(6)
200 std::cout <<
"No intercalib const found for this xtal! something wrong with EcalTimeCalibConstants in your DB? "
211 if( icalitErr!=icalErr->
getMap().
end() ){
212 icalconstErr = (*icalitErr);
215 <<std::setprecision(6)
219 std::cout <<
"No intercalib const found for this xtal! something wrong with EcalTimeCalibErrors in your DB? "
227 std::cout <<
"Fetching EcalTBWeights from DB " << std::endl;
231 std::cout <<
"EcalTBWeightMap.size(): " << std::setprecision(3) << wgts->getMap().size() << std::endl;
238 std::cout <<
"Lookup EcalWeightSet for groupid: " << std::setprecision(3)
239 << gid.id() <<
" and TDC id " << tdcid << std::endl;
240 EcalTBWeights::EcalTBWeightMap::const_iterator wit = wgts->getMap().find( std::make_pair(gid,tdcid) );
242 if( wit != wgts->getMap().end() ) {
244 std::cout <<
"check size of data members in EcalWeightSet" << std::endl;
256 CLHEP::HepMatrix clmat1(3,10,0);
257 CLHEP::HepMatrix clmat2(3,10,0);
258 for(
int irow=0; irow<3; irow++) {
259 for(
int icol=0; icol<10; icol++) {
260 clmat1[irow][icol] = mat1(irow,icol);
261 clmat2[irow][icol] = mat2(irow,icol);
264 std::cout <<
"weight matrix before gain switch:" << std::endl;
266 std::cout <<
"weight matrix after gain switch:" << std::endl;
270 std::cout <<
"No weights found for EcalGroupId: " << gid.id() <<
" and EcalTDCId: " << tdcid << std::endl;
278 for ( EcalFunctionParameters::const_iterator it = paramLocalCont->params().begin(); it != paramLocalCont->params().end(); ++it ) {
286 for ( EcalFunctionParameters::const_iterator it = paramCrack->params().begin(); it != paramCrack->params().end(); ++it ) {
293 std::cout <<
"EnergyCorrectionParameters:";
294 for ( EcalFunctionParameters::const_iterator it = paramEnergyCorrection->params().begin(); it != paramEnergyCorrection->params().end(); ++it ) {
301 std::cout <<
"EnergyCorrectionParameters:";
302 for ( EcalFunctionParameters::const_iterator it = paramEnergyUncertainty->params().begin(); it != paramEnergyUncertainty->params().end(); ++it ) {
316 lalphait = lalpha->
getMap().
find(ebid.rawId());
317 if( lalphait!=lalpha->getMap().end() ){
319 <<std::setprecision(6)
323 std::cout <<
"No laser alpha found for this xtal! something wrong with EcalLaserAlphas in your DB? "
334 if( lrefit!=lref->getMap().end() ){
336 <<std::setprecision(6)
340 std::cout <<
"No laser apd/pn ref found for this xtal! something wrong with EcalLaserAPDPNRatiosRef in your DB? "
353 if( lratioit!=lratio->getLaserMap().end() ){
354 lratioconst = (*lratioit);
358 << std::setprecision(6)
359 << lratioconst.p1 <<
" " << lratioconst.p2
362 std::cout <<
"No laser apd/pn ratio found for this xtal! something wrong with EcalLaserAPDPNRatios in your DB? "
368 EcalLaserAPDPNRatios::EcalLaserTimeStampMap::const_iterator ltimeit;
369 for (
int i=1;
i<=92;
i++) {
370 ltimestamp = lratio->getTimeMap()[
i];
371 std::cout <<
"i = " << std::setprecision(6) <<
i
372 << ltimestamp.t1.value() <<
" " << ltimestamp.t2.value() <<
" : " ;
374 std::cout <<
"Tests finihed." << std::endl;
382 chit = ch_status->
getMap().
find(ebid.rawId());
383 if( chit != ch_status->getMap().end() ){
386 <<std::setprecision(6)
390 std::cout <<
"No channel status found for this xtal! something wrong with EcalChannelStatus in your DB? "
EventNumber_t event() const
const self & getMap() const
const EcalLaserAPDPNRatiosMap & getLaserMap() const
uint16_t getStatusCode() const
float EcalIntercalibError
std::vector< Item >::const_iterator const_iterator
T const * product() const
float EcalTimeCalibConstant
const_iterator find(uint32_t rawId) const
math::Matrix< 3, 10 >::type EcalWeightMatrix
const_iterator end() const
float EcalIntercalibConstant