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>() );
112 std::cout <<
" EcalTrivialConditionRetriever " << std::endl;
118 std::cout <<
" EcalTrivialConditionRetriever going to create conditions based on the damage deu to "<<totLumi_<<
119 " fb-1 integrated luminosity" << std::endl;
123 if (weightsForAsynchronousRunning_)
125 getWeightsFromFile_ =
true;
132 std::ostringstream str;
134 if (!weightsForAsynchronousRunning_)
139 weightType = str.str();
150 amplWeights_.resize(nTDCbins_);
151 amplWeightsAft_.resize(nTDCbins_);
152 pedWeights_.resize(nTDCbins_);
153 pedWeightsAft_.resize(nTDCbins_);
154 jittWeights_.resize(nTDCbins_);
155 jittWeightsAft_.resize(nTDCbins_);
156 chi2Matrix_.resize(nTDCbins_);
157 chi2MatrixAft_.resize(nTDCbins_);
160 getWeightsFromConfiguration(ps);
168 producedEcalMappingElectronics_ = ps.
getUntrackedParameter<
bool>(
"producedEcalMappingElectronics",
true);
171 if ( producedEcalMappingElectronics_ ) {
172 if ( mappingFile_ !=
"" ) {
177 findingRecord<EcalMappingElectronicsRcd>();
181 if(getEBAlignmentFromFile_) {
186 if(getEEAlignmentFromFile_) {
191 if(getESAlignmentFromFile_)
198 if (producedEcalPedestals_)
201 if (producedEcalWeights_) {
206 if (producedEcalGainRatios_)
209 if (producedEcalADCToGeVConstant_)
213 producedEcalTimeOffsetConstant_ = ps.
getUntrackedParameter<
bool>(
"producedEcalTimeOffsetConstant",
true);
215 if (producedEcalTimeOffsetConstant_) {
217 findingRecord<EcalTimeOffsetConstantRcd>();
221 producedEcalLinearCorrections_ = ps.
getUntrackedParameter<
bool>(
"producedEcalLinearCorrections",
true);
224 if (producedEcalLinearCorrections_) {
225 if(linearCorrectionsFile_ !=
"") {
230 findingRecord<EcalLinearCorrectionsRcd> () ;
236 producedEcalIntercalibConstants_ = ps.
getUntrackedParameter<
bool>(
"producedEcalIntercalibConstants",
true);
241 if (producedEcalIntercalibConstants_) {
242 if(intercalibConstantsFile_ !=
"") {
247 findingRecord<EcalIntercalibConstantsRcd> () ;
250 producedEcalIntercalibConstantsMC_ = ps.
getUntrackedParameter<
bool>(
"producedEcalIntercalibConstantsMC",
true);
252 if (producedEcalIntercalibConstantsMC_) {
253 if(intercalibConstantsMCFile_ !=
"") {
258 findingRecord<EcalIntercalibConstantsMCRcd> () ;
265 if (producedEcalIntercalibErrors_) {
266 if(intercalibErrorsFile_ !=
"") {
271 findingRecord<EcalIntercalibErrorsRcd> () ;
275 producedEcalTimeCalibConstants_ = ps.
getUntrackedParameter<
bool>(
"producedEcalTimeCalibConstants",
true);
278 if (producedEcalTimeCalibConstants_) {
279 if(timeCalibConstantsFile_ !=
"") {
284 findingRecord<EcalTimeCalibConstantsRcd> () ;
291 if (producedEcalTimeCalibErrors_) {
292 if(timeCalibErrorsFile_ !=
"") {
297 findingRecord<EcalTimeCalibErrorsRcd> () ;
301 producedEcalClusterLocalContCorrParameters_ = ps.
getUntrackedParameter<
bool>(
"producedEcalClusterLocalContCorrParameters",
false);
302 producedEcalClusterCrackCorrParameters_ = ps.
getUntrackedParameter<
bool>(
"producedEcalClusterCrackCorrParameters",
false);
303 producedEcalClusterEnergyCorrectionParameters_ = ps.
getUntrackedParameter<
bool>(
"producedEcalClusterEnergyCorrectionParameters",
false);
304 producedEcalClusterEnergyUncertaintyParameters_ = ps.
getUntrackedParameter<
bool>(
"producedEcalClusterEnergyUncertaintyParameters",
false);
305 producedEcalClusterEnergyCorrectionObjectSpecificParameters_ = ps.
getUntrackedParameter<
bool>(
"producedEcalClusterEnergyCorrectionObjectSpecificParameters",
false);
306 if ( producedEcalClusterLocalContCorrParameters_ ) {
308 findingRecord<EcalClusterLocalContCorrParametersRcd>();
310 if ( producedEcalClusterCrackCorrParameters_ ) {
312 findingRecord<EcalClusterCrackCorrParametersRcd>();
314 if ( producedEcalClusterEnergyCorrectionParameters_ ) {
316 findingRecord<EcalClusterEnergyCorrectionParametersRcd>();
318 if ( producedEcalClusterEnergyUncertaintyParameters_ ) {
320 findingRecord<EcalClusterEnergyUncertaintyParametersRcd>();
322 if ( producedEcalClusterEnergyCorrectionObjectSpecificParameters_ ) {
324 findingRecord<EcalClusterEnergyCorrectionObjectSpecificParametersRcd>();
329 if (producedEcalLaserCorrection_) {
332 findingRecord<EcalLaserAlphasRcd> () ;
334 std::cout <<
" getLaserAlphaFromFile_ " << getLaserAlphaFromFile_ << std::endl;
335 if(getLaserAlphaFromFile_) {
338 std::cout <<
" EELaserAlphaFile_ " << EELaserAlphaFile_.c_str() << std::endl;
341 findingRecord<EcalLaserAPDPNRatiosRefRcd> () ;
343 findingRecord<EcalLaserAPDPNRatiosRcd> () ;
350 if ( producedEcalChannelStatus_ ) {
351 if ( channelStatusFile_ !=
"" ) {
356 findingRecord<EcalChannelStatusRcd>();
360 if ( producedEcalDQMChannelStatus_ ) {
362 findingRecord<EcalDQMChannelStatusRcd>();
366 if ( producedEcalDCSTowerStatus_ ) {
368 findingRecord<EcalDCSTowerStatusRcd>();
372 if ( producedEcalDAQTowerStatus_ ) {
374 findingRecord<EcalDAQTowerStatusRcd>();
378 if ( producedEcalDQMTowerStatus_ ) {
380 findingRecord<EcalDQMTowerStatusRcd>();
387 if ( producedEcalTrgChannelStatus_ ) {
388 if ( trgChannelStatusFile_ !=
"" ) {
393 findingRecord<EcalTPGCrystalStatusRcd>();
398 if ( producedEcalAlignmentEB_ ) {
400 findingRecord<EBAlignmentRcd>();
403 if ( producedEcalAlignmentEE_ ) {
405 findingRecord<EEAlignmentRcd>();
408 if ( producedEcalAlignmentES_ ) {
410 findingRecord<ESAlignmentRcd>();
413 if (producedEcalPedestals_) findingRecord<EcalPedestalsRcd>();
415 if (producedEcalWeights_) {
416 findingRecord<EcalWeightXtalGroupsRcd>();
417 findingRecord<EcalTBWeightsRcd>();
420 if (producedEcalGainRatios_) findingRecord<EcalGainRatiosRcd>();
422 if (producedEcalADCToGeVConstant_) findingRecord<EcalADCToGeVConstantRcd>();
425 if (producedEcalSampleMask_) {
427 findingRecord<EcalSampleMaskRcd>();
429 producedEcalTimeBiasCorrections_ = ps.
getUntrackedParameter<
bool>(
"producedEcalTimeBiasCorrections",
false);
430 if (producedEcalTimeBiasCorrections_) {
432 findingRecord<EcalTimeBiasCorrectionsRcd>();
448 if(verbose_>=1)
std::cout <<
"EcalTrivialConditionRetriever::setIntervalFor(): record key = " << rk.
name() <<
"\ttime: " << iTime.
time().
value() << std::endl;
454 std::auto_ptr<EcalPedestals>
456 std::auto_ptr<EcalPedestals> peds = std::auto_ptr<EcalPedestals>(
new EcalPedestals() );
461 EBitem.rms_x1 = EBpedRMSX1_;
462 EBitem.mean_x6 = EBpedMeanX6_;
463 EBitem.rms_x6 = EBpedRMSX6_;
464 EBitem.mean_x12 = EBpedMeanX12_;
465 EBitem.rms_x12 = EBpedRMSX12_;
468 EEitem.
rms_x1 = EEpedRMSX1_;
470 EEitem.
rms_x6 = EEpedRMSX6_;
479 if(iEta==0)
continue;
491 EBitem.rms_x1 = EBpedRMSX1_*noisefactor;
492 EBitem.rms_x6 = EBpedRMSX6_*noisefactor;
493 EBitem.rms_x12 = EBpedRMSX12_*noisefactor;
494 std::cout <<
"rms ped at eta:"<< eta<<
" ="<< EBitem.rms_x12 << std::endl;
504 peds->insert(std::make_pair(ebdetid.
rawId(),EBitem));
515 peds->insert(std::make_pair(eedetidpos.
rawId(),EEitem));
520 peds->insert(std::make_pair(eedetidneg.
rawId(),EEitem));
531 std::auto_ptr<EcalWeightXtalGroups>
534 std::auto_ptr<EcalWeightXtalGroups> xtalGroups = std::auto_ptr<EcalWeightXtalGroups>(
new EcalWeightXtalGroups() );
537 if(ieta==0)
continue;
544 xtalGroups->setValue(ebid.
rawId(), defaultGroupId );
555 xtalGroups->setValue(eedetidpos.
rawId(), defaultGroupId );
560 xtalGroups->setValue(eedetidneg.
rawId(), defaultGroupId );
568 std::auto_ptr<EcalLinearCorrections>
571 std::auto_ptr<EcalLinearCorrections> ical = std::auto_ptr<EcalLinearCorrections>(
new EcalLinearCorrections() );
574 if(ieta==0)
continue;
578 double r = (double)
std::rand()/( double(RAND_MAX)+double(1) );
581 pairAPDPN.
p1 = linCorrMean_ + r*linCorrSigma_;
582 pairAPDPN.
p2 = linCorrMean_ + r*linCorrSigma_;
583 pairAPDPN.
p3 = linCorrMean_ + r*linCorrSigma_;
584 ical->setValue( ebid, pairAPDPN );
593 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_;
601 ical->setValue( eedetidpos, pairAPDPN );
605 double r1 = (double)
std::rand()/( double(RAND_MAX)+double(1) );
609 pairAPDPN.
p1 = linCorrMean_ + r1*linCorrSigma_;
610 pairAPDPN.
p2 = linCorrMean_ + r1*linCorrSigma_;
611 pairAPDPN.
p3 = linCorrMean_ + r1*linCorrSigma_;
613 ical->setValue( eedetidneg, pairAPDPN );
620 for(
int i=0;
i<92;
i++){
622 if(linearTime2_ == 0 ){
627 if(linearTime3_ == 0 ){
633 ical->setTime(
i, TimeStamp );
642 std::auto_ptr<EcalIntercalibConstants>
645 std::auto_ptr<EcalIntercalibConstants> ical = std::auto_ptr<EcalIntercalibConstants>(
new EcalIntercalibConstants() );
648 if(ieta==0)
continue;
654 double r = (double)
std::rand()/( double(RAND_MAX)+double(1) );
655 ical->setValue( ebid.
rawId(), intercalibConstantMean_ + r*intercalibConstantSigma_ );
665 double r = (double)
std::rand()/( double(RAND_MAX)+double(1) );
667 ical->setValue( eedetidpos.
rawId(), intercalibConstantMean_ + r*intercalibConstantSigma_ );
671 double r1 = (double)
std::rand()/( double(RAND_MAX)+double(1) );
673 ical->setValue( eedetidneg.
rawId(), intercalibConstantMean_ + r1*intercalibConstantSigma_ );
681 std::auto_ptr<EcalIntercalibConstantsMC>
684 std::auto_ptr<EcalIntercalibConstantsMC> ical = std::auto_ptr<EcalIntercalibConstantsMC>(
new EcalIntercalibConstantsMC() );
687 if(ieta==0)
continue;
693 double r = (double)
std::rand()/( double(RAND_MAX)+double(1) );
694 ical->setValue( ebid.
rawId(), intercalibConstantMeanMC_ + r*intercalibConstantSigmaMC_ );
704 double r = (double)
std::rand()/( double(RAND_MAX)+double(1) );
706 ical->setValue( eedetidpos.
rawId(), intercalibConstantMeanMC_ + r*intercalibConstantSigmaMC_ );
710 double r1 = (double)
std::rand()/( double(RAND_MAX)+double(1) );
712 ical->setValue( eedetidneg.
rawId(), intercalibConstantMeanMC_ + r1*intercalibConstantSigmaMC_ );
720 std::auto_ptr<EcalIntercalibErrors>
723 std::auto_ptr<EcalIntercalibErrors> ical = std::auto_ptr<EcalIntercalibErrors>(
new EcalIntercalibErrors() );
726 if(ieta==0)
continue;
732 ical->setValue( ebid.
rawId(), intercalibErrorMean_);
743 ical->setValue( eedetidpos.
rawId(), intercalibErrorMean_ );
748 ical->setValue( eedetidneg.
rawId(), intercalibErrorMean_ );
756 std::auto_ptr<EcalTimeCalibConstants>
759 std::auto_ptr<EcalTimeCalibConstants> ical = std::auto_ptr<EcalTimeCalibConstants>(
new EcalTimeCalibConstants() );
762 if(ieta==0)
continue;
768 double r = (double)
std::rand()/( double(RAND_MAX)+double(1) );
769 ical->setValue( ebid.
rawId(), timeCalibConstantMean_ + r*timeCalibConstantSigma_ );
779 double r = (double)
std::rand()/( double(RAND_MAX)+double(1) );
781 ical->setValue( eedetidpos.
rawId(), timeCalibConstantMean_ + r*timeCalibConstantSigma_ );
785 double r1 = (double)
std::rand()/( double(RAND_MAX)+double(1) );
787 ical->setValue( eedetidneg.
rawId(), timeCalibConstantMean_ + r1*timeCalibConstantSigma_ );
795 std::auto_ptr<EcalTimeCalibErrors>
798 std::auto_ptr<EcalTimeCalibErrors> ical = std::auto_ptr<EcalTimeCalibErrors>(
new EcalTimeCalibErrors() );
801 if(ieta==0)
continue;
807 ical->setValue( ebid.
rawId(), timeCalibErrorMean_);
818 ical->setValue( eedetidpos.
rawId(), timeCalibErrorMean_ );
823 ical->setValue( eedetidneg.
rawId(), timeCalibErrorMean_ );
831 std::auto_ptr<EcalTimeOffsetConstant>
834 std::cout <<
" produceEcalTimeOffsetConstant: " << std::endl;
835 std::cout <<
" EB " << timeOffsetEBConstant_ <<
" EE " << timeOffsetEEConstant_<< std::endl;
836 return std::auto_ptr<EcalTimeOffsetConstant>(
new EcalTimeOffsetConstant(timeOffsetEBConstant_,timeOffsetEEConstant_) );
839 std::auto_ptr<EcalGainRatios>
842 std::auto_ptr<EcalGainRatios> gratio = std::auto_ptr<EcalGainRatios>(
new EcalGainRatios() );
845 gr.setGain6Over1( gainRatio6over1_ );
848 if(ieta==0)
continue;
853 gratio->setValue( ebid.
rawId(), gr );
864 gratio->setValue( eedetidpos.
rawId(), gr );
869 gratio->setValue( eedetidneg.
rawId(), gr );
877 std::auto_ptr<EcalADCToGeVConstant>
880 return std::auto_ptr<EcalADCToGeVConstant>(
new EcalADCToGeVConstant(adcToGeVEBConstant_,adcToGeVEEConstant_) );
883 std::auto_ptr<EcalTBWeights>
887 std::auto_ptr<EcalTBWeights> tbwgt = std::auto_ptr<EcalTBWeights>(
new EcalTBWeights() );
894 for(
int itdc=1; itdc<=nTDCbins_; ++itdc) {
925 mat1.Place_in_row(amplWeights_[itdc-1],0,0);
926 mat1.Place_in_row(pedWeights_[itdc-1],1,0);
927 mat1.Place_in_row(jittWeights_[itdc-1],2,0);
930 mat2.Place_in_row(amplWeightsAft_[itdc-1],0,0);
931 mat2.Place_in_row(pedWeightsAft_[itdc-1],1,0);
932 mat2.Place_in_row(jittWeightsAft_[itdc-1],2,0);
938 mat3=chi2Matrix_[itdc-1];
939 mat4=chi2MatrixAft_[itdc-1];
964 tbwgt->setValue(std::make_pair(igrp,itdc), wgt);
972 std::auto_ptr<EcalClusterLocalContCorrParameters>
976 for (
size_t i = 0;
i < localContCorrParameters_.size(); ++
i ) {
977 ipar->params().push_back( localContCorrParameters_[
i] );
981 std::auto_ptr<EcalClusterCrackCorrParameters>
985 for (
size_t i = 0;
i < crackCorrParameters_.size(); ++
i ) {
986 ipar->params().push_back( crackCorrParameters_[
i] );
990 std::auto_ptr<EcalClusterEnergyCorrectionParameters>
994 for (
size_t i = 0;
i < energyCorrectionParameters_.size(); ++
i ) {
995 ipar->params().push_back( energyCorrectionParameters_[
i] );
999 std::auto_ptr<EcalClusterEnergyUncertaintyParameters>
1003 for (
size_t i = 0;
i < energyUncertaintyParameters_.size(); ++
i ) {
1004 ipar->params().push_back( energyUncertaintyParameters_[
i] );
1008 std::auto_ptr<EcalClusterEnergyCorrectionObjectSpecificParameters>
1012 for (
size_t i = 0;
i < energyCorrectionObjectSpecificParameters_.size(); ++
i ) {
1013 ipar->params().push_back( energyCorrectionObjectSpecificParameters_[
i] );
1020 std::auto_ptr<EcalLaserAlphas>
1024 std::cout <<
" produceEcalLaserAlphas " << std::endl;
1025 std::auto_ptr<EcalLaserAlphas> ical = std::auto_ptr<EcalLaserAlphas>(
new EcalLaserAlphas() );
1026 if(getLaserAlphaFromFile_) {
1028 int SMpos[36] = {-10, 4, -7, -16, 6, -9, 11, -17, 5, 18, 3, -8, 1, -3, -13, 14, -6, 2,
1029 15, -18, 8, 17, -2, 9, -1, 10, -5, 7, -12, -11, 16, -4, -15, -14, 12, 13};
1031 int SMCal[36] = {12,17,10, 1, 8, 4,27,20,23,25, 6,34,35,15,18,30,21, 9,
1032 24,22,13,31,26,16, 2,11, 5, 0,29,28,14,33,32, 3, 7,19};
1039 for(
int SMcons = 0; SMcons < 36; SMcons++) {
1040 int SM = SMpos[SMcons];
1041 if(SM < 0) SM = 17 +
abs(SM);
1043 if(SMCal[SM] != SMcons)
1044 std::cout <<
" SM pb : read SM " << SMcons<<
" SMpos " << SM
1045 <<
" SMCal " << SMCal[SM] << std::endl;
1049 int readSM, pos, bar, bar2;
1051 for(
int SMcons = 0; SMcons < 36; SMcons++) {
1052 int SM = SMpos[SMcons];
1053 for(
int ic = 0; ic < 1700; ic++) {
1054 fEB >> readSM >> pos >> bar >> bar2 >> type >>
batch;
1057 if(readSM != SMcons || pos != ic + 1)
1058 std::cout <<
" barrel read pb read SM " << readSM <<
" const SM " << SMcons
1059 <<
" read pos " << pos <<
" ic " << ic << std::endl;
1060 if(SM < 0) SM = 18 +
abs(SM);
1062 if(bar == 33101 || bar == 30301 )
1064 else if(bar == 33106) {
1068 std::cout <<
" problem with barcode first " << bar <<
" last " << bar2
1069 <<
" read SM " << readSM <<
" read pos " << pos << std::endl;
1073 ical->setValue( ebdetid, alpha );
1079 if(ieta==0)
continue;
1083 double r = (double)
std::rand()/( double(RAND_MAX)+double(1) );
1084 ical->setValue( ebid, laserAlphaMean_ + r*laserAlphaSigma_ );
1090 std::cout <<
" produceEcalLaserAlphas EE" << std::endl;
1091 if(getLaserAlphaFromFile_) {
1093 int check[101][101];
1094 for(
int x = 1;
x < 101;
x++)
1095 for(
int y = 1;
y < 101;
y++)
1097 for(
int crystal = 0; crystal < 14648; crystal++) {
1098 int x,
y ,
z, bid, bar, bar2;
1099 float LY,
alpha = 0;
1100 fEE >> z >> x >> y >> LY >> bid >> bar >> bar2;
1101 if(x < 1 || x > 100 || y < 1 || y > 100)
1102 std::cout <<
" wrong coordinates for barcode " << bar
1103 <<
" x " << x <<
" y " << y <<
" z " << z << std::endl;
1105 if(z == 1) check[
x][
y] = 1;
1106 else check[
x][
y] = 0;
1107 if(bar == 33201 || (bar == 30399 && bar2 < 568))
1109 else if((bar == 33106 && bar2 > 2000 && bar2 < 4669)
1110 || (bar == 30399 && bar2 > 567))
1113 std::cout <<
" problem with barcode " << bar <<
" " << bar2
1114 <<
" x " << x <<
" y " << y <<
" z " << z << std::endl;
1120 ical->setValue( eedetidpos, alpha );
1123 std::cout <<
" problem with EEDetId " <<
" x " << x <<
" y " << y <<
" z " << z << std::endl;
1125 for(
int x = 1;
x < 101;
x++)
1126 for(
int y = 1;
y < 101;
y++)
1127 if(check[
x][
y] == 1)
std::cout <<
" missing x " <<
x <<
" y " <<
y << std::endl;
1134 double r = (double)
std::rand()/( double(RAND_MAX)+double(1) );
1136 ical->setValue( eedetidpos, laserAlphaMean_ + r*laserAlphaSigma_ );
1140 double r1 = (double)
std::rand()/( double(RAND_MAX)+double(1) );
1142 ical->setValue( eedetidneg, laserAlphaMean_ + r1*laserAlphaSigma_ );
1152 std::auto_ptr<EcalLaserAPDPNRatiosRef>
1155 std::auto_ptr<EcalLaserAPDPNRatiosRef> ical = std::auto_ptr<EcalLaserAPDPNRatiosRef>(
new EcalLaserAPDPNRatiosRef() );
1157 if(ieta==0)
continue;
1161 double r = (double)
std::rand()/( double(RAND_MAX)+double(1) );
1162 ical->setValue( ebid, laserAPDPNRefMean_ + r*laserAPDPNRefSigma_ );
1171 double r = (double)
std::rand()/( double(RAND_MAX)+double(1) );
1173 ical->setValue( eedetidpos, laserAPDPNRefMean_ + r*laserAPDPNRefSigma_ );
1177 double r1 = (double)
std::rand()/( double(RAND_MAX)+double(1) );
1179 ical->setValue( eedetidneg, laserAPDPNRefMean_ + r1*laserAPDPNRefSigma_ );
1188 std::auto_ptr<EcalLaserAPDPNRatios>
1196 std::auto_ptr<EcalLaserAPDPNRatios> ical = std::auto_ptr<EcalLaserAPDPNRatios>(
new EcalLaserAPDPNRatios() );
1198 if(ieta==0)
continue;
1206 std::cout<<
"EB at eta="<<eta<<
" dropping by "<<drop<<std::endl;
1211 double r = (double)
std::rand()/( double(RAND_MAX)+double(1) );
1214 pairAPDPN.
p1 = laserAPDPNMean_*drop + r*laserAPDPNSigma_;
1215 pairAPDPN.
p2 = laserAPDPNMean_*drop + r*laserAPDPNSigma_;
1216 pairAPDPN.
p3 = laserAPDPNMean_*drop + r*laserAPDPNSigma_;
1217 ical->setValue( ebid, pairAPDPN );
1231 double r = (double)
std::rand()/( double(RAND_MAX)+double(1) );
1241 if(iX==50)
std::cout<<
"EE at eta="<<eta<<
" dropping by "<<drop<<std::endl;
1245 pairAPDPN.
p1 = laserAPDPNMean_*drop + r*laserAPDPNSigma_;
1246 pairAPDPN.
p2 = laserAPDPNMean_*drop + r*laserAPDPNSigma_;
1247 pairAPDPN.
p3 = laserAPDPNMean_*drop + r*laserAPDPNSigma_;
1248 ical->setValue( eedetidpos, pairAPDPN );
1252 double r1 = (double)
std::rand()/( double(RAND_MAX)+double(1) );
1255 double eta= -
log(
tan(0.5*atan(
sqrt((iX-50.0)*(iX-50.0)+(iY-50.0)*(iY-50.0))*2.98/328.)));
1258 if(iX==50)
std::cout<<
"EE at eta="<<eta<<
" dropping by "<<drop<<std::endl;
1262 pairAPDPN.
p1 = laserAPDPNMean_*drop + r1*laserAPDPNSigma_;
1263 pairAPDPN.
p2 = laserAPDPNMean_*drop + r1*laserAPDPNSigma_;
1264 pairAPDPN.
p3 = laserAPDPNMean_*drop + r1*laserAPDPNSigma_;
1265 ical->setValue( eedetidneg, pairAPDPN );
1272 for(
int i=0;
i<92;
i++){
1274 if(laserAPDPNTime2_ == 0 ){
1279 if(laserAPDPNTime3_ == 0 ){
1285 ical->setTime(
i, TimeStamp );
1296 std::vector < std::vector<double> > amplwgtv(nTDCbins_);
1298 if (!getWeightsFromFile_ && nTDCbins_ == 1)
1300 std::vector<double> vampl;
1302 vampl.push_back( -0.33333 );
1303 vampl.push_back( -0.33333 );
1304 vampl.push_back( -0.33333 );
1305 vampl.push_back( 0. );
1306 vampl.push_back( 0. );
1307 vampl.push_back( 1. );
1308 vampl.push_back( 0. );
1309 vampl.push_back( 0. );
1310 vampl.push_back( 0. );
1311 vampl.push_back( 0. );
1314 else if (getWeightsFromFile_)
1319 while (!amplFile.eof() && tdcBin < nTDCbins_)
1321 for(
int j = 0;
j < 10; ++
j) {
1324 amplwgtv[tdcBin].push_back(ww);
1328 assert (tdcBin == nTDCbins_);
1334 edm::LogError(
"EcalTrivialConditionRetriever") <<
"Configuration not supported. Exception is raised ";
1339 for (
int i=0;
i<nTDCbins_;
i++)
1341 assert(amplwgtv[
i].
size() == 10);
1343 for(std::vector<double>::const_iterator it = amplwgtv[
i].
begin(); it != amplwgtv[
i].end(); ++it)
1345 (amplWeights_[
i])[j]=*it;
1351 std::vector < std::vector<double> > amplwgtvAftGain(nTDCbins_);
1353 if (!getWeightsFromFile_ && nTDCbins_ == 1 )
1355 std::vector<double> vamplAftGain;
1356 vamplAftGain.push_back( 0. );
1357 vamplAftGain.push_back( 0. );
1358 vamplAftGain.push_back( 0. );
1359 vamplAftGain.push_back( 0. );
1360 vamplAftGain.push_back( 0. );
1361 vamplAftGain.push_back( 1. );
1362 vamplAftGain.push_back( 0. );
1363 vamplAftGain.push_back( 0. );
1364 vamplAftGain.push_back( 0. );
1365 vamplAftGain.push_back( 0. );
1366 amplwgtvAftGain[0] = ps.
getUntrackedParameter< std::vector<double> >(
"amplWeightsAftGain", vamplAftGain);
1368 else if (getWeightsFromFile_)
1374 while (!amplFile.eof() && tdcBin < nTDCbins_)
1376 for(
int j = 0;
j < 10; ++
j) {
1379 amplwgtvAftGain[tdcBin].push_back(ww);
1383 assert (tdcBin == nTDCbins_);
1388 edm::LogError(
"EcalTrivialConditionRetriever") <<
"Configuration not supported. Exception is raised ";
1392 for (
int i=0;
i<nTDCbins_;
i++)
1394 assert(amplwgtvAftGain[
i].
size() == 10);
1396 for(std::vector<double>::const_iterator it = amplwgtvAftGain[
i].
begin(); it != amplwgtvAftGain[
i].end(); ++it) {
1397 (amplWeightsAft_[
i])[j]=*it;
1404 std::vector< std::vector<double> > pedwgtv(nTDCbins_);
1406 if (!getWeightsFromFile_ && nTDCbins_ == 1)
1408 std::vector<double> vped;
1409 vped.push_back( 0.33333 );
1410 vped.push_back( 0.33333 );
1411 vped.push_back( 0.33333 );
1412 vped.push_back( 0. );
1413 vped.push_back( 0. );
1414 vped.push_back( 0. );
1415 vped.push_back( 0. );
1416 vped.push_back( 0. );
1417 vped.push_back( 0. );
1418 vped.push_back( 0. );
1421 else if (getWeightsFromFile_)
1427 while (!pedFile.eof() && tdcBin < nTDCbins_)
1429 for(
int j = 0;
j < 10; ++
j) {
1432 pedwgtv[tdcBin].push_back(ww);
1436 assert (tdcBin == nTDCbins_);
1441 edm::LogError(
"EcalTrivialConditionRetriever") <<
"Configuration not supported. Exception is raised ";
1445 for (
int i=0;
i<nTDCbins_;
i++)
1447 assert(pedwgtv[
i].
size() == 10);
1449 for(std::vector<double>::const_iterator it = pedwgtv[
i].
begin(); it != pedwgtv[
i].end(); ++it) {
1450 (pedWeights_[
i])[j] = *it;
1455 std::vector< std::vector<double> > pedwgtvaft(nTDCbins_);
1457 if (!getWeightsFromFile_ && nTDCbins_ == 1)
1459 std::vector<double> vped;
1460 vped.push_back( 0. );
1461 vped.push_back( 0. );
1462 vped.push_back( 0. );
1463 vped.push_back( 0. );
1464 vped.push_back( 0. );
1465 vped.push_back( 0. );
1466 vped.push_back( 0. );
1467 vped.push_back( 0. );
1468 vped.push_back( 0. );
1469 vped.push_back( 0. );
1472 else if (getWeightsFromFile_)
1478 while (!pedFile.eof() && tdcBin < nTDCbins_)
1480 for(
int j = 0;
j < 10; ++
j) {
1483 pedwgtvaft[tdcBin].push_back(ww);
1487 assert (tdcBin == nTDCbins_);
1492 edm::LogError(
"EcalTrivialConditionRetriever") <<
"Configuration not supported. Exception is raised ";
1496 for (
int i=0;
i<nTDCbins_;
i++)
1498 assert(pedwgtvaft[
i].
size() == 10);
1500 for(std::vector<double>::const_iterator it = pedwgtvaft[
i].
begin(); it != pedwgtvaft[
i].end(); ++it) {
1501 (pedWeightsAft_[
i])[j]=*it;
1510 std::vector< std::vector<double> > jittwgtv(nTDCbins_);
1512 if (!getWeightsFromFile_ && nTDCbins_ == 1 )
1514 std::vector<double> vjitt;
1515 vjitt.push_back( 0.04066309 );
1516 vjitt.push_back( 0.04066309 );
1517 vjitt.push_back( 0.04066309 );
1518 vjitt.push_back( 0.000 );
1519 vjitt.push_back( 1.325176 );
1520 vjitt.push_back( -0.04997078 );
1521 vjitt.push_back( -0.504338 );
1522 vjitt.push_back( -0.5024844 );
1523 vjitt.push_back( -0.3903718 );
1524 vjitt.push_back( 0.000 );
1527 else if (getWeightsFromFile_)
1533 while (!jittFile.eof() && tdcBin < nTDCbins_)
1535 for(
int j = 0;
j < 10; ++
j) {
1538 jittwgtv[tdcBin].push_back(ww);
1542 assert (tdcBin == nTDCbins_);
1547 edm::LogError(
"EcalTrivialConditionRetriever") <<
"Configuration not supported. Exception is raised ";
1551 for (
int i=0;
i<nTDCbins_;
i++)
1553 assert(jittwgtv[
i].
size() == 10);
1555 for(std::vector<double>::const_iterator it = jittwgtv[
i].
begin(); it != jittwgtv[
i].end(); ++it) {
1556 (jittWeights_[
i])[j]= *it;
1561 std::vector< std::vector<double> > jittwgtvaft(nTDCbins_);
1563 if (!getWeightsFromFile_ && nTDCbins_ == 1)
1565 std::vector<double> vjitt;
1566 vjitt.push_back( 0. );
1567 vjitt.push_back( 0. );
1568 vjitt.push_back( 0. );
1569 vjitt.push_back( 0. );
1570 vjitt.push_back( 1.097871 );
1571 vjitt.push_back( -0.04551035 );
1572 vjitt.push_back( -0.4159156 );
1573 vjitt.push_back( -0.4185352 );
1574 vjitt.push_back( -0.3367127 );
1575 vjitt.push_back( 0. );
1578 else if (getWeightsFromFile_)
1584 while (!jittFile.eof() && tdcBin < nTDCbins_)
1586 for(
int j = 0;
j < 10; ++
j) {
1589 jittwgtvaft[tdcBin].push_back(ww);
1593 assert (tdcBin == nTDCbins_);
1598 edm::LogError(
"EcalTrivialConditionRetriever") <<
"Configuration not supported. Exception is raised ";
1602 for (
int i=0;
i<nTDCbins_;
i++)
1604 assert(jittwgtvaft[
i].
size() == 10);
1606 for(std::vector<double>::const_iterator it = jittwgtvaft[
i].
begin(); it != jittwgtvaft[
i].end(); ++it) {
1607 (jittWeightsAft_[
i])[j]= *it;
1613 std::vector< EcalWeightSet::EcalChi2WeightMatrix > chi2Matrix(nTDCbins_);
1614 if (!getWeightsFromFile_ && nTDCbins_ == 1 )
1620 chi2Matrix[0](0,0) = 0.694371;
1621 chi2Matrix[0](0,1) = -0.305629;
1622 chi2Matrix[0](0,2) = -0.305629;
1623 chi2Matrix[0](0,3) = 0.;
1624 chi2Matrix[0](0,4) = 0.;
1625 chi2Matrix[0](0,5) = 0.;
1626 chi2Matrix[0](0,6) = 0.;
1627 chi2Matrix[0](0,7) = 0.;
1628 chi2Matrix[0](0,8) = 0.;
1629 chi2Matrix[0](0,9) = 0.;
1630 chi2Matrix[0](1,0) = -0.305629;
1631 chi2Matrix[0](1,1) = 0.694371;
1632 chi2Matrix[0](1,2) = -0.305629;
1633 chi2Matrix[0](1,3) = 0.;
1634 chi2Matrix[0](1,4) = 0.;
1635 chi2Matrix[0](1,5) = 0.;
1636 chi2Matrix[0](1,6) = 0.;
1637 chi2Matrix[0](1,7) = 0.;
1638 chi2Matrix[0](1,8) = 0.;
1639 chi2Matrix[0](1,9) = 0.;
1640 chi2Matrix[0](2,0) = -0.305629;
1641 chi2Matrix[0](2,1) = -0.305629;
1642 chi2Matrix[0](2,2) = 0.694371;
1643 chi2Matrix[0](2,3) = 0.;
1644 chi2Matrix[0](2,4) = 0.;
1645 chi2Matrix[0](2,5) = 0.;
1646 chi2Matrix[0](2,6) = 0.;
1647 chi2Matrix[0](2,7) = 0.;
1648 chi2Matrix[0](2,8) = 0.;
1649 chi2Matrix[0](2,9) = 0.;
1650 chi2Matrix[0](3,0) = 0.;
1651 chi2Matrix[0](3,1) = 0.;
1652 chi2Matrix[0](3,2) = 0.;
1653 chi2Matrix[0](3,3) = 0.;
1654 chi2Matrix[0](3,4) = 0.;
1655 chi2Matrix[0](3,5) = 0.;
1656 chi2Matrix[0](3,6) = 0.;
1657 chi2Matrix[0](3,7) = 0.;
1658 chi2Matrix[0](3,8) = 0.;
1659 chi2Matrix[0](3,9) = 0.;
1660 chi2Matrix[0](4,0) = 0.;
1661 chi2Matrix[0](4,1) = 0.;
1662 chi2Matrix[0](4,2) = 0.;
1663 chi2Matrix[0](4,3) = 0.;
1664 chi2Matrix[0](4,4) = 0.8027116;
1665 chi2Matrix[0](4,5) = -0.2517103;
1666 chi2Matrix[0](4,6) = -0.2232882;
1667 chi2Matrix[0](4,7) = -0.1716192;
1668 chi2Matrix[0](4,8) = -0.1239006;
1669 chi2Matrix[0](4,9) = 0.;
1670 chi2Matrix[0](5,0) = 0.;
1671 chi2Matrix[0](5,1) = 0.;
1672 chi2Matrix[0](5,2) = 0.;
1673 chi2Matrix[0](5,3) = 0.;
1674 chi2Matrix[0](5,4) = -0.2517103;
1675 chi2Matrix[0](5,5) = 0.6528964;
1676 chi2Matrix[0](5,6) = -0.2972839;
1677 chi2Matrix[0](5,7) = -0.2067162;
1678 chi2Matrix[0](5,8) = -0.1230729;
1679 chi2Matrix[0](5,9) = 0.;
1680 chi2Matrix[0](6,0) = 0.;
1681 chi2Matrix[0](6,1) = 0.;
1682 chi2Matrix[0](6,2) = 0.;
1683 chi2Matrix[0](6,3) = 0.;
1684 chi2Matrix[0](6,4) = -0.2232882;
1685 chi2Matrix[0](6,5) = -0.2972839;
1686 chi2Matrix[0](6,6) = 0.7413607;
1687 chi2Matrix[0](6,7) = -0.1883866;
1688 chi2Matrix[0](6,8) = -0.1235052;
1689 chi2Matrix[0](6,9) = 0.;
1690 chi2Matrix[0](7,0) = 0.;
1691 chi2Matrix[0](7,1) = 0.;
1692 chi2Matrix[0](7,2) = 0.;
1693 chi2Matrix[0](7,3) = 0.;
1694 chi2Matrix[0](7,4) = -0.1716192;
1695 chi2Matrix[0](7,5) = -0.2067162;
1696 chi2Matrix[0](7,6) = -0.1883866;
1697 chi2Matrix[0](7,7) = 0.844935;
1698 chi2Matrix[0](7,8) = -0.124291;
1699 chi2Matrix[0](7,9) = 0.;
1700 chi2Matrix[0](8,0) = 0.;
1701 chi2Matrix[0](8,1) = 0.;
1702 chi2Matrix[0](8,2) = 0.;
1703 chi2Matrix[0](8,3) = 0.;
1704 chi2Matrix[0](8,4) = -0.1239006;
1705 chi2Matrix[0](8,5) = -0.1230729;
1706 chi2Matrix[0](8,6) = -0.1235052;
1707 chi2Matrix[0](8,7) = -0.124291;
1708 chi2Matrix[0](8,8) = 0.8749833;
1709 chi2Matrix[0](8,9) = 0.;
1710 chi2Matrix[0](9,0) = 0.;
1711 chi2Matrix[0](9,1) = 0.;
1712 chi2Matrix[0](9,2) = 0.;
1713 chi2Matrix[0](9,3) = 0.;
1714 chi2Matrix[0](9,4) = 0.;
1715 chi2Matrix[0](9,5) = 0.;
1716 chi2Matrix[0](9,6) = 0.;
1717 chi2Matrix[0](9,7) = 0.;
1718 chi2Matrix[0](9,8) = 0.;
1719 chi2Matrix[0](9,9) = 0.;
1721 else if (getWeightsFromFile_)
1727 while (!chi2MatrixFile.eof() && tdcBin < nTDCbins_)
1730 for(
int j = 0;
j < 10; ++
j) {
1731 for(
int l = 0;
l < 10; ++
l) {
1733 chi2MatrixFile >> ww;
1734 chi2Matrix[tdcBin](
j,
l)=ww;
1739 assert (tdcBin == nTDCbins_);
1744 edm::LogError(
"EcalTrivialConditionRetriever") <<
"Configuration not supported. Exception is raised ";
1751 chi2Matrix_ = chi2Matrix;
1754 std::vector< EcalWeightSet::EcalChi2WeightMatrix > chi2MatrixAft(nTDCbins_);
1755 if (!getWeightsFromFile_ && nTDCbins_ == 1 )
1761 chi2MatrixAft[0](0,0) = 0.;
1762 chi2MatrixAft[0](0,1) = 0.;
1763 chi2MatrixAft[0](0,2) = 0.;
1764 chi2MatrixAft[0](0,3) = 0.;
1765 chi2MatrixAft[0](0,4) = 0.;
1766 chi2MatrixAft[0](0,5) = 0.;
1767 chi2MatrixAft[0](0,6) = 0.;
1768 chi2MatrixAft[0](0,7) = 0.;
1769 chi2MatrixAft[0](0,8) = 0.;
1770 chi2MatrixAft[0](0,9) = 0.;
1771 chi2MatrixAft[0](1,0) = 0.;
1772 chi2MatrixAft[0](1,1) = 0.;
1773 chi2MatrixAft[0](1,2) = 0.;
1774 chi2MatrixAft[0](1,3) = 0.;
1775 chi2MatrixAft[0](1,4) = 0.;
1776 chi2MatrixAft[0](1,5) = 0.;
1777 chi2MatrixAft[0](1,6) = 0.;
1778 chi2MatrixAft[0](1,7) = 0.;
1779 chi2MatrixAft[0](1,8) = 0.;
1780 chi2MatrixAft[0](1,9) = 0.;
1781 chi2MatrixAft[0](2,0) = 0.;
1782 chi2MatrixAft[0](2,1) = 0.;
1783 chi2MatrixAft[0](2,2) = 0.;
1784 chi2MatrixAft[0](2,3) = 0.;
1785 chi2MatrixAft[0](2,4) = 0.;
1786 chi2MatrixAft[0](2,5) = 0.;
1787 chi2MatrixAft[0](2,6) = 0.;
1788 chi2MatrixAft[0](2,7) = 0.;
1789 chi2MatrixAft[0](2,8) = 0.;
1790 chi2MatrixAft[0](2,9) = 0.;
1791 chi2MatrixAft[0](3,0) = 0.;
1792 chi2MatrixAft[0](3,1) = 0.;
1793 chi2MatrixAft[0](3,2) = 0.;
1794 chi2MatrixAft[0](3,3) = 0.;
1795 chi2MatrixAft[0](3,4) = 0.;
1796 chi2MatrixAft[0](3,5) = 0.;
1797 chi2MatrixAft[0](3,6) = 0.;
1798 chi2MatrixAft[0](3,7) = 0.;
1799 chi2MatrixAft[0](3,8) = 0.;
1800 chi2MatrixAft[0](3,9) = 0.;
1801 chi2MatrixAft[0](4,0) = 0.;
1802 chi2MatrixAft[0](4,1) = 0.;
1803 chi2MatrixAft[0](4,2) = 0.;
1804 chi2MatrixAft[0](4,3) = 0.;
1805 chi2MatrixAft[0](4,4) = 0.8030884;
1806 chi2MatrixAft[0](4,5) = -0.2543541;
1807 chi2MatrixAft[0](4,6) = -0.2243544;
1808 chi2MatrixAft[0](4,7) = -0.1698177;
1809 chi2MatrixAft[0](4,8) = -0.1194506;
1810 chi2MatrixAft[0](4,9) = 0.;
1811 chi2MatrixAft[0](5,0) = 0.;
1812 chi2MatrixAft[0](5,1) = 0.;
1813 chi2MatrixAft[0](5,2) = 0.;
1814 chi2MatrixAft[0](5,3) = 0.;
1815 chi2MatrixAft[0](5,4) = -0.2543541;
1816 chi2MatrixAft[0](5,5) = 0.6714465;
1817 chi2MatrixAft[0](5,6) = -0.2898025;
1818 chi2MatrixAft[0](5,7) = -0.2193564;
1819 chi2MatrixAft[0](5,8) = -0.1542964;
1820 chi2MatrixAft[0](5,9) = 0.;
1821 chi2MatrixAft[0](6,0) = 0.;
1822 chi2MatrixAft[0](6,1) = 0.;
1823 chi2MatrixAft[0](6,2) = 0.;
1824 chi2MatrixAft[0](6,3) = 0.;
1825 chi2MatrixAft[0](6,4) = -0.2243544;
1826 chi2MatrixAft[0](6,5) = -0.2898025;
1827 chi2MatrixAft[0](6,6) = 0.7443781;
1828 chi2MatrixAft[0](6,7) = -0.1934846;
1829 chi2MatrixAft[0](6,8) = -0.136098;
1830 chi2MatrixAft[0](6,9) = 0.;
1831 chi2MatrixAft[0](7,0) = 0.;
1832 chi2MatrixAft[0](7,1) = 0.;
1833 chi2MatrixAft[0](7,2) = 0.;
1834 chi2MatrixAft[0](7,3) = 0.;
1835 chi2MatrixAft[0](7,4) = -0.1698177;
1836 chi2MatrixAft[0](7,5) = -0.2193564;
1837 chi2MatrixAft[0](7,6) = -0.1934846;
1838 chi2MatrixAft[0](7,7) = 0.8535482;
1839 chi2MatrixAft[0](7,8) = -0.1030149;
1840 chi2MatrixAft[0](7,9) = 0.;
1841 chi2MatrixAft[0](8,0) = 0.;
1842 chi2MatrixAft[0](8,1) = 0.;
1843 chi2MatrixAft[0](8,2) = 0.;
1844 chi2MatrixAft[0](8,3) = 0.;
1845 chi2MatrixAft[0](8,4) = -0.1194506;
1846 chi2MatrixAft[0](8,5) = -0.1542964;
1847 chi2MatrixAft[0](8,6) = -0.136098;
1848 chi2MatrixAft[0](8,7) = -0.1030149;
1849 chi2MatrixAft[0](8,8) = 0.9275388;
1850 chi2MatrixAft[0](8,9) = 0.;
1851 chi2MatrixAft[0](9,0) = 0.;
1852 chi2MatrixAft[0](9,1) = 0.;
1853 chi2MatrixAft[0](9,2) = 0.;
1854 chi2MatrixAft[0](9,3) = 0.;
1855 chi2MatrixAft[0](9,4) = 0.;
1856 chi2MatrixAft[0](9,5) = 0.;
1857 chi2MatrixAft[0](9,6) = 0.;
1858 chi2MatrixAft[0](9,7) = 0.;
1859 chi2MatrixAft[0](9,8) = 0.;
1860 chi2MatrixAft[0](9,9) = 0.;
1862 else if (getWeightsFromFile_)
1868 while (!chi2MatrixAftFile.eof() && tdcBin < nTDCbins_)
1871 for(
int j = 0;
j < 10; ++
j) {
1872 for(
int l = 0;
l < 10; ++
l) {
1874 chi2MatrixAftFile >> ww;
1875 chi2MatrixAft[tdcBin](
j,
l)=ww;
1880 assert (tdcBin == nTDCbins_);
1885 edm::LogError(
"EcalTrivialConditionRetriever") <<
"Configuration not supported. Exception is raised ";
1892 chi2MatrixAft_ = chi2MatrixAft;
1900 std::auto_ptr<EcalChannelStatus>
1903 std::auto_ptr<EcalChannelStatus> ecalStatus = std::auto_ptr<EcalChannelStatus>(
new EcalChannelStatus() );
1910 if(ieta==0)
continue;
1914 ecalStatus->setValue( ebid, 0 );
1924 ecalStatus->setValue( eedetidpos, 0 );
1928 ecalStatus->setValue( eedetidneg, 0 );
1939 if ( !statusFile.good() ) {
1941 <<
"*** Problems opening file: " << channelStatusFile_ ;
1950 while (!statusFile.eof())
1952 statusFile >> EcalSubDet;
1955 std::getline(statusFile,str);
1960 statusFile>> hashIndex >>
status;
1967 ecalStatus->setValue( ebid, status );
1972 ecalStatus->setValue( eedetid, status );
1977 <<
" *** " << EcalSubDet <<
" is neither EB nor EE ";
1990 std::auto_ptr<EcalChannelStatus>
1994 std::auto_ptr<EcalChannelStatus> ical = std::auto_ptr<EcalChannelStatus>(
new EcalChannelStatus() );
1997 if(ieta==0)
continue;
2001 ical->setValue( ebid, 0 );
2011 ical->setValue( eedetidpos, 0 );
2015 ical->setValue( eedetidneg, 0 );
2023 std::auto_ptr<EcalDQMChannelStatus>
2028 std::auto_ptr<EcalDQMChannelStatus> ical = std::auto_ptr<EcalDQMChannelStatus>(
new EcalDQMChannelStatus() );
2031 if(ieta==0)
continue;
2035 ical->setValue( ebid, sta );
2045 ical->setValue( eedetidpos, sta );
2049 ical->setValue( eedetidneg, sta );
2057 std::auto_ptr<EcalDQMTowerStatus>
2061 std::auto_ptr<EcalDQMTowerStatus> ical = std::auto_ptr<EcalDQMTowerStatus>(
new EcalDQMTowerStatus() );
2067 for(
int k=0 ;
k<2;
k++ ) {
2070 for(
int i=1 ;
i<73;
i++) {
2071 for(
int j=1 ;
j<18;
j++) {
2075 ical->setValue( ebid, sta );
2083 for(
int k=0 ;
k<2;
k++ ) {
2086 for(
int i=1 ;
i<21;
i++) {
2087 for(
int j=1 ;
j<21;
j++) {
2090 ical->setValue( eeid, sta );
2100 std::auto_ptr<EcalDCSTowerStatus>
2104 std::auto_ptr<EcalDCSTowerStatus> ical = std::auto_ptr<EcalDCSTowerStatus>(
new EcalDCSTowerStatus() );
2110 for(
int k=0 ;
k<2;
k++ ) {
2113 for(
int i=1 ;
i<73;
i++) {
2114 for(
int j=1 ;
j<18;
j++) {
2118 ical->setValue( ebid, status );
2126 for(
int k=0 ;
k<2;
k++ ) {
2129 for(
int i=1 ;
i<21;
i++) {
2130 for(
int j=1 ;
j<21;
j++) {
2133 ical->setValue( eeid, status );
2143 std::auto_ptr<EcalDAQTowerStatus>
2147 std::auto_ptr<EcalDAQTowerStatus> ical = std::auto_ptr<EcalDAQTowerStatus>(
new EcalDAQTowerStatus() );
2153 for(
int k=0 ;
k<2;
k++ ) {
2156 for(
int i=1 ;
i<73;
i++) {
2157 for(
int j=1 ;
j<18;
j++) {
2161 ical->setValue( ebid, status );
2169 for(
int k=0 ;
k<2;
k++ ) {
2172 for(
int i=1 ;
i<21;
i++) {
2173 for(
int j=1 ;
j<21;
j++) {
2176 ical->setValue( eeid, status );
2186 std::auto_ptr<EcalTPGCrystalStatus>
2189 std::auto_ptr<EcalTPGCrystalStatus> ecalStatus = std::auto_ptr<EcalTPGCrystalStatus>(
new EcalTPGCrystalStatus() );
2196 if(ieta==0)
continue;
2200 ecalStatus->setValue( ebid, 0 );
2210 ecalStatus->setValue( eedetidpos, 0 );
2214 ecalStatus->setValue( eedetidneg, 0 );
2225 if ( !statusFile.good() ) {
2227 <<
"*** Problems opening file: " << channelStatusFile_ ;
2236 while (!statusFile.eof())
2238 statusFile >> EcalSubDet;
2241 std::getline(statusFile,str);
2246 statusFile>> hashIndex >>
status;
2253 ecalStatus->setValue( ebid, status );
2258 ecalStatus->setValue( eedetid, status );
2263 <<
" *** " << EcalSubDet <<
" is neither EB nor EE ";
2276 std::auto_ptr<EcalTPGCrystalStatus>
2280 std::auto_ptr<EcalTPGCrystalStatus> ical = std::auto_ptr<EcalTPGCrystalStatus>(
new EcalTPGCrystalStatus() );
2283 if(ieta==0)
continue;
2287 ical->setValue( ebid, 0 );
2297 ical->setValue( eedetidpos, 0 );
2301 ical->setValue( eedetidneg, 0 );
2311 std::auto_ptr<EcalIntercalibConstants>
2315 std::auto_ptr<EcalIntercalibConstants> ical;
2321 edm::LogInfo(
"EcalTrivialConditionRetriever") <<
"Reading intercalibration constants from file "
2322 << intercalibConstantsFile_.c_str() ;
2324 if(intercalibConstantsFile_.find(
".xml")!= std::string::npos) {
2326 std::cout<<
"generating Intercalib from xml file"<<std::endl;
2333 if(totLumi_ !=0 || instLumi_!=0) {
2334 std::cout<<
"implementing ageing for intercalib"<<std::endl;
2338 if(intercalibConstantsMCFile_.find(
".xml")!= std::string::npos) {
2340 std::cout<<
"generating IntercalibMC from xml file"<<std::endl;
2346 std::cout<<
"please provide the xml file of the EcalIntercalibConstantsMC"<<std::endl;
2350 TRandom3 * gRandom =
new TRandom3();
2361 if(ieta==0)
continue;
2366 std::cout<<
"EB at eta="<<eta<<
" constant term is "<<constantTerm<<std::endl;
2375 if(idref!=mymap.
end())icalconstant=(*idref);
2379 if(idrefMC!=mymapMC.
end())icalconstantMC=(*idrefMC);
2381 double r = gRandom->Gaus(0,constantTerm);
2383 if(iphi==10)
std::cout<<
"EB at eta="<<eta<<
" IC="<<icalconstant<<
" ICMC="<<icalconstantMC<<
" smear="<<r<<
" ";
2385 icalconstant = icalconstant + r*1.29*icalconstantMC;
2388 if(iphi==10)
std::cout<<
"newIC="<<icalconstant<<std::endl;
2391 if(icalconstant !=icalconstant2)
std::cout<<
">>>> error in smearing intercalib"<<std::endl;
2403 double eta= -
log(
tan(0.5*atan(
sqrt((iX-50.0)*(iX-50.0)+(iY-50.0)*(iY-50.0))*2.98/328.)));
2406 if(iX==50)
std::cout<<
"EE at eta="<<eta<<
" constant term is "<<constantTerm<<std::endl;
2413 if(idref!=mymap.
end())icalconstant=(*idref);
2417 if(idrefMC!=mymapMC.
end())icalconstantMC=(*idrefMC);
2419 double r = gRandom->Gaus(0,constantTerm);
2421 if(iX==10)
std::cout<<
"EE at eta="<<eta<<
" IC="<<icalconstant<<
" ICMC="<<icalconstantMC<<
" smear="<<r<<
" ";
2422 icalconstant = icalconstant + r*1.29*icalconstantMC;
2424 if(iX==10)
std::cout<<
"newIC="<<icalconstant<<std::endl;
2433 double eta= -
log(
tan(0.5*atan(
sqrt((iX-50.0)*(iX-50.0)+(iY-50.0)*(iY-50.0))*2.98/328.)));
2441 if(idrefMC!=mymapMC.
end())icalconstantMC=(*idrefMC);
2443 double r = gRandom->Gaus(0,constantTerm);
2444 icalconstant = icalconstant + r*1.29*icalconstantMC;
2452 ical = std::auto_ptr<EcalIntercalibConstants> (rcd);
2464 inpFile = fopen (intercalibConstantsFile_.c_str (),
"r") ;
2468 <<
"*** Can not open file: " << intercalibConstantsFile_ ;
2469 throw cms::Exception (
"Cannot open inter-calibration coefficients txt file") ;
2473 std::ostringstream str ;
2474 fgets (line,255,inpFile) ;
2475 int sm_number=atoi (line) ;
2476 str <<
"sm: " << sm_number ;
2478 fgets (line,255,inpFile) ;
2481 fgets (line,255,inpFile) ;
2483 str <<
"gen tag: " << gen_tag ;
2485 fgets (line,255,inpFile) ;
2487 str <<
"cali method: " << cali_method << std::endl ;
2489 fgets (line,255,inpFile) ;
2491 str <<
"cali version: " << cali_version << std::endl ;
2493 fgets (line,255,inpFile) ;
2495 str <<
"cali type: " << cali_type ;
2498 <<
"[PIETRO] Intercalibration file - "
2499 << str.str () << std::endl ;
2501 float calib[1700]={1} ;
2502 int calib_status[1700]={0} ;
2506 while (fgets (line,255,inpFile))
2510 float dmy_calib = 0. ;
2511 float dmy_RMS = 0. ;
2512 int dmy_events = 0 ;
2513 int dmy_status = 0 ;
2514 sscanf (line,
"%d %f %f %d %d", &dmy_num, &dmy_calib,
2515 &dmy_RMS, &dmy_events,
2517 assert (dmy_num >= 1) ;
2518 assert (dmy_num <= 1700) ;
2519 calib[dmy_num-1] = dmy_calib ;
2520 calib_status[dmy_num-1] = dmy_status ;
2532 edm::LogInfo (
"EcalTrivialConditionRetriever") <<
"Read intercalibrations for " << ii <<
" xtals " ;
2534 <<
"Some crystals missing, set to 1" << std::endl ;
2542 for (
int i=0 ;
i<1700 ;
i++)
2553 if (calib_status[
i]) ical->setValue (ebid.
rawId (), calib[
i]) ;
2554 else ical->setValue (ebid.
rawId (), 1.) ;
2569 std::auto_ptr<EcalIntercalibConstantsMC>
2573 std::auto_ptr<EcalIntercalibConstantsMC> ical;
2579 edm::LogInfo(
"EcalTrivialConditionRetriever") <<
"Reading intercalibration constants MC from file "
2580 << intercalibConstantsMCFile_.c_str() ;
2582 if(intercalibConstantsMCFile_.find(
".xml")!= std::string::npos) {
2584 std::cout<<
"generating Intercalib MC from xml file"<<std::endl;
2590 ical = std::auto_ptr<EcalIntercalibConstants> (rcd);
2594 std::cout <<
"ERROR>>> please provide a xml file"<<std::endl;
2603 std::auto_ptr<EcalIntercalibErrors>
2607 std::auto_ptr<EcalIntercalibErrors> ical =
2613 edm::LogInfo(
"EcalTrivialConditionRetriever") <<
"Reading intercalibration constants from file "
2614 << intercalibErrorsFile_.c_str() ;
2617 inpFile = fopen (intercalibErrorsFile_.c_str (),
"r") ;
2621 <<
"*** Can not open file: " << intercalibErrorsFile_ ;
2622 throw cms::Exception (
"Cannot open inter-calibration coefficients txt file") ;
2626 std::ostringstream str ;
2627 fgets (line,255,inpFile) ;
2628 int sm_number=atoi (line) ;
2629 str <<
"sm: " << sm_number ;
2631 fgets (line,255,inpFile) ;
2634 fgets (line,255,inpFile) ;
2636 str <<
"gen tag: " << gen_tag ;
2638 fgets (line,255,inpFile) ;
2640 str <<
"cali method: " << cali_method << std::endl ;
2642 fgets (line,255,inpFile) ;
2644 str <<
"cali version: " << cali_version << std::endl ;
2646 fgets (line,255,inpFile) ;
2648 str <<
"cali type: " << cali_type ;
2651 <<
"[PIETRO] Intercalibration file - "
2652 << str.str () << std::endl ;
2654 float calib[1700]={1} ;
2655 int calib_status[1700]={0} ;
2659 while (fgets (line,255,inpFile))
2663 float dmy_calib = 0. ;
2664 float dmy_RMS = 0. ;
2665 int dmy_events = 0 ;
2666 int dmy_status = 0 ;
2667 sscanf (line,
"%d %f %f %d %d", &dmy_num, &dmy_calib,
2668 &dmy_RMS, &dmy_events,
2670 assert (dmy_num >= 1) ;
2671 assert (dmy_num <= 1700) ;
2672 calib[dmy_num-1] = dmy_calib ;
2673 calib_status[dmy_num-1] = dmy_status ;
2685 edm::LogInfo (
"EcalTrivialConditionRetriever") <<
"Read intercalibrations for " << ii <<
" xtals " ;
2687 <<
"Some crystals missing, set to 1" << std::endl ;
2695 for (
int i=0 ;
i<1700 ;
i++)
2706 if (calib_status[
i]) ical->setValue (ebid.
rawId (), calib[
i]) ;
2707 else ical->setValue (ebid.
rawId (), 1.) ;
2724 std::auto_ptr<EcalTimeCalibConstants>
2728 std::auto_ptr<EcalTimeCalibConstants> ical =
2734 edm::LogInfo(
"EcalTrivialConditionRetriever") <<
"Reading time calibration constants from file "
2735 << timeCalibConstantsFile_.c_str() ;
2738 inpFile = fopen (timeCalibConstantsFile_.c_str (),
"r") ;
2742 <<
"*** Can not open file: " << timeCalibConstantsFile_ ;
2743 throw cms::Exception (
"Cannot open inter-calibration coefficients txt file") ;
2747 std::ostringstream str ;
2748 fgets (line,255,inpFile) ;
2749 int sm_number=atoi (line) ;
2750 str <<
"sm: " << sm_number ;
2752 fgets (line,255,inpFile) ;
2755 fgets (line,255,inpFile) ;
2757 str <<
"gen tag: " << gen_tag ;
2759 fgets (line,255,inpFile) ;
2761 str <<
"cali method: " << cali_method << std::endl ;
2763 fgets (line,255,inpFile) ;
2765 str <<
"cali version: " << cali_version << std::endl ;
2767 fgets (line,255,inpFile) ;
2769 str <<
"cali type: " << cali_type ;
2772 <<
"TimeCalibration file - "
2773 << str.str () << std::endl ;
2775 float calib[1700]={1} ;
2776 int calib_status[1700]={0} ;
2780 while (fgets (line,255,inpFile))
2784 float dmy_calib = 0. ;
2785 float dmy_RMS = 0. ;
2786 int dmy_events = 0 ;
2787 int dmy_status = 0 ;
2788 sscanf (line,
"%d %f %f %d %d", &dmy_num, &dmy_calib,
2789 &dmy_RMS, &dmy_events,
2791 assert (dmy_num >= 1) ;
2792 assert (dmy_num <= 1700) ;
2793 calib[dmy_num-1] = dmy_calib ;
2794 calib_status[dmy_num-1] = dmy_status ;
2806 edm::LogInfo (
"EcalTrivialConditionRetriever") <<
"Read timeCalibrations for " << ii <<
" xtals " ;
2808 <<
"Some crystals missing, set to 1" << std::endl ;
2816 for (
int i=0 ;
i<1700 ;
i++)
2827 if (calib_status[
i]) ical->setValue (ebid.
rawId (), calib[
i]) ;
2828 else ical->setValue (ebid.
rawId (), 1.) ;
2838 std::auto_ptr<EcalTimeCalibErrors>
2842 std::auto_ptr<EcalTimeCalibErrors> ical =
2848 edm::LogInfo(
"EcalTrivialConditionRetriever") <<
"Reading timeCalibration constants from file "
2849 << timeCalibErrorsFile_.c_str() ;
2852 inpFile = fopen (timeCalibErrorsFile_.c_str (),
"r") ;
2856 <<
"*** Can not open file: " << timeCalibErrorsFile_ ;
2857 throw cms::Exception (
"Cannot open inter-calibration coefficients txt file") ;
2861 std::ostringstream str ;
2862 fgets (line,255,inpFile) ;
2863 int sm_number=atoi (line) ;
2864 str <<
"sm: " << sm_number ;
2866 fgets (line,255,inpFile) ;
2869 fgets (line,255,inpFile) ;
2871 str <<
"gen tag: " << gen_tag ;
2873 fgets (line,255,inpFile) ;
2875 str <<
"cali method: " << cali_method << std::endl ;
2877 fgets (line,255,inpFile) ;
2879 str <<
"cali version: " << cali_version << std::endl ;
2881 fgets (line,255,inpFile) ;
2883 str <<
"cali type: " << cali_type ;
2886 <<
"TimeCalibration file - "
2887 << str.str () << std::endl ;
2889 float calib[1700]={1} ;
2890 int calib_status[1700]={0} ;
2894 while (fgets (line,255,inpFile))
2898 float dmy_calib = 0. ;
2899 float dmy_RMS = 0. ;
2900 int dmy_events = 0 ;
2901 int dmy_status = 0 ;
2902 sscanf (line,
"%d %f %f %d %d", &dmy_num, &dmy_calib,
2903 &dmy_RMS, &dmy_events,
2905 assert (dmy_num >= 1) ;
2906 assert (dmy_num <= 1700) ;
2907 calib[dmy_num-1] = dmy_calib ;
2908 calib_status[dmy_num-1] = dmy_status ;
2920 edm::LogInfo (
"EcalTrivialConditionRetriever") <<
"Read time calibrations for " << ii <<
" xtals " ;
2922 <<
"Some crystals missing, set to 1" << std::endl ;
2930 for (
int i=0 ;
i<1700 ;
i++)
2941 if (calib_status[
i]) ical->setValue (ebid.
rawId (), calib[
i]) ;
2942 else ical->setValue (ebid.
rawId (), 1.) ;
2953 std::auto_ptr<EcalMappingElectronics>
2956 std::auto_ptr<EcalMappingElectronics> mapping = std::auto_ptr<EcalMappingElectronics>(
new EcalMappingElectronics() );
2962 edm::LogError(
"EcalTrivialConditionRetriever") <<
"File not found";
2971 int dccid, towerid, pseudostrip_in_SC, xtal_in_pseudostrip;
2972 int tccid, tower, pseudostrip_in_TCC, pseudostrip_in_TT;
2977 f >> ix >> iy >> iz >> CL >> dccid >> towerid >> pseudostrip_in_SC >> xtal_in_pseudostrip >> tccid >> tower >>
2978 pseudostrip_in_TCC >> pseudostrip_in_TT ;
2985 EcalElectronicsId elecid(dccid,towerid, pseudostrip_in_SC, xtal_in_pseudostrip);
2991 (*mapping).setValue(detid, aElement);
3000 std::auto_ptr<EcalMappingElectronics>
3004 std::auto_ptr<EcalMappingElectronics> ical = std::auto_ptr<EcalMappingElectronics>(
new EcalMappingElectronics() );
3010 std::auto_ptr<Alignments>
3012 double mytrans[3] = {0., 0., 0.};
3013 double myeuler[3] = {0., 0., 0.};
3015 if(getEBAlignmentFromFile_)
3017 std::vector<AlignTransform> my_align;
3020 for(
int SM = 1 ; SM < 37; SM++ ) {
3023 iphi = 1 + (SM - 19) * 20;
3029 if(getEBAlignmentFromFile_) {
3030 f >> myeuler[0] >> myeuler[1] >> myeuler[2] >> mytrans[0] >> mytrans[1] >> mytrans[2];
3031 std::cout <<
" translation " << mytrans[0] <<
" " << mytrans[1] <<
" " << mytrans[2] <<
"\n"
3032 <<
" euler " << myeuler[0] <<
" " << myeuler[1] <<
" " << myeuler[2] << std::endl;
3034 CLHEP::Hep3Vector translation( mytrans[0], mytrans[1], mytrans[2]);
3035 CLHEP::HepEulerAngles euler( myeuler[0], myeuler[1], myeuler[2]);
3037 my_align.push_back(transform);
3063 std::auto_ptr<Alignments> ical = std::auto_ptr<Alignments>(
new Alignments(a) );
3067 std::auto_ptr<Alignments>
3069 double mytrans[3] = {0., 0., 0.};
3070 double myeuler[3] = {0., 0., 0.};
3072 if(getEEAlignmentFromFile_)
3074 std::vector<AlignTransform> my_align;
3078 for(
int Dee = 0 ; Dee < 4; Dee++ ) {
3080 if(Dee == 1 || Dee == 3)
3085 EEDetId eedetId(ix, iy, side);
3086 if(getEEAlignmentFromFile_) {
3087 f >> myeuler[0] >> myeuler[1] >> myeuler[2] >> mytrans[0] >> mytrans[1] >> mytrans[2];
3088 std::cout <<
" translation " << mytrans[0] <<
" " << mytrans[1] <<
" " << mytrans[2] <<
"\n"
3089 <<
" euler " << myeuler[0] <<
" " << myeuler[1] <<
" " << myeuler[2] << std::endl;
3091 CLHEP::Hep3Vector translation( mytrans[0], mytrans[1], mytrans[2]);
3092 CLHEP::HepEulerAngles euler( myeuler[0], myeuler[1], myeuler[2]);
3094 my_align.push_back(transform);
3098 std::auto_ptr<Alignments> ical = std::auto_ptr<Alignments>(
new Alignments(a) );
3102 std::auto_ptr<Alignments>
3104 double mytrans[3] = {0., 0., 0.};
3105 double myeuler[3] = {0., 0., 0.};
3107 if(getESAlignmentFromFile_)
3109 std::vector<AlignTransform> my_align;
3111 int pl_vect[10] = {2, 2, 1, 1, 1, 1, 2, 2};
3115 for(
int layer = 0 ; layer < 8; layer++ ) {
3117 int ix = 10 + (layer%2) * 20;
3118 int plane = pl_vect[layer];
3119 if(layer > 3) side = 1;
3120 ESDetId esdetId(strip, ix, iy, plane, side);
3121 if(getESAlignmentFromFile_) {
3122 f >> myeuler[0] >> myeuler[1] >> myeuler[2] >> mytrans[0] >> mytrans[1] >> mytrans[2];
3123 std::cout <<
" translation " << mytrans[0] <<
" " << mytrans[1] <<
" " << mytrans[2] <<
"\n"
3124 <<
" euler " << myeuler[0] <<
" " << myeuler[1] <<
" " << myeuler[2] << std::endl;
3126 CLHEP::Hep3Vector translation( mytrans[0], mytrans[1], mytrans[2]);
3127 CLHEP::HepEulerAngles euler( myeuler[0], myeuler[1], myeuler[2]);
3129 my_align.push_back(transform);
3133 std::auto_ptr<Alignments> ical = std::auto_ptr<Alignments>(
new Alignments(a) );
3137 std::auto_ptr<EcalSampleMask>
3140 return std::auto_ptr<EcalSampleMask>(
new EcalSampleMask(sampleMaskEB_, sampleMaskEE_) );
3143 std::auto_ptr<EcalTimeBiasCorrections>
3145 std::auto_ptr<EcalTimeBiasCorrections> ipar = std::auto_ptr<EcalTimeBiasCorrections>(
new EcalTimeBiasCorrections() );
3146 copy(EBtimeCorrAmplitudeBins_.begin(), EBtimeCorrAmplitudeBins_.end(),
3147 back_inserter(ipar->EBTimeCorrAmplitudeBins));
3148 copy(EBtimeCorrShiftBins_.begin(), EBtimeCorrShiftBins_.end(),
3149 back_inserter(ipar->EBTimeCorrShiftBins));
3150 copy(EEtimeCorrAmplitudeBins_.begin(), EEtimeCorrAmplitudeBins_.end(),
3151 back_inserter(ipar->EETimeCorrAmplitudeBins));
3152 copy(EEtimeCorrShiftBins_.begin(), EEtimeCorrShiftBins_.end(),
3153 back_inserter(ipar->EETimeCorrShiftBins));
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
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 &)
virtual std::auto_ptr< Alignments > produceEcalAlignmentEE(const EEAlignmentRcd &)
EcalDQMChannelStatusMap EcalDQMChannelStatus
MVATrainerComputer * calib
EcalMappingElectronicsMap EcalMappingElectronics
EcalChannelStatusMap EcalChannelStatus
EcalGainRatioMap EcalGainRatios
tuple path
else: Piece not in the list, fine.
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