51 #include "valgrind/callgrind.h"
58 TMath::Max(1.
e-10,(x[0]-par[2])*(x[0]-par[2]) + .25*par[1]*par[1]);
64 return par[0]*
exp(-0.5*((x[0]-par[1])/par[2])*((x[0]-par[1])/par[2]));
83 TF1 *
GL =
new TF1 (
"GL",
84 "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))",
87 TF2 *
GL2=
new TF2 (
"GL2",
88 "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))",
272 std::pair<SimTrack, SimTrack> simMuFromBestRes;
273 double maxprob = -0.1;
277 for (std::vector<SimTrack>::const_iterator simMu1=simMuons.begin(); simMu1!=simMuons.end(); simMu1++) {
278 for (std::vector<SimTrack>::const_iterator simMu2=simMu1+1; simMu2!=simMuons.end(); simMu2++) {
279 if (((*simMu1).charge()*(*simMu2).charge())>0) {
284 double mcomb = ((*simMu1).momentum()+(*simMu2).momentum()).mass();
285 double Y = ((*simMu1).momentum()+(*simMu2).momentum()).Rapidity();
290 simMuFromBestRes.first = (*simMu1);
291 simMuFromBestRes.second = (*simMu2);
301 return simMuFromBestRes;
313 std::pair<MuScleFitMuon, MuScleFitMuon> recMuFromBestRes;
317 double maxprob = -0.1;
318 double minDeltaMass = 999999;
319 std::pair<MuScleFitMuon,MuScleFitMuon> bestMassMuons;
320 for (std::vector<MuScleFitMuon>::const_iterator Muon1=muons.begin(); Muon1!=muons.end(); ++Muon1) {
322 if (
debug>0)
std::cout <<
"muon_1_charge:"<<(*Muon1).charge() << std::endl;
323 for (std::vector<MuScleFitMuon>::const_iterator Muon2=Muon1+1; Muon2!=muons.end(); ++Muon2) {
326 if ((((*Muon1).charge())*((*Muon2).charge()))>0) {
333 double pt1 = (*Muon1).Pt();
334 double pt2 = (*Muon2).Pt();
335 double eta1 = (*Muon1).Eta();
336 double eta2 = (*Muon2).Eta();
343 double mcomb = ((*Muon1).p4()+(*Muon2).p4()).mass();
344 double Y = ((*Muon1).p4()+(*Muon2).p4()).Rapidity();
346 std::cout<<
"muon1 "<<(*Muon1).p4().Px()<<
", "<<(*Muon1).p4().Py()<<
", "<<(*Muon1).p4().Pz()<<
", "<<(*Muon1).p4().E()<<
", "<<(*Muon1).charge()<<std::endl;
347 std::cout<<
"muon2 "<<(*Muon2).p4().Px()<<
", "<<(*Muon2).p4().Py()<<
", "<<(*Muon2).p4().Pz()<<
", "<<(*Muon2).p4().E()<<
", "<<(*Muon2).charge()<<std::endl;
349 double massResol = 0.;
360 if( (*Muon1).charge()<0 ) {
361 recMuFromBestRes.first = (*Muon1);
362 recMuFromBestRes.second = (*Muon2);
364 recMuFromBestRes.first = (*Muon2);
365 recMuFromBestRes.second = (*Muon1);
367 if (
debug>0)
std::cout <<
"muon_1_charge (after swapping):"<<recMuFromBestRes.first.charge() << std::endl;
376 if( deltaMass<minDeltaMass ){
377 bestMassMuons = std::make_pair((*Muon1),(*Muon2));
378 minDeltaMass = deltaMass;
388 if(bestMassMuons.first.charge()<0){
389 recMuFromBestRes.first = bestMassMuons.first;
390 recMuFromBestRes.second = bestMassMuons.second;
393 recMuFromBestRes.second = bestMassMuons.first;
394 recMuFromBestRes.first = bestMassMuons.second;
397 return recMuFromBestRes;
404 double pt = muon.Pt();
405 double eta = muon.Eta();
406 double phi = muon.Phi();
418 std::cout <<
"Smearing Pt,eta,phi = " << pt <<
" " << eta <<
" "
420 for (
int i=0;
i<SmearType+3;
i++) {
426 double ptEtaPhiE[4] = {
pt,
eta,
phi, E};
434 double ptEtaPhiE[4] = {muon.Pt(),muon.Eta(),muon.Phi(),muon.E()};
453 const std::vector<double> & parval,
const int chg)
455 double *
p =
new double[(int)(parval.size())];
460 for (std::vector<double>::const_iterator it=parval.begin(); it!=parval.end(); ++it, ++id) {
473 double* parval,
const int chg)
475 double ptEtaPhiE[4] = {muon.Pt(),muon.Eta(),muon.Phi(),muon.E()};
482 ptEtaPhiE[0] =
scaleFunction->
scale(ptEtaPhiE[0], ptEtaPhiE[1], ptEtaPhiE[2], chg, &(parval[shift]));
493 double px = ptEtaPhiE[0]*
cos(ptEtaPhiE[2]);
494 double py = ptEtaPhiE[0]*
sin(ptEtaPhiE[2]);
495 double tmp = 2*atan(
exp(-ptEtaPhiE[1]));
496 double pz = ptEtaPhiE[0]*
cos(tmp)/
sin(tmp);
511 return (mu1+mu2).mass();
518 const std::vector<double> & parval )
531 double *
p =
new double[(int)(parval.size())];
532 std::vector<double>::const_iterator it = parval.begin();
534 for ( ; it!=parval.end(); ++it, ++id) {
564 double mass = (mu1+mu2).mass();
565 double pt1 = mu1.Pt();
566 double phi1 = mu1.Phi();
567 double eta1 = mu1.Eta();
568 double theta1 = 2*atan(
exp(-eta1));
569 double pt2 = mu2.Pt();
570 double phi2 = mu2.Phi();
571 double eta2 = mu2.Eta();
572 double theta2 = 2*atan(
exp(-eta2));
575 pt2*(
cos(phi1-phi2)+
cos(theta1)*
cos(theta2)/(
sin(theta1)*
sin(theta2))))/mass;
577 pt1*(
cos(phi2-phi1)+
cos(theta2)*
cos(theta1)/(
sin(theta2)*
sin(theta1))))/mass;
578 double dmdphi1 = pt1*pt2/mass*
sin(phi1-phi2);
579 double dmdphi2 = pt2*pt1/mass*
sin(phi2-phi1);
580 double dmdcotgth1 = (pt1*pt1*
cos(theta1)/
sin(theta1)*
582 pt1*pt2*
cos(theta2)/
sin(theta2))/mass;
583 double dmdcotgth2 = (pt2*pt2*
cos(theta2)/
sin(theta2)*
585 pt2*pt1*
cos(theta1)/
sin(theta1))/mass;
611 2*dmdpt1*dmdpt2*cov_pt1pt2*sigma_pt1*sigma_pt2);
614 std::cout <<
" Pt1=" << pt1 <<
" phi1=" << phi1 <<
" cotgth1=" <<
cos(theta1)/
sin(theta1) <<
" - Pt2=" << pt2
615 <<
" phi2=" << phi2 <<
" cotgth2=" <<
cos(theta2)/
sin(theta2) << std::endl;
617 << parval[0] <<
" P[1]=" << parval[1] <<
"P[2]=" << parval[2] <<
" P[3]=" << parval[3] << std::endl;
618 std::cout <<
" Dmdpt1= " << dmdpt1 <<
" dmdpt2= " << dmdpt2 <<
" sigma_pt1="
619 << sigma_pt1 <<
" sigma_pt2=" << sigma_pt2 << std::endl;
620 std::cout <<
" Dmdphi1= " << dmdphi1 <<
" dmdphi2= " << dmdphi2 <<
" sigma_phi1="
621 << sigma_phi1 <<
" sigma_phi2=" << sigma_phi2 << std::endl;
622 std::cout <<
" Dmdcotgth1= " << dmdcotgth1 <<
" dmdcotgth2= " << dmdcotgth2
624 << sigma_cotgth1 <<
" sigma_cotgth2=" << sigma_cotgth2 << std::endl;
625 std::cout <<
" Mass resolution (pval) for muons of Pt = " << pt1 <<
" " << pt2
626 <<
" : " << mass <<
" +- " << mass_res << std::endl;
636 LogDebug(
"MuScleFitUtils") <<
"RESOLUTION PROBLEM: ires=" << ires << std::endl;
653 double mass = (mu1+mu2).mass();
654 double pt1 = mu1.Pt();
655 double phi1 = mu1.Phi();
656 double eta1 = mu1.Eta();
657 double theta1 = 2*atan(
exp(-eta1));
658 double pt2 = mu2.Pt();
659 double phi2 = mu2.Phi();
660 double eta2 = mu2.Eta();
661 double theta2 = 2*atan(
exp(-eta2));
664 pt2*(
cos(phi1-phi2)+
cos(theta1)*
cos(theta2)/(
sin(theta1)*
sin(theta2))))/mass;
666 pt1*(
cos(phi2-phi1)+
cos(theta2)*
cos(theta1)/(
sin(theta2)*
sin(theta1))))/mass;
667 double dmdphi1 = pt1*pt2/mass*
sin(phi1-phi2);
668 double dmdphi2 = pt2*pt1/mass*
sin(phi2-phi1);
669 double dmdcotgth1 = (pt1*pt1*
cos(theta1)/
sin(theta1)*
671 pt1*pt2*
cos(theta2)/
sin(theta2))/mass;
672 double dmdcotgth2 = (pt2*pt2*
cos(theta2)/
sin(theta2)*
674 pt2*pt1*
cos(theta1)/
sin(theta1))/mass;
678 double sigma_pt1 = resolFunc.
sigmaPt( mu1 );
679 double sigma_pt2 = resolFunc.
sigmaPt( mu2 );
680 double sigma_phi1 = resolFunc.
sigmaPhi( mu1 );
681 double sigma_phi2 = resolFunc.
sigmaPhi( mu2 );
682 double sigma_cotgth1 = resolFunc.
sigmaCotgTh( mu1 );
683 double sigma_cotgth2 = resolFunc.
sigmaCotgTh( mu2 );
697 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 )
700 CALLGRIND_START_INSTRUMENTATION;
703 double *
p =
new double[(int)(parval.size())];
708 std::vector<double>::const_iterator it = parval.begin();
710 for ( ; it!=parval.end(); ++it, ++id) {
715 double massProbability =
massProb( mass, resEta, rapidity, massResol, p, doUseBkgrWindow, eta1, eta2 );
719 CALLGRIND_STOP_INSTRUMENTATION;
720 CALLGRIND_DUMP_STATS;
723 return massProbability;
732 const double GLvalue[][1001][1001],
const double GLnorm[][1001],
733 const int iRes,
const int iY )
735 if( iRes == 0 && iY > 23 ) {
736 std::cout <<
"WARNING: rapidity bin selected = " << iY <<
" but there are only histograms for the first 24 bins" << std::endl;
740 bool insideProbMassWindow =
true;
748 if (
debug>1)
std::cout << std::setprecision(9)<<
"mass ResMinMass[iRes] ResHalfWidth[iRes] ResHalfWidth[iRes]"
750 int iMassLeft = (int)(fracMass*(
double)
nbins);
751 int iMassRight = iMassLeft+1;
752 double fracMassStep = (double)
nbins*(fracMass - (
double)iMassLeft/(double)
nbins);
753 if (
debug>1)
std::cout<<
"nbins iMassLeft fracMass "<<nbins<<
" "<<iMassLeft<<
" "<<fracMass<<std::endl;
759 edm::LogInfo(
"probability") <<
"WARNING: fracMass=" << fracMass <<
", iMassLeft="
760 << iMassLeft <<
"; mass = " << mass <<
" and bounds are " <<
ResMinMass[iRes]
764 insideProbMassWindow =
false;
766 if (iMassRight>nbins) {
767 edm::LogInfo(
"probability") <<
"WARNING: fracMass=" << fracMass <<
", iMassRight="
768 << iMassRight <<
"; mass = " << mass <<
" and bounds are " <<
ResMinMass[iRes]
769 <<
":" <<
ResMass[iRes]+2*
ResHalfWidth[iRes] <<
" - iMassRight set to " << nbins-1 << std::endl;
772 insideProbMassWindow =
false;
775 int iSigmaLeft = (int)(fracSigma*(
double)
nbins);
776 int iSigmaRight = iSigmaLeft+1;
777 double fracSigmaStep = (double)nbins * (fracSigma - (
double)iSigmaLeft/(double)nbins);
791 edm::LogInfo(
"probability") <<
"WARNING: fracSigma = " << fracSigma <<
", iSigmaLeft="
792 << iSigmaLeft <<
", with massResol = " << massResol <<
" and ResMaxSigma[iRes] = "
793 <<
ResMaxSigma[iRes] <<
" - iSigmaLeft set to 0" << std::endl;
797 if (iSigmaRight>nbins ) {
799 edm::LogInfo(
"probability") <<
"WARNING: fracSigma = " << fracSigma <<
", iSigmaRight="
800 << iSigmaRight <<
", with massResol = " << massResol <<
" and ResMaxSigma[iRes] = "
801 <<
ResMaxSigma[iRes] <<
" - iSigmaRight set to " << nbins-1 << std::endl;
802 iSigmaLeft = nbins-1;
809 if( insideProbMassWindow ) {
811 if (GLnorm[iY][iSigmaLeft]>0)
812 f11 = GLvalue[iY][iMassLeft][iSigmaLeft] / GLnorm[iY][iSigmaLeft];
814 if (GLnorm[iY][iSigmaRight]>0)
815 f12 = GLvalue[iY][iMassLeft][iSigmaRight] / GLnorm[iY][iSigmaRight];
817 if (GLnorm[iY][iSigmaLeft]>0)
818 f21 = GLvalue[iY][iMassRight][iSigmaLeft] / GLnorm[iY][iSigmaLeft];
820 if (GLnorm[iY][iSigmaRight]>0)
821 f22 = GLvalue[iY][iMassRight][iSigmaRight] / GLnorm[iY][iSigmaRight];
822 PS = f11 + (f12-f11)*fracSigmaStep + (f21-f11)*fracMassStep +
823 (f22-f21-f12+f11)*fracMassStep*fracSigmaStep;
824 if (PS>0.1 ||
debug>1)
LogDebug(
"MuScleFitUtils") <<
"iRes = " << iRes <<
" PS=" << PS <<
" f11,f12,f21,f22="
825 << f11 <<
" " << f12 <<
" " << f21 <<
" " << f22 <<
" "
826 <<
" fSS=" << fracSigmaStep <<
" fMS=" << fracMassStep <<
" iSL, iSR="
827 << iSigmaLeft <<
" " << iSigmaRight
828 <<
" GLvalue["<<iY<<
"]["<<iMassLeft<<
"] = " << GLvalue[iY][iMassLeft][iSigmaLeft]
829 <<
" GLnorm["<<iY<<
"]["<<iSigmaLeft<<
"] = " << GLnorm[iY][iSigmaLeft] << std::endl;
840 edm::LogInfo(
"probability") <<
"outside mass probability window. Setting PS["<<iRes<<
"] = 0" << std::endl;
862 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 ) {
953 double PStot[6] = {0.};
956 bool resConsidered[6] = {
false};
978 int iY = (int)(fabs(rapidity)*10.);
979 if( iY > 23 ) iY = 23;
986 if( PS[0] != PS[0] ) {
987 std::cout <<
"ERROR: PS[0] = nan, setting it to 0" << std::endl;
999 Bgrp1 = bgrResult.first;
1003 PB = bgrResult.second;
1004 if( PB != PB ) PB = 0;
1005 PStot[0] = (1-Bgrp1)*PS[0] + Bgrp1*PB;
1010 PStot[0] *= relativeCrossSections[0];
1011 if (
MuScleFitUtils::debug > 0 )
std::cout <<
"PStot["<<0<<
"] = " <<
"(1-"<<Bgrp1<<
")*"<<PS[0]<<
" + "<<Bgrp1<<
"*"<<PB<<
" = " << PStot[0] <<
" (reletiveXS = )" << relativeCrossSections[0] << std::endl;
1015 std::cout <<
"Mass = " << mass <<
" outside range with rapidity = " << rapidity << std::endl;
1016 std::cout <<
"with resMass = " <<
backgroundHandler->
resMass( useBackgroundWindow, 0 ) <<
" and left border = " << windowBorders.first <<
" right border = " << windowBorders.second << std::endl;
1029 if(
checkMassWindow(mass, windowBorder.first, windowBorder.second) ) {
1039 Bgrp1 = bgrResult.first;
1040 PB = bgrResult.second;
1042 if( PB != PB ) PB = 0;
1043 PStot[
ires] = (1-Bgrp1)*PS[
ires] + Bgrp1*PB;
1046 PStot[
ires] *= relativeCrossSections[
ires];
1051 for(
int i=0;
i<6; ++
i ) {
1056 double PStotTemp = 0.;
1057 for(
int i=0;
i<6; ++
i ) {
1058 PStotTemp += PS[
i]*relativeCrossSections[
i];
1060 if( PStotTemp != PStotTemp ) {
1061 std::cout <<
"ERROR: PStotTemp = nan!!!!!!!!!" << std::endl;
1063 for(
int i=0;
i<6; ++
i ) {
1064 std::cout <<
"PS[i] = " << PS[
i] << std::endl;
1065 if( PS[
i] != PS[
i] ) {
1066 std::cout <<
"mass = " << mass << std::endl;
1067 std::cout <<
"massResol = " << massResol << std::endl;
1068 for(
int j=0;
j<parnumber; ++
j ) {
1069 std::cout <<
"parval["<<
j<<
"] = " << parval[
j] << std::endl;
1074 if( PStotTemp == PStotTemp ) {
1077 if (
debug>0)
std::cout <<
"mass = " << mass <<
", P = " << P <<
", PStot = " << PStotTemp <<
", PB = " << PB <<
", bgrp1 = " << Bgrp1 << std::endl;
1092 return( (mass > leftBorder) && (mass < rightBorder) );
1108 if( doUseBkgrWindow && (
debug > 0) )
std::cout <<
"using backgrond window for mass = " << mass << std::endl;
1118 if(
checkMassWindow(mass, windowBorder.first, windowBorder.second) ) {
1120 if( doUseBkgrWindow && (
debug > 0) )
std::cout <<
"setting weight to = " << weight << std::endl;
1134 std::ofstream FitParametersFile;
1135 FitParametersFile.open (
"FitParameters.txt", std::ios::app);
1136 FitParametersFile <<
"Fitting with resolution, scale, bgr function # "
1153 int parForResonanceWindows = 0;
1166 std::vector<double> *tmpVec = &(
parvalue.back());
1173 std::cout <<
"scaleFitNotDone: tmpVec->size() = " << tmpVec->size() << std::endl;
1177 std::cout <<
"scaleFitDone: tmpVec->size() = " << tmpVec->size() << std::endl;
1180 tmpVec->insert( tmpVec->end(),
parBgr.begin(),
parBgr.end() );
1182 std::vector<double>::const_iterator it = tmpVec->begin();
1183 for( ; it != tmpVec->end(); ++it, ++
i ) {
1184 std::cout <<
"tmpVec["<<i<<
"] = " << *it << std::endl;
1190 std::vector<int> crossSectionParNumSizeVec( MuScleFitUtils::crossSectionHandler->parNum(), 0 );
1194 parfix.insert( parfix.end(), crossSectionParNumSizeVec.begin(), crossSectionParNumSizeVec.end() );
1199 parorder.insert( parorder.end(), crossSectionParNumSizeVec.begin(), crossSectionParNumSizeVec.end() );
1203 std::vector<double> parerr(3*parnumberAll,0.);
1206 std::cout <<
"[MuScleFitUtils-minimizeLikelihood]: Parameters before likelihood " << std::endl;
1207 for (
unsigned int i=0; i<(
unsigned int)parnumberAll; i++) {
1209 << parorder[
i] << std::endl;
1226 TMinuit rmin (parnumber);
1232 rmin.mninit (5, 6, 7);
1239 rmin.mnexcm (
"SET STR", arglis, 1, ierror);
1243 rmin.mnexcm(
"SET RAN", arglis, 1, ierror);
1247 double * Start =
new double[parnumberAll];
1248 double *
Step =
new double[parnumberAll];
1249 double * Mini =
new double[parnumberAll];
1250 double * Maxi =
new double[parnumberAll];
1251 int * ind =
new int[parnumberAll];
1252 TString * parname =
new TString[parnumberAll];
1255 MuScleFitUtils::resolutionFunctionForVec->
setParameters( Start, Step, Mini, Maxi, ind, parname,
parResol,
parResolOrder,
parResolStep,
parResolMin,
parResolMax,
MuonType );
1262 int resParNum = MuScleFitUtils::resolutionFunctionForVec->
parNum();
1265 MuScleFitUtils::scaleFunctionForVec->
setParameters( &(Start[resParNum]), &(Step[resParNum]),
1266 &(Mini[resParNum]), &(Maxi[resParNum]),
1267 &(ind[resParNum]), &(parname[resParNum]),
1272 MuScleFitUtils::scaleFunctionForVec->
setParameters( &(Start[resParNum]), &(Step[resParNum]),
1273 &(Mini[resParNum]), &(Maxi[resParNum]),
1274 &(ind[resParNum]), &(parname[resParNum]),
1279 int crossSectionParShift = resParNum + MuScleFitUtils::scaleFunctionForVec->
parNum();
1280 MuScleFitUtils::crossSectionHandler->
setParameters( &(Start[crossSectionParShift]), &(Step[crossSectionParShift]), &(Mini[crossSectionParShift]),
1281 &(Maxi[crossSectionParShift]), &(ind[crossSectionParShift]), &(parname[crossSectionParShift]),
1286 MuScleFitUtils::backgroundHandler->
setParameters( &(Start[bgrParShift]), &(Step[bgrParShift]), &(Mini[bgrParShift]), &(Maxi[bgrParShift]),
1289 for(
int ipar=0; ipar<parnumber; ++ipar ) {
1290 std::cout <<
"parname["<<ipar<<
"] = " << parname[ipar] << std::endl;
1291 std::cout <<
"Start["<<ipar<<
"] = " << Start[ipar] << std::endl;
1292 std::cout <<
"Step["<<ipar<<
"] = " << Step[ipar] << std::endl;
1293 std::cout <<
"Mini["<<ipar<<
"] = " << Mini[ipar] << std::endl;
1294 std::cout <<
"Maxi["<<ipar<<
"] = " << Maxi[ipar] << std::endl;
1297 rmin.mnparm( ipar, parname[ipar], Start[ipar], Step[ipar], Mini[ipar], Maxi[ipar], ierror );
1309 std::cout <<
"[MuScleFitUtils-minimizeLikelihood]: Starting minimization" << std::endl;
1315 rmin.mnexcm (
"CALL FCN", arglis, 1, ierror);
1320 std::cout <<
"[MuScleFitUtils-minimizeLikelihood]: First fix all parameters ...";
1321 for (
int ipar=0; ipar<parnumber; ipar++) {
1322 rmin.FixParameter (ipar);
1327 if (
debug>19)
std::cout <<
" Then release them in order..." << std::endl;
1349 std::cout <<
"number of parameters for scaleFunction = " << scaleParNum << std::endl;
1350 std::cout <<
"number of parameters for resolutionFunction = " << resParNum << std::endl;
1352 std::cout <<
"number of parameters for backgroundFunction = " <<
parBgr.size() << std::endl;
1355 for (
int i=0; i<parnumber; i++) {
1357 if (n_times<ind[i]) {
1360 if ( i<resParNum ) {
1363 else if( i<resParNum+scaleParNum ) {
1370 std::cout <<
"Starting minimization " <<
iorder <<
" of " << n_times << std::endl;
1372 bool somethingtodo =
false;
1379 for(
unsigned int ipar=0; ipar<
parResol.size(); ++ipar ) {
1380 if( parfix[ipar]==0 && ind[ipar]==
iorder ) {
1381 rmin.Release( ipar );
1382 somethingtodo =
true;
1390 if( parfix[ipar]==0 && ind[ipar]==
iorder ) {
1391 rmin.Release( ipar );
1392 somethingtodo =
true;
1403 if( doCrossSection ) somethingtodo =
true;
1414 rmin.Release( ipar );
1415 somethingtodo =
true;
1422 if( somethingtodo ) {
1425 std::stringstream fileNum;
1430 sprintf(name,
"likelihoodInLoop_%d_%d", loopCounter,
iorder);
1431 TH1D * tempLikelihoodInLoop =
new TH1D(name,
"likelihood value in minuit loop", 10000, 0, 10000);
1433 char signalProbName[50];
1434 sprintf(signalProbName,
"signalProb_%d_%d", loopCounter,
iorder);
1435 TH1D * tempSignalProb =
new TH1D(signalProbName,
"signal probability", 10000, 0, 10000);
1437 char backgroundProbName[50];
1438 sprintf(backgroundProbName,
"backgroundProb_%d_%d", loopCounter,
iorder);
1439 TH1D * tempBackgroundProb =
new TH1D(backgroundProbName,
"background probability", 10000, 0, 10000);
1450 double protectionFactor = 0.9;
1467 double windowBorderShift = (windowBorder.second - windowBorder.first)*(1-protectionFactor)/2.;
1468 double windowBorderLeft = windowBorder.first + windowBorderShift;
1469 double windowBorderRight = windowBorder.second - windowBorderShift;
1484 std::cout<<
"MINUIT is starting the minimization for the iteration number "<<loopCounter<<std::endl;
1489 std::cout<<
"maxNumberOfIterations (just set) = "<<rmin.GetMaxIterations()<<std::endl;
1500 rmin.mnexcm(
"SIMPLEX", arglis, 0, ierror );
1503 rmin.mnexcm(
"MIGRAD", arglis, 2, ierror );
1512 delete tempLikelihoodInLoop;
1513 delete tempSignalProb;
1514 delete tempBackgroundProb;
1522 rmin.mnexcm(
"HESSE", arglis, 0, ierror );
1527 rmin.mnexcm(
"MINOS", arglis, 0, ierror );
1532 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;
1537 for (
int ipar=0; ipar<parnumber; ipar++) {
1539 rmin.mnpout (ipar, name, pval, erro, pmin, pmax, ivar);
1542 if (ierror!=0 &&
debug>0) {
1543 std::cout <<
"[MuScleFitUtils-minimizeLikelihood]: ierror!=0, bogus pars" << std::endl;
1554 rmin.mnerrs (ipar, errh, errl, errp, cglo);
1560 parerr[3*ipar] = errp;
1562 parerr[3*ipar] = (((errh)>(fabs(errl)))?(errh):(fabs(errl)));
1564 parerr[3*ipar+1] = errl;
1565 parerr[3*ipar+2] = errh;
1568 FitParametersFile <<
" Resolution fit parameters:" << std::endl;
1570 if( ipar ==
int(
parResol.size()) ) {
1571 FitParametersFile <<
" Scale fit parameters:" << std::endl;
1574 FitParametersFile <<
" Cross section fit parameters:" << std::endl;
1577 FitParametersFile <<
" Background fit parameters:" << std::endl;
1593 FitParametersFile <<
" Results of the fit: parameter " << ipar <<
" has value "
1594 << pval <<
"+-" << parerr[3*ipar]
1595 <<
" + " << parerr[3*ipar+1] <<
" - " << parerr[3*ipar+2]
1602 rmin.mnstat (fmin, fdem, errdef, npari, nparx, istat);
1603 FitParametersFile << std::endl;
1609 if( somethingtodo ) {
1610 std::stringstream iorderString;
1612 std::stringstream iLoopString;
1615 for (
int ipar=0; ipar<parnumber; ipar++) {
1616 if( parfix[ipar] == 1 )
continue;
1617 std::cout <<
"plotting parameter = " << ipar+1 << std::endl;
1618 std::stringstream iparString;
1619 iparString << ipar+1;
1620 std::stringstream iparStringName;
1621 iparStringName << ipar;
1622 rmin.mncomd( (
"scan "+iparString.str()).c_str(), ierror );
1624 TCanvas *
canvas =
new TCanvas((
"likelihoodCanvas_loop_"+iLoopString.str()+
"_oder_"+iorderString.str()+
"_par_"+iparStringName.str()).c_str(), (
"likelihood_"+iparStringName.str()).c_str(), 1000, 800);
1628 TGraph *
graph = (TGraph*)rmin.GetPlot();
1631 graph->SetTitle(parname[ipar]);
1653 FitParametersFile.close();
1655 std::cout <<
"[MuScleFitUtils-minimizeLikelihood]: Parameters after likelihood " << std::endl;
1656 for (
unsigned int ipar=0; ipar<(
unsigned int)parnumber; ipar++) {
1658 << parfix[ipar] <<
"; order = " << parorder[ipar] << std::endl;
1663 for(
int i=0; i<(int)(
parResol.size()); ++
i ) {
1666 for(
int i=0; i<(int)(
parScale.size()); ++
i ) {
1675 for(
unsigned int i = 0; i<(
parBgr.size() - parForResonanceWindows); ++
i ) {
1685 if(
MuonType > 2 ) localMuonType = 2;
1701 extern "C" void likelihood(
int& npar,
double* grad,
double& fval,
double* xval,
int flag ) {
1771 double Y = (corrMu1+corrMu2).Rapidity();
1772 double resEta = (corrMu1+corrMu2).
Eta();
1774 std::cout <<
"[MuScleFitUtils-likelihood]: Original/Corrected resonance mass = " << mass
1775 <<
" / " << corrMass << std::endl;
1782 std::cout <<
"[MuScleFitUtils-likelihood]: Resolution is " << massResol << std::endl;
1789 double prob =
MuScleFitUtils::massProb( corrMass, resEta, Y, massResol, xval,
false, corrMu1.eta(), corrMu2.eta() );
1800 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;
1801 std::cout <<
"Original mass was = " << mass << std::endl;
1802 std::cout <<
"WARNING: massResol = " << massResol <<
" outside window" << std::endl;
1807 std::cout <<
"[MuScleFitUtils-likelihood]: Mass probability = " << prob << std::endl;
1830 if( evtsinlik != 0 ) {
1837 double normalizationArg[] = {1/double(evtsinlik)};
1851 fval = -2.*flike/double(evtsinlik);
1862 std::cout <<
"Problem: Events in likelihood = " << evtsinlik << std::endl;
1867 std::cout <<
"[MuScleFitUtils-likelihood]: End tree loop with likelihood value = " << fval << std::endl;
1892 std::cout <<
"Events in likelihood = " << evtsinlik << std::endl;
1893 std::cout <<
"Events out likelihood = " << evtsoutlik << std::endl;
1905 std::vector<TGraphErrors *>
results;
1909 std::vector<double> Ftop;
1910 std::vector<double> Fwidth;
1911 std::vector<double> Fmass;
1912 std::vector<double> Etop;
1913 std::vector<double> Ewidth;
1914 std::vector<double> Emass;
1915 std::vector<double> Fchi2;
1918 std::vector<double> Xcenter;
1919 std::vector<double> Ex;
1924 fitFcn->SetParameters (100, 3, 91);
1925 fitFcn->SetParNames (
"Ftop",
"Fwidth",
"Fmass");
1926 fitFcn->SetLineWidth (2);
1930 double cont_min = 20;
1931 Int_t binx = histo->GetXaxis()->GetNbins();
1934 for (
int i=1;
i<=binx;
i++) {
1935 TH1 * histoY = histo->ProjectionY (
"",
i,
i);
1937 double cont = histoY->GetEntries();
1938 if (cont>cont_min) {
1939 histoY->Fit (
"fitFcn",
"0",
"", 70, 110);
1940 double *par = fitFcn->GetParameters();
1941 const double *err = fitFcn->GetParErrors();
1943 Ftop.push_back(par[0]);
1944 Fwidth.push_back(par[1]);
1945 Fmass.push_back(par[2]);
1946 Etop.push_back(err[0]);
1947 Ewidth.push_back(err[1]);
1948 Emass.push_back(err[2]);
1950 double chi2 = fitFcn->GetChisquare();
1951 Fchi2.push_back(chi2);
1953 double xx = histo->GetXaxis()->GetBinCenter(
i);
1954 Xcenter.push_back(xx);
1963 const int nn = Fmass.size();
1964 double *
x =
new double[nn];
1965 double *ym =
new double[nn];
1966 double *
e =
new double[nn];
1967 double *eym =
new double[nn];
1968 double *yw =
new double[nn];
1969 double *eyw =
new double[nn];
1970 double *yc =
new double[nn];
1972 for (
int j=0;
j<nn;
j++) {
1984 TString
name = histo->GetName();
1985 TGraphErrors *grM =
new TGraphErrors (nn, x, ym, e, eym);
1986 grM->SetTitle (name+
"_M");
1987 grM->SetName (name+
"_M");
1988 TGraphErrors *grW =
new TGraphErrors (nn, x, yw, e, eyw);
1989 grW->SetTitle (name+
"_W");
1990 grW->SetName (name+
"_W");
1991 TGraphErrors *grC =
new TGraphErrors (nn, x, yc, e, e);
1992 grC->SetTitle (name+
"_chi2");
1993 grC->SetName (name+
"_chi2");
2006 results.push_back(grM);
2007 results.push_back(grW);
2008 results.push_back(grC);
2015 std::cout <<
"Fitting " << histo->GetName() << std::endl;
2016 std::vector<TGraphErrors *>
results;
2020 std::vector<double> maxs;
2021 std::vector<double> means;
2022 std::vector<double> sigmas;
2023 std::vector<double> chi2s;
2024 std::vector<double> Emaxs;
2025 std::vector<double> Emeans;
2026 std::vector<double> Esigmas;
2030 std::vector<double> Xcenter;
2031 std::vector<double> Ex;
2035 TF1 *fitFcn =
new TF1 (
"fitFunc",
Gaussian, -0.2, 0.2, 3);
2036 fitFcn->SetParameters (100, 0, 0.02);
2037 fitFcn->SetParNames (
"max",
"mean",
"sigma");
2038 fitFcn->SetLineWidth (2);
2042 double cont_min = 20;
2043 Int_t binx = histo->GetXaxis()->GetNbins();
2044 for (
int i=1;
i<=binx;
i++) {
2045 TH1 * histoY = histo->ProjectionY (
"",
i,
i);
2046 double cont = histoY->GetEntries();
2047 if (cont>cont_min) {
2048 histoY->Fit (
"fitFunc",
"0",
"", -0.2, 0.2);
2049 double *par = fitFcn->GetParameters();
2050 const double *err = fitFcn->GetParErrors();
2052 maxs.push_back (par[0]);
2053 means.push_back (par[1]);
2054 sigmas.push_back (par[2]);
2055 Emaxs.push_back (err[0]);
2056 Emeans.push_back (err[1]);
2057 Esigmas.push_back (err[2]);
2059 double chi2 = fitFcn->GetChisquare();
2060 chi2s.push_back (chi2);
2062 double xx = histo->GetXaxis()->GetBinCenter(
i);
2063 Xcenter.push_back (xx);
2071 const int nn = means.size();
2072 double *
x =
new double[nn];
2073 double *ym =
new double[nn];
2074 double *
e =
new double[nn];
2075 double *eym =
new double[nn];
2076 double *yw =
new double[nn];
2077 double *eyw =
new double[nn];
2078 double *yc =
new double[nn];
2080 for (
int j=0;
j<nn;
j++) {
2087 eyw[
j] = Esigmas[
j];
2094 TString
name = histo->GetName();
2095 TGraphErrors *grM =
new TGraphErrors (nn, x, ym, e, eym);
2096 grM->SetTitle (name+
"_mean");
2097 grM->SetName (name+
"_mean");
2098 TGraphErrors *grW =
new TGraphErrors (nn, x, yw, e, eyw);
2099 grW->SetTitle (name+
"_sigma");
2100 grW->SetName (name+
"_sigma");
2101 TGraphErrors *grC =
new TGraphErrors (nn, x, yc, e, e);
2102 grC->SetTitle (name+
"_chi2");
2103 grC->SetName (name+
"_chi2");
2116 results.push_back (grM);
2117 results.push_back (grW);
2118 results.push_back (grC);
2134 if (massResol==0.) {
2135 if (
debug>9)
std::cout <<
"Mass, gamma , mref, width, P: " << mass
2137 <<
" : used Lorentz P-value" << std::endl;
2158 double *
x =
new double[
np];
2159 double *
w =
new double[
np];
2161 GL->CalcGaussLegendreSamplingPoints (np, x, w, 0.1
e-15);
2170 if (
debug>9)
std::cout <<
"Mass, gamma , mref, width, P: " << mass
2172 <<
": used epsilon" << std::endl;
2176 if (
debug>9)
std::cout <<
"Mass, gamma , mref, width, P: " << mass
2178 <<
" " << P << std::endl;
2186 std::pair<lorentzVector, lorentzVector> simMuFromRes;
2187 for( edm::SimTrackContainer::const_iterator simTrack=simTracks->begin(); simTrack!=simTracks->end(); ++simTrack ) {
2189 if (fabs((*simTrack).type())==13) {
2191 if ((*simTrack).genpartIndex()>0) {
2192 HepMC::GenParticle* gp = evtMC->GetEvent()->barcode_to_particle ((*simTrack).genpartIndex());
2195 for (HepMC::GenVertex::particle_iterator mother = gp->production_vertex()->particles_begin(HepMC::ancestors);
2196 mother!=gp->production_vertex()->particles_end(HepMC::ancestors); ++mother) {
2198 bool fromRes =
false;
2199 unsigned int motherPdgId = (*mother)->pdg_id();
2204 if(gp->pdg_id() == 13)
2205 simMuFromRes.first =
lorentzVector(simTrack->momentum().px(),simTrack->momentum().py(),
2206 simTrack->momentum().pz(),simTrack->momentum().e());
2208 simMuFromRes.second =
lorentzVector(simTrack->momentum().px(),simTrack->momentum().py(),
2209 simTrack->momentum().pz(),simTrack->momentum().e());
2217 return simMuFromRes;
2222 const HepMC::GenEvent* Evt = evtMC->
GetEvent();
2223 std::pair<lorentzVector,lorentzVector> muFromRes;
2225 for (HepMC::GenEvent::particle_const_iterator
part=Evt->particles_begin();
2226 part!=Evt->particles_end();
part++) {
2227 if (fabs((*part)->pdg_id())==13 && (*part)->status()==1) {
2228 bool fromRes =
false;
2229 for (HepMC::GenVertex::particle_iterator mother = (*part)->production_vertex()->particles_begin(HepMC::ancestors);
2230 mother != (*part)->production_vertex()->particles_end(HepMC::ancestors); ++mother) {
2231 unsigned int motherPdgId = (*mother)->pdg_id();
2236 if( motherPdgId == 13 && (*mother)->status() == 3 ) fromRes =
true;
2245 if((*part)->pdg_id()==13)
2247 muFromRes.first = (
lorentzVector((*part)->momentum().px(),(*part)->momentum().py(),
2248 (*part)->momentum().pz(),(*part)->momentum().e()));
2250 muFromRes.second = (
lorentzVector((*part)->momentum().px(),(*part)->momentum().py(),
2251 (*part)->momentum().pz(),(*part)->momentum().e()));
2260 std::pair<lorentzVector,lorentzVector> muFromRes;
2263 if(
debug>0 )
std::cout <<
"Starting loop on " << genParticles->size() <<
" genParticles" << std::endl;
2264 for( reco::GenParticleCollection::const_iterator
part=genParticles->begin();
part!=genParticles->end(); ++
part ) {
2265 if (fabs(
part->pdgId())==13 &&
part->status()==1) {
2266 bool fromRes =
false;
2267 unsigned int motherPdgId =
part->mother()->pdgId();
2269 std::cout <<
"Found a muon with mother: " << motherPdgId << std::endl;
2275 if(
part->pdgId()==13) {
2276 muFromRes.first =
part->p4();
2277 if(
debug>0 )
std::cout <<
"Found a genMuon + : " << muFromRes.first << std::endl;
2282 muFromRes.second =
part->p4();
2283 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.
tuple cont
load Luminosity info ##
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
T x() const
Cartesian x coordinate.
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
bool check(const std::string &)
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
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