53 #include "valgrind/callgrind.h"
60 TMath::Max(1.
e-10,(x[0]-par[2])*(x[0]-par[2]) + .25*par[1]*par[1]);
66 return par[0]*
exp(-0.5*((x[0]-par[1])/par[2])*((x[0]-par[1])/par[2]));
85 TF1 *
GL =
new TF1 (
"GL",
86 "0.5/3.1415926*[0]/(pow(x-[1],2)+pow(0.5*[0],2))*exp(-0.5*pow((x-[2])/[3],2))/([3]*sqrt(6.283185))",
89 TF2 *
GL2=
new TF2 (
"GL2",
90 "0.5/3.1415926*[0]/(pow(x-[1],2)+pow(0.5*[0],2))*exp(-0.5*pow((x-y)/[2],2))/([2]*sqrt(6.283185))",
274 std::pair<SimTrack, SimTrack> simMuFromBestRes;
275 double maxprob = -0.1;
279 for (std::vector<SimTrack>::const_iterator simMu1=simMuons.begin(); simMu1!=simMuons.end(); simMu1++) {
280 for (std::vector<SimTrack>::const_iterator simMu2=simMu1+1; simMu2!=simMuons.end(); simMu2++) {
281 if (((*simMu1).charge()*(*simMu2).charge())>0) {
286 double mcomb = ((*simMu1).momentum()+(*simMu2).momentum()).
mass();
287 double Y = ((*simMu1).momentum()+(*simMu2).momentum()).Rapidity();
292 simMuFromBestRes.first = (*simMu1);
293 simMuFromBestRes.second = (*simMu2);
303 return simMuFromBestRes;
315 std::pair<MuScleFitMuon, MuScleFitMuon> recMuFromBestRes;
319 double maxprob = -0.1;
320 double minDeltaMass = 999999;
321 std::pair<MuScleFitMuon,MuScleFitMuon> bestMassMuons;
322 for (std::vector<MuScleFitMuon>::const_iterator Muon1=muons.begin(); Muon1!=muons.end(); ++Muon1) {
324 if (
debug>0)
std::cout <<
"muon_1_charge:"<<(*Muon1).charge() << std::endl;
325 for (std::vector<MuScleFitMuon>::const_iterator Muon2=Muon1+1; Muon2!=muons.end(); ++Muon2) {
328 if ((((*Muon1).charge())*((*Muon2).charge()))>0) {
335 double pt1 = (*Muon1).Pt();
336 double pt2 = (*Muon2).Pt();
337 double eta1 = (*Muon1).Eta();
338 double eta2 = (*Muon2).Eta();
345 double mcomb = ((*Muon1).p4()+(*Muon2).p4()).
mass();
346 double Y = ((*Muon1).p4()+(*Muon2).p4()).Rapidity();
348 std::cout<<
"muon1 "<<(*Muon1).p4().Px()<<
", "<<(*Muon1).p4().Py()<<
", "<<(*Muon1).p4().Pz()<<
", "<<(*Muon1).p4().E()<<
", "<<(*Muon1).charge()<<std::endl;
349 std::cout<<
"muon2 "<<(*Muon2).p4().Px()<<
", "<<(*Muon2).p4().Py()<<
", "<<(*Muon2).p4().Pz()<<
", "<<(*Muon2).p4().E()<<
", "<<(*Muon2).charge()<<std::endl;
351 double massResol = 0.;
362 if( (*Muon1).charge()<0 ) {
363 recMuFromBestRes.first = (*Muon1);
364 recMuFromBestRes.second = (*Muon2);
366 recMuFromBestRes.first = (*Muon2);
367 recMuFromBestRes.second = (*Muon1);
369 if (
debug>0)
std::cout <<
"muon_1_charge (after swapping):"<<recMuFromBestRes.first.charge() << std::endl;
378 if( deltaMass<minDeltaMass ){
379 bestMassMuons = std::make_pair((*Muon1),(*Muon2));
380 minDeltaMass = deltaMass;
390 if(bestMassMuons.first.charge()<0){
391 recMuFromBestRes.first = bestMassMuons.first;
392 recMuFromBestRes.second = bestMassMuons.second;
395 recMuFromBestRes.second = bestMassMuons.first;
396 recMuFromBestRes.first = bestMassMuons.second;
399 return recMuFromBestRes;
406 double pt = muon.Pt();
407 double eta = muon.Eta();
408 double phi = muon.Phi();
420 std::cout <<
"Smearing Pt,eta,phi = " << pt <<
" " << eta <<
" "
422 for (
int i=0;
i<SmearType+3;
i++) {
428 double ptEtaPhiE[4] = {pt,
eta,
phi, E};
436 double ptEtaPhiE[4] = {muon.Pt(),muon.Eta(),muon.Phi(),muon.E()};
455 const std::vector<double> & parval,
const int chg)
457 double *
p =
new double[(int)(parval.size())];
462 for (std::vector<double>::const_iterator it=parval.begin(); it!=parval.end(); ++it, ++
id) {
475 double* parval,
const int chg)
477 double ptEtaPhiE[4] = {muon.Pt(),muon.Eta(),muon.Phi(),muon.E()};
484 ptEtaPhiE[0] =
scaleFunction->
scale(ptEtaPhiE[0], ptEtaPhiE[1], ptEtaPhiE[2], chg, &(parval[shift]));
495 double px = ptEtaPhiE[0]*
cos(ptEtaPhiE[2]);
496 double py = ptEtaPhiE[0]*
sin(ptEtaPhiE[2]);
497 double tmp = 2*atan(
exp(-ptEtaPhiE[1]));
498 double pz = ptEtaPhiE[0]*
cos(tmp)/
sin(tmp);
513 return (mu1+mu2).mass();
520 const std::vector<double> & parval )
533 double *
p =
new double[(int)(parval.size())];
534 std::vector<double>::const_iterator it = parval.begin();
536 for ( ; it!=parval.end(); ++it, ++
id) {
567 double pt1 = mu1.Pt();
568 double phi1 = mu1.Phi();
569 double eta1 = mu1.Eta();
570 double theta1 = 2*atan(
exp(-eta1));
571 double pt2 = mu2.Pt();
572 double phi2 = mu2.Phi();
573 double eta2 = mu2.Eta();
574 double theta2 = 2*atan(
exp(-eta2));
577 pt2*(
cos(phi1-phi2)+
cos(theta1)*
cos(theta2)/(
sin(theta1)*
sin(theta2))))/mass;
579 pt1*(
cos(phi2-phi1)+
cos(theta2)*
cos(theta1)/(
sin(theta2)*
sin(theta1))))/mass;
580 double dmdphi1 = pt1*pt2/mass*
sin(phi1-phi2);
581 double dmdphi2 = pt2*pt1/mass*
sin(phi2-phi1);
582 double dmdcotgth1 = (pt1*pt1*
cos(theta1)/
sin(theta1)*
584 pt1*pt2*
cos(theta2)/
sin(theta2))/mass;
585 double dmdcotgth2 = (pt2*pt2*
cos(theta2)/
sin(theta2)*
587 pt2*pt1*
cos(theta1)/
sin(theta1))/mass;
613 2*dmdpt1*dmdpt2*cov_pt1pt2*sigma_pt1*sigma_pt2);
616 std::cout <<
" Pt1=" << pt1 <<
" phi1=" << phi1 <<
" cotgth1=" <<
cos(theta1)/
sin(theta1) <<
" - Pt2=" << pt2
617 <<
" phi2=" << phi2 <<
" cotgth2=" <<
cos(theta2)/
sin(theta2) << std::endl;
619 << parval[0] <<
" P[1]=" << parval[1] <<
"P[2]=" << parval[2] <<
" P[3]=" << parval[3] << std::endl;
620 std::cout <<
" Dmdpt1= " << dmdpt1 <<
" dmdpt2= " << dmdpt2 <<
" sigma_pt1="
621 << sigma_pt1 <<
" sigma_pt2=" << sigma_pt2 << std::endl;
622 std::cout <<
" Dmdphi1= " << dmdphi1 <<
" dmdphi2= " << dmdphi2 <<
" sigma_phi1="
623 << sigma_phi1 <<
" sigma_phi2=" << sigma_phi2 << std::endl;
624 std::cout <<
" Dmdcotgth1= " << dmdcotgth1 <<
" dmdcotgth2= " << dmdcotgth2
626 << sigma_cotgth1 <<
" sigma_cotgth2=" << sigma_cotgth2 << std::endl;
627 std::cout <<
" Mass resolution (pval) for muons of Pt = " << pt1 <<
" " << pt2
628 <<
" : " << mass <<
" +- " << mass_res << std::endl;
638 LogDebug(
"MuScleFitUtils") <<
"RESOLUTION PROBLEM: ires=" << ires << std::endl;
656 double pt1 = mu1.Pt();
657 double phi1 = mu1.Phi();
658 double eta1 = mu1.Eta();
659 double theta1 = 2*atan(
exp(-eta1));
660 double pt2 = mu2.Pt();
661 double phi2 = mu2.Phi();
662 double eta2 = mu2.Eta();
663 double theta2 = 2*atan(
exp(-eta2));
666 pt2*(
cos(phi1-phi2)+
cos(theta1)*
cos(theta2)/(
sin(theta1)*
sin(theta2))))/mass;
668 pt1*(
cos(phi2-phi1)+
cos(theta2)*
cos(theta1)/(
sin(theta2)*
sin(theta1))))/mass;
669 double dmdphi1 = pt1*pt2/mass*
sin(phi1-phi2);
670 double dmdphi2 = pt2*pt1/mass*
sin(phi2-phi1);
671 double dmdcotgth1 = (pt1*pt1*
cos(theta1)/
sin(theta1)*
673 pt1*pt2*
cos(theta2)/
sin(theta2))/mass;
674 double dmdcotgth2 = (pt2*pt2*
cos(theta2)/
sin(theta2)*
676 pt2*pt1*
cos(theta1)/
sin(theta1))/mass;
680 double sigma_pt1 = resolFunc.
sigmaPt( mu1 );
681 double sigma_pt2 = resolFunc.
sigmaPt( mu2 );
682 double sigma_phi1 = resolFunc.
sigmaPhi( mu1 );
683 double sigma_phi2 = resolFunc.
sigmaPhi( mu2 );
684 double sigma_cotgth1 = resolFunc.
sigmaCotgTh( mu1 );
685 double sigma_cotgth2 = resolFunc.
sigmaCotgTh( mu2 );
699 double MuScleFitUtils::massProb(
const double &
mass,
const double & resEta,
const double & rapidity,
const double & massResol,
const std::vector<double> & parval,
const bool doUseBkgrWindow,
const double & eta1,
const double & eta2 )
702 CALLGRIND_START_INSTRUMENTATION;
705 double *
p =
new double[(int)(parval.size())];
710 std::vector<double>::const_iterator it = parval.begin();
712 for ( ; it!=parval.end(); ++it, ++
id) {
717 double massProbability =
massProb( mass, resEta, rapidity, massResol, p, doUseBkgrWindow, eta1, eta2 );
721 CALLGRIND_STOP_INSTRUMENTATION;
722 CALLGRIND_DUMP_STATS;
725 return massProbability;
734 const double GLvalue[][1001][1001],
const double GLnorm[][1001],
735 const int iRes,
const int iY )
737 if( iRes == 0 && iY > 23 ) {
738 std::cout <<
"WARNING: rapidity bin selected = " << iY <<
" but there are only histograms for the first 24 bins" << std::endl;
742 bool insideProbMassWindow =
true;
750 if (
debug>1)
std::cout << std::setprecision(9)<<
"mass ResMinMass[iRes] ResHalfWidth[iRes] ResHalfWidth[iRes]"
752 int iMassLeft = (int)(fracMass*(
double)
nbins);
753 int iMassRight = iMassLeft+1;
754 double fracMassStep = (double)
nbins*(fracMass - (
double)iMassLeft/(double)
nbins);
755 if (
debug>1)
std::cout<<
"nbins iMassLeft fracMass "<<nbins<<
" "<<iMassLeft<<
" "<<fracMass<<std::endl;
761 edm::LogInfo(
"probability") <<
"WARNING: fracMass=" << fracMass <<
", iMassLeft="
762 << iMassLeft <<
"; mass = " << mass <<
" and bounds are " <<
ResMinMass[iRes]
766 insideProbMassWindow =
false;
768 if (iMassRight>nbins) {
769 edm::LogInfo(
"probability") <<
"WARNING: fracMass=" << fracMass <<
", iMassRight="
770 << iMassRight <<
"; mass = " << mass <<
" and bounds are " <<
ResMinMass[iRes]
771 <<
":" <<
ResMass[iRes]+2*
ResHalfWidth[iRes] <<
" - iMassRight set to " << nbins-1 << std::endl;
774 insideProbMassWindow =
false;
777 int iSigmaLeft = (int)(fracSigma*(
double)
nbins);
778 int iSigmaRight = iSigmaLeft+1;
779 double fracSigmaStep = (double)nbins * (fracSigma - (
double)iSigmaLeft/(double)nbins);
793 edm::LogInfo(
"probability") <<
"WARNING: fracSigma = " << fracSigma <<
", iSigmaLeft="
794 << iSigmaLeft <<
", with massResol = " << massResol <<
" and ResMaxSigma[iRes] = "
795 <<
ResMaxSigma[iRes] <<
" - iSigmaLeft set to 0" << std::endl;
799 if (iSigmaRight>nbins ) {
801 edm::LogInfo(
"probability") <<
"WARNING: fracSigma = " << fracSigma <<
", iSigmaRight="
802 << iSigmaRight <<
", with massResol = " << massResol <<
" and ResMaxSigma[iRes] = "
803 <<
ResMaxSigma[iRes] <<
" - iSigmaRight set to " << nbins-1 << std::endl;
804 iSigmaLeft = nbins-1;
811 if( insideProbMassWindow ) {
813 if (GLnorm[iY][iSigmaLeft]>0)
814 f11 = GLvalue[iY][iMassLeft][iSigmaLeft] / GLnorm[iY][iSigmaLeft];
816 if (GLnorm[iY][iSigmaRight]>0)
817 f12 = GLvalue[iY][iMassLeft][iSigmaRight] / GLnorm[iY][iSigmaRight];
819 if (GLnorm[iY][iSigmaLeft]>0)
820 f21 = GLvalue[iY][iMassRight][iSigmaLeft] / GLnorm[iY][iSigmaLeft];
822 if (GLnorm[iY][iSigmaRight]>0)
823 f22 = GLvalue[iY][iMassRight][iSigmaRight] / GLnorm[iY][iSigmaRight];
824 PS = f11 + (f12-f11)*fracSigmaStep + (f21-f11)*fracMassStep +
825 (f22-f21-f12+f11)*fracMassStep*fracSigmaStep;
826 if (PS>0.1 ||
debug>1)
LogDebug(
"MuScleFitUtils") <<
"iRes = " << iRes <<
" PS=" << PS <<
" f11,f12,f21,f22="
827 << f11 <<
" " << f12 <<
" " << f21 <<
" " << f22 <<
" "
828 <<
" fSS=" << fracSigmaStep <<
" fMS=" << fracMassStep <<
" iSL, iSR="
829 << iSigmaLeft <<
" " << iSigmaRight
830 <<
" GLvalue["<<iY<<
"]["<<iMassLeft<<
"] = " << GLvalue[iY][iMassLeft][iSigmaLeft]
831 <<
" GLnorm["<<iY<<
"]["<<iSigmaLeft<<
"] = " << GLnorm[iY][iSigmaLeft] << std::endl;
842 edm::LogInfo(
"probability") <<
"outside mass probability window. Setting PS["<<iRes<<
"] = 0" << std::endl;
864 double MuScleFitUtils::massProb(
const double &
mass,
const double & resEta,
const double & rapidity,
const double & massResol,
double * parval,
const bool doUseBkgrWindow,
const double & eta1,
const double & eta2 ) {
955 double PStot[6] = {0.};
958 bool resConsidered[6] = {
false};
980 int iY = (int)(fabs(rapidity)*10.);
981 if( iY > 23 ) iY = 23;
988 if( PS[0] != PS[0] ) {
989 std::cout <<
"ERROR: PS[0] = nan, setting it to 0" << std::endl;
1001 Bgrp1 = bgrResult.first;
1005 PB = bgrResult.second;
1006 if( PB != PB ) PB = 0;
1007 PStot[0] = (1-Bgrp1)*PS[0] + Bgrp1*PB;
1012 PStot[0] *= relativeCrossSections[0];
1013 if (
MuScleFitUtils::debug > 0 )
std::cout <<
"PStot["<<0<<
"] = " <<
"(1-"<<Bgrp1<<
")*"<<PS[0]<<
" + "<<Bgrp1<<
"*"<<PB<<
" = " << PStot[0] <<
" (reletiveXS = )" << relativeCrossSections[0] << std::endl;
1017 std::cout <<
"Mass = " << mass <<
" outside range with rapidity = " << rapidity << std::endl;
1018 std::cout <<
"with resMass = " <<
backgroundHandler->
resMass( useBackgroundWindow, 0 ) <<
" and left border = " << windowBorders.first <<
" right border = " << windowBorders.second << std::endl;
1031 if(
checkMassWindow(mass, windowBorder.first, windowBorder.second) ) {
1041 Bgrp1 = bgrResult.first;
1042 PB = bgrResult.second;
1044 if( PB != PB ) PB = 0;
1045 PStot[
ires] = (1-Bgrp1)*PS[
ires] + Bgrp1*PB;
1048 PStot[
ires] *= relativeCrossSections[
ires];
1053 for(
int i=0;
i<6; ++
i ) {
1058 double PStotTemp = 0.;
1059 for(
int i=0;
i<6; ++
i ) {
1060 PStotTemp += PS[
i]*relativeCrossSections[
i];
1062 if( PStotTemp != PStotTemp ) {
1063 std::cout <<
"ERROR: PStotTemp = nan!!!!!!!!!" << std::endl;
1065 for(
int i=0;
i<6; ++
i ) {
1066 std::cout <<
"PS[i] = " << PS[
i] << std::endl;
1067 if( PS[
i] != PS[
i] ) {
1068 std::cout <<
"mass = " << mass << std::endl;
1069 std::cout <<
"massResol = " << massResol << std::endl;
1070 for(
int j=0;
j<parnumber; ++
j ) {
1071 std::cout <<
"parval["<<
j<<
"] = " << parval[
j] << std::endl;
1076 if( PStotTemp == PStotTemp ) {
1079 if (
debug>0)
std::cout <<
"mass = " << mass <<
", P = " << P <<
", PStot = " << PStotTemp <<
", PB = " << PB <<
", bgrp1 = " << Bgrp1 << std::endl;
1094 return( (mass > leftBorder) && (mass < rightBorder) );
1110 if( doUseBkgrWindow && (
debug > 0) )
std::cout <<
"using backgrond window for mass = " << mass << std::endl;
1120 if(
checkMassWindow(mass, windowBorder.first, windowBorder.second) ) {
1122 if( doUseBkgrWindow && (
debug > 0) )
std::cout <<
"setting weight to = " << weight << std::endl;
1136 ofstream FitParametersFile;
1137 FitParametersFile.open (
"FitParameters.txt", std::ios::app);
1138 FitParametersFile <<
"Fitting with resolution, scale, bgr function # "
1155 int parForResonanceWindows = 0;
1168 std::vector<double> *tmpVec = &(
parvalue.back());
1175 std::cout <<
"scaleFitNotDone: tmpVec->size() = " << tmpVec->size() << std::endl;
1179 std::cout <<
"scaleFitDone: tmpVec->size() = " << tmpVec->size() << std::endl;
1182 tmpVec->insert( tmpVec->end(),
parBgr.begin(),
parBgr.end() );
1184 std::vector<double>::const_iterator it = tmpVec->begin();
1185 for( ; it != tmpVec->end(); ++it, ++
i ) {
1186 std::cout <<
"tmpVec["<<i<<
"] = " << *it << std::endl;
1192 std::vector<int> crossSectionParNumSizeVec( MuScleFitUtils::crossSectionHandler->parNum(), 0 );
1196 parfix.insert( parfix.end(), crossSectionParNumSizeVec.begin(), crossSectionParNumSizeVec.end() );
1201 parorder.insert( parorder.end(), crossSectionParNumSizeVec.begin(), crossSectionParNumSizeVec.end() );
1205 std::vector<double> parerr(3*parnumberAll,0.);
1208 std::cout <<
"[MuScleFitUtils-minimizeLikelihood]: Parameters before likelihood " << std::endl;
1209 for (
unsigned int i=0; i<(
unsigned int)parnumberAll; i++) {
1211 << parorder[
i] << std::endl;
1228 TMinuit rmin (parnumber);
1234 rmin.mninit (5, 6, 7);
1241 rmin.mnexcm (
"SET STR", arglis, 1, ierror);
1245 rmin.mnexcm(
"SET RAN", arglis, 1, ierror);
1249 double * Start =
new double[parnumberAll];
1250 double *
Step =
new double[parnumberAll];
1251 double * Mini =
new double[parnumberAll];
1252 double * Maxi =
new double[parnumberAll];
1253 int * ind =
new int[parnumberAll];
1254 TString * parname =
new TString[parnumberAll];
1257 MuScleFitUtils::resolutionFunctionForVec->
setParameters( Start, Step, Mini, Maxi, ind, parname,
parResol,
parResolOrder,
parResolStep,
parResolMin,
parResolMax,
MuonType );
1264 int resParNum = MuScleFitUtils::resolutionFunctionForVec->
parNum();
1267 MuScleFitUtils::scaleFunctionForVec->
setParameters( &(Start[resParNum]), &(Step[resParNum]),
1268 &(Mini[resParNum]), &(Maxi[resParNum]),
1269 &(ind[resParNum]), &(parname[resParNum]),
1274 MuScleFitUtils::scaleFunctionForVec->
setParameters( &(Start[resParNum]), &(Step[resParNum]),
1275 &(Mini[resParNum]), &(Maxi[resParNum]),
1276 &(ind[resParNum]), &(parname[resParNum]),
1281 int crossSectionParShift = resParNum + MuScleFitUtils::scaleFunctionForVec->
parNum();
1282 MuScleFitUtils::crossSectionHandler->
setParameters( &(Start[crossSectionParShift]), &(Step[crossSectionParShift]), &(Mini[crossSectionParShift]),
1283 &(Maxi[crossSectionParShift]), &(ind[crossSectionParShift]), &(parname[crossSectionParShift]),
1288 MuScleFitUtils::backgroundHandler->
setParameters( &(Start[bgrParShift]), &(Step[bgrParShift]), &(Mini[bgrParShift]), &(Maxi[bgrParShift]),
1291 for(
int ipar=0; ipar<parnumber; ++ipar ) {
1292 std::cout <<
"parname["<<ipar<<
"] = " << parname[ipar] << std::endl;
1293 std::cout <<
"Start["<<ipar<<
"] = " << Start[ipar] << std::endl;
1294 std::cout <<
"Step["<<ipar<<
"] = " << Step[ipar] << std::endl;
1295 std::cout <<
"Mini["<<ipar<<
"] = " << Mini[ipar] << std::endl;
1296 std::cout <<
"Maxi["<<ipar<<
"] = " << Maxi[ipar] << std::endl;
1299 rmin.mnparm( ipar, parname[ipar], Start[ipar], Step[ipar], Mini[ipar], Maxi[ipar], ierror );
1311 std::cout <<
"[MuScleFitUtils-minimizeLikelihood]: Starting minimization" << std::endl;
1317 rmin.mnexcm (
"CALL FCN", arglis, 1, ierror);
1322 std::cout <<
"[MuScleFitUtils-minimizeLikelihood]: First fix all parameters ...";
1323 for (
int ipar=0; ipar<parnumber; ipar++) {
1324 rmin.FixParameter (ipar);
1329 if (
debug>19)
std::cout <<
" Then release them in order..." << std::endl;
1351 std::cout <<
"number of parameters for scaleFunction = " << scaleParNum << std::endl;
1352 std::cout <<
"number of parameters for resolutionFunction = " << resParNum << std::endl;
1354 std::cout <<
"number of parameters for backgroundFunction = " <<
parBgr.size() << std::endl;
1357 for (
int i=0; i<parnumber; i++) {
1359 if (n_times<ind[i]) {
1362 if ( i<resParNum ) {
1365 else if( i<resParNum+scaleParNum ) {
1372 std::cout <<
"Starting minimization " <<
iorder <<
" of " << n_times << std::endl;
1374 bool somethingtodo =
false;
1381 for(
unsigned int ipar=0; ipar<
parResol.size(); ++ipar ) {
1382 if( parfix[ipar]==0 && ind[ipar]==
iorder ) {
1383 rmin.Release( ipar );
1384 somethingtodo =
true;
1392 if( parfix[ipar]==0 && ind[ipar]==
iorder ) {
1393 rmin.Release( ipar );
1394 somethingtodo =
true;
1405 if( doCrossSection ) somethingtodo =
true;
1416 rmin.Release( ipar );
1417 somethingtodo =
true;
1424 if( somethingtodo ) {
1427 std::stringstream fileNum;
1432 sprintf(name,
"likelihoodInLoop_%d_%d", loopCounter,
iorder);
1433 TH1D * tempLikelihoodInLoop =
new TH1D(name,
"likelihood value in minuit loop", 10000, 0, 10000);
1435 char signalProbName[50];
1436 sprintf(signalProbName,
"signalProb_%d_%d", loopCounter,
iorder);
1437 TH1D * tempSignalProb =
new TH1D(signalProbName,
"signal probability", 10000, 0, 10000);
1439 char backgroundProbName[50];
1440 sprintf(backgroundProbName,
"backgroundProb_%d_%d", loopCounter,
iorder);
1441 TH1D * tempBackgroundProb =
new TH1D(backgroundProbName,
"background probability", 10000, 0, 10000);
1452 double protectionFactor = 0.9;
1469 double windowBorderShift = (windowBorder.second - windowBorder.first)*(1-protectionFactor)/2.;
1470 double windowBorderLeft = windowBorder.first + windowBorderShift;
1471 double windowBorderRight = windowBorder.second - windowBorderShift;
1486 std::cout<<
"MINUIT is starting the minimization for the iteration number "<<loopCounter<<std::endl;
1491 std::cout<<
"maxNumberOfIterations (just set) = "<<rmin.GetMaxIterations()<<std::endl;
1502 rmin.mnexcm(
"SIMPLEX", arglis, 0, ierror );
1505 rmin.mnexcm(
"MIGRAD", arglis, 2, ierror );
1514 delete tempLikelihoodInLoop;
1515 delete tempSignalProb;
1516 delete tempBackgroundProb;
1524 rmin.mnexcm(
"HESSE", arglis, 0, ierror );
1529 rmin.mnexcm(
"MINOS", arglis, 0, ierror );
1534 std::cout <<
"WARNING: normalization changed during fit meaning that events exited from the mass window. This causes a discontinuity in the likelihood function. Please check the scan of the likelihood as a function of the parameters to see if there are discontinuities around the minimum." << std::endl;
1539 for (
int ipar=0; ipar<parnumber; ipar++) {
1541 rmin.mnpout (ipar, name, pval, erro, pmin, pmax, ivar);
1544 if (ierror!=0 &&
debug>0) {
1545 std::cout <<
"[MuScleFitUtils-minimizeLikelihood]: ierror!=0, bogus pars" << std::endl;
1556 rmin.mnerrs (ipar, errh, errl, errp, cglo);
1562 parerr[3*ipar] = errp;
1564 parerr[3*ipar] = (((errh)>(fabs(errl)))?(errh):(fabs(errl)));
1566 parerr[3*ipar+1] = errl;
1567 parerr[3*ipar+2] = errh;
1570 FitParametersFile <<
" Resolution fit parameters:" << std::endl;
1572 if( ipar ==
int(
parResol.size()) ) {
1573 FitParametersFile <<
" Scale fit parameters:" << std::endl;
1576 FitParametersFile <<
" Cross section fit parameters:" << std::endl;
1579 FitParametersFile <<
" Background fit parameters:" << std::endl;
1595 FitParametersFile <<
" Results of the fit: parameter " << ipar <<
" has value "
1596 << pval <<
"+-" << parerr[3*ipar]
1597 <<
" + " << parerr[3*ipar+1] <<
" - " << parerr[3*ipar+2]
1604 rmin.mnstat (fmin, fdem, errdef, npari, nparx, istat);
1605 FitParametersFile << std::endl;
1611 if( somethingtodo ) {
1612 std::stringstream iorderString;
1614 std::stringstream iLoopString;
1617 for (
int ipar=0; ipar<parnumber; ipar++) {
1618 if( parfix[ipar] == 1 )
continue;
1619 std::cout <<
"plotting parameter = " << ipar+1 << std::endl;
1620 std::stringstream iparString;
1621 iparString << ipar+1;
1622 std::stringstream iparStringName;
1623 iparStringName << ipar;
1624 rmin.mncomd( (
"scan "+iparString.str()).c_str(), ierror );
1626 TCanvas *
canvas =
new TCanvas((
"likelihoodCanvas_loop_"+iLoopString.str()+
"_oder_"+iorderString.str()+
"_par_"+iparStringName.str()).c_str(), (
"likelihood_"+iparStringName.str()).c_str(), 1000, 800);
1630 TGraph *
graph = (TGraph*)rmin.GetPlot();
1633 graph->SetTitle(parname[ipar]);
1655 FitParametersFile.close();
1657 std::cout <<
"[MuScleFitUtils-minimizeLikelihood]: Parameters after likelihood " << std::endl;
1658 for (
unsigned int ipar=0; ipar<(
unsigned int)parnumber; ipar++) {
1660 << parfix[ipar] <<
"; order = " << parorder[ipar] << std::endl;
1665 for(
int i=0; i<(int)(
parResol.size()); ++
i ) {
1668 for(
int i=0; i<(int)(
parScale.size()); ++
i ) {
1677 for(
unsigned int i = 0; i<(
parBgr.size() - parForResonanceWindows); ++
i ) {
1687 if(
MuonType > 2 ) localMuonType = 2;
1703 extern "C" void likelihood(
int& npar,
double* grad,
double& fval,
double* xval,
int flag ) {
1773 double Y = (corrMu1+corrMu2).Rapidity();
1774 double resEta = (corrMu1+corrMu2).
Eta();
1776 std::cout <<
"[MuScleFitUtils-likelihood]: Original/Corrected resonance mass = " << mass
1777 <<
" / " << corrMass << std::endl;
1784 std::cout <<
"[MuScleFitUtils-likelihood]: Resolution is " << massResol << std::endl;
1791 double prob =
MuScleFitUtils::massProb( corrMass, resEta, Y, massResol, xval,
false, corrMu1.eta(), corrMu2.eta() );
1802 std::cout <<
"WARNING: corrMass = " << corrMass <<
" outside window, this will cause a discontinuity in the likelihood. Consider increasing the safety bands which are now set to 90% of the normalization window to avoid this problem" << std::endl;
1803 std::cout <<
"Original mass was = " << mass << std::endl;
1804 std::cout <<
"WARNING: massResol = " << massResol <<
" outside window" << std::endl;
1809 std::cout <<
"[MuScleFitUtils-likelihood]: Mass probability = " << prob << std::endl;
1832 if( evtsinlik != 0 ) {
1839 double normalizationArg[] = {1/double(evtsinlik)};
1853 fval = -2.*flike/double(evtsinlik);
1864 std::cout <<
"Problem: Events in likelihood = " << evtsinlik << std::endl;
1869 std::cout <<
"[MuScleFitUtils-likelihood]: End tree loop with likelihood value = " << fval << std::endl;
1894 std::cout <<
"Events in likelihood = " << evtsinlik << std::endl;
1895 std::cout <<
"Events out likelihood = " << evtsoutlik << std::endl;
1907 std::vector<TGraphErrors *>
results;
1911 std::vector<double> Ftop;
1912 std::vector<double> Fwidth;
1913 std::vector<double> Fmass;
1914 std::vector<double> Etop;
1915 std::vector<double> Ewidth;
1916 std::vector<double> Emass;
1917 std::vector<double> Fchi2;
1920 std::vector<double> Xcenter;
1921 std::vector<double> Ex;
1926 fitFcn->SetParameters (100, 3, 91);
1927 fitFcn->SetParNames (
"Ftop",
"Fwidth",
"Fmass");
1928 fitFcn->SetLineWidth (2);
1932 double cont_min = 20;
1933 Int_t binx = histo->GetXaxis()->GetNbins();
1936 for (
int i=1;
i<=binx;
i++) {
1937 TH1 * histoY = histo->ProjectionY (
"",
i,
i);
1939 double cont = histoY->GetEntries();
1940 if (cont>cont_min) {
1941 histoY->Fit (
"fitFcn",
"0",
"", 70, 110);
1942 double *par = fitFcn->GetParameters();
1943 double *err = fitFcn->GetParErrors();
1945 Ftop.push_back(par[0]);
1946 Fwidth.push_back(par[1]);
1947 Fmass.push_back(par[2]);
1948 Etop.push_back(err[0]);
1949 Ewidth.push_back(err[1]);
1950 Emass.push_back(err[2]);
1952 double chi2 = fitFcn->GetChisquare();
1953 Fchi2.push_back(chi2);
1955 double xx = histo->GetXaxis()->GetBinCenter(
i);
1956 Xcenter.push_back(xx);
1965 const int nn = Fmass.size();
1966 double *
x =
new double[nn];
1967 double *ym =
new double[nn];
1968 double *
e =
new double[nn];
1969 double *eym =
new double[nn];
1970 double *yw =
new double[nn];
1971 double *eyw =
new double[nn];
1972 double *yc =
new double[nn];
1974 for (
int j=0;
j<nn;
j++) {
1986 TString
name = histo->GetName();
1987 TGraphErrors *grM =
new TGraphErrors (nn, x, ym, e, eym);
1988 grM->SetTitle (name+
"_M");
1989 grM->SetName (name+
"_M");
1990 TGraphErrors *grW =
new TGraphErrors (nn, x, yw, e, eyw);
1991 grW->SetTitle (name+
"_W");
1992 grW->SetName (name+
"_W");
1993 TGraphErrors *grC =
new TGraphErrors (nn, x, yc, e, e);
1994 grC->SetTitle (name+
"_chi2");
1995 grC->SetName (name+
"_chi2");
2008 results.push_back(grM);
2009 results.push_back(grW);
2010 results.push_back(grC);
2017 std::cout <<
"Fitting " << histo->GetName() << std::endl;
2018 std::vector<TGraphErrors *>
results;
2022 std::vector<double> maxs;
2023 std::vector<double> means;
2024 std::vector<double> sigmas;
2025 std::vector<double> chi2s;
2026 std::vector<double> Emaxs;
2027 std::vector<double> Emeans;
2028 std::vector<double> Esigmas;
2032 std::vector<double> Xcenter;
2033 std::vector<double> Ex;
2037 TF1 *fitFcn =
new TF1 (
"fitFunc",
Gaussian, -0.2, 0.2, 3);
2038 fitFcn->SetParameters (100, 0, 0.02);
2039 fitFcn->SetParNames (
"max",
"mean",
"sigma");
2040 fitFcn->SetLineWidth (2);
2044 double cont_min = 20;
2045 Int_t binx = histo->GetXaxis()->GetNbins();
2046 for (
int i=1;
i<=binx;
i++) {
2047 TH1 * histoY = histo->ProjectionY (
"",
i,
i);
2048 double cont = histoY->GetEntries();
2049 if (cont>cont_min) {
2050 histoY->Fit (
"fitFunc",
"0",
"", -0.2, 0.2);
2051 double *par = fitFcn->GetParameters();
2052 double *err = fitFcn->GetParErrors();
2054 maxs.push_back (par[0]);
2055 means.push_back (par[1]);
2056 sigmas.push_back (par[2]);
2057 Emaxs.push_back (err[0]);
2058 Emeans.push_back (err[1]);
2059 Esigmas.push_back (err[2]);
2061 double chi2 = fitFcn->GetChisquare();
2062 chi2s.push_back (chi2);
2064 double xx = histo->GetXaxis()->GetBinCenter(
i);
2065 Xcenter.push_back (xx);
2073 const int nn = means.size();
2074 double *
x =
new double[nn];
2075 double *ym =
new double[nn];
2076 double *
e =
new double[nn];
2077 double *eym =
new double[nn];
2078 double *yw =
new double[nn];
2079 double *eyw =
new double[nn];
2080 double *yc =
new double[nn];
2082 for (
int j=0;
j<nn;
j++) {
2089 eyw[
j] = Esigmas[
j];
2096 TString
name = histo->GetName();
2097 TGraphErrors *grM =
new TGraphErrors (nn, x, ym, e, eym);
2098 grM->SetTitle (name+
"_mean");
2099 grM->SetName (name+
"_mean");
2100 TGraphErrors *grW =
new TGraphErrors (nn, x, yw, e, eyw);
2101 grW->SetTitle (name+
"_sigma");
2102 grW->SetName (name+
"_sigma");
2103 TGraphErrors *grC =
new TGraphErrors (nn, x, yc, e, e);
2104 grC->SetTitle (name+
"_chi2");
2105 grC->SetName (name+
"_chi2");
2118 results.push_back (grM);
2119 results.push_back (grW);
2120 results.push_back (grC);
2136 if (massResol==0.) {
2137 if (
debug>9)
std::cout <<
"Mass, gamma , mref, width, P: " << mass
2139 <<
" : used Lorentz P-value" << std::endl;
2160 double *
x =
new double[
np];
2161 double *
w =
new double[
np];
2163 GL->CalcGaussLegendreSamplingPoints (np, x, w, 0.1
e-15);
2172 if (
debug>9)
std::cout <<
"Mass, gamma , mref, width, P: " << mass
2174 <<
": used epsilon" << std::endl;
2178 if (
debug>9)
std::cout <<
"Mass, gamma , mref, width, P: " << mass
2180 <<
" " << P << std::endl;
2188 std::pair<lorentzVector, lorentzVector> simMuFromRes;
2189 for( edm::SimTrackContainer::const_iterator simTrack=simTracks->begin(); simTrack!=simTracks->end(); ++simTrack ) {
2191 if (fabs((*simTrack).type())==13) {
2193 if ((*simTrack).genpartIndex()>0) {
2194 HepMC::GenParticle* gp = evtMC->GetEvent()->barcode_to_particle ((*simTrack).genpartIndex());
2197 for (HepMC::GenVertex::particle_iterator mother = gp->production_vertex()->particles_begin(HepMC::ancestors);
2198 mother!=gp->production_vertex()->particles_end(HepMC::ancestors); ++mother) {
2200 bool fromRes =
false;
2201 unsigned int motherPdgId = (*mother)->pdg_id();
2206 if(gp->pdg_id() == 13)
2207 simMuFromRes.first =
lorentzVector(simTrack->momentum().px(),simTrack->momentum().py(),
2208 simTrack->momentum().pz(),simTrack->momentum().e());
2210 simMuFromRes.second =
lorentzVector(simTrack->momentum().px(),simTrack->momentum().py(),
2211 simTrack->momentum().pz(),simTrack->momentum().e());
2219 return simMuFromRes;
2224 const HepMC::GenEvent* Evt = evtMC->
GetEvent();
2225 std::pair<lorentzVector,lorentzVector> muFromRes;
2227 for (HepMC::GenEvent::particle_const_iterator
part=Evt->particles_begin();
2228 part!=Evt->particles_end();
part++) {
2229 if (fabs((*part)->pdg_id())==13 && (*part)->status()==1) {
2230 bool fromRes =
false;
2231 for (HepMC::GenVertex::particle_iterator mother = (*part)->production_vertex()->particles_begin(HepMC::ancestors);
2232 mother != (*part)->production_vertex()->particles_end(HepMC::ancestors); ++mother) {
2233 unsigned int motherPdgId = (*mother)->pdg_id();
2238 if( motherPdgId == 13 && (*mother)->status() == 3 ) fromRes =
true;
2247 if((*part)->pdg_id()==13)
2249 muFromRes.first = (
lorentzVector((*part)->momentum().px(),(*part)->momentum().py(),
2250 (*part)->momentum().pz(),(*part)->momentum().e()));
2252 muFromRes.second = (
lorentzVector((*part)->momentum().px(),(*part)->momentum().py(),
2253 (*part)->momentum().pz(),(*part)->momentum().e()));
2262 std::pair<lorentzVector,lorentzVector> muFromRes;
2265 if(
debug>0 )
std::cout <<
"Starting loop on " << genParticles->size() <<
" genParticles" << std::endl;
2266 for( reco::GenParticleCollection::const_iterator
part=genParticles->begin();
part!=genParticles->end(); ++
part ) {
2267 if (fabs(
part->pdgId())==13 &&
part->status()==1) {
2268 bool fromRes =
false;
2269 unsigned int motherPdgId =
part->mother()->pdgId();
2271 std::cout <<
"Found a muon with mother: " << motherPdgId << std::endl;
2277 if(
part->pdgId()==13) {
2278 muFromRes.first =
part->p4();
2279 if(
debug>0 )
std::cout <<
"Found a genMuon + : " << muFromRes.first << std::endl;
2284 muFromRes.second =
part->p4();
2285 if(
debug>0 )
std::cout <<
"Found a genMuon - : " << muFromRes.second << std::endl;
static std::vector< std::pair< lorentzVector, lorentzVector > > simPair
static std::vector< int > doScaleFit
std::vector< GenParticle > GenParticleCollection
collection of GenParticles
static std::vector< int > doResolFit
static std::pair< lorentzVector, lorentzVector > findGenMuFromRes(const reco::GenParticleCollection *genParticles)
double sigmaPt(const U &track, const int i=0) const
The second, optional, parameter is the iteration number.
static double GLValue[6][1001][1001]
static std::vector< double > parBias
static std::vector< int > parCrossSectionOrder
static smearFunctionBase * smearFunction
static std::vector< int > parScaleOrder
static std::vector< int > doCrossSectionFit
static void minimizeLikelihood()
static double maxMuonEtaSecondRange_
Double_t Gaussian(Double_t *x, Double_t *par)
int regionsParNum()
Returns the total number of parameters used for the regions.
static std::vector< int > parBgrOrder
static std::vector< int > parfix
static double deltaPhiMaxCut_
static unsigned int loopCounter
double sigmaCotgTh(const U &track, const int i=0) const
The second, optional, parameter is the iteration number.
static std::vector< double > parResolMax
static std::pair< lorentzVector, lorentzVector > findSimMuFromRes(const edm::Handle< edm::HepMCProduct > &evtMC, const edm::Handle< edm::SimTrackContainer > &simTracks)
static std::vector< std::pair< MuScleFitMuon, MuScleFitMuon > > SavedPairMuScleFitMuons
void likelihood(int &npar, double *grad, double &fval, double *xval, int flag)
static bool startWithSimplex_
static std::vector< int > doBackgroundFit
static std::vector< double > parResol
static bool debugMassResol_
void setParameters(double *Start, double *Step, double *Mini, double *Maxi, int *ind, TString *parname, const std::vector< double > &parCrossSection, const std::vector< int > &parCrossSectionOrder, const std::vector< int > &resfind)
Initializes the arrays needed by Minuit.
Sin< T >::type sin(const T &t)
static double ResMinMass[6]
static TH1D * backgroundProb_
virtual void smear(double &pt, double &eta, double &phi, const double *y, const std::vector< double > &parSmear)=0
static BackgroundHandler * backgroundHandler
static double x[7][10000]
std::pair< double, double > backgroundFunction(const bool doBackgroundFit, const double *parval, const int resTotNum, const int ires, const bool *resConsidered, const double *ResMass, const double ResHalfWidth[], const int MuonType, const double &mass, const double &eta1, const double &eta2)
static std::vector< TGraphErrors * > fitMass(TH2F *histo)
static double massWindowHalfWidth[3][6]
static bool scaleFitNotDone_
static unsigned int normalizationChanged_
static scaleFunctionBase< std::vector< double > > * biasFunction
static bool checkMassWindow(const double &mass, const double &leftBorder, const double &rightBorder)
Method to check if the mass value is within the mass window of the i-th resonance.
static std::vector< int > parBgrFix
static std::vector< double > parResolMin
static bool minimumShapePlots_
static int MuonTypeForCheckMassWindow
static double minMuonEtaFirstRange_
static double massProb(const double &mass, const double &rapidity, const int ires, const double &massResol)
static struct MuScleFitUtils::massResolComponentsStruct massResolComponents
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e g
static std::vector< int > parScaleFix
static bool computeMinosErrors_
reco::Particle::LorentzVector lorentzVector
static scaleFunctionBase< std::vector< double > > * scaleFunctionForVec
static std::pair< SimTrack, SimTrack > findBestSimuRes(const std::vector< SimTrack > &simMuons)
static std::vector< std::vector< double > > parvalue
virtual double sigmaPt(const double &pt, const double &eta, const T &parval)=0
static std::pair< MuScleFitMuon, MuScleFitMuon > findBestRecoRes(const std::vector< MuScleFitMuon > &muons)
static std::vector< std::pair< lorentzVector, lorentzVector > > genPair
static std::vector< std::pair< lorentzVector, lorentzVector > > ReducedSavedPair
static const int totalResNum
static const double muMass
static double massResolution(const lorentzVector &mu1, const lorentzVector &mu2)
static const unsigned int motherPdgIdArray[6]
virtual int parNum() const
static std::vector< double > parScaleMin
static lorentzVector applyBias(const lorentzVector &muon, const int charge)
void rescale(std::vector< double > &parBgr, const double *ResMass, const double *massWindowHalfWidth, const std::vector< std::pair< reco::Particle::LorentzVector, reco::Particle::LorentzVector > > &muonPairs, const double &weight=1.)
static double GLZNorm[40][1001]
static std::vector< double > parBgr
bool check(const DataFrame &df, bool capcheck, bool dvercheck)
virtual void setParameters(double *Start, double *Step, double *Mini, double *Maxi, int *ind, TString *parname, const T &parScale, const std::vector< int > &parScaleOrder, const int muonType)=0
This method is used to differentiate parameters among the different functions.
static lorentzVector fromPtEtaPhiToPxPyPz(const double *ptEtaPhiE)
Cos< T >::type cos(const T &t)
virtual double covPt1Pt2(const double &pt1, const double &eta1, const double &pt2, const double &eta2, const T &parval)
bool releaseParameters(TMinuit &rmin, const std::vector< int > &resfind, const std::vector< int > &parfix, const int *ind, const int iorder, const unsigned int shift)
Use the information in resfind, parorder and parfix to release the N-1 variables. ...
static double ResMaxSigma[6]
static double computeWeight(const double &mass, const int iev, const bool doUseBkgrWindow=false)
static std::vector< double > parScaleStep
static std::vector< std::pair< lorentzVector, lorentzVector > > SavedPair
static double invDimuonMass(const lorentzVector &mu1, const lorentzVector &mu2)
static lorentzVector applyScale(const lorentzVector &muon, const std::vector< double > &parval, const int charge)
static TH1D * signalProb_
static std::vector< int > parResolFix
static double GLZValue[40][1001][1001]
static TMinuit * rminPtr_
static std::vector< double > parSmear
virtual double scale(const double &pt, const double &eta, const double &phi, const int chg, const T &parScale) const =0
static std::vector< int > parResolOrder
double resMass(const bool doBackgroundFit, const int ires)
static TH1D * likelihoodInLoop_
static std::vector< double > parScaleMax
double sigmaPhi(const U &track, const int i=0) const
The second, optional, parameter is the iteration number.
static std::vector< double > parScale
static double oldNormalization_
virtual double sigmaCotgTh(const double &pt, const double &eta, const T &parval)=0
std::vector< double > relativeCrossSections(const double *variables, const std::vector< int > &resfind)
Perform a variable transformation from N-1 to relative cross sections.
const HepMC::GenEvent * GetEvent() const
void setParameters(double *Start, double *Step, double *Mini, double *Maxi, int *ind, TString *parname, const std::vector< double > &parBgr, const std::vector< int > &parBgrOrder, const int muonType)
Sets initial parameters for all the functions.
static double ResGamma[6]
static double deltaPhiMinCut_
Double_t lorentzianPeak(Double_t *x, Double_t *par)
static bool rapidityBinsForZ_
static bool separateRanges_
static double minMuonEtaSecondRange_
static std::vector< double > parCrossSection
std::vector< std::vector< double > > tmp
static double GLNorm[6][1001]
static std::vector< TGraphErrors * > fitReso(TH2F *histo)
static lorentzVector applySmearing(const lorentzVector &muon)
std::pair< double, double > windowBorders(const bool doBackgroundFit, const int ires)
Returns the appropriate window borders depending on whether the background is being fitted and on the...
static bool normalizeLikelihoodByEventNumber_
bool unlockParameter(const std::vector< int > &resfind, const unsigned int ipar)
returns true if the parameter is to be unlocked
static unsigned int const shift
virtual void setParameters(double *Start, double *Step, double *Mini, double *Maxi, int *ind, TString *parname, const T &parResol, const std::vector< int > &parResolOrder, const int muonType)
This method is used to differentiate parameters among the different functions.
static double probability(const double &mass, const double &massResol, const double GLvalue[][1001][1001], const double GLnorm[][1001], const int iRes, const int iY)
Computes the probability given the mass, mass resolution and the arrays with the probabilities and th...
virtual double sigmaPhi(const double &pt, const double &eta, const T &parval)=0
static scaleFunctionBase< double * > * scaleFunction
static bool useProbsFile_
static std::vector< int > resfind
virtual void resetParameters(std::vector< double > *scaleVec) const
This method is used to reset the scale parameters to neutral values (useful for iterations > 0) ...
static double ResHalfWidth[6]
static int counter_resprob
static resolutionFunctionBase< std::vector< double > > * resolutionFunctionForVec
static std::vector< int > parorder
virtual int parNum() const
static double maxMuonEtaFirstRange_
Power< A, B >::type pow(const A &a, const B &b)
static CrossSectionHandler * crossSectionHandler
static std::vector< double > parResolStep
static std::vector< int > parCrossSectionFix
static resolutionFunctionBase< double * > * resolutionFunction