75 localContCorrParameters_ = ps.
getUntrackedParameter< std::vector<double> >(
"localContCorrParameters", std::vector<double>(0) );
76 crackCorrParameters_ = ps.
getUntrackedParameter< std::vector<double> >(
"crackCorrParameters", std::vector<double>(0) );
77 energyCorrectionParameters_ = ps.
getUntrackedParameter< std::vector<double> >(
"energyCorrectionParameters", std::vector<double>(0) );
78 energyUncertaintyParameters_ = ps.
getUntrackedParameter< std::vector<double> >(
"energyUncertaintyParameters", std::vector<double>(0) );
79 energyCorrectionObjectSpecificParameters_ = ps.
getUntrackedParameter< std::vector<double> >(
"energyCorrectionObjectSpecificParameters", std::vector<double>(0) );
103 EBtimeCorrAmplitudeBins_ = ps.
getUntrackedParameter< std::vector<double> >(
"EBtimeCorrAmplitudeBins", std::vector<double>() );
104 EBtimeCorrShiftBins_ = ps.
getUntrackedParameter< std::vector<double> >(
"EBtimeCorrShiftBins", std::vector<double>() );
105 EEtimeCorrAmplitudeBins_ = ps.
getUntrackedParameter< std::vector<double> >(
"EEtimeCorrAmplitudeBins", std::vector<double>() );
106 EEtimeCorrShiftBins_ = ps.
getUntrackedParameter< std::vector<double> >(
"EEtimeCorrShiftBins", std::vector<double>() );
108 EBG12samplesCorrelation_ = ps.
getUntrackedParameter< std::vector<double> >(
"EBG12samplesCorrelation", std::vector<double>() );
109 EBG6samplesCorrelation_ = ps.
getUntrackedParameter< std::vector<double> >(
"EBG6samplesCorrelation", std::vector<double>() );
110 EBG1samplesCorrelation_ = ps.
getUntrackedParameter< std::vector<double> >(
"EBG1samplesCorrelation", std::vector<double>() );
111 EEG12samplesCorrelation_ = ps.
getUntrackedParameter< std::vector<double> >(
"EEG12samplesCorrelation", std::vector<double>() );
112 EEG6samplesCorrelation_ = ps.
getUntrackedParameter< std::vector<double> >(
"EEG6samplesCorrelation", std::vector<double>() );
113 EEG1samplesCorrelation_ = ps.
getUntrackedParameter< std::vector<double> >(
"EEG1samplesCorrelation", std::vector<double>() );
119 std::cout <<
" EcalTrivialConditionRetriever " << std::endl;
125 std::cout <<
" EcalTrivialConditionRetriever going to create conditions based on the damage deu to "<<totLumi_<<
126 " fb-1 integrated luminosity" << std::endl;
130 if (weightsForAsynchronousRunning_)
132 getWeightsFromFile_ =
true;
139 std::ostringstream str;
141 if (!weightsForAsynchronousRunning_)
146 weightType = str.str();
157 amplWeights_.resize(nTDCbins_);
158 amplWeightsAft_.resize(nTDCbins_);
159 pedWeights_.resize(nTDCbins_);
160 pedWeightsAft_.resize(nTDCbins_);
161 jittWeights_.resize(nTDCbins_);
162 jittWeightsAft_.resize(nTDCbins_);
163 chi2Matrix_.resize(nTDCbins_);
164 chi2MatrixAft_.resize(nTDCbins_);
167 getWeightsFromConfiguration(ps);
175 producedEcalMappingElectronics_ = ps.
getUntrackedParameter<
bool>(
"producedEcalMappingElectronics",
true);
178 if ( producedEcalMappingElectronics_ ) {
179 if ( mappingFile_ !=
"" ) {
184 findingRecord<EcalMappingElectronicsRcd>();
188 if(getEBAlignmentFromFile_) {
193 if(getEEAlignmentFromFile_) {
198 if(getESAlignmentFromFile_)
205 if (producedEcalPedestals_)
208 if (producedEcalWeights_) {
213 if (producedEcalGainRatios_)
216 if (producedEcalADCToGeVConstant_)
220 producedEcalTimeOffsetConstant_ = ps.
getUntrackedParameter<
bool>(
"producedEcalTimeOffsetConstant",
true);
222 if (producedEcalTimeOffsetConstant_) {
224 findingRecord<EcalTimeOffsetConstantRcd>();
228 producedEcalLinearCorrections_ = ps.
getUntrackedParameter<
bool>(
"producedEcalLinearCorrections",
true);
231 if (producedEcalLinearCorrections_) {
232 if(linearCorrectionsFile_ !=
"") {
237 findingRecord<EcalLinearCorrectionsRcd> () ;
243 producedEcalIntercalibConstants_ = ps.
getUntrackedParameter<
bool>(
"producedEcalIntercalibConstants",
true);
248 if (producedEcalIntercalibConstants_) {
249 if(intercalibConstantsFile_ !=
"") {
254 findingRecord<EcalIntercalibConstantsRcd> () ;
257 producedEcalIntercalibConstantsMC_ = ps.
getUntrackedParameter<
bool>(
"producedEcalIntercalibConstantsMC",
true);
259 if (producedEcalIntercalibConstantsMC_) {
260 if(intercalibConstantsMCFile_ !=
"") {
265 findingRecord<EcalIntercalibConstantsMCRcd> () ;
272 if (producedEcalIntercalibErrors_) {
273 if(intercalibErrorsFile_ !=
"") {
278 findingRecord<EcalIntercalibErrorsRcd> () ;
282 producedEcalTimeCalibConstants_ = ps.
getUntrackedParameter<
bool>(
"producedEcalTimeCalibConstants",
true);
285 if (producedEcalTimeCalibConstants_) {
286 if(timeCalibConstantsFile_ !=
"") {
291 findingRecord<EcalTimeCalibConstantsRcd> () ;
298 if (producedEcalTimeCalibErrors_) {
299 if(timeCalibErrorsFile_ !=
"") {
304 findingRecord<EcalTimeCalibErrorsRcd> () ;
308 producedEcalClusterLocalContCorrParameters_ = ps.
getUntrackedParameter<
bool>(
"producedEcalClusterLocalContCorrParameters",
false);
309 producedEcalClusterCrackCorrParameters_ = ps.
getUntrackedParameter<
bool>(
"producedEcalClusterCrackCorrParameters",
false);
310 producedEcalClusterEnergyCorrectionParameters_ = ps.
getUntrackedParameter<
bool>(
"producedEcalClusterEnergyCorrectionParameters",
false);
311 producedEcalClusterEnergyUncertaintyParameters_ = ps.
getUntrackedParameter<
bool>(
"producedEcalClusterEnergyUncertaintyParameters",
false);
312 producedEcalClusterEnergyCorrectionObjectSpecificParameters_ = ps.
getUntrackedParameter<
bool>(
"producedEcalClusterEnergyCorrectionObjectSpecificParameters",
false);
313 if ( producedEcalClusterLocalContCorrParameters_ ) {
315 findingRecord<EcalClusterLocalContCorrParametersRcd>();
317 if ( producedEcalClusterCrackCorrParameters_ ) {
319 findingRecord<EcalClusterCrackCorrParametersRcd>();
321 if ( producedEcalClusterEnergyCorrectionParameters_ ) {
323 findingRecord<EcalClusterEnergyCorrectionParametersRcd>();
325 if ( producedEcalClusterEnergyUncertaintyParameters_ ) {
327 findingRecord<EcalClusterEnergyUncertaintyParametersRcd>();
329 if ( producedEcalClusterEnergyCorrectionObjectSpecificParameters_ ) {
331 findingRecord<EcalClusterEnergyCorrectionObjectSpecificParametersRcd>();
336 if (producedEcalLaserCorrection_) {
339 findingRecord<EcalLaserAlphasRcd> () ;
341 std::cout <<
" getLaserAlphaFromFile_ " << getLaserAlphaFromFile_ << std::endl;
342 if(getLaserAlphaFromFile_) {
345 std::cout <<
" EELaserAlphaFile_ " << EELaserAlphaFile_.c_str() << std::endl;
348 findingRecord<EcalLaserAPDPNRatiosRefRcd> () ;
350 findingRecord<EcalLaserAPDPNRatiosRcd> () ;
357 if ( producedEcalChannelStatus_ ) {
358 if ( channelStatusFile_ !=
"" ) {
363 findingRecord<EcalChannelStatusRcd>();
367 if ( producedEcalDQMChannelStatus_ ) {
369 findingRecord<EcalDQMChannelStatusRcd>();
373 if ( producedEcalDCSTowerStatus_ ) {
375 findingRecord<EcalDCSTowerStatusRcd>();
379 if ( producedEcalDAQTowerStatus_ ) {
381 findingRecord<EcalDAQTowerStatusRcd>();
385 if ( producedEcalDQMTowerStatus_ ) {
387 findingRecord<EcalDQMTowerStatusRcd>();
394 if ( producedEcalTrgChannelStatus_ ) {
395 if ( trgChannelStatusFile_ !=
"" ) {
400 findingRecord<EcalTPGCrystalStatusRcd>();
405 if ( producedEcalAlignmentEB_ ) {
407 findingRecord<EBAlignmentRcd>();
410 if ( producedEcalAlignmentEE_ ) {
412 findingRecord<EEAlignmentRcd>();
415 if ( producedEcalAlignmentES_ ) {
417 findingRecord<ESAlignmentRcd>();
420 if (producedEcalPedestals_) findingRecord<EcalPedestalsRcd>();
422 if (producedEcalWeights_) {
423 findingRecord<EcalWeightXtalGroupsRcd>();
424 findingRecord<EcalTBWeightsRcd>();
427 if (producedEcalGainRatios_) findingRecord<EcalGainRatiosRcd>();
429 if (producedEcalADCToGeVConstant_) findingRecord<EcalADCToGeVConstantRcd>();
432 if (producedEcalSampleMask_) {
434 findingRecord<EcalSampleMaskRcd>();
436 producedEcalTimeBiasCorrections_ = ps.
getUntrackedParameter<
bool>(
"producedEcalTimeBiasCorrections",
false);
437 if (producedEcalTimeBiasCorrections_) {
439 findingRecord<EcalTimeBiasCorrectionsRcd>();
441 producedEcalSamplesCorrelation_ = ps.
getUntrackedParameter<
bool>(
"producedEcalSamplesCorrelation",
false);
442 if (producedEcalSamplesCorrelation_) {
444 findingRecord<EcalSamplesCorrelationRcd>();
445 getSamplesCorrelationFromFile_ = ps.
getUntrackedParameter<
bool>(
"getSamplesCorrelationFromFile",
false);
446 if(getSamplesCorrelationFromFile_) {
464 if(verbose_>=1)
std::cout <<
"EcalTrivialConditionRetriever::setIntervalFor(): record key = " << rk.
name() <<
"\ttime: " << iTime.
time().
value() << std::endl;
470 std::auto_ptr<EcalPedestals>
472 std::auto_ptr<EcalPedestals> peds = std::auto_ptr<EcalPedestals>(
new EcalPedestals() );
477 EBitem.rms_x1 = EBpedRMSX1_;
478 EBitem.mean_x6 = EBpedMeanX6_;
479 EBitem.rms_x6 = EBpedRMSX6_;
480 EBitem.mean_x12 = EBpedMeanX12_;
481 EBitem.rms_x12 = EBpedRMSX12_;
484 EEitem.
rms_x1 = EEpedRMSX1_;
486 EEitem.
rms_x6 = EEpedRMSX6_;
495 if(iEta==0)
continue;
507 EBitem.rms_x1 = EBpedRMSX1_*noisefactor;
508 EBitem.rms_x6 = EBpedRMSX6_*noisefactor;
509 EBitem.rms_x12 = EBpedRMSX12_*noisefactor;
510 std::cout <<
"rms ped at eta:"<< eta<<
" ="<< EBitem.rms_x12 << std::endl;
520 peds->insert(std::make_pair(ebdetid.
rawId(),EBitem));
531 peds->insert(std::make_pair(eedetidpos.
rawId(),EEitem));
536 peds->insert(std::make_pair(eedetidneg.
rawId(),EEitem));
547 std::auto_ptr<EcalWeightXtalGroups>
550 std::auto_ptr<EcalWeightXtalGroups> xtalGroups = std::auto_ptr<EcalWeightXtalGroups>(
new EcalWeightXtalGroups() );
553 if(ieta==0)
continue;
560 xtalGroups->setValue(ebid.
rawId(), defaultGroupId );
571 xtalGroups->setValue(eedetidpos.
rawId(), defaultGroupId );
576 xtalGroups->setValue(eedetidneg.
rawId(), defaultGroupId );
584 std::auto_ptr<EcalLinearCorrections>
587 std::auto_ptr<EcalLinearCorrections> ical = std::auto_ptr<EcalLinearCorrections>(
new EcalLinearCorrections() );
590 if(ieta==0)
continue;
594 double r = (double)
std::rand()/( double(RAND_MAX)+double(1) );
597 pairAPDPN.
p1 = linCorrMean_ + r*linCorrSigma_;
598 pairAPDPN.
p2 = linCorrMean_ + r*linCorrSigma_;
599 pairAPDPN.
p3 = linCorrMean_ + r*linCorrSigma_;
600 ical->setValue( ebid, pairAPDPN );
609 double r = (double)
std::rand()/( double(RAND_MAX)+double(1) );
613 pairAPDPN.
p1 = linCorrMean_ + r*linCorrSigma_;
614 pairAPDPN.
p2 = linCorrMean_ + r*linCorrSigma_;
615 pairAPDPN.
p3 = linCorrMean_ + r*linCorrSigma_;
617 ical->setValue( eedetidpos, pairAPDPN );
621 double r1 = (double)
std::rand()/( double(RAND_MAX)+double(1) );
625 pairAPDPN.
p1 = linCorrMean_ + r1*linCorrSigma_;
626 pairAPDPN.
p2 = linCorrMean_ + r1*linCorrSigma_;
627 pairAPDPN.
p3 = linCorrMean_ + r1*linCorrSigma_;
629 ical->setValue( eedetidneg, pairAPDPN );
636 for(
int i=0;
i<92;
i++){
638 if(linearTime2_ == 0 ){
643 if(linearTime3_ == 0 ){
649 ical->setTime(
i, TimeStamp );
658 std::auto_ptr<EcalIntercalibConstants>
661 std::auto_ptr<EcalIntercalibConstants> ical = std::auto_ptr<EcalIntercalibConstants>(
new EcalIntercalibConstants() );
664 if(ieta==0)
continue;
670 double r = (double)
std::rand()/( double(RAND_MAX)+double(1) );
671 ical->setValue( ebid.
rawId(), intercalibConstantMean_ + r*intercalibConstantSigma_ );
681 double r = (double)
std::rand()/( double(RAND_MAX)+double(1) );
683 ical->setValue( eedetidpos.
rawId(), intercalibConstantMean_ + r*intercalibConstantSigma_ );
687 double r1 = (double)
std::rand()/( double(RAND_MAX)+double(1) );
689 ical->setValue( eedetidneg.
rawId(), intercalibConstantMean_ + r1*intercalibConstantSigma_ );
697 std::auto_ptr<EcalIntercalibConstantsMC>
700 std::auto_ptr<EcalIntercalibConstantsMC> ical = std::auto_ptr<EcalIntercalibConstantsMC>(
new EcalIntercalibConstantsMC() );
703 if(ieta==0)
continue;
709 double r = (double)
std::rand()/( double(RAND_MAX)+double(1) );
710 ical->setValue( ebid.
rawId(), intercalibConstantMeanMC_ + r*intercalibConstantSigmaMC_ );
720 double r = (double)
std::rand()/( double(RAND_MAX)+double(1) );
722 ical->setValue( eedetidpos.
rawId(), intercalibConstantMeanMC_ + r*intercalibConstantSigmaMC_ );
726 double r1 = (double)
std::rand()/( double(RAND_MAX)+double(1) );
728 ical->setValue( eedetidneg.
rawId(), intercalibConstantMeanMC_ + r1*intercalibConstantSigmaMC_ );
736 std::auto_ptr<EcalIntercalibErrors>
739 std::auto_ptr<EcalIntercalibErrors> ical = std::auto_ptr<EcalIntercalibErrors>(
new EcalIntercalibErrors() );
742 if(ieta==0)
continue;
748 ical->setValue( ebid.
rawId(), intercalibErrorMean_);
759 ical->setValue( eedetidpos.
rawId(), intercalibErrorMean_ );
764 ical->setValue( eedetidneg.
rawId(), intercalibErrorMean_ );
772 std::auto_ptr<EcalTimeCalibConstants>
775 std::auto_ptr<EcalTimeCalibConstants> ical = std::auto_ptr<EcalTimeCalibConstants>(
new EcalTimeCalibConstants() );
778 if(ieta==0)
continue;
784 double r = (double)
std::rand()/( double(RAND_MAX)+double(1) );
785 ical->setValue( ebid.
rawId(), timeCalibConstantMean_ + r*timeCalibConstantSigma_ );
795 double r = (double)
std::rand()/( double(RAND_MAX)+double(1) );
797 ical->setValue( eedetidpos.
rawId(), timeCalibConstantMean_ + r*timeCalibConstantSigma_ );
801 double r1 = (double)
std::rand()/( double(RAND_MAX)+double(1) );
803 ical->setValue( eedetidneg.
rawId(), timeCalibConstantMean_ + r1*timeCalibConstantSigma_ );
811 std::auto_ptr<EcalTimeCalibErrors>
814 std::auto_ptr<EcalTimeCalibErrors> ical = std::auto_ptr<EcalTimeCalibErrors>(
new EcalTimeCalibErrors() );
817 if(ieta==0)
continue;
823 ical->setValue( ebid.
rawId(), timeCalibErrorMean_);
834 ical->setValue( eedetidpos.
rawId(), timeCalibErrorMean_ );
839 ical->setValue( eedetidneg.
rawId(), timeCalibErrorMean_ );
847 std::auto_ptr<EcalTimeOffsetConstant>
850 std::cout <<
" produceEcalTimeOffsetConstant: " << std::endl;
851 std::cout <<
" EB " << timeOffsetEBConstant_ <<
" EE " << timeOffsetEEConstant_<< std::endl;
852 return std::auto_ptr<EcalTimeOffsetConstant>(
new EcalTimeOffsetConstant(timeOffsetEBConstant_,timeOffsetEEConstant_) );
855 std::auto_ptr<EcalGainRatios>
858 std::auto_ptr<EcalGainRatios> gratio = std::auto_ptr<EcalGainRatios>(
new EcalGainRatios() );
861 gr.setGain6Over1( gainRatio6over1_ );
864 if(ieta==0)
continue;
869 gratio->setValue( ebid.
rawId(), gr );
880 gratio->setValue( eedetidpos.
rawId(), gr );
885 gratio->setValue( eedetidneg.
rawId(), gr );
893 std::auto_ptr<EcalADCToGeVConstant>
896 return std::auto_ptr<EcalADCToGeVConstant>(
new EcalADCToGeVConstant(adcToGeVEBConstant_,adcToGeVEEConstant_) );
899 std::auto_ptr<EcalTBWeights>
903 std::auto_ptr<EcalTBWeights> tbwgt = std::auto_ptr<EcalTBWeights>(
new EcalTBWeights() );
910 for(
int itdc=1; itdc<=nTDCbins_; ++itdc) {
941 mat1.Place_in_row(amplWeights_[itdc-1],0,0);
942 mat1.Place_in_row(pedWeights_[itdc-1],1,0);
943 mat1.Place_in_row(jittWeights_[itdc-1],2,0);
946 mat2.Place_in_row(amplWeightsAft_[itdc-1],0,0);
947 mat2.Place_in_row(pedWeightsAft_[itdc-1],1,0);
948 mat2.Place_in_row(jittWeightsAft_[itdc-1],2,0);
954 mat3=chi2Matrix_[itdc-1];
955 mat4=chi2MatrixAft_[itdc-1];
980 tbwgt->setValue(std::make_pair(igrp,itdc), wgt);
988 std::auto_ptr<EcalClusterLocalContCorrParameters>
992 for (
size_t i = 0;
i < localContCorrParameters_.size(); ++
i ) {
993 ipar->params().push_back( localContCorrParameters_[
i] );
997 std::auto_ptr<EcalClusterCrackCorrParameters>
1001 for (
size_t i = 0;
i < crackCorrParameters_.size(); ++
i ) {
1002 ipar->params().push_back( crackCorrParameters_[
i] );
1006 std::auto_ptr<EcalClusterEnergyCorrectionParameters>
1010 for (
size_t i = 0;
i < energyCorrectionParameters_.size(); ++
i ) {
1011 ipar->params().push_back( energyCorrectionParameters_[
i] );
1015 std::auto_ptr<EcalClusterEnergyUncertaintyParameters>
1019 for (
size_t i = 0;
i < energyUncertaintyParameters_.size(); ++
i ) {
1020 ipar->params().push_back( energyUncertaintyParameters_[
i] );
1024 std::auto_ptr<EcalClusterEnergyCorrectionObjectSpecificParameters>
1028 for (
size_t i = 0;
i < energyCorrectionObjectSpecificParameters_.size(); ++
i ) {
1029 ipar->params().push_back( energyCorrectionObjectSpecificParameters_[
i] );
1036 std::auto_ptr<EcalLaserAlphas>
1040 std::cout <<
" produceEcalLaserAlphas " << std::endl;
1041 std::auto_ptr<EcalLaserAlphas> ical = std::auto_ptr<EcalLaserAlphas>(
new EcalLaserAlphas() );
1042 if(getLaserAlphaFromFile_) {
1044 int SMpos[36] = {-10, 4, -7, -16, 6, -9, 11, -17, 5, 18, 3, -8, 1, -3, -13, 14, -6, 2,
1045 15, -18, 8, 17, -2, 9, -1, 10, -5, 7, -12, -11, 16, -4, -15, -14, 12, 13};
1047 int SMCal[36] = {12,17,10, 1, 8, 4,27,20,23,25, 6,34,35,15,18,30,21, 9,
1048 24,22,13,31,26,16, 2,11, 5, 0,29,28,14,33,32, 3, 7,19};
1055 for(
int SMcons = 0; SMcons < 36; SMcons++) {
1056 int SM = SMpos[SMcons];
1057 if(SM < 0) SM = 17 +
abs(SM);
1059 if(SMCal[SM] != SMcons)
1060 std::cout <<
" SM pb : read SM " << SMcons<<
" SMpos " << SM
1061 <<
" SMCal " << SMCal[SM] << std::endl;
1065 int readSM, pos, bar, bar2;
1067 for(
int SMcons = 0; SMcons < 36; SMcons++) {
1068 int SM = SMpos[SMcons];
1069 for(
int ic = 0; ic < 1700; ic++) {
1070 fEB >> readSM >> pos >> bar >> bar2 >> type >>
batch;
1073 if(readSM != SMcons || pos != ic + 1)
1074 std::cout <<
" barrel read pb read SM " << readSM <<
" const SM " << SMcons
1075 <<
" read pos " << pos <<
" ic " << ic << std::endl;
1076 if(SM < 0) SM = 18 +
abs(SM);
1078 if(bar == 33101 || bar == 30301 )
1080 else if(bar == 33106) {
1084 std::cout <<
" problem with barcode first " << bar <<
" last " << bar2
1085 <<
" read SM " << readSM <<
" read pos " << pos << std::endl;
1089 ical->setValue( ebdetid, alpha );
1095 if(ieta==0)
continue;
1099 double r = (double)
std::rand()/( double(RAND_MAX)+double(1) );
1100 ical->setValue( ebid, laserAlphaMean_ + r*laserAlphaSigma_ );
1106 std::cout <<
" produceEcalLaserAlphas EE" << std::endl;
1107 if(getLaserAlphaFromFile_) {
1109 int check[101][101];
1110 for(
int x = 1;
x < 101;
x++)
1111 for(
int y = 1; y < 101; y++)
1113 for(
int crystal = 0; crystal < 14648; crystal++) {
1114 int x, y ,z, bid, bar, bar2;
1115 float LY,
alpha = 0;
1116 fEE >> z >> x >> y >> LY >> bid >> bar >> bar2;
1117 if(x < 1 || x > 100 || y < 1 || y > 100)
1118 std::cout <<
" wrong coordinates for barcode " << bar
1119 <<
" x " << x <<
" y " << y <<
" z " << z << std::endl;
1121 if(z == 1) check[x][y] = 1;
1122 else check[x][y] = 0;
1123 if(bar == 33201 || (bar == 30399 && bar2 < 568))
1125 else if((bar == 33106 && bar2 > 2000 && bar2 < 4669)
1126 || (bar == 30399 && bar2 > 567))
1129 std::cout <<
" problem with barcode " << bar <<
" " << bar2
1130 <<
" x " << x <<
" y " << y <<
" z " << z << std::endl;
1136 ical->setValue( eedetidpos, alpha );
1139 std::cout <<
" problem with EEDetId " <<
" x " << x <<
" y " << y <<
" z " << z << std::endl;
1141 for(
int x = 1;
x < 101;
x++)
1142 for(
int y = 1; y < 101; y++)
1143 if(check[
x][y] == 1)
std::cout <<
" missing x " <<
x <<
" y " << y << std::endl;
1150 double r = (double)
std::rand()/( double(RAND_MAX)+double(1) );
1152 ical->setValue( eedetidpos, laserAlphaMean_ + r*laserAlphaSigma_ );
1156 double r1 = (double)
std::rand()/( double(RAND_MAX)+double(1) );
1158 ical->setValue( eedetidneg, laserAlphaMean_ + r1*laserAlphaSigma_ );
1168 std::auto_ptr<EcalLaserAPDPNRatiosRef>
1171 std::auto_ptr<EcalLaserAPDPNRatiosRef> ical = std::auto_ptr<EcalLaserAPDPNRatiosRef>(
new EcalLaserAPDPNRatiosRef() );
1173 if(ieta==0)
continue;
1177 double r = (double)
std::rand()/( double(RAND_MAX)+double(1) );
1178 ical->setValue( ebid, laserAPDPNRefMean_ + r*laserAPDPNRefSigma_ );
1187 double r = (double)
std::rand()/( double(RAND_MAX)+double(1) );
1189 ical->setValue( eedetidpos, laserAPDPNRefMean_ + r*laserAPDPNRefSigma_ );
1193 double r1 = (double)
std::rand()/( double(RAND_MAX)+double(1) );
1195 ical->setValue( eedetidneg, laserAPDPNRefMean_ + r1*laserAPDPNRefSigma_ );
1204 std::auto_ptr<EcalLaserAPDPNRatios>
1212 std::auto_ptr<EcalLaserAPDPNRatios> ical = std::auto_ptr<EcalLaserAPDPNRatios>(
new EcalLaserAPDPNRatios() );
1214 if(ieta==0)
continue;
1222 std::cout<<
"EB at eta="<<eta<<
" dropping by "<<drop<<std::endl;
1227 double r = (double)
std::rand()/( double(RAND_MAX)+double(1) );
1230 pairAPDPN.
p1 = laserAPDPNMean_*drop + r*laserAPDPNSigma_;
1231 pairAPDPN.
p2 = laserAPDPNMean_*drop + r*laserAPDPNSigma_;
1232 pairAPDPN.
p3 = laserAPDPNMean_*drop + r*laserAPDPNSigma_;
1233 ical->setValue( ebid, pairAPDPN );
1247 double r = (double)
std::rand()/( double(RAND_MAX)+double(1) );
1257 if(iX==50)
std::cout<<
"EE at eta="<<eta<<
" dropping by "<<drop<<std::endl;
1261 pairAPDPN.
p1 = laserAPDPNMean_*drop + r*laserAPDPNSigma_;
1262 pairAPDPN.
p2 = laserAPDPNMean_*drop + r*laserAPDPNSigma_;
1263 pairAPDPN.
p3 = laserAPDPNMean_*drop + r*laserAPDPNSigma_;
1264 ical->setValue( eedetidpos, pairAPDPN );
1268 double r1 = (double)
std::rand()/( double(RAND_MAX)+double(1) );
1271 double eta= -
log(
tan(0.5*atan(
sqrt((iX-50.0)*(iX-50.0)+(iY-50.0)*(iY-50.0))*2.98/328.)));
1274 if(iX==50)
std::cout<<
"EE at eta="<<eta<<
" dropping by "<<drop<<std::endl;
1278 pairAPDPN.
p1 = laserAPDPNMean_*drop + r1*laserAPDPNSigma_;
1279 pairAPDPN.
p2 = laserAPDPNMean_*drop + r1*laserAPDPNSigma_;
1280 pairAPDPN.
p3 = laserAPDPNMean_*drop + r1*laserAPDPNSigma_;
1281 ical->setValue( eedetidneg, pairAPDPN );
1288 for(
int i=0;
i<92;
i++){
1290 if(laserAPDPNTime2_ == 0 ){
1295 if(laserAPDPNTime3_ == 0 ){
1301 ical->setTime(
i, TimeStamp );
1312 std::vector < std::vector<double> > amplwgtv(nTDCbins_);
1314 if (!getWeightsFromFile_ && nTDCbins_ == 1)
1316 std::vector<double> vampl;
1318 vampl.push_back( -0.33333 );
1319 vampl.push_back( -0.33333 );
1320 vampl.push_back( -0.33333 );
1321 vampl.push_back( 0. );
1322 vampl.push_back( 0. );
1323 vampl.push_back( 1. );
1324 vampl.push_back( 0. );
1325 vampl.push_back( 0. );
1326 vampl.push_back( 0. );
1327 vampl.push_back( 0. );
1330 else if (getWeightsFromFile_)
1335 while (!amplFile.eof() && tdcBin < nTDCbins_)
1337 for(
int j = 0;
j < 10; ++
j) {
1340 amplwgtv[tdcBin].push_back(ww);
1344 assert (tdcBin == nTDCbins_);
1350 edm::LogError(
"EcalTrivialConditionRetriever") <<
"Configuration not supported. Exception is raised ";
1355 for (
int i=0;
i<nTDCbins_;
i++)
1359 for(std::vector<double>::const_iterator it = amplwgtv[
i].
begin(); it != amplwgtv[
i].end(); ++it)
1361 (amplWeights_[
i])[j]=*it;
1367 std::vector < std::vector<double> > amplwgtvAftGain(nTDCbins_);
1369 if (!getWeightsFromFile_ && nTDCbins_ == 1 )
1371 std::vector<double> vamplAftGain;
1372 vamplAftGain.push_back( 0. );
1373 vamplAftGain.push_back( 0. );
1374 vamplAftGain.push_back( 0. );
1375 vamplAftGain.push_back( 0. );
1376 vamplAftGain.push_back( 0. );
1377 vamplAftGain.push_back( 1. );
1378 vamplAftGain.push_back( 0. );
1379 vamplAftGain.push_back( 0. );
1380 vamplAftGain.push_back( 0. );
1381 vamplAftGain.push_back( 0. );
1382 amplwgtvAftGain[0] = ps.
getUntrackedParameter< std::vector<double> >(
"amplWeightsAftGain", vamplAftGain);
1384 else if (getWeightsFromFile_)
1390 while (!amplFile.eof() && tdcBin < nTDCbins_)
1392 for(
int j = 0;
j < 10; ++
j) {
1395 amplwgtvAftGain[tdcBin].push_back(ww);
1399 assert (tdcBin == nTDCbins_);
1404 edm::LogError(
"EcalTrivialConditionRetriever") <<
"Configuration not supported. Exception is raised ";
1408 for (
int i=0;
i<nTDCbins_;
i++)
1412 for(std::vector<double>::const_iterator it = amplwgtvAftGain[
i].
begin(); it != amplwgtvAftGain[
i].end(); ++it) {
1413 (amplWeightsAft_[
i])[j]=*it;
1420 std::vector< std::vector<double> > pedwgtv(nTDCbins_);
1422 if (!getWeightsFromFile_ && nTDCbins_ == 1)
1424 std::vector<double> vped;
1425 vped.push_back( 0.33333 );
1426 vped.push_back( 0.33333 );
1427 vped.push_back( 0.33333 );
1428 vped.push_back( 0. );
1429 vped.push_back( 0. );
1430 vped.push_back( 0. );
1431 vped.push_back( 0. );
1432 vped.push_back( 0. );
1433 vped.push_back( 0. );
1434 vped.push_back( 0. );
1437 else if (getWeightsFromFile_)
1443 while (!pedFile.eof() && tdcBin < nTDCbins_)
1445 for(
int j = 0;
j < 10; ++
j) {
1448 pedwgtv[tdcBin].push_back(ww);
1452 assert (tdcBin == nTDCbins_);
1457 edm::LogError(
"EcalTrivialConditionRetriever") <<
"Configuration not supported. Exception is raised ";
1461 for (
int i=0;
i<nTDCbins_;
i++)
1465 for(std::vector<double>::const_iterator it = pedwgtv[
i].
begin(); it != pedwgtv[
i].end(); ++it) {
1466 (pedWeights_[
i])[j] = *it;
1471 std::vector< std::vector<double> > pedwgtvaft(nTDCbins_);
1473 if (!getWeightsFromFile_ && nTDCbins_ == 1)
1475 std::vector<double> vped;
1476 vped.push_back( 0. );
1477 vped.push_back( 0. );
1478 vped.push_back( 0. );
1479 vped.push_back( 0. );
1480 vped.push_back( 0. );
1481 vped.push_back( 0. );
1482 vped.push_back( 0. );
1483 vped.push_back( 0. );
1484 vped.push_back( 0. );
1485 vped.push_back( 0. );
1488 else if (getWeightsFromFile_)
1494 while (!pedFile.eof() && tdcBin < nTDCbins_)
1496 for(
int j = 0;
j < 10; ++
j) {
1499 pedwgtvaft[tdcBin].push_back(ww);
1503 assert (tdcBin == nTDCbins_);
1508 edm::LogError(
"EcalTrivialConditionRetriever") <<
"Configuration not supported. Exception is raised ";
1512 for (
int i=0;
i<nTDCbins_;
i++)
1516 for(std::vector<double>::const_iterator it = pedwgtvaft[
i].
begin(); it != pedwgtvaft[
i].end(); ++it) {
1517 (pedWeightsAft_[
i])[j]=*it;
1526 std::vector< std::vector<double> > jittwgtv(nTDCbins_);
1528 if (!getWeightsFromFile_ && nTDCbins_ == 1 )
1530 std::vector<double> vjitt;
1531 vjitt.push_back( 0.04066309 );
1532 vjitt.push_back( 0.04066309 );
1533 vjitt.push_back( 0.04066309 );
1534 vjitt.push_back( 0.000 );
1535 vjitt.push_back( 1.325176 );
1536 vjitt.push_back( -0.04997078 );
1537 vjitt.push_back( -0.504338 );
1538 vjitt.push_back( -0.5024844 );
1539 vjitt.push_back( -0.3903718 );
1540 vjitt.push_back( 0.000 );
1543 else if (getWeightsFromFile_)
1549 while (!jittFile.eof() && tdcBin < nTDCbins_)
1551 for(
int j = 0;
j < 10; ++
j) {
1554 jittwgtv[tdcBin].push_back(ww);
1558 assert (tdcBin == nTDCbins_);
1563 edm::LogError(
"EcalTrivialConditionRetriever") <<
"Configuration not supported. Exception is raised ";
1567 for (
int i=0;
i<nTDCbins_;
i++)
1571 for(std::vector<double>::const_iterator it = jittwgtv[
i].
begin(); it != jittwgtv[
i].end(); ++it) {
1572 (jittWeights_[
i])[j]= *it;
1577 std::vector< std::vector<double> > jittwgtvaft(nTDCbins_);
1579 if (!getWeightsFromFile_ && nTDCbins_ == 1)
1581 std::vector<double> vjitt;
1582 vjitt.push_back( 0. );
1583 vjitt.push_back( 0. );
1584 vjitt.push_back( 0. );
1585 vjitt.push_back( 0. );
1586 vjitt.push_back( 1.097871 );
1587 vjitt.push_back( -0.04551035 );
1588 vjitt.push_back( -0.4159156 );
1589 vjitt.push_back( -0.4185352 );
1590 vjitt.push_back( -0.3367127 );
1591 vjitt.push_back( 0. );
1594 else if (getWeightsFromFile_)
1600 while (!jittFile.eof() && tdcBin < nTDCbins_)
1602 for(
int j = 0;
j < 10; ++
j) {
1605 jittwgtvaft[tdcBin].push_back(ww);
1609 assert (tdcBin == nTDCbins_);
1614 edm::LogError(
"EcalTrivialConditionRetriever") <<
"Configuration not supported. Exception is raised ";
1618 for (
int i=0;
i<nTDCbins_;
i++)
1622 for(std::vector<double>::const_iterator it = jittwgtvaft[
i].
begin(); it != jittwgtvaft[
i].end(); ++it) {
1623 (jittWeightsAft_[
i])[j]= *it;
1629 std::vector< EcalWeightSet::EcalChi2WeightMatrix > chi2Matrix(nTDCbins_);
1630 if (!getWeightsFromFile_ && nTDCbins_ == 1 )
1636 chi2Matrix[0](0,0) = 0.694371;
1637 chi2Matrix[0](0,1) = -0.305629;
1638 chi2Matrix[0](0,2) = -0.305629;
1639 chi2Matrix[0](0,3) = 0.;
1640 chi2Matrix[0](0,4) = 0.;
1641 chi2Matrix[0](0,5) = 0.;
1642 chi2Matrix[0](0,6) = 0.;
1643 chi2Matrix[0](0,7) = 0.;
1644 chi2Matrix[0](0,8) = 0.;
1645 chi2Matrix[0](0,9) = 0.;
1646 chi2Matrix[0](1,0) = -0.305629;
1647 chi2Matrix[0](1,1) = 0.694371;
1648 chi2Matrix[0](1,2) = -0.305629;
1649 chi2Matrix[0](1,3) = 0.;
1650 chi2Matrix[0](1,4) = 0.;
1651 chi2Matrix[0](1,5) = 0.;
1652 chi2Matrix[0](1,6) = 0.;
1653 chi2Matrix[0](1,7) = 0.;
1654 chi2Matrix[0](1,8) = 0.;
1655 chi2Matrix[0](1,9) = 0.;
1656 chi2Matrix[0](2,0) = -0.305629;
1657 chi2Matrix[0](2,1) = -0.305629;
1658 chi2Matrix[0](2,2) = 0.694371;
1659 chi2Matrix[0](2,3) = 0.;
1660 chi2Matrix[0](2,4) = 0.;
1661 chi2Matrix[0](2,5) = 0.;
1662 chi2Matrix[0](2,6) = 0.;
1663 chi2Matrix[0](2,7) = 0.;
1664 chi2Matrix[0](2,8) = 0.;
1665 chi2Matrix[0](2,9) = 0.;
1666 chi2Matrix[0](3,0) = 0.;
1667 chi2Matrix[0](3,1) = 0.;
1668 chi2Matrix[0](3,2) = 0.;
1669 chi2Matrix[0](3,3) = 0.;
1670 chi2Matrix[0](3,4) = 0.;
1671 chi2Matrix[0](3,5) = 0.;
1672 chi2Matrix[0](3,6) = 0.;
1673 chi2Matrix[0](3,7) = 0.;
1674 chi2Matrix[0](3,8) = 0.;
1675 chi2Matrix[0](3,9) = 0.;
1676 chi2Matrix[0](4,0) = 0.;
1677 chi2Matrix[0](4,1) = 0.;
1678 chi2Matrix[0](4,2) = 0.;
1679 chi2Matrix[0](4,3) = 0.;
1680 chi2Matrix[0](4,4) = 0.8027116;
1681 chi2Matrix[0](4,5) = -0.2517103;
1682 chi2Matrix[0](4,6) = -0.2232882;
1683 chi2Matrix[0](4,7) = -0.1716192;
1684 chi2Matrix[0](4,8) = -0.1239006;
1685 chi2Matrix[0](4,9) = 0.;
1686 chi2Matrix[0](5,0) = 0.;
1687 chi2Matrix[0](5,1) = 0.;
1688 chi2Matrix[0](5,2) = 0.;
1689 chi2Matrix[0](5,3) = 0.;
1690 chi2Matrix[0](5,4) = -0.2517103;
1691 chi2Matrix[0](5,5) = 0.6528964;
1692 chi2Matrix[0](5,6) = -0.2972839;
1693 chi2Matrix[0](5,7) = -0.2067162;
1694 chi2Matrix[0](5,8) = -0.1230729;
1695 chi2Matrix[0](5,9) = 0.;
1696 chi2Matrix[0](6,0) = 0.;
1697 chi2Matrix[0](6,1) = 0.;
1698 chi2Matrix[0](6,2) = 0.;
1699 chi2Matrix[0](6,3) = 0.;
1700 chi2Matrix[0](6,4) = -0.2232882;
1701 chi2Matrix[0](6,5) = -0.2972839;
1702 chi2Matrix[0](6,6) = 0.7413607;
1703 chi2Matrix[0](6,7) = -0.1883866;
1704 chi2Matrix[0](6,8) = -0.1235052;
1705 chi2Matrix[0](6,9) = 0.;
1706 chi2Matrix[0](7,0) = 0.;
1707 chi2Matrix[0](7,1) = 0.;
1708 chi2Matrix[0](7,2) = 0.;
1709 chi2Matrix[0](7,3) = 0.;
1710 chi2Matrix[0](7,4) = -0.1716192;
1711 chi2Matrix[0](7,5) = -0.2067162;
1712 chi2Matrix[0](7,6) = -0.1883866;
1713 chi2Matrix[0](7,7) = 0.844935;
1714 chi2Matrix[0](7,8) = -0.124291;
1715 chi2Matrix[0](7,9) = 0.;
1716 chi2Matrix[0](8,0) = 0.;
1717 chi2Matrix[0](8,1) = 0.;
1718 chi2Matrix[0](8,2) = 0.;
1719 chi2Matrix[0](8,3) = 0.;
1720 chi2Matrix[0](8,4) = -0.1239006;
1721 chi2Matrix[0](8,5) = -0.1230729;
1722 chi2Matrix[0](8,6) = -0.1235052;
1723 chi2Matrix[0](8,7) = -0.124291;
1724 chi2Matrix[0](8,8) = 0.8749833;
1725 chi2Matrix[0](8,9) = 0.;
1726 chi2Matrix[0](9,0) = 0.;
1727 chi2Matrix[0](9,1) = 0.;
1728 chi2Matrix[0](9,2) = 0.;
1729 chi2Matrix[0](9,3) = 0.;
1730 chi2Matrix[0](9,4) = 0.;
1731 chi2Matrix[0](9,5) = 0.;
1732 chi2Matrix[0](9,6) = 0.;
1733 chi2Matrix[0](9,7) = 0.;
1734 chi2Matrix[0](9,8) = 0.;
1735 chi2Matrix[0](9,9) = 0.;
1737 else if (getWeightsFromFile_)
1743 while (!chi2MatrixFile.eof() && tdcBin < nTDCbins_)
1746 for(
int j = 0;
j < 10; ++
j) {
1747 for(
int l = 0;
l < 10; ++
l) {
1749 chi2MatrixFile >> ww;
1750 chi2Matrix[tdcBin](
j,
l)=ww;
1755 assert (tdcBin == nTDCbins_);
1760 edm::LogError(
"EcalTrivialConditionRetriever") <<
"Configuration not supported. Exception is raised ";
1767 chi2Matrix_ = chi2Matrix;
1770 std::vector< EcalWeightSet::EcalChi2WeightMatrix > chi2MatrixAft(nTDCbins_);
1771 if (!getWeightsFromFile_ && nTDCbins_ == 1 )
1777 chi2MatrixAft[0](0,0) = 0.;
1778 chi2MatrixAft[0](0,1) = 0.;
1779 chi2MatrixAft[0](0,2) = 0.;
1780 chi2MatrixAft[0](0,3) = 0.;
1781 chi2MatrixAft[0](0,4) = 0.;
1782 chi2MatrixAft[0](0,5) = 0.;
1783 chi2MatrixAft[0](0,6) = 0.;
1784 chi2MatrixAft[0](0,7) = 0.;
1785 chi2MatrixAft[0](0,8) = 0.;
1786 chi2MatrixAft[0](0,9) = 0.;
1787 chi2MatrixAft[0](1,0) = 0.;
1788 chi2MatrixAft[0](1,1) = 0.;
1789 chi2MatrixAft[0](1,2) = 0.;
1790 chi2MatrixAft[0](1,3) = 0.;
1791 chi2MatrixAft[0](1,4) = 0.;
1792 chi2MatrixAft[0](1,5) = 0.;
1793 chi2MatrixAft[0](1,6) = 0.;
1794 chi2MatrixAft[0](1,7) = 0.;
1795 chi2MatrixAft[0](1,8) = 0.;
1796 chi2MatrixAft[0](1,9) = 0.;
1797 chi2MatrixAft[0](2,0) = 0.;
1798 chi2MatrixAft[0](2,1) = 0.;
1799 chi2MatrixAft[0](2,2) = 0.;
1800 chi2MatrixAft[0](2,3) = 0.;
1801 chi2MatrixAft[0](2,4) = 0.;
1802 chi2MatrixAft[0](2,5) = 0.;
1803 chi2MatrixAft[0](2,6) = 0.;
1804 chi2MatrixAft[0](2,7) = 0.;
1805 chi2MatrixAft[0](2,8) = 0.;
1806 chi2MatrixAft[0](2,9) = 0.;
1807 chi2MatrixAft[0](3,0) = 0.;
1808 chi2MatrixAft[0](3,1) = 0.;
1809 chi2MatrixAft[0](3,2) = 0.;
1810 chi2MatrixAft[0](3,3) = 0.;
1811 chi2MatrixAft[0](3,4) = 0.;
1812 chi2MatrixAft[0](3,5) = 0.;
1813 chi2MatrixAft[0](3,6) = 0.;
1814 chi2MatrixAft[0](3,7) = 0.;
1815 chi2MatrixAft[0](3,8) = 0.;
1816 chi2MatrixAft[0](3,9) = 0.;
1817 chi2MatrixAft[0](4,0) = 0.;
1818 chi2MatrixAft[0](4,1) = 0.;
1819 chi2MatrixAft[0](4,2) = 0.;
1820 chi2MatrixAft[0](4,3) = 0.;
1821 chi2MatrixAft[0](4,4) = 0.8030884;
1822 chi2MatrixAft[0](4,5) = -0.2543541;
1823 chi2MatrixAft[0](4,6) = -0.2243544;
1824 chi2MatrixAft[0](4,7) = -0.1698177;
1825 chi2MatrixAft[0](4,8) = -0.1194506;
1826 chi2MatrixAft[0](4,9) = 0.;
1827 chi2MatrixAft[0](5,0) = 0.;
1828 chi2MatrixAft[0](5,1) = 0.;
1829 chi2MatrixAft[0](5,2) = 0.;
1830 chi2MatrixAft[0](5,3) = 0.;
1831 chi2MatrixAft[0](5,4) = -0.2543541;
1832 chi2MatrixAft[0](5,5) = 0.6714465;
1833 chi2MatrixAft[0](5,6) = -0.2898025;
1834 chi2MatrixAft[0](5,7) = -0.2193564;
1835 chi2MatrixAft[0](5,8) = -0.1542964;
1836 chi2MatrixAft[0](5,9) = 0.;
1837 chi2MatrixAft[0](6,0) = 0.;
1838 chi2MatrixAft[0](6,1) = 0.;
1839 chi2MatrixAft[0](6,2) = 0.;
1840 chi2MatrixAft[0](6,3) = 0.;
1841 chi2MatrixAft[0](6,4) = -0.2243544;
1842 chi2MatrixAft[0](6,5) = -0.2898025;
1843 chi2MatrixAft[0](6,6) = 0.7443781;
1844 chi2MatrixAft[0](6,7) = -0.1934846;
1845 chi2MatrixAft[0](6,8) = -0.136098;
1846 chi2MatrixAft[0](6,9) = 0.;
1847 chi2MatrixAft[0](7,0) = 0.;
1848 chi2MatrixAft[0](7,1) = 0.;
1849 chi2MatrixAft[0](7,2) = 0.;
1850 chi2MatrixAft[0](7,3) = 0.;
1851 chi2MatrixAft[0](7,4) = -0.1698177;
1852 chi2MatrixAft[0](7,5) = -0.2193564;
1853 chi2MatrixAft[0](7,6) = -0.1934846;
1854 chi2MatrixAft[0](7,7) = 0.8535482;
1855 chi2MatrixAft[0](7,8) = -0.1030149;
1856 chi2MatrixAft[0](7,9) = 0.;
1857 chi2MatrixAft[0](8,0) = 0.;
1858 chi2MatrixAft[0](8,1) = 0.;
1859 chi2MatrixAft[0](8,2) = 0.;
1860 chi2MatrixAft[0](8,3) = 0.;
1861 chi2MatrixAft[0](8,4) = -0.1194506;
1862 chi2MatrixAft[0](8,5) = -0.1542964;
1863 chi2MatrixAft[0](8,6) = -0.136098;
1864 chi2MatrixAft[0](8,7) = -0.1030149;
1865 chi2MatrixAft[0](8,8) = 0.9275388;
1866 chi2MatrixAft[0](8,9) = 0.;
1867 chi2MatrixAft[0](9,0) = 0.;
1868 chi2MatrixAft[0](9,1) = 0.;
1869 chi2MatrixAft[0](9,2) = 0.;
1870 chi2MatrixAft[0](9,3) = 0.;
1871 chi2MatrixAft[0](9,4) = 0.;
1872 chi2MatrixAft[0](9,5) = 0.;
1873 chi2MatrixAft[0](9,6) = 0.;
1874 chi2MatrixAft[0](9,7) = 0.;
1875 chi2MatrixAft[0](9,8) = 0.;
1876 chi2MatrixAft[0](9,9) = 0.;
1878 else if (getWeightsFromFile_)
1884 while (!chi2MatrixAftFile.eof() && tdcBin < nTDCbins_)
1887 for(
int j = 0;
j < 10; ++
j) {
1888 for(
int l = 0;
l < 10; ++
l) {
1890 chi2MatrixAftFile >> ww;
1891 chi2MatrixAft[tdcBin](
j,
l)=ww;
1896 assert (tdcBin == nTDCbins_);
1901 edm::LogError(
"EcalTrivialConditionRetriever") <<
"Configuration not supported. Exception is raised ";
1908 chi2MatrixAft_ = chi2MatrixAft;
1916 std::auto_ptr<EcalChannelStatus>
1919 std::auto_ptr<EcalChannelStatus> ecalStatus = std::auto_ptr<EcalChannelStatus>(
new EcalChannelStatus() );
1926 if(ieta==0)
continue;
1930 ecalStatus->setValue( ebid, 0 );
1940 ecalStatus->setValue( eedetidpos, 0 );
1944 ecalStatus->setValue( eedetidneg, 0 );
1955 if ( !statusFile.good() ) {
1957 <<
"*** Problems opening file: " << channelStatusFile_ ;
1966 while (!statusFile.eof())
1968 statusFile >> EcalSubDet;
1971 std::getline(statusFile,str);
1976 statusFile>> hashIndex >>
status;
1983 ecalStatus->setValue( ebid, status );
1988 ecalStatus->setValue( eedetid, status );
1993 <<
" *** " << EcalSubDet <<
" is neither EB nor EE ";
2006 std::auto_ptr<EcalChannelStatus>
2010 std::auto_ptr<EcalChannelStatus> ical = std::auto_ptr<EcalChannelStatus>(
new EcalChannelStatus() );
2013 if(ieta==0)
continue;
2017 ical->setValue( ebid, 0 );
2027 ical->setValue( eedetidpos, 0 );
2031 ical->setValue( eedetidneg, 0 );
2039 std::auto_ptr<EcalDQMChannelStatus>
2044 std::auto_ptr<EcalDQMChannelStatus> ical = std::auto_ptr<EcalDQMChannelStatus>(
new EcalDQMChannelStatus() );
2047 if(ieta==0)
continue;
2051 ical->setValue( ebid, sta );
2061 ical->setValue( eedetidpos, sta );
2065 ical->setValue( eedetidneg, sta );
2073 std::auto_ptr<EcalDQMTowerStatus>
2077 std::auto_ptr<EcalDQMTowerStatus> ical = std::auto_ptr<EcalDQMTowerStatus>(
new EcalDQMTowerStatus() );
2083 for(
int k=0 ;
k<2;
k++ ) {
2086 for(
int i=1 ;
i<73;
i++) {
2087 for(
int j=1 ;
j<18;
j++) {
2091 ical->setValue( ebid, sta );
2099 for(
int k=0 ;
k<2;
k++ ) {
2102 for(
int i=1 ;
i<21;
i++) {
2103 for(
int j=1 ;
j<21;
j++) {
2106 ical->setValue( eeid, sta );
2116 std::auto_ptr<EcalDCSTowerStatus>
2120 std::auto_ptr<EcalDCSTowerStatus> ical = std::auto_ptr<EcalDCSTowerStatus>(
new EcalDCSTowerStatus() );
2126 for(
int k=0 ;
k<2;
k++ ) {
2129 for(
int i=1 ;
i<73;
i++) {
2130 for(
int j=1 ;
j<18;
j++) {
2134 ical->setValue( ebid, status );
2142 for(
int k=0 ;
k<2;
k++ ) {
2145 for(
int i=1 ;
i<21;
i++) {
2146 for(
int j=1 ;
j<21;
j++) {
2149 ical->setValue( eeid, status );
2159 std::auto_ptr<EcalDAQTowerStatus>
2163 std::auto_ptr<EcalDAQTowerStatus> ical = std::auto_ptr<EcalDAQTowerStatus>(
new EcalDAQTowerStatus() );
2169 for(
int k=0 ;
k<2;
k++ ) {
2172 for(
int i=1 ;
i<73;
i++) {
2173 for(
int j=1 ;
j<18;
j++) {
2177 ical->setValue( ebid, status );
2185 for(
int k=0 ;
k<2;
k++ ) {
2188 for(
int i=1 ;
i<21;
i++) {
2189 for(
int j=1 ;
j<21;
j++) {
2192 ical->setValue( eeid, status );
2202 std::auto_ptr<EcalTPGCrystalStatus>
2205 std::auto_ptr<EcalTPGCrystalStatus> ecalStatus = std::auto_ptr<EcalTPGCrystalStatus>(
new EcalTPGCrystalStatus() );
2212 if(ieta==0)
continue;
2216 ecalStatus->setValue( ebid, 0 );
2226 ecalStatus->setValue( eedetidpos, 0 );
2230 ecalStatus->setValue( eedetidneg, 0 );
2241 if ( !statusFile.good() ) {
2243 <<
"*** Problems opening file: " << channelStatusFile_ ;
2252 while (!statusFile.eof())
2254 statusFile >> EcalSubDet;
2257 std::getline(statusFile,str);
2262 statusFile>> hashIndex >>
status;
2269 ecalStatus->setValue( ebid, status );
2274 ecalStatus->setValue( eedetid, status );
2279 <<
" *** " << EcalSubDet <<
" is neither EB nor EE ";
2292 std::auto_ptr<EcalTPGCrystalStatus>
2296 std::auto_ptr<EcalTPGCrystalStatus> ical = std::auto_ptr<EcalTPGCrystalStatus>(
new EcalTPGCrystalStatus() );
2299 if(ieta==0)
continue;
2303 ical->setValue( ebid, 0 );
2313 ical->setValue( eedetidpos, 0 );
2317 ical->setValue( eedetidneg, 0 );
2327 std::auto_ptr<EcalIntercalibConstants>
2331 std::auto_ptr<EcalIntercalibConstants> ical;
2337 edm::LogInfo(
"EcalTrivialConditionRetriever") <<
"Reading intercalibration constants from file "
2338 << intercalibConstantsFile_.c_str() ;
2340 if(intercalibConstantsFile_.find(
".xml")!= std::string::npos) {
2342 std::cout<<
"generating Intercalib from xml file"<<std::endl;
2349 if(totLumi_ !=0 || instLumi_!=0) {
2350 std::cout<<
"implementing ageing for intercalib"<<std::endl;
2354 if(intercalibConstantsMCFile_.find(
".xml")!= std::string::npos) {
2356 std::cout<<
"generating IntercalibMC from xml file"<<std::endl;
2362 std::cout<<
"please provide the xml file of the EcalIntercalibConstantsMC"<<std::endl;
2366 TRandom3 * gRandom =
new TRandom3();
2377 if(ieta==0)
continue;
2382 std::cout<<
"EB at eta="<<eta<<
" constant term is "<<constantTerm<<std::endl;
2391 if(idref!=mymap.
end())icalconstant=(*idref);
2395 if(idrefMC!=mymapMC.
end())icalconstantMC=(*idrefMC);
2397 double r = gRandom->Gaus(0,constantTerm);
2399 if(iphi==10)
std::cout<<
"EB at eta="<<eta<<
" IC="<<icalconstant<<
" ICMC="<<icalconstantMC<<
" smear="<<r<<
" ";
2401 icalconstant = icalconstant + r*1.29*icalconstantMC;
2404 if(iphi==10)
std::cout<<
"newIC="<<icalconstant<<std::endl;
2407 if(icalconstant !=icalconstant2)
std::cout<<
">>>> error in smearing intercalib"<<std::endl;
2419 double eta= -
log(
tan(0.5*atan(
sqrt((iX-50.0)*(iX-50.0)+(iY-50.0)*(iY-50.0))*2.98/328.)));
2422 if(iX==50)
std::cout<<
"EE at eta="<<eta<<
" constant term is "<<constantTerm<<std::endl;
2429 if(idref!=mymap.
end())icalconstant=(*idref);
2433 if(idrefMC!=mymapMC.
end())icalconstantMC=(*idrefMC);
2435 double r = gRandom->Gaus(0,constantTerm);
2437 if(iX==10)
std::cout<<
"EE at eta="<<eta<<
" IC="<<icalconstant<<
" ICMC="<<icalconstantMC<<
" smear="<<r<<
" ";
2438 icalconstant = icalconstant + r*1.29*icalconstantMC;
2440 if(iX==10)
std::cout<<
"newIC="<<icalconstant<<std::endl;
2449 double eta= -
log(
tan(0.5*atan(
sqrt((iX-50.0)*(iX-50.0)+(iY-50.0)*(iY-50.0))*2.98/328.)));
2457 if(idrefMC!=mymapMC.
end())icalconstantMC=(*idrefMC);
2459 double r = gRandom->Gaus(0,constantTerm);
2460 icalconstant = icalconstant + r*1.29*icalconstantMC;
2468 ical = std::auto_ptr<EcalIntercalibConstants> (rcd);
2480 inpFile = fopen (intercalibConstantsFile_.c_str (),
"r") ;
2484 <<
"*** Can not open file: " << intercalibConstantsFile_ ;
2485 throw cms::Exception (
"Cannot open inter-calibration coefficients txt file") ;
2489 std::ostringstream str ;
2490 fgets (line,255,inpFile) ;
2491 int sm_number=atoi (line) ;
2492 str <<
"sm: " << sm_number ;
2494 fgets (line,255,inpFile) ;
2497 fgets (line,255,inpFile) ;
2499 str <<
"gen tag: " << gen_tag ;
2501 fgets (line,255,inpFile) ;
2503 str <<
"cali method: " << cali_method << std::endl ;
2505 fgets (line,255,inpFile) ;
2507 str <<
"cali version: " << cali_version << std::endl ;
2509 fgets (line,255,inpFile) ;
2511 str <<
"cali type: " << cali_type ;
2514 <<
"[PIETRO] Intercalibration file - "
2515 << str.str () << std::endl ;
2517 float calib[1700]={1} ;
2518 int calib_status[1700]={0} ;
2522 while (fgets (line,255,inpFile))
2526 float dmy_calib = 0. ;
2527 float dmy_RMS = 0. ;
2528 int dmy_events = 0 ;
2529 int dmy_status = 0 ;
2530 sscanf (line,
"%d %f %f %d %d", &dmy_num, &dmy_calib,
2531 &dmy_RMS, &dmy_events,
2534 assert (dmy_num <= 1700) ;
2535 calib[dmy_num-1] = dmy_calib ;
2536 calib_status[dmy_num-1] = dmy_status ;
2548 edm::LogInfo (
"EcalTrivialConditionRetriever") <<
"Read intercalibrations for " << ii <<
" xtals " ;
2550 <<
"Some crystals missing, set to 1" << std::endl ;
2558 for (
int i=0 ;
i<1700 ;
i++)
2569 if (calib_status[
i]) ical->setValue (ebid.
rawId (), calib[
i]) ;
2570 else ical->setValue (ebid.
rawId (), 1.) ;
2585 std::auto_ptr<EcalIntercalibConstantsMC>
2589 std::auto_ptr<EcalIntercalibConstantsMC> ical;
2595 edm::LogInfo(
"EcalTrivialConditionRetriever") <<
"Reading intercalibration constants MC from file "
2596 << intercalibConstantsMCFile_.c_str() ;
2598 if(intercalibConstantsMCFile_.find(
".xml")!= std::string::npos) {
2600 std::cout<<
"generating Intercalib MC from xml file"<<std::endl;
2606 ical = std::auto_ptr<EcalIntercalibConstants> (rcd);
2610 std::cout <<
"ERROR>>> please provide a xml file"<<std::endl;
2619 std::auto_ptr<EcalIntercalibErrors>
2623 std::auto_ptr<EcalIntercalibErrors> ical =
2629 edm::LogInfo(
"EcalTrivialConditionRetriever") <<
"Reading intercalibration constants from file "
2630 << intercalibErrorsFile_.c_str() ;
2633 inpFile = fopen (intercalibErrorsFile_.c_str (),
"r") ;
2637 <<
"*** Can not open file: " << intercalibErrorsFile_ ;
2638 throw cms::Exception (
"Cannot open inter-calibration coefficients txt file") ;
2642 std::ostringstream str ;
2643 fgets (line,255,inpFile) ;
2644 int sm_number=atoi (line) ;
2645 str <<
"sm: " << sm_number ;
2647 fgets (line,255,inpFile) ;
2650 fgets (line,255,inpFile) ;
2652 str <<
"gen tag: " << gen_tag ;
2654 fgets (line,255,inpFile) ;
2656 str <<
"cali method: " << cali_method << std::endl ;
2658 fgets (line,255,inpFile) ;
2660 str <<
"cali version: " << cali_version << std::endl ;
2662 fgets (line,255,inpFile) ;
2664 str <<
"cali type: " << cali_type ;
2667 <<
"[PIETRO] Intercalibration file - "
2668 << str.str () << std::endl ;
2670 float calib[1700]={1} ;
2671 int calib_status[1700]={0} ;
2675 while (fgets (line,255,inpFile))
2679 float dmy_calib = 0. ;
2680 float dmy_RMS = 0. ;
2681 int dmy_events = 0 ;
2682 int dmy_status = 0 ;
2683 sscanf (line,
"%d %f %f %d %d", &dmy_num, &dmy_calib,
2684 &dmy_RMS, &dmy_events,
2687 assert (dmy_num <= 1700) ;
2688 calib[dmy_num-1] = dmy_calib ;
2689 calib_status[dmy_num-1] = dmy_status ;
2701 edm::LogInfo (
"EcalTrivialConditionRetriever") <<
"Read intercalibrations for " << ii <<
" xtals " ;
2703 <<
"Some crystals missing, set to 1" << std::endl ;
2711 for (
int i=0 ;
i<1700 ;
i++)
2722 if (calib_status[
i]) ical->setValue (ebid.
rawId (), calib[
i]) ;
2723 else ical->setValue (ebid.
rawId (), 1.) ;
2740 std::auto_ptr<EcalTimeCalibConstants>
2744 std::auto_ptr<EcalTimeCalibConstants> ical =
2750 edm::LogInfo(
"EcalTrivialConditionRetriever") <<
"Reading time calibration constants from file "
2751 << timeCalibConstantsFile_.c_str() ;
2754 inpFile = fopen (timeCalibConstantsFile_.c_str (),
"r") ;
2758 <<
"*** Can not open file: " << timeCalibConstantsFile_ ;
2759 throw cms::Exception (
"Cannot open inter-calibration coefficients txt file") ;
2763 std::ostringstream str ;
2764 fgets (line,255,inpFile) ;
2765 int sm_number=atoi (line) ;
2766 str <<
"sm: " << sm_number ;
2768 fgets (line,255,inpFile) ;
2771 fgets (line,255,inpFile) ;
2773 str <<
"gen tag: " << gen_tag ;
2775 fgets (line,255,inpFile) ;
2777 str <<
"cali method: " << cali_method << std::endl ;
2779 fgets (line,255,inpFile) ;
2781 str <<
"cali version: " << cali_version << std::endl ;
2783 fgets (line,255,inpFile) ;
2785 str <<
"cali type: " << cali_type ;
2788 <<
"TimeCalibration file - "
2789 << str.str () << std::endl ;
2791 float calib[1700]={1} ;
2792 int calib_status[1700]={0} ;
2796 while (fgets (line,255,inpFile))
2800 float dmy_calib = 0. ;
2801 float dmy_RMS = 0. ;
2802 int dmy_events = 0 ;
2803 int dmy_status = 0 ;
2804 sscanf (line,
"%d %f %f %d %d", &dmy_num, &dmy_calib,
2805 &dmy_RMS, &dmy_events,
2808 assert (dmy_num <= 1700) ;
2809 calib[dmy_num-1] = dmy_calib ;
2810 calib_status[dmy_num-1] = dmy_status ;
2822 edm::LogInfo (
"EcalTrivialConditionRetriever") <<
"Read timeCalibrations for " << ii <<
" xtals " ;
2824 <<
"Some crystals missing, set to 1" << std::endl ;
2832 for (
int i=0 ;
i<1700 ;
i++)
2843 if (calib_status[
i]) ical->setValue (ebid.
rawId (), calib[
i]) ;
2844 else ical->setValue (ebid.
rawId (), 1.) ;
2854 std::auto_ptr<EcalTimeCalibErrors>
2858 std::auto_ptr<EcalTimeCalibErrors> ical =
2864 edm::LogInfo(
"EcalTrivialConditionRetriever") <<
"Reading timeCalibration constants from file "
2865 << timeCalibErrorsFile_.c_str() ;
2868 inpFile = fopen (timeCalibErrorsFile_.c_str (),
"r") ;
2872 <<
"*** Can not open file: " << timeCalibErrorsFile_ ;
2873 throw cms::Exception (
"Cannot open inter-calibration coefficients txt file") ;
2877 std::ostringstream str ;
2878 fgets (line,255,inpFile) ;
2879 int sm_number=atoi (line) ;
2880 str <<
"sm: " << sm_number ;
2882 fgets (line,255,inpFile) ;
2885 fgets (line,255,inpFile) ;
2887 str <<
"gen tag: " << gen_tag ;
2889 fgets (line,255,inpFile) ;
2891 str <<
"cali method: " << cali_method << std::endl ;
2893 fgets (line,255,inpFile) ;
2895 str <<
"cali version: " << cali_version << std::endl ;
2897 fgets (line,255,inpFile) ;
2899 str <<
"cali type: " << cali_type ;
2902 <<
"TimeCalibration file - "
2903 << str.str () << std::endl ;
2905 float calib[1700]={1} ;
2906 int calib_status[1700]={0} ;
2910 while (fgets (line,255,inpFile))
2914 float dmy_calib = 0. ;
2915 float dmy_RMS = 0. ;
2916 int dmy_events = 0 ;
2917 int dmy_status = 0 ;
2918 sscanf (line,
"%d %f %f %d %d", &dmy_num, &dmy_calib,
2919 &dmy_RMS, &dmy_events,
2922 assert (dmy_num <= 1700) ;
2923 calib[dmy_num-1] = dmy_calib ;
2924 calib_status[dmy_num-1] = dmy_status ;
2936 edm::LogInfo (
"EcalTrivialConditionRetriever") <<
"Read time calibrations for " << ii <<
" xtals " ;
2938 <<
"Some crystals missing, set to 1" << std::endl ;
2946 for (
int i=0 ;
i<1700 ;
i++)
2957 if (calib_status[
i]) ical->setValue (ebid.
rawId (), calib[
i]) ;
2958 else ical->setValue (ebid.
rawId (), 1.) ;
2969 std::auto_ptr<EcalMappingElectronics>
2972 std::auto_ptr<EcalMappingElectronics> mapping = std::auto_ptr<EcalMappingElectronics>(
new EcalMappingElectronics() );
2978 edm::LogError(
"EcalTrivialConditionRetriever") <<
"File not found";
2987 int dccid, towerid, pseudostrip_in_SC, xtal_in_pseudostrip;
2988 int tccid, tower, pseudostrip_in_TCC, pseudostrip_in_TT;
2993 f >> ix >> iy >> iz >> CL >> dccid >> towerid >> pseudostrip_in_SC >> xtal_in_pseudostrip >> tccid >> tower >>
2994 pseudostrip_in_TCC >> pseudostrip_in_TT ;
3001 EcalElectronicsId elecid(dccid,towerid, pseudostrip_in_SC, xtal_in_pseudostrip);
3007 (*mapping).setValue(detid, aElement);
3016 std::auto_ptr<EcalMappingElectronics>
3020 std::auto_ptr<EcalMappingElectronics> ical = std::auto_ptr<EcalMappingElectronics>(
new EcalMappingElectronics() );
3026 std::auto_ptr<Alignments>
3028 double mytrans[3] = {0., 0., 0.};
3029 double myeuler[3] = {0., 0., 0.};
3031 if(getEBAlignmentFromFile_)
3033 std::vector<AlignTransform> my_align;
3036 for(
int SM = 1 ; SM < 37; SM++ ) {
3039 iphi = 1 + (SM - 19) * 20;
3045 if(getEBAlignmentFromFile_) {
3046 f >> myeuler[0] >> myeuler[1] >> myeuler[2] >> mytrans[0] >> mytrans[1] >> mytrans[2];
3047 std::cout <<
" translation " << mytrans[0] <<
" " << mytrans[1] <<
" " << mytrans[2] <<
"\n"
3048 <<
" euler " << myeuler[0] <<
" " << myeuler[1] <<
" " << myeuler[2] << std::endl;
3050 CLHEP::Hep3Vector translation( mytrans[0], mytrans[1], mytrans[2]);
3051 CLHEP::HepEulerAngles euler( myeuler[0], myeuler[1], myeuler[2]);
3053 my_align.push_back(transform);
3079 std::auto_ptr<Alignments> ical = std::auto_ptr<Alignments>(
new Alignments(a) );
3083 std::auto_ptr<Alignments>
3085 double mytrans[3] = {0., 0., 0.};
3086 double myeuler[3] = {0., 0., 0.};
3088 if(getEEAlignmentFromFile_)
3090 std::vector<AlignTransform> my_align;
3094 for(
int Dee = 0 ; Dee < 4; Dee++ ) {
3096 if(Dee == 1 || Dee == 3)
3101 EEDetId eedetId(ix, iy, side);
3102 if(getEEAlignmentFromFile_) {
3103 f >> myeuler[0] >> myeuler[1] >> myeuler[2] >> mytrans[0] >> mytrans[1] >> mytrans[2];
3104 std::cout <<
" translation " << mytrans[0] <<
" " << mytrans[1] <<
" " << mytrans[2] <<
"\n"
3105 <<
" euler " << myeuler[0] <<
" " << myeuler[1] <<
" " << myeuler[2] << std::endl;
3107 CLHEP::Hep3Vector translation( mytrans[0], mytrans[1], mytrans[2]);
3108 CLHEP::HepEulerAngles euler( myeuler[0], myeuler[1], myeuler[2]);
3110 my_align.push_back(transform);
3114 std::auto_ptr<Alignments> ical = std::auto_ptr<Alignments>(
new Alignments(a) );
3118 std::auto_ptr<Alignments>
3120 double mytrans[3] = {0., 0., 0.};
3121 double myeuler[3] = {0., 0., 0.};
3123 if(getESAlignmentFromFile_)
3125 std::vector<AlignTransform> my_align;
3127 int pl_vect[10] = {2, 2, 1, 1, 1, 1, 2, 2};
3131 for(
int layer = 0 ; layer < 8; layer++ ) {
3133 int ix = 10 + (layer%2) * 20;
3134 int plane = pl_vect[layer];
3135 if(layer > 3) side = 1;
3136 ESDetId esdetId(strip, ix, iy, plane, side);
3137 if(getESAlignmentFromFile_) {
3138 f >> myeuler[0] >> myeuler[1] >> myeuler[2] >> mytrans[0] >> mytrans[1] >> mytrans[2];
3139 std::cout <<
" translation " << mytrans[0] <<
" " << mytrans[1] <<
" " << mytrans[2] <<
"\n"
3140 <<
" euler " << myeuler[0] <<
" " << myeuler[1] <<
" " << myeuler[2] << std::endl;
3142 CLHEP::Hep3Vector translation( mytrans[0], mytrans[1], mytrans[2]);
3143 CLHEP::HepEulerAngles euler( myeuler[0], myeuler[1], myeuler[2]);
3145 my_align.push_back(transform);
3149 std::auto_ptr<Alignments> ical = std::auto_ptr<Alignments>(
new Alignments(a) );
3153 std::auto_ptr<EcalSampleMask>
3156 return std::auto_ptr<EcalSampleMask>(
new EcalSampleMask(sampleMaskEB_, sampleMaskEE_) );
3159 std::auto_ptr<EcalTimeBiasCorrections>
3161 std::auto_ptr<EcalTimeBiasCorrections> ipar = std::auto_ptr<EcalTimeBiasCorrections>(
new EcalTimeBiasCorrections() );
3162 copy(EBtimeCorrAmplitudeBins_.begin(), EBtimeCorrAmplitudeBins_.end(),
3163 back_inserter(ipar->EBTimeCorrAmplitudeBins));
3164 copy(EBtimeCorrShiftBins_.begin(), EBtimeCorrShiftBins_.end(),
3165 back_inserter(ipar->EBTimeCorrShiftBins));
3166 copy(EEtimeCorrAmplitudeBins_.begin(), EEtimeCorrAmplitudeBins_.end(),
3167 back_inserter(ipar->EETimeCorrAmplitudeBins));
3168 copy(EEtimeCorrShiftBins_.begin(), EEtimeCorrShiftBins_.end(),
3169 back_inserter(ipar->EETimeCorrShiftBins));
3173 std::auto_ptr<EcalSamplesCorrelation>
3175 if(getSamplesCorrelationFromFile_) {
3179 for(
int j = 0;
j < 10; ++
j) {
3181 EBG12samplesCorrelation_.push_back(ww);
3183 for(
int j = 0;
j < 10; ++
j) {
3185 EBG6samplesCorrelation_.push_back(ww);
3187 for(
int j = 0;
j < 10; ++
j) {
3189 EBG1samplesCorrelation_.push_back(ww);
3191 for(
int j = 0;
j < 10; ++
j) {
3193 EEG12samplesCorrelation_.push_back(ww);
3195 for(
int j = 0;
j < 10; ++
j) {
3197 EEG6samplesCorrelation_.push_back(ww);
3199 for(
int j = 0;
j < 10; ++
j) {
3201 EEG1samplesCorrelation_.push_back(ww);
3205 std::auto_ptr<EcalSamplesCorrelation> ipar = std::auto_ptr<EcalSamplesCorrelation>(
new EcalSamplesCorrelation() );
3206 copy(EBG12samplesCorrelation_.begin(), EBG12samplesCorrelation_.end(),
3207 back_inserter(ipar->EBG12SamplesCorrelation));
3208 copy(EBG6samplesCorrelation_.begin(), EBG6samplesCorrelation_.end(),
3209 back_inserter(ipar->EBG6SamplesCorrelation));
3210 copy(EBG1samplesCorrelation_.begin(), EBG1samplesCorrelation_.end(),
3211 back_inserter(ipar->EBG1SamplesCorrelation));
3212 copy(EEG12samplesCorrelation_.begin(), EEG12samplesCorrelation_.end(),
3213 back_inserter(ipar->EEG12SamplesCorrelation));
3214 copy(EEG6samplesCorrelation_.begin(), EEG6samplesCorrelation_.end(),
3215 back_inserter(ipar->EEG6SamplesCorrelation));
3216 copy(EEG1samplesCorrelation_.begin(), EEG1samplesCorrelation_.end(),
3217 back_inserter(ipar->EEG1SamplesCorrelation));
EcalChi2WeightMatrix & getChi2WeightsBeforeGainSwitch()
EcalDAQTowerStatusMap EcalDAQTowerStatus
virtual std::auto_ptr< EcalTimeCalibConstants > produceEcalTimeCalibConstants(const EcalTimeCalibConstantsRcd &)
static bool validDetId(int ix, int iy, int iz)
virtual std::auto_ptr< EcalChannelStatus > produceEcalChannelStatus(const EcalChannelStatusRcd &)
virtual std::auto_ptr< EcalIntercalibConstants > getIntercalibConstantsFromConfiguration(const EcalIntercalibConstantsRcd &)
EcalIntercalibConstantMCMap EcalIntercalibConstantsMC
T getUntrackedParameter(std::string const &, T const &) const
static const int MIN_IPHI
virtual void setIntervalFor(const edm::eventsetup::EventSetupRecordKey &, const edm::IOVSyncValue &, edm::ValidityInterval &)
static Timestamp endOfTime()
virtual std::auto_ptr< EcalClusterCrackCorrParameters > produceEcalClusterCrackCorrParameters(const EcalClusterCrackCorrParametersRcd &)
EcalFunParams EcalClusterCrackCorrParameters
virtual std::auto_ptr< EcalTPGCrystalStatus > produceEcalTrgChannelStatus(const EcalTPGCrystalStatusRcd &)
virtual std::auto_ptr< EcalIntercalibConstantsMC > getIntercalibConstantsMCFromConfiguration(const EcalIntercalibConstantsMCRcd &)
const self & getMap() const
virtual std::auto_ptr< EcalChannelStatus > getChannelStatusFromConfiguration(const EcalChannelStatusRcd &)
Ecal readout channel identification [32:20] Unused (so far) [19:13] DCC id [12:6] tower [5:3] strip [...
virtual std::auto_ptr< EcalTBWeights > produceEcalTBWeights(const EcalTBWeightsRcd &)
virtual std::auto_ptr< EcalMappingElectronics > produceEcalMappingElectronics(const EcalMappingElectronicsRcd &)
tuple batch
Use ROOT's batch mode, unless outputting to C macros, since there is a bug in pyROOT that fails to ex...
virtual std::auto_ptr< EcalTimeBiasCorrections > produceEcalTimeBiasCorrections(const EcalTimeBiasCorrectionsRcd &)
static const IOVSyncValue & endOfTime()
EcalTimeCalibErrorMap EcalTimeCalibErrors
EcalCondObjectContainer< EcalXtalGroupId > EcalWeightXtalGroups
virtual std::auto_ptr< EcalSamplesCorrelation > produceEcalSamplesCorrelation(const EcalSamplesCorrelationRcd &)
EcalLaserAPDPNRatiosRefMap EcalLaserAPDPNRatiosRef
std::pair< Time_t, Time_t > ValidityInterval
void getWeightsFromConfiguration(const edm::ParameterSet &ps)
double calcresolutitonConstantTerm(double eta)
static EEDetId unhashIndex(int hi)
virtual std::auto_ptr< EcalPedestals > produceEcalPedestals(const EcalPedestalsRcd &)
virtual std::auto_ptr< EcalLaserAPDPNRatios > produceEcalLaserAPDPNRatios(const EcalLaserAPDPNRatiosRcd &)
EcalTimeDependentCorrections EcalLinearCorrections
std::vector< AlignTransform > m_align
void setInstLumi(double x)
static int readXML(const std::string &filename, EcalCondHeader &header, EcalFloatCondObjectContainer &record)
virtual std::auto_ptr< EcalLaserAlphas > produceEcalLaserAlphas(const EcalLaserAlphasRcd &)
static bool validDetId(int i, int j)
check if a valid index combination
void setGain12Over6(const float &g)
uint32_t rawId() const
get the raw id
virtual std::auto_ptr< EcalTimeCalibConstants > getTimeCalibConstantsFromConfiguration(const EcalTimeCalibConstantsRcd &)
void setValue(const uint32_t id, const Item &item)
virtual std::auto_ptr< EcalDAQTowerStatus > produceEcalDAQTowerStatus(const EcalDAQTowerStatusRcd &)
T x() const
Cartesian x coordinate.
virtual std::auto_ptr< Alignments > produceEcalAlignmentEE(const EEAlignmentRcd &)
EcalDQMChannelStatusMap EcalDQMChannelStatus
MVATrainerComputer * calib
EcalMappingElectronicsMap EcalMappingElectronics
EcalChannelStatusMap EcalChannelStatus
EcalGainRatioMap EcalGainRatios
virtual std::auto_ptr< EcalADCToGeVConstant > produceEcalADCToGeVConstant(const EcalADCToGeVConstantRcd &)
static const IOVSyncValue & beginOfTime()
virtual std::auto_ptr< EcalClusterLocalContCorrParameters > produceEcalClusterLocalContCorrParameters(const EcalClusterLocalContCorrParametersRcd &)
EcalLaserAlphaMap EcalLaserAlphas
double calcnoiseIncreaseADC(double eta)
EcalDCSTowerStatusMap EcalDCSTowerStatus
EcalDQMTowerStatusMap EcalDQMTowerStatus
virtual std::auto_ptr< EcalWeightXtalGroups > produceEcalWeightXtalGroups(const EcalWeightXtalGroupsRcd &)
const char * name() const
virtual std::auto_ptr< EcalIntercalibErrors > getIntercalibErrorsFromConfiguration(const EcalIntercalibErrorsRcd &)
virtual std::auto_ptr< Alignments > produceEcalAlignmentEB(const EBAlignmentRcd &)
Tan< T >::type tan(const T &t)
EcalTPGCrystalStatusMap EcalTPGCrystalStatus
Abs< T >::type abs(const T &t)
EcalChi2WeightMatrix & getChi2WeightsAfterGainSwitch()
virtual std::auto_ptr< EcalDQMTowerStatus > produceEcalDQMTowerStatus(const EcalDQMTowerStatusRcd &)
EcalFunParams EcalClusterEnergyCorrectionObjectSpecificParameters
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
virtual std::auto_ptr< EcalClusterEnergyUncertaintyParameters > produceEcalClusterEnergyUncertaintyParameters(const EcalClusterEnergyUncertaintyParametersRcd &)
virtual std::auto_ptr< EcalMappingElectronics > getMappingFromConfiguration(const EcalMappingElectronicsRcd &)
virtual std::auto_ptr< EcalIntercalibErrors > produceEcalIntercalibErrors(const EcalIntercalibErrorsRcd &)
virtual std::auto_ptr< EcalTimeCalibErrors > produceEcalTimeCalibErrors(const EcalTimeCalibErrorsRcd &)
virtual std::auto_ptr< EcalTPGCrystalStatus > getTrgChannelStatusFromConfiguration(const EcalTPGCrystalStatusRcd &)
virtual std::auto_ptr< EcalClusterEnergyCorrectionParameters > produceEcalClusterEnergyCorrectionParameters(const EcalClusterEnergyCorrectionParametersRcd &)
virtual ~EcalTrivialConditionRetriever()
virtual std::auto_ptr< EcalSampleMask > produceEcalSampleMask(const EcalSampleMaskRcd &)
EcalWeightMatrix & getWeightsAfterGainSwitch()
EcalIntercalibErrorMap EcalIntercalibErrors
math::Matrix< 10, 10 >::type EcalChi2WeightMatrix
EcalFunParams EcalClusterEnergyUncertaintyParameters
virtual std::auto_ptr< EcalDCSTowerStatus > produceEcalDCSTowerStatus(const EcalDCSTowerStatusRcd &)
static void check(Principal const &p, std::string const &id, edm::ModuleCallingContext const *mcc)
virtual std::auto_ptr< EcalIntercalibConstants > produceEcalIntercalibConstants(const EcalIntercalibConstantsRcd &)
virtual std::auto_ptr< EcalIntercalibConstantsMC > produceEcalIntercalibConstantsMC(const EcalIntercalibConstantsMCRcd &)
EcalPedestalsMap EcalPedestals
static const int MAX_IPHI
EcalWeightMatrix & getWeightsBeforeGainSwitch()
EcalTimeCalibConstantMap EcalTimeCalibConstants
static bool validDetId(int crystal_ix, int crystal_iy, int iz)
EcalTrivialConditionRetriever(const edm::ParameterSet &pset)
std::vector< Item >::const_iterator const_iterator
static const int MAX_IETA
virtual std::auto_ptr< EcalLaserAPDPNRatiosRef > produceEcalLaserAPDPNRatiosRef(const EcalLaserAPDPNRatiosRefRcd &)
EcalFunParams EcalClusterLocalContCorrParameters
static EBDetId unhashIndex(int hi)
get a DetId from a compact index for arrays
EcalIntercalibConstantMap EcalIntercalibConstants
static bool validDetId(int iz, EcalSubdetector sd, int i, int j)
check if a valid index combination
EcalFunParams EcalClusterEnergyCorrectionParameters
const_iterator find(uint32_t rawId) const
math::Matrix< 3, 10 >::type EcalWeightMatrix
virtual std::auto_ptr< Alignments > produceEcalAlignmentES(const ESAlignmentRcd &)
virtual std::auto_ptr< EcalTimeCalibErrors > getTimeCalibErrorsFromConfiguration(const EcalTimeCalibErrorsRcd &)
const Timestamp & time() const
virtual std::auto_ptr< EcalTimeOffsetConstant > produceEcalTimeOffsetConstant(const EcalTimeOffsetConstantRcd &)
virtual std::auto_ptr< EcalClusterEnergyCorrectionObjectSpecificParameters > produceEcalClusterEnergyCorrectionObjectSpecificParameters(const EcalClusterEnergyCorrectionObjectSpecificParametersRcd &)
virtual std::auto_ptr< EcalLinearCorrections > produceEcalLinearCorrections(const EcalLinearCorrectionsRcd &)
const_iterator end() const
float EcalIntercalibConstantMC
std::string fullPath() const
virtual std::auto_ptr< EcalDQMChannelStatus > produceEcalDQMChannelStatus(const EcalDQMChannelStatusRcd &)
static const int SMCRYSTALMODE
double calcampDropTotal(double eta)
virtual std::auto_ptr< EcalGainRatios > produceEcalGainRatios(const EcalGainRatiosRcd &)
TimeValue_t value() const
Ecal trigger electronics identification [32:20] Unused (so far) [19:13] TCC id [12:6] TT id [5:3] pse...
tuple size
Write out results.
float EcalIntercalibConstant