void OSM_Model400::calculateA( int comp ) { int i = 0; int j = 0; // Set A[][] to identity matrix A = 0; for( i=0; i<nSize(); i++ ) A[i][i] = 1; double logT10 = log( T10[comp] ); double t1Size = 0; double tSize = 0; double yPass = 0; // 1. Generate square upper triangular matrix of appearance // functions. ie. the complete appearance function table // any size to any other size for( i=0; i<nSize()-1; i++ ) { // t1 marker size basis for this row t1Size = nominal()[i]; // from 2nd coarsest size (i+1) to 2nd finest (nSize-1) for( j=(i+1); j<(nSize()-1); j++ ) { tSize = t1Size / nominal()[j]; yPass = 0.01 * exp( m0 + m1 * logT10 - m2 * log(tSize) + m3 / (tSize*(T10[comp]+10)) ) / tSize; if( yPass > 1.0 ) yPass = 1.0; if( tSize < 1.0001 ) yPass = 1.0; A[i][j] = yPass; } A[i][nSize()-1] = 0; } // 2. Convert to a FRACTION retained basis for( i=0; i<nSize(); i++ ) { // ultrafine sink size a special case A[i][nSize()-1] = A[i][nSize()-2]; for( j=nSize()-2; j>i; j-- ) { // retained by difference A[i][j] = A[i][j-1] - A[i][j]; } // diagonal element is zero A[i][i] = 0; } }
Real FixedRateCoupon::accruedAmount(const Date& d) const { if (d <= accrualStartDate_ || d > paymentDate_) { return 0.0; } else if (tradingExCoupon(d)) { return -nominal()*(rate_.compoundFactor(d, accrualEndDate_, refPeriodStart_, refPeriodEnd_) - 1.0); } else { return nominal()*(rate_.compoundFactor(accrualStartDate_, std::min(d,accrualEndDate_), refPeriodStart_, refPeriodEnd_) - 1.0); } }
void TimeSigProperties::accept() { if (zText->text() != timesig->numeratorString()) timesig->setNumeratorString(zText->text()); if (nText->text() != timesig->denominatorString()) timesig->setDenominatorString(nText->text()); TimeSigType ts = TimeSigType::NORMAL; if (textButton->isChecked()) ts = TimeSigType::NORMAL; else if (fourfourButton->isChecked()) ts = TimeSigType::FOUR_FOUR; else if (allaBreveButton->isChecked()) ts = TimeSigType::ALLA_BREVE; else if (otherButton->isChecked()) { // if other symbol, set as normal text... ts = TimeSigType::NORMAL; ScoreFont* scoreFont = timesig->score()->scoreFont(); SymId symId = (SymId)( otherCombo->itemData(otherCombo->currentIndex()).toInt() ); // ...and set numerator to font string for symbol and denominator to empty string timesig->setNumeratorString(scoreFont->toString(symId)); timesig->setDenominatorString(QString()); } Fraction actual(zActual->value(), nActual->value()); Fraction nominal(zNominal->value(), nNominal->value()); timesig->setSig(actual, ts); timesig->setStretch(nominal / actual); Groups g = groups->groups(); timesig->setGroups(g); QDialog::accept(); }
void TimeSigProperties::accept() { if (zText->text() != timesig->zText() || nText->text() != timesig->nText()) timesig->setText(zText->text(), nText->text()); // timesig->setSig(Fraction(zNominal->value(), nNominal->value())); // timesig->setActualSig(Fraction(zActual->value(), nActual->value())); if (textButton->isChecked()) timesig->setSubtype(TSIG_NORMAL); else if (fourfourButton->isChecked()) { timesig->setSubtype(TSIG_FOUR_FOUR); qDebug("fourfour\n"); } else if (allaBreveButton->isChecked()) { timesig->setSubtype(TSIG_ALLA_BREVE); qDebug("alla breve\n"); } // setSig() and setActualSig must be AFTER setSubType() // as setSubType() also reset sig Fraction actual(zActual->value(), nActual->value()); Fraction nominal(zActual->value(), nActual->value()); Fraction stretch = nominal / actual; timesig->setSig(actual); timesig->setStretch(stretch); QDialog::accept(); }
Real InflationCoupon::accruedAmount(const Date& d) const { if (d <= accrualStartDate_ || d > paymentDate_) { return 0.0; } else { return nominal() * rate() * dayCounter().yearFraction(accrualStartDate_, std::min(d, accrualEndDate_), refPeriodStart_, refPeriodEnd_); } }
dd4hep::Position CellPositionsECalBarrelTool::xyzPosition(const uint64_t& aCellId) const { double radius; dd4hep::DDSegmentation::CellID volumeId = aCellId; m_decoder->set(volumeId, "phi", 0); m_decoder->set(volumeId, "eta", 0); auto detelement = m_volman.lookupDetElement(volumeId); const auto& transformMatrix = detelement.nominal().worldTransformation(); double outGlobal[3]; double inLocal[] = {0, 0, 0}; transformMatrix.LocalToMaster(inLocal, outGlobal); //debug() << "Position of volume (mm) : \t" << outGlobal[0] / dd4hep::mm << "\t" << outGlobal[1] / dd4hep::mm << "\t" // << outGlobal[2] / dd4hep::mm << endmsg; // radius calculated from segmenation + z postion of volumes auto inSeg = m_segmentation->position(aCellId); radius = std::sqrt(std::pow(outGlobal[0], 2) + std::pow(outGlobal[1], 2)); dd4hep::Position outSeg(inSeg.x() * radius, inSeg.y() * radius, inSeg.z() * radius); return outSeg; }
void TimeSigProperties::accept() { if (zText->text() != timesig->numeratorString()) timesig->setNumeratorString(zText->text()); if (nText->text() != timesig->denominatorString()) timesig->setDenominatorString(nText->text()); TimeSigType ts = TSIG_NORMAL; if (textButton->isChecked()) ts = TSIG_NORMAL; else if (fourfourButton->isChecked()) ts = TSIG_FOUR_FOUR; else if (allaBreveButton->isChecked()) ts = TSIG_ALLA_BREVE; Fraction actual(zActual->value(), nActual->value()); Fraction nominal(zActual->value(), nActual->value()); timesig->setSig(actual, ts); timesig->setStretch(nominal / actual); QDialog::accept(); }
dd4hep::Position CellPositionsCaloDiscsTool::xyzPosition(const uint64_t& aCellId) const { double radius; dd4hep::DDSegmentation::CellID volumeId = aCellId; m_decoder->set(volumeId, "phi", 0); m_decoder->set(volumeId, "eta", 0); dd4hep::Position outPos; auto detelement = m_volman.lookupDetElement(volumeId); const auto& transformMatrix = detelement.nominal().worldTransformation(); // m_volman.worldTransformation(volumeId); double outGlobal[3]; double inLocal[] = {0, 0, 0}; transformMatrix.LocalToMaster(inLocal, outGlobal); debug() << "Position of volume (mm) : \t" << outGlobal[0] / dd4hep::mm << "\t" << outGlobal[1] / dd4hep::mm << "\t" << outGlobal[2] / dd4hep::mm << endmsg; // radius calculated from segmenation + z postion of volumes auto inSeg = m_segmentation->position(aCellId); double eta = m_segmentation->eta(aCellId); radius = outGlobal[2] / std::sinh(eta); debug() << "Radius : " << radius << endmsg; outPos.SetCoordinates(inSeg.x() * radius, inSeg.y() * radius, outGlobal[2]); return outPos; }
void OSM_Model400::calculateC( ) { // Calculate C[] for each size for( int size=0; size<nSize(); size++ ) { double nomSize = nominal()[size]; if( size==nSize()-1 ) // Ugly patch nomSize = 0; if( nomSize < k1 ) { C[size] = 0.0; } else if( nomSize < k2 ) { C[size] = 1.0 - pow( (k2-nomSize)/(k2-k1), k3 ); } else { C[size] = 1.0; } } }
//! \name CashFlow interface //@{ Real amount() const { return rate() * accrualPeriod() * nominal(); }
Real CmsSpreadRangeAccrualCoupon::priceWithoutOptionality( const Handle<YieldTermStructure>& discountingCurve) const { return accrualPeriod() * (gearing_*indexFixing()+spread_) * nominal() * discountingCurve->discount(date()); }
Real FixedRateCoupon::amount() const { return nominal()*(rate_.compoundFactor(accrualStartDate_, accrualEndDate_, refPeriodStart_, refPeriodEnd_) - 1.0); }
int AbstractMeter::qt_metacall(QMetaObject::Call _c, int _id, void **_a) { _id = WidgetWithBackground::qt_metacall(_c, _id, _a); if (_id < 0) return _id; if (_c == QMetaObject::InvokeMetaMethod) { switch (_id) { case 0: valueChanged((*reinterpret_cast< int(*)>(_a[1]))); break; case 1: valueChanged((*reinterpret_cast< double(*)>(_a[1]))); break; case 2: setValue((*reinterpret_cast< int(*)>(_a[1]))); break; case 3: setValue((*reinterpret_cast< double(*)>(_a[1]))); break; default: ; } _id -= 4; } #ifndef QT_NO_PROPERTIES else if (_c == QMetaObject::ReadProperty) { void *_v = _a[0]; switch (_id) { case 0: *reinterpret_cast< double*>(_v) = minimum(); break; case 1: *reinterpret_cast< double*>(_v) = maximum(); break; case 2: *reinterpret_cast< double*>(_v) = value(); break; case 3: *reinterpret_cast< double*>(_v) = nominal(); break; case 4: *reinterpret_cast< double*>(_v) = critical(); break; case 5: *reinterpret_cast< QString*>(_v) = prefix(); break; case 6: *reinterpret_cast< QString*>(_v) = suffix(); break; case 7: *reinterpret_cast< QFont*>(_v) = valueFont(); break; case 8: *reinterpret_cast< double*>(_v) = valueOffset(); break; case 9: *reinterpret_cast< QFont*>(_v) = digitFont(); break; case 10: *reinterpret_cast< double*>(_v) = digitOffset(); break; } _id -= 11; } else if (_c == QMetaObject::WriteProperty) { void *_v = _a[0]; switch (_id) { case 0: setMinimum(*reinterpret_cast< double*>(_v)); break; case 1: setMaximum(*reinterpret_cast< double*>(_v)); break; case 2: setValue(*reinterpret_cast< double*>(_v)); break; case 3: setNominal(*reinterpret_cast< double*>(_v)); break; case 4: setCritical(*reinterpret_cast< double*>(_v)); break; case 5: setPrefix(*reinterpret_cast< QString*>(_v)); break; case 6: setSuffix(*reinterpret_cast< QString*>(_v)); break; case 7: setValueFont(*reinterpret_cast< QFont*>(_v)); break; case 8: setValueOffset(*reinterpret_cast< double*>(_v)); break; case 9: setDigitFont(*reinterpret_cast< QFont*>(_v)); break; case 10: setDigitOffset(*reinterpret_cast< double*>(_v)); break; } _id -= 11; } else if (_c == QMetaObject::ResetProperty) { _id -= 11; } else if (_c == QMetaObject::QueryPropertyDesignable) { _id -= 11; } else if (_c == QMetaObject::QueryPropertyScriptable) { _id -= 11; } else if (_c == QMetaObject::QueryPropertyStored) { _id -= 11; } else if (_c == QMetaObject::QueryPropertyEditable) { _id -= 11; } else if (_c == QMetaObject::QueryPropertyUser) { _id -= 11; } #endif // QT_NO_PROPERTIES return _id; }
void plotDataCard(TString file, Int_t channel, Int_t cat=-1){ TString ChannelName; if(channel==1)ChannelName="muTau"; else if(channel==2)ChannelName="eleTau"; else return; TFile nominal(file+".root","read"); gROOT->cd(); //TString fname=TString("plotDataCard_")+file+".ps"; TString fname=file+".ps"; TCanvas C; C.Print(fname+"["); for(long sm=0;sm<NCAT;sm++){// if(cat==13 && (sm==2 || sm==4))continue;//skip boost_low and vbf if(cat==20 && (sm==3 || sm==4))continue;//skip boost_high and vbf if(cat==23 && (sm==4))continue;//skip vbf if(cat==15 && (sm==2 || sm==3))continue;//skip boost_low and boost_high TH1F* ZTT = (TH1F*)nominal.Get(ChannelName+"_"+catdirname[sm]+"/ZTT"); if(!ZTT)continue; TH1F* QCD = (TH1F*)nominal.Get(ChannelName+"_"+catdirname[sm]+"/QCD"); TH1F* W = (TH1F*)nominal.Get(ChannelName+"_"+catdirname[sm]+"/W"); TH1F* TT = (TH1F*)nominal.Get(ChannelName+"_"+catdirname[sm]+"/TT"); TH1F* ZL = (TH1F*)nominal.Get(ChannelName+"_"+catdirname[sm]+"/ZL"); TH1F* ZJ = (TH1F*)nominal.Get(ChannelName+"_"+catdirname[sm]+"/ZJ"); TH1F* VV = (TH1F*)nominal.Get(ChannelName+"_"+catdirname[sm]+"/VV"); TH1F* data_obs = (TH1F*)nominal.Get(ChannelName+"_"+catdirname[sm]+"/data_obs"); //plot TH1F*MC=(TH1F*)ZTT->Clone("MC"); MC->Add(ZL); MC->Add(ZJ); MC->Add(TT); MC->Add(W); MC->Add(TT); MC->Add(VV); MC->Add(QCD); MC->SetTitle(ChannelName+"_"+catdirname[sm]); THStack hMCStack("hBkgStack","BkgStack");//dont't set any of the regular histogram properties on the THStack will crash. QCD->SetFillColor(kMagenta-10); hMCStack.Add(QCD,"hist"); TH1F*hEWK=(TH1F*)W->Clone("EWK"); hEWK->Add(ZL); hEWK->Add(ZJ); hEWK->Add(VV); hEWK->SetFillColor(kRed+2); hMCStack.Add(hEWK,"hist"); TT->SetFillColor(kBlue-8); hMCStack.Add(TT,"hist"); ZTT->SetFillColor(kOrange-4); hMCStack.Add(ZTT,"hist"); //////////// C.Clear(); if(MC->GetMaximum()>data_obs->GetMaximum()) data_obs->GetYaxis()->SetRangeUser(0,1.2*MC->GetMaximum()); else data_obs->GetYaxis()->SetRangeUser(0,1.2*data_obs->GetMaximum()); data_obs->SetTitle(catdirname[sm]); data_obs->Draw("histpe"); hMCStack.Draw("histsame"); data_obs->Draw("histpesame"); C.Print(fname); delete MC; ////////Draw the first and last Higgs signal C.Clear(); TH1F * SM1=0; TH1F * SM2=0; for(Int_t m=0;m<NMASS;m++){ long ma=massValues[m]; TH1F* SM = (TH1F*)nominal.Get(ChannelName+"_"+catdirname[sm]+"/ggH"+ma); TH1F* VBF = (TH1F*)nominal.Get(ChannelName+"_"+catdirname[sm]+"/qqH"+ma); TH1F* VH = (TH1F*)nominal.Get(ChannelName+"_"+catdirname[sm]+"/VH"+ma); if(massValues[m]==110){SM1=(TH1F*)SM->Clone("SM1"); SM1->Add(VBF); SM1->Add(VH);} if(massValues[m]==145){SM2=(TH1F*)SM->Clone("SM2");SM2->Add(VBF);SM2->Add(VH);} } if(SM1->GetMaximum()>SM2->GetMaximum()) SM1->GetYaxis()->SetRangeUser(0,1.2*SM1->GetMaximum()); if(SM1->GetMaximum()<SM2->GetMaximum()) SM1->GetYaxis()->SetRangeUser(0,1.2*SM2->GetMaximum()); SM1->SetTitle(catdirname[sm]); SM1->Draw("hist"); SM2->Draw("histsame"); C.Print(fname); } C.Print(fname+"]"); nominal.Close(); }
void combineDataCardsSM(Int_t channel, Int_t cat, TString mass){ TString ChannelName; if(channel==1)ChannelName="muTau"; else if(channel==2)ChannelName="eleTau"; else return; TFile nominal(ChannelName+"_SM"+(long)cat+"_"+mass+"_.root","read"); TFile nominaltUp(ChannelName+"_SM"+(long)cat+"_"+mass+"_tUp.root","read"); TFile nominaltDown(ChannelName+"_SM"+(long)cat+"_"+mass+"_tDown.root","read"); TString scaleUp="CMS_scale_t_mutau_8TeVUp"; TString scaleDown="CMS_scale_t_mutau_8TeVDown"; if(channel==2)scaleUp="CMS_scale_t_etau_8TeVUp"; if(channel==2)scaleDown="CMS_scale_t_etau_8TeVDown"; TFile output(ChannelName+"_SM"+(long)cat+"_"+mass+".root","recreate"); for(long sm=0;sm<NCAT;sm++){ if(cat==13 && (sm==2 || sm==4))continue;//skip boost_low and vbf if(cat==20 && (sm==3 || sm==4))continue;//skip boost_high and vbf if(cat==23 && (sm==4))continue;//skip vbf if(cat==15 && (sm==2 || sm==3))continue;//skip boost_low and boost_high cout<<catdirname[sm]<<endl; TDirectory* dir = output.mkdir(ChannelName+"_"+catdirname[sm]); dir->cd(); /////////////Nominal histos: TH1F* ZTT = (TH1F*)nominal.Get(ChannelName+"_"+catdirname[sm]+"/ZTT"); TH1F* QCD = (TH1F*)nominal.Get(ChannelName+"_"+catdirname[sm]+"/QCD"); TH1F* W = (TH1F*)nominal.Get(ChannelName+"_"+catdirname[sm]+"/W"); TH1F* TT = (TH1F*)nominal.Get(ChannelName+"_"+catdirname[sm]+"/TT"); TH1F* ZL = (TH1F*)nominal.Get(ChannelName+"_"+catdirname[sm]+"/ZL"); TH1F* ZJ = (TH1F*)nominal.Get(ChannelName+"_"+catdirname[sm]+"/ZJ"); TH1F* VV = (TH1F*)nominal.Get(ChannelName+"_"+catdirname[sm]+"/VV"); TH1F* ZLL = (TH1F*)nominal.Get(ChannelName+"_"+catdirname[sm]+"/ZLL"); TH1F* data_obs = (TH1F*)nominal.Get(ChannelName+"_"+catdirname[sm]+"/data_obs"); ZTT->Write(); ZL->Write(); ZJ->Write(); ZLL->Write(); W->Write(); TT->Write(); VV->Write(); QCD->Write(); data_obs->Write(); /////////////tUp histos TH1F* ZTT_CMS_scale_tUp = (TH1F*)nominaltUp.Get(ChannelName+"_"+catdirname[sm]+"/ZTT"); ZTT_CMS_scale_tUp->SetName(TString("ZTT_")+scaleUp); TH1F* QCD_CMS_scale_tUp = (TH1F*)nominaltUp.Get(ChannelName+"_"+catdirname[sm]+"/QCD"); QCD_CMS_scale_tUp->SetName(TString("QCD_")+scaleUp); TH1F* W_CMS_scale_tUp = (TH1F*)nominaltUp.Get(ChannelName+"_"+catdirname[sm]+"/W"); W_CMS_scale_tUp->SetName(TString("W_")+scaleUp); TH1F* TT_CMS_scale_tUp = (TH1F*)nominaltUp.Get(ChannelName+"_"+catdirname[sm]+"/TT"); TT_CMS_scale_tUp->SetName(TString("TT_")+scaleUp); TH1F* ZL_CMS_scale_tUp = (TH1F*)nominaltUp.Get(ChannelName+"_"+catdirname[sm]+"/ZL"); ZL_CMS_scale_tUp->SetName(TString("ZL_")+scaleUp); TH1F* ZJ_CMS_scale_tUp = (TH1F*)nominaltUp.Get(ChannelName+"_"+catdirname[sm]+"/ZJ"); ZJ_CMS_scale_tUp->SetName(TString("ZJ_")+scaleUp); TH1F* VV_CMS_scale_tUp = (TH1F*)nominaltUp.Get(ChannelName+"_"+catdirname[sm]+"/VV"); VV_CMS_scale_tUp->SetName(TString("VV_")+scaleUp); TH1F* ZLL_CMS_scale_tUp= (TH1F*)nominaltUp.Get(ChannelName+"_"+catdirname[sm]+"/ZLL"); ZLL_CMS_scale_tUp->SetName(TString("ZLL_")+scaleUp); ZTT_CMS_scale_tUp->Write(); ZL_CMS_scale_tUp->Write(); ZJ_CMS_scale_tUp->Write(); ZLL_CMS_scale_tUp->Write(); W_CMS_scale_tUp->Write(); TT_CMS_scale_tUp->Write(); VV_CMS_scale_tUp->Write(); QCD_CMS_scale_tUp->Write(); /////////////tDown histos TH1F* ZTT_CMS_scale_tDown = (TH1F*)nominaltDown.Get(ChannelName+"_"+catdirname[sm]+"/ZTT"); ZTT_CMS_scale_tDown->SetName(TString("ZTT_")+scaleDown); TH1F* QCD_CMS_scale_tDown = (TH1F*)nominaltDown.Get(ChannelName+"_"+catdirname[sm]+"/QCD"); QCD_CMS_scale_tDown->SetName(TString("QCD_")+scaleDown); TH1F* W_CMS_scale_tDown = (TH1F*)nominaltDown.Get(ChannelName+"_"+catdirname[sm]+"/W"); W_CMS_scale_tDown->SetName(TString("W_")+scaleDown); TH1F* TT_CMS_scale_tDown = (TH1F*)nominaltDown.Get(ChannelName+"_"+catdirname[sm]+"/TT"); TT_CMS_scale_tDown->SetName(TString("TT_")+scaleDown); TH1F* ZL_CMS_scale_tDown = (TH1F*)nominaltDown.Get(ChannelName+"_"+catdirname[sm]+"/ZL"); ZL_CMS_scale_tDown->SetName(TString("ZL_")+scaleDown); TH1F* ZJ_CMS_scale_tDown = (TH1F*)nominaltDown.Get(ChannelName+"_"+catdirname[sm]+"/ZJ"); ZJ_CMS_scale_tDown->SetName(TString("ZJ_")+scaleDown); TH1F* VV_CMS_scale_tDown = (TH1F*)nominaltDown.Get(ChannelName+"_"+catdirname[sm]+"/VV"); VV_CMS_scale_tDown->SetName(TString("VV_")+scaleDown); TH1F* ZLL_CMS_scale_tDown= (TH1F*)nominaltDown.Get(ChannelName+"_"+catdirname[sm]+"/ZLL"); ZLL_CMS_scale_tDown->SetName(TString("ZLL_")+scaleDown); ZTT_CMS_scale_tDown->Write(); ZL_CMS_scale_tDown->Write(); ZJ_CMS_scale_tDown->Write(); ZLL_CMS_scale_tDown->Write(); W_CMS_scale_tDown->Write(); TT_CMS_scale_tDown->Write(); VV_CMS_scale_tDown->Write(); QCD_CMS_scale_tDown->Write(); for(Int_t m=0;m<NMASS;m++){ long ma=massValues[m]; cout<<ChannelName+"_"+catdirname[sm]<<" "<<ma<<endl; //Nominal histos TH1F* SM = (TH1F*)nominal.Get(ChannelName+"_"+catdirname[sm]+"/ggH"+ma); SM->SetName(TString("ggH")+ma); TH1F* VBF = (TH1F*)nominal.Get(ChannelName+"_"+catdirname[sm]+"/qqH"+ma); VBF->SetName(TString("qqH")+ma); TH1F* VH = (TH1F*)nominal.Get(ChannelName+"_"+catdirname[sm]+"/VH"+ma); VH->SetName(TString("VH")+ma); //tUp histos TH1F* SM_CMS_scale_tUp = (TH1F*)nominaltUp.Get(ChannelName+"_"+catdirname[sm]+"/ggH"+ma); SM_CMS_scale_tUp->SetName(TString("ggH")+ma+"_"+scaleUp); TH1F* VBF_CMS_scale_tUp = (TH1F*)nominaltUp.Get(ChannelName+"_"+catdirname[sm]+"/qqH"+ma); VBF_CMS_scale_tUp->SetName(TString("qqH")+ma+"_"+scaleUp); TH1F* VH_CMS_scale_tUp = (TH1F*)nominaltUp.Get(ChannelName+"_"+catdirname[sm]+"/VH"+ma); VH_CMS_scale_tUp->SetName(TString("VH")+ma+"_"+scaleUp); //tDown histos TH1F* SM_CMS_scale_tDown = (TH1F*)nominaltDown.Get(ChannelName+"_"+catdirname[sm]+"/ggH"+ma); SM_CMS_scale_tDown->SetName(TString("ggH")+ma+"_"+scaleDown); TH1F* VBF_CMS_scale_tDown = (TH1F*)nominaltDown.Get(ChannelName+"_"+catdirname[sm]+"/qqH"+ma); VBF_CMS_scale_tDown->SetName(TString("qqH")+ma+"_"+scaleDown); TH1F* VH_CMS_scale_tDown = (TH1F*)nominaltDown.Get(ChannelName+"_"+catdirname[sm]+"/VH"+ma); VH_CMS_scale_tDown->SetName(TString("VH")+ma+"_"+scaleDown); SM->Write(); VBF->Write(); VH->Write(); SM_CMS_scale_tUp->Write(); VBF_CMS_scale_tUp->Write(); VH_CMS_scale_tUp->Write(); SM_CMS_scale_tDown->Write(); VBF_CMS_scale_tDown->Write(); VH_CMS_scale_tDown->Write(); } } //for 1Jet_low need to add a shape systematic for QCD TH1F* QCD = (TH1F*)nominal.Get(ChannelName+"_boost_low/QCD"); if(QCD){ TH1F* QCDUp=(TH1F*)QCD->Clone("QCD_CMS_htt_QCDShape_mutau_boost_low_8TeVUp"); TH1F* QCDDown=(TH1F*)QCD->Clone("QCD_CMS_htt_QCDShape_mutau_boost_low_8TeVDown"); for(Int_t b=1;b<=QCD->GetNbinsX();b++){ if(QCD->GetBinCenter(b)<=70.){ QCDUp->SetBinContent(b,1.15*QCDUp->GetBinContent(b)); QCDDown->SetBinContent(b,0.85*QCDDown->GetBinContent(b)); } } output.cd("muTau_boost_low"); QCDUp->Write(); QCDDown->Write(); } output.ls(); output.Close(); gROOT->ProcessLine(".q"); }