Exemple #1
0
// Check if any managed widgets are selected. If so, iterate over
// selection and deselect all unmanaged objects
bool ObjectInspector::ObjectInspectorPrivate::checkManagedWidgetSelection(const QModelIndexList &rowSelection)
{
    bool isManagedWidgetSelection = false;
    QItemSelectionModel *selectionModel = m_treeView->selectionModel();
    const QModelIndexList::const_iterator cscend = rowSelection.constEnd();
    for (QModelIndexList::const_iterator it = rowSelection.constBegin(); it != cscend; ++it) {
        QObject *object = m_model->objectAt(*it);
        if (selectionType(m_formWindow, object) == ManagedWidgetSelection) {
            isManagedWidgetSelection = true;
            break;
        }
    }

    if (!isManagedWidgetSelection)
        return false;
    // Need to unselect unmanaged ones
    const bool blocked = selectionModel->blockSignals(true);
    for (QModelIndexList::const_iterator it = rowSelection.constBegin(); it != cscend; ++it) {
        QObject *object = m_model->objectAt(*it);
        if (selectionType(m_formWindow, object) != ManagedWidgetSelection)
            selectionModel->select(*it, QItemSelectionModel::Deselect|QItemSelectionModel::Rows);
    }
    selectionModel->blockSignals(blocked);
    return true;
}
void VisibleSelection::validate(TextGranularity granularity)
{
    setBaseAndExtentToDeepEquivalents();
    setStartAndEndFromBaseAndExtentRespectingGranularity(granularity);
    adjustSelectionToAvoidCrossingShadowBoundaries();
    adjustSelectionToAvoidCrossingEditingBoundaries();
    updateSelectionType();

    if (selectionType() == RangeSelection) {
        // "Constrain" the selection to be the smallest equivalent range of nodes.
        // This is a somewhat arbitrary choice, but experience shows that it is
        // useful to make to make the selection "canonical" (if only for
        // purposes of comparing selections). This is an ideal point of the code
        // to do this operation, since all selection changes that result in a RANGE 
        // come through here before anyone uses it.
        // FIXME: Canonicalizing is good, but haven't we already done it (when we
        // set these two positions to VisiblePosition deepEquivalent()s above)?
        m_start = m_start.downstream();
        m_end = m_end.upstream();

        // FIXME: Position::downstream() or Position::upStream() might violate editing boundaries
        // if an anchor node has a Shadow DOM. So we adjust selection to avoid crossing editing
        // boundaries again. See https://bugs.webkit.org/show_bug.cgi?id=87463
        adjustSelectionToAvoidCrossingEditingBoundaries();
    }
}
Exemple #3
0
QList<QAction*> ButtonTaskMenu::taskActions() const
{
    ButtonTaskMenu *ncThis = const_cast<ButtonTaskMenu*>(this);
    QButtonGroup *buttonGroup = 0;

    QDesignerFormWindowInterface *fw = formWindow();
    const SelectionType st = selectionType(fw->cursor(), &buttonGroup);

    m_groupMenu.initialize(fw, buttonGroup, button());
    const bool hasAssignOptions = ncThis->refreshAssignMenu(fw, fw->cursor()->selectedWidgetCount(), st, buttonGroup);
    m_assignToGroupSubMenuAction->setVisible(hasAssignOptions);
    // add/remove
    switch (st) {
    case UngroupedButtonSelection:
    case OtherSelection:
        m_currentGroupSubMenuAction->setVisible(false);
        break;
    case GroupedButtonSelection:
        m_currentGroupSubMenuAction->setText(tr("Button group '%1'").arg(buttonGroup->objectName()));
        m_currentGroupSubMenuAction->setVisible(true);
        break;
    }

    return m_taskActions + QDesignerTaskMenu::taskActions();
}
Exemple #4
0
void ObjectInspector::ObjectInspectorPrivate::getSelection(Selection &s) const
{
    s.clear();

    if (!m_formWindow)
        return;

    const QModelIndexList currentSelectedIndexes = m_treeView->selectionModel()->selectedRows(0);
    if (currentSelectedIndexes.empty())
        return;

    // sort objects
    foreach (const QModelIndex &index, currentSelectedIndexes)
        if (QObject *object = m_model->objectAt(index))
            switch (selectionType(m_formWindow, object)) {
            case NoSelection:
                break;
            case QObjectSelection:
                // It is actually possible to select an action twice if it is in a menu bar
                // and in a tool bar.
                if (!s.objects.contains(object))
                    s.objects.push_back(object);
                break;
            case UnmanagedWidgetSelection:
                s.unmanaged.push_back(qobject_cast<QWidget *>(object));
                break;
            case ManagedWidgetSelection:
                s.managed.push_back(qobject_cast<QWidget *>(object));
                break;
            }
}
int main( int argc, char* argv[] ) {

  if( argc!=3 && argc!=4 && argc!=5 && argc!=6 ) {
    std::cout << "USAGE: ./finalize_TTZDilepton [dataset] [selectionType] [bTaggerType=\"SSVHE\"] [PUType=\"HR11_73pb\"] [leptType=\"ALL\"]" <<std::endl;
    return 13;
  }


  std::string dataset(argv[1]);
  std::string selectionType(argv[2]);

  std::string bTaggerType="SSVHE";
  if( argc==4 ) {
    std::string bTaggerType_str(argv[3]);
    bTaggerType = bTaggerType_str;
  }

  std::string PUType="HR11_73pb";
  if( argc==5 ) {
    std::string PUType_str(argv[4]);
    PUType = PUType_str;
  }

  std::string leptType="ALL";
  if( argc==6 ) {
    std::string leptType_str(argv[5]);
    leptType = leptType_str;
  }



  Ntp1Finalizer_TTZDilepton* nf = new Ntp1Finalizer_TTZDilepton( dataset, selectionType, bTaggerType, PUType, leptType );
  nf->set_inputAnalyzerType("TTZ");


  if( dataset=="DATA_HR11_v2" ) {
   
    nf->addFile("DoubleMu_Run2011A_FULL"); //first muons! important!
    nf->addFile("DoubleMu_Run2011B_v2"); //first muons! important!
    nf->addFile("SingleMu_Run2011A_FULL"); //first muons! important!
    nf->addFile("SingleMu_Run2011B_v2"); //first muons! important!
    nf->addFile("DoubleElectron_Run2011A_FULL");
    nf->addFile("DoubleElectron_Run2011B_v2");

  } else {
  
    nf->addFile( dataset );

  }

  nf->finalize();


  return 0;

}
Exemple #6
0
// Synchronize managed widget in the form (select in cursor). Block updates
static int selectInCursor(FormWindowBase *fw, const QObjectVector &objects, bool value)
{
    int rc = 0;
    const bool blocked = fw->blockSelectionChanged(true);
    const QObjectVector::const_iterator ocend = objects.constEnd();
    for (QObjectVector::const_iterator it = objects.constBegin(); it != ocend; ++it)
        if (selectionType(fw, *it) == ManagedWidgetSelection) {
            fw->selectWidget(static_cast<QWidget *>(*it), value);
            rc++;
        }
    fw->blockSelectionChanged(blocked);
    return rc;
}
Exemple #7
0
void ObjectInspector::ObjectInspectorPrivate::setFormWindowBlocked(QDesignerFormWindowInterface *fwi)
{
    FormWindowBase *fw = qobject_cast<FormWindowBase *>(fwi);
    const bool formWindowChanged = m_formWindow != fw;

    m_formWindow = fw;

    const int oldWidth = m_treeView->columnWidth(0);
    const int xoffset = m_treeView->horizontalScrollBar()->value();
    const int yoffset = m_treeView->verticalScrollBar()->value();

    if (formWindowChanged)
        m_formFakeDropTarget = 0;

    switch (m_model->update(m_formWindow)) {
    case ObjectInspectorModel::NoForm:
        clear();
        return;
    case ObjectInspectorModel::Rebuilt: // Complete rebuild: Just apply cursor selection
        applyCursorSelection();
        m_treeView->expandAll();
        if (formWindowChanged) {
            m_treeView->resizeColumnToContents(0);
        } else {
            m_treeView->setColumnWidth(0, oldWidth);
            m_treeView->horizontalScrollBar()->setValue(xoffset);
            m_treeView->verticalScrollBar()->setValue(yoffset);
        }
        break;
    case ObjectInspectorModel::Updated: {
        // Same structure (property changed or click on the form)
        // We maintain a selection of unmanaged objects
        // only if the cursor is in state "mainContainer() == current".
        // and we have a non-managed selection.
        // Else we take over the cursor selection.
        bool applySelection = !mainContainerIsCurrent(m_formWindow);
        if (!applySelection) {
            const QModelIndexList currentIndexes = m_treeView->selectionModel()->selectedRows(0);
            if (currentIndexes.empty()) {
                applySelection = true;
            } else {
                applySelection = selectionType(m_formWindow, m_model->objectAt(currentIndexes.front())) == ManagedWidgetSelection;
            }
        }
        if (applySelection)
            applyCursorSelection();
    }
        break;
    }
}
int main( int argc, char* argv[] ) {

  if( argc!=4 && argc!=5 ) {
    std::cout << "USAGE: ./forMjjStudies_radion_commonNtp [redntpVersion] [dataset] [selectionType] [bTaggerType=JP or CSV]" <<std::endl;
    return 13;
  }

  std::string redntpVersion(argv[1]);
  std::string dataset(argv[2]);
  std::string selectionType(argv[3]);

  std::string bTaggerType="JP";
  if( argc>4 ) {
    std::string bTaggerType_str(argv[4]);
    bTaggerType = bTaggerType_str;
  }
  cout << "Running analysis for bTaggerType = " << bTaggerType << endl;

  std::vector<std::string> *datasets = new std::vector<std::string>;

  if( dataset=="DiPhoton_madgraph" ) {
    finalize_oneDataset_commonNtp(redntpVersion, "DiPhotonJets_8TeV-madgraph", selectionType,  bTaggerType, datasets);
    
  } else if( dataset=="Radion_M-300_madgraph" ) {  
    finalize_oneDataset_commonNtp(redntpVersion, "Radion_M-300_madgraph", selectionType, bTaggerType, datasets);    
    
  } else if( dataset=="Radion_M-500_madgraph" ) {  
    finalize_oneDataset_commonNtp(redntpVersion, "Radion_M-500_madgraph", selectionType, bTaggerType, datasets);    

  } else if( dataset=="Radion_M-700_madgraph" ) {  
    finalize_oneDataset_commonNtp(redntpVersion, "Radion_M-700_madgraph", selectionType, bTaggerType, datasets);    

  } else if( dataset=="Radion_M-1000_madgraph" ) {  
    finalize_oneDataset_commonNtp(redntpVersion, "Radion_M-1000_madgraph", selectionType, bTaggerType, datasets);    

  } else if( dataset=="Radion_M-300_regr" ) {
    finalize_oneDataset_commonNtp(redntpVersion, "Radion_M-300_regr", selectionType, bTaggerType, datasets);

  } else {
    cout << "this dataset does not exists" << endl;
  }

  do_haddCommand_commonNtp(redntpVersion, dataset, datasets, selectionType, bTaggerType );

  return 0;
}
void VisibleSelection::validate()
{
    setBaseAndExtentToDeepEquivalents();
    setStartAndEndFromBaseAndExtentRespectingGranularity();
    adjustSelectionToAvoidCrossingEditingBoundaries();
    updateSelectionType();

    if (selectionType() == RangeSelection) {
        // "Constrain" the selection to be the smallest equivalent range of nodes.
        // This is a somewhat arbitrary choice, but experience shows that it is
        // useful to make to make the selection "canonical" (if only for
        // purposes of comparing selections). This is an ideal point of the code
        // to do this operation, since all selection changes that result in a RANGE 
        // come through here before anyone uses it.
        // FIXME: Canonicalizing is good, but haven't we already done it (when we
        // set these two positions to VisiblePosition deepEquivalent()s above)?
        m_start = m_start.downstream();
        m_end = m_end.upstream();
    }
}
Exemple #10
0
void VisibleSelection::setBaseAndExtentToDeepEquivalents()
{
    // Move the selection to rendered positions, if possible.
    bool baseAndExtentEqual = m_base == m_extent;
    if (m_base.isNotNull()) {
        m_base = VisiblePosition(m_base, m_affinity).deepEquivalent();
        if (baseAndExtentEqual)
            m_extent = m_base;
    }
    if (m_extent.isNotNull() && !baseAndExtentEqual)
        m_extent = VisiblePosition(m_extent, m_affinity).deepEquivalent();


// SAMSUNG CHANGE- ADVANCED TEXT SELECTIION -BEGIN
   if ((selectionType() == RangeSelection) && 
	(m_base.isNotNull() &&  m_extent.isNotNull() ) &&
	(m_base.anchorNode()->document()->settings() && m_base.anchorNode()->document()->settings()->advancedSelectionEnabled() ))
    {
		if ((m_base.anchorNode()==m_extent.anchorNode())&& (m_extent.offsetInContainerNode() == m_base.offsetInContainerNode()))
		{
			m_extent.moveToOffset(m_base.offsetInContainerNode()+1);
		}
    }

	// SAMSUNG CHANGE- ADVANCED TEXT SELECTIION -END
	
    // Make sure we do not have a dangling base or extent.
    if (m_base.isNull() && m_extent.isNull())
        m_baseIsFirst = true;
    else if (m_base.isNull()) {
        m_base = m_extent;
        m_baseIsFirst = true;
    } else if (m_extent.isNull()) {
        m_extent = m_base;
        m_baseIsFirst = true;
    } else
        m_baseIsFirst = comparePositions(m_base, m_extent) <= 0;
}
Exemple #11
0
int main( int argc, char* argv[] ) {

  if( argc!=4 && argc!=5 && argc!=6 ) {
    std::cout << "USAGE: ./finalize_THq [redntpVersion] [dataset] [selectionType] [use_inverted_photID=\"false\"] [bTaggerType=\"CSV\"]" <<std::endl;
    return 13;
  }


  std::string redntpVersion(argv[1]);
  std::string dataset(argv[2]);
  std::string selectionType(argv[3]);
  if( argc>4 ) {
    std::string invPhotID_str(argv[4]);
    use_inverted_photID = (invPhotID_str=="true");
  }

  if( use_inverted_photID )  
    std::cout << std::endl << "-> INVERTING PHOTON ID." << std::endl;


  std::string bTaggerType="CSV";
  if( argc>5 ) {
    std::string bTaggerType_str(argv[5]);
    bTaggerType = bTaggerType_str;
  }


  std::vector<std::string> *datasets = new std::vector<std::string>;


  if( dataset=="DATA_Run2011_FULL" ) {
   
    finalize_oneDataset(redntpVersion, "DoubleMu_Run2011A_FULL", selectionType, bTaggerType, datasets); //first muons! important!
    finalize_oneDataset(redntpVersion, "DoubleMu_Run2011B_v2", selectionType, bTaggerType, datasets); //first muons! important!
    finalize_oneDataset(redntpVersion, "DoubleElectron_Run2011A_FULL", selectionType, bTaggerType, datasets);
    finalize_oneDataset(redntpVersion, "DoubleElectron_Run2011B_v2", selectionType, bTaggerType, datasets);
    finalize_oneDataset(redntpVersion, "MuEG_Run2011A_FULL", selectionType, bTaggerType, datasets);
    finalize_oneDataset(redntpVersion, "MuEG_Run2011B", selectionType, bTaggerType, datasets);

  } else if( dataset=="DATA_Run2012" ) {
   

    finalize_oneDataset(redntpVersion, "Photon_Run2012A-13Jul2012-v1", selectionType, bTaggerType, datasets);
    finalize_oneDataset(redntpVersion, "Photon-Run2012A-recover-06Aug2012-v1", selectionType, bTaggerType, datasets);
    finalize_oneDataset(redntpVersion, "DoublePhoton-Run2012B-13Jul2012-v1", selectionType, bTaggerType, datasets);
    finalize_oneDataset(redntpVersion, "DoublePhoton-Run2012C-PromptReco-v2", selectionType, bTaggerType, datasets);
    finalize_oneDataset(redntpVersion, "DoublePhoton-Run2012C-24Aug2012-v2", selectionType, bTaggerType, datasets);//-EcalRecover_11Dec2012-v1 is missing
    finalize_oneDataset(redntpVersion, "DoublePhoton_Run2012D-PromptReco-v1", selectionType, bTaggerType, datasets);

  } else if( dataset=="DATA_Run2012ABC" ) {
   
    finalize_oneDataset(redntpVersion, "Photon-Run2012A-13Jul2012-v1", selectionType, bTaggerType, datasets);
    finalize_oneDataset(redntpVersion, "DoublePhoton-Run2012B-13Jul2012-v1", selectionType, bTaggerType, datasets);
    finalize_oneDataset(redntpVersion, "DoublePhoton-Run2012C-13Jul2012-v1_b", selectionType, bTaggerType, datasets);
    finalize_oneDataset(redntpVersion, "DoublePhoton-Run2012C-13Jul2012-v2", selectionType, bTaggerType, datasets);

  } else if( dataset=="DATA_Run2012SinglePhoton" ) {
   
    finalize_oneDataset(redntpVersion, "SinglePhoton_Run2012B-13Jul2012-v1", selectionType, bTaggerType, datasets);
    finalize_oneDataset(redntpVersion, "SinglePhoton_Run2012C-PromptReco-v1", selectionType, bTaggerType, datasets);
    finalize_oneDataset(redntpVersion, "Photon-Run2012A-13Jul2012-v1", selectionType, bTaggerType, datasets);

  }   else if(dataset == "DATA_Run2012DoublePhoton"){
    finalize_oneDataset(redntpVersion,"DoublePhoton-Run2012C-13Jul2012-v1_b", selectionType, bTaggerType, datasets); 
    finalize_oneDataset(redntpVersion,"DoublePhoton-Run2012B-13Jul2012-v1", selectionType, bTaggerType, datasets); 
    //problems with this dataset    finalize_oneDataset("DoublePhoton-Run2012C-13Jul2012-v2", selectionType, bTaggerType, datasets); 

  }else if( dataset=="DiPhotonBox_8TeV-pythia6" ) {

    finalize_oneDataset(redntpVersion, "DiPhotonBox_Pt-10To25_8TeV-pythia6_Summer12-PU_S7_START52_V9-v1", selectionType, bTaggerType, datasets);
    finalize_oneDataset(redntpVersion, "DiPhotonBox_Pt-250ToInf_8TeV-pythia6_Summer12-PU_S7_START52_V9-v1", selectionType, bTaggerType, datasets);
    finalize_oneDataset(redntpVersion, "DiPhotonBox_Pt-25To250_8TeV-pythia6_Summer12-PU_S7_START52_V9-v1", selectionType, bTaggerType, datasets);

  } else if( dataset=="DiPhoton_8TeV-pythia6" ) {

    finalize_oneDataset(redntpVersion, "DiPhotonBox_Pt-10To25_8TeV-pythia6_Summer12-PU_S7_START52_V9-v1", selectionType, bTaggerType, datasets);
    finalize_oneDataset(redntpVersion, "DiPhotonBox_Pt-250ToInf_8TeV-pythia6_Summer12-PU_S7_START52_V9-v1", selectionType, bTaggerType, datasets);
    finalize_oneDataset(redntpVersion, "DiPhotonBox_Pt-25To250_8TeV-pythia6_Summer12-PU_S7_START52_V9-v1", selectionType, bTaggerType, datasets);
    finalize_oneDataset(redntpVersion, "DiPhotonJets_8TeV-madgraph-tarball-v2_Summer12-PU_S7_START52_V9-v1", selectionType, bTaggerType, datasets);

  } else if( dataset=="V_8TeV") {
  //} else if( dataset=="DYJetsToLL_8TeV-madgraph" ) {

    finalize_oneDataset(redntpVersion, "DYJetsToLL_M-10To50filter_8TeV-madgraph_Summer12-PU_S7_START52_V9-v1" , selectionType, bTaggerType, datasets);
    finalize_oneDataset(redntpVersion, "DYJetsToLL_M-50_TuneZ2Star_8TeV-madgraph-tarball_Summer12-PU_S7_START52_V9-v2", selectionType, bTaggerType, datasets);
    finalize_oneDataset(redntpVersion, "WJetsToLNu_TuneZ2Star_8TeV-madgraph-tarball_Summer12-PU_S7_START52_V9-v1", selectionType, bTaggerType, datasets);

  } else if( dataset=="GJet_doubleEMEnriched_TuneZ2star_8TeV-pythia6" ) {

    finalize_oneDataset(redntpVersion, "GJet_Pt-20to40_doubleEMEnriched_TuneZ2star_8TeV-pythia6_Summer12-PU_S7_START52_V9-v1", selectionType, bTaggerType, datasets);
    finalize_oneDataset(redntpVersion, "GJet_Pt40_doubleEMEnriched_TuneZ2star_8TeV-pythia6_Summer12-PU_S7_START52_V9-v1", selectionType, bTaggerType, datasets);

  } else if( dataset=="QCD_doubleEMEnriched_TuneZ2star_8TeV-pythia6") {

    finalize_oneDataset(redntpVersion, "QCD_Pt-40_doubleEMEnriched_TuneZ2star_8TeV-pythia6_Summer12-PU_S7_START52_V9-v1", selectionType, bTaggerType, datasets);
    finalize_oneDataset(redntpVersion, "QCD_Pt-30to40_doubleEMEnriched_TuneZ2star_8TeV-pythia6_Summer12-PU_S7_START52_V9-v1", selectionType, bTaggerType, datasets);

  } else if( dataset=="TT_8TeV" ) {

    finalize_oneDataset(redntpVersion, "TTbarGG_0Jet_Summer12-PU_S7_START52_V9-v1" , selectionType, bTaggerType, datasets);
    finalize_oneDataset(redntpVersion, "TTGJets_8TeV-madgraph_Summer12-PU_S7_START52_V9-v1", selectionType, bTaggerType, datasets);
    //    finalize_oneDataset(redntpVersion, "TTJets_TuneZ2star_8TeV-madgraph-tauola_Summer12-PU_S7_START52_V9-v1", selectionType, bTaggerType, datasets);
    //    finalize_oneDataset(redntpVersion, "TTJets_MassiveBinDECAY_TuneZ2star_8TeV-madgraph-tauola_Summer12_DR53X-PU_S10_START53_V7A-v1", selectionType, bTaggerType, datasets);
    finalize_oneDataset(redntpVersion, "TT_CT10_TuneZ2star_8TeV-powheg-tauola_Summer12_DR53X-PU_S10_START53_V7A-v2", selectionType, bTaggerType, datasets);

  } else if( dataset=="T_8TeV" ) {

    finalize_oneDataset(redntpVersion, "Tbar_s-channel_TuneZ2star_8TeV-powheg-tauola_Summer12_DR53X-PU_S10_START53_V7A-v1" , selectionType, bTaggerType, datasets);
    finalize_oneDataset(redntpVersion, "T_t-channel_TuneZ2star_8TeV-powheg-tauola_Summer12_DR53X-PU_S10_START53_V7A-v1" , selectionType, bTaggerType, datasets);
    finalize_oneDataset(redntpVersion, "T_tW-channel-DR_TuneZ2star_8TeV-powheg-tauola_Summer12_DR53X-PU_S10_START53_V7A-v1" , selectionType, bTaggerType, datasets);
    finalize_oneDataset(redntpVersion, "T_s-channel_TuneZ2star_8TeV-powheg-tauola_Summer12_DR53X-PU_S10_START53_V7A-v1" , selectionType, bTaggerType, datasets);
    finalize_oneDataset(redntpVersion, "Tbar_tW-channel-DR_TuneZ2star_8TeV-powheg-tauola_Summer12_DR53X-PU_S10_START53_V7A-v1" , selectionType, bTaggerType, datasets);
    finalize_oneDataset(redntpVersion, "Tbar_t-channel_TuneZ2star_8TeV-powheg-tauola_Summer12_DR53X-PU_S10_START53_V7A" , selectionType, bTaggerType, datasets);


  } else if( dataset=="VV_8TeV" ) {

    //finalize_oneDataset("WWJetsTo2L2Nu_TuneZ2star_8TeV-madgraph-tauola");
    finalize_oneDataset(redntpVersion, "WW_TuneZ2star_8TeV_pythia6_tauola_Summer12-PU_S7_START52_V9-v1", selectionType, bTaggerType, datasets);
    finalize_oneDataset(redntpVersion, "ZZ_TuneZ2star_8TeV_pythia6_tauola_Summer12-PU_S7_START52_V9-v1", selectionType, bTaggerType, datasets);
    finalize_oneDataset(redntpVersion, "WZ_TuneZ2star_8TeV_pythia6_tauola_Summer12-PU_S7_START52_V9-v1", selectionType, bTaggerType, datasets);
    finalize_oneDataset(redntpVersion, "WGToLNuG_TuneZ2star_8TeV-madgraph-tauola_Summer12-PU_S7_START52_V9-v2", selectionType, bTaggerType, datasets);
    finalize_oneDataset(redntpVersion, "ZGToLLG_8TeV-madgraph_Summer12-PU_S7_START52_V9-v1", selectionType, bTaggerType, datasets);

  } else if( dataset=="VGG_8TeV" ) {

    finalize_oneDataset(redntpVersion, "WmGG", selectionType, bTaggerType, datasets);
    finalize_oneDataset(redntpVersion, "WpGG", selectionType, bTaggerType, datasets);
    finalize_oneDataset(redntpVersion, "ZGG", selectionType, bTaggerType, datasets);

  } else if( dataset=="HToGG_M-125_8TeV-pythia6" ) {

    finalize_oneDataset(redntpVersion, "WH_ZH_HToGG_M-125_8TeV-pythia6_Summer12-PU_S7_START52_V9-v2", selectionType, bTaggerType, datasets);
    finalize_oneDataset(redntpVersion, "GluGluToHToGG_M-125_8TeV-powheg-pythia6_Summer12-PU_S7_START52_V9-v1", selectionType, bTaggerType, datasets);
    finalize_oneDataset(redntpVersion, "VBF_HToGG_M-125_8TeV-powheg-pythia6_Summer12-PU_S7_START52_V9-v1", selectionType, bTaggerType, datasets);
    finalize_oneDataset(redntpVersion, "TTH_HToGG_M-125_8TeV-pythia6_Summer12-PU_S7_START52_V9-v2", selectionType, bTaggerType, datasets);

  } else if( dataset=="tHq_mH125_8TeV_testtest" ) {

    finalize_oneDataset(redntpVersion, "tHqHadronic_mH125_8TeV_testtest", selectionType, bTaggerType, datasets);
    finalize_oneDataset(redntpVersion, "tHqLeptonic_mH125_8TeV_testtest", selectionType, bTaggerType, datasets);

  } else if( dataset=="tHq_mH125_8TeV_testtest_prova_synch" ) {

    finalize_oneDataset(redntpVersion, "tHqLeptonic_mH125_8TeV_testtest_prova_synch", selectionType, bTaggerType, datasets);

  } else {
  
    finalize_oneDataset(redntpVersion, dataset, selectionType, bTaggerType, datasets );

  }


  do_haddCommand(redntpVersion, dataset, datasets, selectionType, bTaggerType );

  return 0;

}
Exemple #12
0
int main( int argc, char* argv[] ) {

  if( argc!=3 && argc!=4 ) {
    std::cout << "USAGE: ./finalize_HZZlljj [dataset] [selectionType] [leptType=\"ALL\"]" <<std::endl;
    return 13;
  }


  std::string dataset(argv[1]);
  std::string selectionType(argv[2]);

  std::string leptType="ALL";
  if( argc==4 ) {
    std::string leptType_str(argv[3]);
    leptType = leptType_str;
  }



  Ntp1Finalizer_HZZlljj* nf = new Ntp1Finalizer_HZZlljj( dataset, selectionType, leptType );

  nf->set_useLooseBTags(true);


  if( dataset=="DATA_EG_37X" ) {

    nf->addFile( "EG_Run2010A_Jul15thReReco_v1" );
    nf->addFile( "EG_Run2010A_Jul26thReReco_v1" );

  } else if( dataset=="Electron_Run2010B" ) {

    nf->addFile( "Electron_Run2010B_PromptReco_v2_runs146240_146733_prod2" );
    nf->addFile( "Electron_Run2010B_PromptReco_v2_runs146733_147111" );

  } else if( dataset=="Run2010B_runs146240_146733" ) {

    nf->addFile( "Electron_Run2010B_PromptReco_v2_runs146240_146733_prod2" );
    nf->addFile( "MU_Run2010B_PromptReco_v2_runs146240_146733" );

  } else if( dataset=="Mu_upto147589" ) {

    nf->addFile("Mu_Run2010B_PromptReco_v2_runs146734_147589");
    nf->addFile("Mu_Run2010A-Sep17ReReco_v2_runs135821_144114");
    nf->addFile("Mu_Run2010B_PromptReco_v2_runs146240_146733");

  } else if( dataset=="ELEMUCombined" ) {

    nf->addFile("Mu_Run2010B_PromptReco_v2_runs146734_147589");
    nf->addFile("Mu_Run2010A-Sep17ReReco_v2_runs135821_144114");
    nf->addFile("Mu_Run2010B_PromptReco_v2_runs146240_146733");
    nf->addFile("EG_upto146724");

  } else if( dataset=="EleMu_Nov4ReReco_PU" ) {

    nf->addFile("Mu_Nov4ReReco_PU");
    nf->addFile("Electron_Nov4ReReco_PU");

  } else if( dataset=="DATA_Run2011A" ) {

    nf->addFile("DoubleMu_Run2011A"); //first muons! important!
    nf->addFile("DoubleElectron_Run2011A");

  } else if( dataset=="ZJets_alpgen_TuneZ2_Fall10" ) {

    nf->addFile( "Z0Jets_TuneZ2_7TeV-alpgen-tauola_3" );
    nf->addFile( "Z1Jets_ptZ-0to100_TuneZ2_7TeV-alpgen-tauola_3" );
    nf->addFile( "Z1Jets_ptZ-100to300_TuneZ2_7TeV-alpgen-tauola_3" );
    nf->addFile( "Z1Jets_ptZ-300to800_TuneZ2_7TeV-alpgen-tauola_3" );
    nf->addFile( "Z1Jets_ptZ-800to1600_TuneZ2_7TeV-alpgen-tauola_3" );
    nf->addFile( "Z2Jets_ptZ-0to100_TuneZ2_7TeV-alpgen-tauola_3" );
    nf->addFile( "Z2Jets_ptZ-100to300_TuneZ2_7TeV-alpgen-tauola_3" );
    nf->addFile( "Z2Jets_ptZ-300to800_TuneZ2_7TeV-alpgen-tauola_3" );
    nf->addFile( "Z2Jets_ptZ-800to1600_TuneZ2_7TeV-alpgen-tauola_3" );
    nf->addFile( "Z3Jets_ptZ-0to100_TuneZ2_7TeV-alpgen-tauola_3" );
    nf->addFile( "Z3Jets_ptZ-100to300_TuneZ2_7TeV-alpgen-tauola_3" );
    nf->addFile( "Z3Jets_ptZ-300to800_TuneZ2_7TeV-alpgen-tauola_3" );
    nf->addFile( "Z3Jets_ptZ-800to1600_TuneZ2_7TeV-alpgen-tauola_3" );
    nf->addFile( "Z4Jets_ptZ-0to100_TuneZ2_7TeV-alpgen-tauola_3" );
    nf->addFile( "Z4Jets_ptZ-100to300_TuneZ2_7TeV-alpgen-tauola_3" );
    nf->addFile( "Z4Jets_ptZ-300to800_TuneZ2_7TeV-alpgen-tauola_3" );
    nf->addFile( "Z4Jets_ptZ-800to1600_TuneZ2_7TeV-alpgen-tauola_3" );
    nf->addFile( "Z5Jets_ptZ-0to100_TuneZ2_7TeV-alpgen-tauola_3" );
    nf->addFile( "Z5Jets_ptZ-100to300_TuneZ2_7TeV-alpgen-tauola_3" );
    nf->addFile( "Z5Jets_ptZ-300to800_TuneZ2_7TeV-alpgen-tauola_3" );
    nf->addFile( "Z5Jets_ptZ-800to1600_TuneZ2_7TeV-alpgen-tauola_3" );

  } else if( dataset=="ZJets_alpgen_TuneZ2_Fall10_v2" ) {

    nf->addFile( "Z0Jets_TuneZ2_7TeV-alpgen-tauola" );
    nf->addFile( "Z1Jets_ptZ-0to100_TuneZ2_7TeV-alpgen-tauola_v2" );
    nf->addFile( "Z1Jets_ptZ-100to300_TuneZ2_7TeV-alpgen-tauola_v2" );
    nf->addFile( "Z1Jets_ptZ-300to800_TuneZ2_7TeV-alpgen-tauola_v2" );
    nf->addFile( "Z1Jets_ptZ-800to1600_TuneZ2_7TeV-alpgen-tauola_v2" );
    nf->addFile( "Z2Jets_ptZ-0to100_TuneZ2_7TeV-alpgen-tauola_v2" );
    nf->addFile( "Z2Jets_ptZ-100to300_TuneZ2_7TeV-alpgen-tauola_v2" );
    nf->addFile( "Z2Jets_ptZ-300to800_TuneZ2_7TeV-alpgen-tauola_v2" );
    nf->addFile( "Z2Jets_ptZ-800to1600_TuneZ2_7TeV-alpgen-tauola_v2" );
    nf->addFile( "Z3Jets_ptZ-0to100_TuneZ2_7TeV-alpgen-tauola_v2" );
    nf->addFile( "Z3Jets_ptZ-100to300_TuneZ2_7TeV-alpgen-tauola_v2" );
    nf->addFile( "Z3Jets_ptZ-300to800_TuneZ2_7TeV-alpgen-tauola_v2" );
    nf->addFile( "Z3Jets_ptZ-800to1600_TuneZ2_7TeV-alpgen-tauola_v2" );
    nf->addFile( "Z4Jets_ptZ-0to100_TuneZ2_7TeV-alpgen-tauola_v2" );
    nf->addFile( "Z4Jets_ptZ-100to300_TuneZ2_7TeV-alpgen-tauola_v2" );
    nf->addFile( "Z4Jets_ptZ-300to800_TuneZ2_7TeV-alpgen-tauola_v2" );
    nf->addFile( "Z4Jets_ptZ-800to1600_TuneZ2_7TeV-alpgen-tauola_v2" );
    nf->addFile( "Z5Jets_ptZ-0to100_TuneZ2_7TeV-alpgen-tauola_v2" );
    nf->addFile( "Z5Jets_ptZ-100to300_TuneZ2_7TeV-alpgen-tauola_v2" );
    nf->addFile( "Z5Jets_ptZ-300to800_TuneZ2_7TeV-alpgen-tauola_v2" );
    nf->addFile( "Z5Jets_ptZ-800to1600_TuneZ2_7TeV-alpgen-tauola_v2" );

  } else if( dataset=="ZJets_alpgen_TuneZ2_Spring11" ) {

    nf->addFile( "Z0Jets_TuneZ2_7TeV-alpgen-tauola_Spring11-PU_S1_START311_V1G1-v1" );
    nf->addFile( "Z1Jets_ptZ-0to100_TuneZ2_7TeV-alpgen-tauola_Spring11-PU_S1_START311_V1G1-v1_3" );
    nf->addFile( "Z1Jets_ptZ-100to300_TuneZ2_7TeV-alpgen-tauola_Spring11-PU_S1_START311_V1G1-v1" );
    nf->addFile( "Z1Jets_ptZ-300to800_TuneZ2_7TeV-alpgen-tauola_Spring11-PU_S1_START311_V1G1-v1_4" );
    nf->addFile( "Z2Jets_ptZ-0to100_TuneZ2_7TeV-alpgen-tauola_Spring11-PU_S1_START311_V1G1-v1_3" );
    nf->addFile( "Z2Jets_ptZ-100to300_TuneZ2_7TeV-alpgen-tauola_Spring11-PU_S1_START311_V1G1-v1" );
    nf->addFile( "Z2Jets_ptZ-300to800_TuneZ2_7TeV-alpgen-tauola_Spring11-PU_S1_START311_V1G1-v1" );
    nf->addFile( "Z2Jets_ptZ-800to1600_TuneZ2_7TeV-alpgen-tauola_Spring11-PU_S1_START311_V1G1-v1" );
    nf->addFile( "Z3Jets_ptZ-0to100_TuneZ2_7TeV-alpgen-tauola_Spring11-PU_S1_START311_V1G1-v1" );
    nf->addFile( "Z3Jets_ptZ-100to300_TuneZ2_7TeV-alpgen-tauola_Spring11-PU_S1_START311_V1G1-v1" );
    nf->addFile( "Z3Jets_ptZ-300to800_TuneZ2_7TeV-alpgen-tauola_Spring11-PU_S1_START311_V1G1-v1_3" );
    nf->addFile( "Z3Jets_ptZ-800to1600_TuneZ2_7TeV-alpgen-tauola_Spring11-PU_S1_START311_V1G1-v1" );
    nf->addFile( "Z4Jets_ptZ-0to100_TuneZ2_7TeV-alpgen-tauola_Spring11-PU_S1_START311_V1G1-v1_2" );
    nf->addFile( "Z4Jets_ptZ-100to300_TuneZ2_7TeV-alpgen-tauola_Spring11-PU_S1_START311_V1G1-v1_2" );
    nf->addFile( "Z4Jets_ptZ-300to800_TuneZ2_7TeV-alpgen-tauola_Spring11-PU_S1_START311_V1G1-v1_2" );
    nf->addFile( "Z4Jets_ptZ-800to1600_TuneZ2_7TeV-alpgen-tauola_Spring11-PU_S1_START311_V1G1-v1_2" );
    nf->addFile( "Z5Jets_ptZ-0to100_TuneZ2_7TeV-alpgen-tauola_Spring11-PU_S1_START311_V1G1-v1_2" );
    nf->addFile( "Z5Jets_ptZ-100to300_TuneZ2_7TeV-alpgen-tauola_Spring11-PU_S1_START311_V1G1-v1_2" );
    nf->addFile( "Z5Jets_ptZ-300to800_TuneZ2_7TeV-alpgen-tauola_Spring11-PU_S1_START311_V1G1-v1_2" );
    nf->addFile( "Z5Jets_ptZ-800to1600_TuneZ2_7TeV-alpgen-tauola_Spring11-PU_S1_START311_V1G1-v1_2" );

  } else if( dataset=="ZBB_alpgen_TuneZ2_Spring11" ) {

    nf->addFile( "ZBB0JetsToLNu_TuneZ2_7TeV-alpgen-tauola_Spring11-PU_S1_START311_V1G1-v1_3" );
    nf->addFile( "ZBB1JetsToLNu_TuneZ2_7TeV-alpgen-tauola_Spring11-PU_S1_START311_V1G1-v1" );
    nf->addFile( "ZBB2JetsToLNu_TuneZ2_7TeV-alpgen-tauola_Spring11-PU_S1_START311_V1G1-v1" );
    nf->addFile( "ZBB3JetsToLNu_TuneZ2_7TeV-alpgen-tauola_Spring11-PU_S1_START311_V1G1-v1" );

  } else if( dataset=="ZCC_alpgen_TuneZ2_Spring11" ) {

    nf->addFile( "ZCC0JetsToLNu_TuneZ2_7TeV-alpgen-tauola_Spring11-PU_S1_START311_V1G1-v1" );
    nf->addFile( "ZCC1JetsToLNu_TuneZ2_7TeV-alpgen-tauola_Spring11-PU_S1_START311_V1G1-v1" );
    nf->addFile( "ZCC2JetsToLNu_TuneZ2_7TeV-alpgen-tauola_Spring11-PU_S1_START311_V1G1-v1" );
    nf->addFile( "ZCC3JetsToLNu_TuneZ2_7TeV-alpgen-tauola_Spring11-PU_S1_START311_V1G1-v1_3" );

  } else if( dataset=="VVtoAnything_TuneZ2_7TeV-pythia6-tauola_Fall10" ) {

    nf->addFile( "ZZtoAnything_TuneZ2_7TeV-pythia6-tauola_Fall10" );
    nf->addFile( "WZtoAnything_TuneZ2_7TeV-pythia6-tauola_Fall10" );
    nf->addFile( "WWtoAnything_TuneZ2_7TeV-pythia6-tauola_Fall10" );

  } else if( dataset=="VVtoAnything_TuneZ2_7TeV-pythia6-tauola_Spring11" ) {

    nf->addFile( "ZZtoAnything_TuneZ2_7TeV-pythia6-tauola_Spring11-PU_S1_START311_V1G1-v1_3" );
    nf->addFile( "WWtoAnything_TuneZ2_7TeV-pythia6-tauola_Spring11-PU_S1_START311_V1G1-v1_6" );
    nf->addFile( "WZtoAnything_TuneZ2_7TeV-pythia6-tauola_Spring11-PU_S1_START311_V1G1-v1_3" );

  } else if( dataset=="TT_TW_TuneZ2_7TeV-pythia6-tauola_Spring11" ) {

    //nf->addFile( "TT_TuneZ2_7TeV-pythia6-tauola_Spring11-PU_S1_START311_V1G1-v1_3" );
    nf->addFile( "TTTo2L2Nu2B_7TeV-powheg-pythia6_Spring11-PU_S1_START311_V1G1-v1_2" );
    nf->addFile( "TToBLNu_TuneZ2_tW-channel_7TeV-madgraph_Spring11-PU_S1_START311_V1G1-v1" );

  } else if( dataset=="all" ) {


    if( leptType=="ELE" ) {
      argv[1] = new char[strlen("EG_upto146724")];
      strcpy( argv[1], "EG_upto146724");
      main( argc, argv );
    } else if( leptType=="MU") {
      argv[1] = new char[strlen("Mu_upto147589")];
      strcpy( argv[1], "Mu_upto147589");
      main( argc, argv );
      //finalize( "Mu_upto147589", leptType);
    } else if( leptType=="ALL" ) {
      argv[1] = new char[strlen("ELEMUCombined")];
      strcpy( argv[1], "ELEMUCombined");
      main( argc, argv );
    }


    argv[1] = new char[strlen("HZZ_qqll_gluonfusion_M130")];
    strcpy( argv[1], "HZZ_qqll_gluonfusion_M130");
    main( argc, argv );
    argv[1] = new char[strlen("HZZ_qqll_gluonfusion_M150")];
    strcpy( argv[1], "HZZ_qqll_gluonfusion_M150");
    main( argc, argv );
    argv[1] = new char[strlen("HZZ_qqll_gluonfusion_M200")];
    strcpy( argv[1], "HZZ_qqll_gluonfusion_M200");
    main( argc, argv );
    argv[1] = new char[strlen("HZZ_qqll_gluonfusion_M300")];
    strcpy( argv[1], "HZZ_qqll_gluonfusion_M300");
    main( argc, argv );
    argv[1] = new char[strlen("HZZ_qqll_gluonfusion_M400")];
    strcpy( argv[1], "HZZ_qqll_gluonfusion_M400");
    main( argc, argv );
    argv[1] = new char[strlen("HZZ_qqll_gluonfusion_M500")];
    strcpy( argv[1], "HZZ_qqll_gluonfusion_M500");
    main( argc, argv );
    argv[1] = new char[strlen("TTbar_2l_Spring10")];
    strcpy( argv[1], "TTbar_2l_Spring10");
    main( argc, argv );
    argv[1] = new char[strlen("ZZ_Spring10")];
    strcpy( argv[1], "ZZ_Spring10");
    main( argc, argv );
    argv[1] = new char[strlen("ZJets_madgraph")];
    strcpy( argv[1], "ZJets_madgraph");
    main( argc, argv );
    argv[1] = new char[strlen("ZJets_alpgen")];
    strcpy( argv[1], "ZJets_alpgen");
    main( argc, argv );
    //return 0;
    exit(1111);

  } else {
  
    nf->addFile( dataset );

  }

  nf->finalize();


  return 0;

}
Exemple #13
0
int main( int argc, char* argv[] ) {

  if( argc!=4 && argc!=5 ) {
    std::cout << "USAGE: ./finalize_VHgg [redntpVersion] [dataset] [selectionType] [bTaggerType=\"JP\"]" <<std::endl;
    return 13;
  }


  std::string redntpVersion(argv[1]);
  std::string dataset(argv[2]);
  std::string selectionType(argv[3]);

  std::string bTaggerType="JP";
  if( argc>4 ) {
    std::string bTaggerType_str(argv[4]);
    bTaggerType = bTaggerType_str;
  }


  std::vector<std::string> *datasets = new std::vector<std::string>;


  if( dataset=="DATA_Run2011_FULL" ) {
   
    finalize_oneDataset(redntpVersion, "DoubleMu_Run2011A_FULL", selectionType, bTaggerType, datasets); //first muons! important!
    finalize_oneDataset(redntpVersion, "DoubleMu_Run2011B_v2", selectionType, bTaggerType, datasets); //first muons! important!
    finalize_oneDataset(redntpVersion, "DoubleElectron_Run2011A_FULL", selectionType, bTaggerType, datasets);
    finalize_oneDataset(redntpVersion, "DoubleElectron_Run2011B_v2", selectionType, bTaggerType, datasets);
    finalize_oneDataset(redntpVersion, "MuEG_Run2011A_FULL", selectionType, bTaggerType, datasets);
    finalize_oneDataset(redntpVersion, "MuEG_Run2011B", selectionType, bTaggerType, datasets);

  } else if( dataset=="DiPhotonBox_8TeV-pythia6" ) {

    finalize_oneDataset(redntpVersion, "DiPhotonBox_Pt-10To25_8TeV-pythia6_Summer12-PU_S7_START52_V9-v1", selectionType, bTaggerType, datasets);
    finalize_oneDataset(redntpVersion, "DiPhotonBox_Pt-250ToInf_8TeV-pythia6_Summer12-PU_S7_START52_V9-v1", selectionType, bTaggerType, datasets);
    finalize_oneDataset(redntpVersion, "DiPhotonBox_Pt-25To250_8TeV-pythia6_Summer12-PU_S7_START52_V9-v1", selectionType, bTaggerType, datasets);

  } else if( dataset=="DiPhoton_8TeV-pythia6" ) {

    finalize_oneDataset(redntpVersion, "DiPhotonBox_Pt-10To25_8TeV-pythia6_Summer12-PU_S7_START52_V9-v1", selectionType, bTaggerType, datasets);
    finalize_oneDataset(redntpVersion, "DiPhotonBox_Pt-250ToInf_8TeV-pythia6_Summer12-PU_S7_START52_V9-v1", selectionType, bTaggerType, datasets);
    finalize_oneDataset(redntpVersion, "DiPhotonBox_Pt-25To250_8TeV-pythia6_Summer12-PU_S7_START52_V9-v1", selectionType, bTaggerType, datasets);
    finalize_oneDataset(redntpVersion, "DiPhotonJets_8TeV-madgraph-tarball-v2_Summer12-PU_S7_START52_V9-v1", selectionType, bTaggerType, datasets);

  } else if( dataset=="V_8TeV") {
  //} else if( dataset=="DYJetsToLL_8TeV-madgraph" ) {

    finalize_oneDataset(redntpVersion, "DYJetsToLL_M-10To50filter_8TeV-madgraph_Summer12-PU_S7_START52_V9-v1" , selectionType, bTaggerType, datasets);
    finalize_oneDataset(redntpVersion, "DYJetsToLL_M-50_TuneZ2Star_8TeV-madgraph-tarball_Summer12-PU_S7_START52_V9-v2", selectionType, bTaggerType, datasets);
    finalize_oneDataset(redntpVersion, "WJetsToLNu_TuneZ2Star_8TeV-madgraph-tarball_Summer12-PU_S7_START52_V9-v1", selectionType, bTaggerType, datasets);

  } else if( dataset=="GJet_doubleEMEnriched_TuneZ2star_8TeV-pythia6" ) {

    finalize_oneDataset(redntpVersion, "GJet_Pt-20to40_doubleEMEnriched_TuneZ2star_8TeV-pythia6_Summer12-PU_S7_START52_V9-v1", selectionType, bTaggerType, datasets);
    finalize_oneDataset(redntpVersion, "GJet_Pt40_doubleEMEnriched_TuneZ2star_8TeV-pythia6_Summer12-PU_S7_START52_V9-v1", selectionType, bTaggerType, datasets);

  } else if( dataset=="QCD_doubleEMEnriched_TuneZ2star_8TeV-pythia6") {

    finalize_oneDataset(redntpVersion, "QCD_Pt-40_doubleEMEnriched_TuneZ2star_8TeV-pythia6_Summer12-PU_S7_START52_V9-v1", selectionType, bTaggerType, datasets);
    finalize_oneDataset(redntpVersion, "QCD_Pt-30to40_doubleEMEnriched_TuneZ2star_8TeV-pythia6_Summer12-PU_S7_START52_V9-v1", selectionType, bTaggerType, datasets);

  } else if( dataset=="TT_8TeV" ) {

    finalize_oneDataset(redntpVersion, "TTbarGG_0Jet_Summer12-PU_S7_START52_V9-v1" , selectionType, bTaggerType, datasets);
    finalize_oneDataset(redntpVersion, "TTGJets_8TeV-madgraph_Summer12-PU_S7_START52_V9-v1", selectionType, bTaggerType, datasets);
    finalize_oneDataset(redntpVersion, "TTJets_TuneZ2star_8TeV-madgraph-tauola_Summer12-PU_S7_START52_V9-v1", selectionType, bTaggerType, datasets);

  //} else if( dataset=="VG_8TeV" ) {

  } else if( dataset=="VV_8TeV" ) {

    //finalize_oneDataset("WWJetsTo2L2Nu_TuneZ2star_8TeV-madgraph-tauola");
    finalize_oneDataset(redntpVersion, "WW_TuneZ2star_8TeV_pythia6_tauola_Summer12-PU_S7_START52_V9-v1", selectionType, bTaggerType, datasets);
    finalize_oneDataset(redntpVersion, "ZZ_TuneZ2star_8TeV_pythia6_tauola_Summer12-PU_S7_START52_V9-v1", selectionType, bTaggerType, datasets);
    finalize_oneDataset(redntpVersion, "WZ_TuneZ2star_8TeV_pythia6_tauola_Summer12-PU_S7_START52_V9-v1", selectionType, bTaggerType, datasets);
    finalize_oneDataset(redntpVersion, "WGToLNuG_TuneZ2star_8TeV-madgraph-tauola_Summer12-PU_S7_START52_V9-v2", selectionType, bTaggerType, datasets);
    finalize_oneDataset(redntpVersion, "ZGToLLG_8TeV-madgraph_Summer12-PU_S7_START52_V9-v1", selectionType, bTaggerType, datasets);

  } else if( dataset=="VGG_8TeV" ) {

    finalize_oneDataset(redntpVersion, "WmGG", selectionType, bTaggerType, datasets);
    finalize_oneDataset(redntpVersion, "WpGG", selectionType, bTaggerType, datasets);
    finalize_oneDataset(redntpVersion, "ZGG", selectionType, bTaggerType, datasets);

  } else if( dataset=="HToGG_M-125_8TeV-pythia6" ) {

    finalize_oneDataset(redntpVersion, "WH_ZH_HToGG_M-125_8TeV-pythia6_Summer12-PU_S7_START52_V9-v2", selectionType, bTaggerType, datasets);
    finalize_oneDataset(redntpVersion, "GluGluToHToGG_M-125_8TeV-powheg-pythia6_Summer12-PU_S7_START52_V9-v1", selectionType, bTaggerType, datasets);
    finalize_oneDataset(redntpVersion, "VBF_HToGG_M-125_8TeV-powheg-pythia6_Summer12-PU_S7_START52_V9-v1", selectionType, bTaggerType, datasets);
    finalize_oneDataset(redntpVersion, "TTH_HToGG_M-125_8TeV-pythia6_Summer12-PU_S7_START52_V9-v2", selectionType, bTaggerType, datasets);

  } else {
  
    finalize_oneDataset(redntpVersion, dataset, selectionType, bTaggerType, datasets );

  }


  do_haddCommand(redntpVersion, dataset, datasets, selectionType, bTaggerType );

  return 0;

}
Exemple #14
0
int main( int argc, char* argv[] ) {

  if( argc!=3 && argc!=4 ) {
    std::cout << "USAGE: ./finalize_ttHgg [dataset] [selectionType] [bTaggerType=\"JP\"]" <<std::endl;
    return 13;
  }


  std::string dataset(argv[1]);
  std::string selectionType(argv[2]);

  std::string bTaggerType="JP";
  if( argc>3 ) {
    std::string bTaggerType_str(argv[3]);
    bTaggerType = bTaggerType_str;
  }


  std::vector<std::string> *datasets = new std::vector<std::string>;


  if( dataset=="DATA_Run2011_FULL" ) {
   
    finalize_oneDataset("DoubleMu_Run2011A_FULL", selectionType, bTaggerType, datasets); //first muons! important!
    finalize_oneDataset("DoubleMu_Run2011B_v2", selectionType, bTaggerType, datasets); //first muons! important!
    finalize_oneDataset("DoubleElectron_Run2011A_FULL", selectionType, bTaggerType, datasets);
    finalize_oneDataset("DoubleElectron_Run2011B_v2", selectionType, bTaggerType, datasets);
    finalize_oneDataset("MuEG_Run2011A_FULL", selectionType, bTaggerType, datasets);
    finalize_oneDataset("MuEG_Run2011B", selectionType, bTaggerType, datasets);

  }else if( dataset=="DATA_Run2012_FULL" ) {
    runOnMC=false;
    finalize_oneDataset("DoublePhoton-Run2012C-13Jul2012-v1_b", selectionType, bTaggerType, datasets); 
    finalize_oneDataset("DoublePhoton-Run2012B-13Jul2012-v1", selectionType, bTaggerType, datasets); 
    finalize_oneDataset("DoublePhoton-Run2012C-13Jul2012-v2", selectionType, bTaggerType, datasets); 
    finalize_oneDataset("Photon-Run2012A-13Jul2012-v1", selectionType, bTaggerType, datasets); 

  }else if( dataset=="SinglePhoton" ) {
    runOnMC=false;
    finalize_oneDataset("Photon-Run2012A-13Jul2012-v1", selectionType, bTaggerType, datasets); 

  } else if( dataset=="DiPhotonBox_8TeV-pythia6" ) {

    finalize_oneDataset("DiPhotonBox_Pt-10To25_8TeV-pythia6_Summer12-PU_S7_START52_V9-v1", selectionType, bTaggerType, datasets);
    finalize_oneDataset("DiPhotonBox_Pt-250ToInf_8TeV-pythia6_Summer12-PU_S7_START52_V9-v1", selectionType, bTaggerType, datasets);
    finalize_oneDataset("DiPhotonBox_Pt-25To250_8TeV-pythia6_Summer12-PU_S7_START52_V9-v1", selectionType, bTaggerType, datasets);

  } else if( dataset=="DiPhoton_8TeV-pythia6" ) {

    finalize_oneDataset("DiPhotonBox_Pt-10To25_8TeV-pythia6_Summer12-PU_S7_START52_V9-v1", selectionType, bTaggerType, datasets);
    finalize_oneDataset("DiPhotonBox_Pt-250ToInf_8TeV-pythia6_Summer12-PU_S7_START52_V9-v1", selectionType, bTaggerType, datasets);
    finalize_oneDataset("DiPhotonBox_Pt-25To250_8TeV-pythia6_Summer12-PU_S7_START52_V9-v1", selectionType, bTaggerType, datasets);
    finalize_oneDataset("DiPhotonJets_8TeV-madgraph-tarball-v2_Summer12-PU_S7_START52_V9-v1", selectionType, bTaggerType, datasets);

  } else if( dataset=="V_8TeV") {
  //} else if( dataset=="DYJetsToLL_8TeV-madgraph" ) {

    finalize_oneDataset("DYJetsToLL_M-10To50filter_8TeV-madgraph_Summer12-PU_S7_START52_V9-v1" , selectionType, bTaggerType, datasets);
    finalize_oneDataset("DYJetsToLL_M-50_TuneZ2Star_8TeV-madgraph-tarball_Summer12-PU_S7_START52_V9-v1", selectionType, bTaggerType, datasets);
    finalize_oneDataset("WJetsToLNu_TuneZ2Star_8TeV-madgraph-tarball_Summer12-PU_S7_START52_V9-v1", selectionType, bTaggerType, datasets);

  } else if( dataset=="GJet_doubleEMEnriched_TuneZ2star_8TeV-pythia6" ) {

    finalize_oneDataset("GJet_Pt-20to40_doubleEMEnriched_TuneZ2star_8TeV-pythia6_Summer12-PU_S7_START52_V9-v1", selectionType, bTaggerType, datasets);
    finalize_oneDataset("GJet_Pt40_doubleEMEnriched_TuneZ2star_8TeV-pythia6_Summer12-PU_S7_START52_V9-v1", selectionType, bTaggerType, datasets);

  } else if( dataset=="QCD_doubleEMEnriched_TuneZ2star_8TeV-pythia6") {

    finalize_oneDataset("QCD_Pt-40_doubleEMEnriched_TuneZ2star_8TeV-pythia6_Summer12-PU_S7_START52_V9-v1", selectionType, bTaggerType, datasets);
    finalize_oneDataset("QCD_Pt-30to40_doubleEMEnriched_TuneZ2star_8TeV-pythia6_Summer12-PU_S7_START52_V9-v1", selectionType, bTaggerType, datasets);

  } else if( dataset=="TT_8TeV" ) {

    //    finalize_oneDataset("TTbarGG_0Jet_S1-cmkuo-TTGG_525_RECO_s46_v1" , selectionType, bTaggerType, datasets);//different from pandolfi
    finalize_oneDataset("TTbarGG_0Jet_Summer12-PU_S7_START52_V9-v1" , selectionType, bTaggerType, datasets);
    finalize_oneDataset("TTGJets_8TeV-madgraph_Summer12-PU_S7_START52_V9-v1", selectionType, bTaggerType, datasets);
    finalize_oneDataset("TTJets_TuneZ2star_8TeV-madgraph-tauola_Summer12-PU_S7_START52_V9-v1", selectionType, bTaggerType, datasets);

  //} else if( dataset=="VG_8TeV" ) {

  } else if( dataset=="VV_8TeV" ) {

    //finalize_oneDataset("WWJetsTo2L2Nu_TuneZ2star_8TeV-madgraph-tauola");
    finalize_oneDataset("WW_TuneZ2star_8TeV_pythia6_tauola_Summer12-PU_S7_START52_V9-v1", selectionType, bTaggerType, datasets);
    finalize_oneDataset("ZZ_TuneZ2star_8TeV_pythia6_tauola_Summer12-PU_S7_START52_V9-v1", selectionType, bTaggerType, datasets);
    finalize_oneDataset("WZ_TuneZ2star_8TeV_pythia6_tauola_Summer12-PU_S7_START52_V9-v1", selectionType, bTaggerType, datasets);
    finalize_oneDataset("WGToLNuG_TuneZ2star_8TeV-madgraph-tauola_Summer12-PU_S7_START52_V9-v2", selectionType, bTaggerType, datasets);
    finalize_oneDataset("ZGToLLG_8TeV-madgraph_Summer12-PU_S7_START52_V9-v1", selectionType, bTaggerType, datasets);

  } else if( dataset=="VGG_8TeV" ) {

    finalize_oneDataset("WmGG", selectionType, bTaggerType, datasets);
    finalize_oneDataset("WpGG", selectionType, bTaggerType, datasets);
    finalize_oneDataset("ZGG", selectionType, bTaggerType, datasets);

  } else if( dataset=="HToGG_M-125_8TeV-pythia6" ) {

    finalize_oneDataset("WH_ZH_HToGG_M-125_8TeV-pythia6_Summer12-PU_S7_START52_V9-v2", selectionType, bTaggerType, datasets);
    finalize_oneDataset("GluGluToHToGG_M-125_8TeV-powheg-pythia6_Summer12-PU_S7_START52_V9-v1", selectionType, bTaggerType, datasets);
    finalize_oneDataset("VBF_HToGG_M-125_8TeV-powheg-pythia6_Summer12-PU_S7_START52_V9-v1", selectionType, bTaggerType, datasets);
    //    finalize_oneDataset("TTH_HToGG_M-125_8TeV-pythia6", selectionType, bTaggerType, datasets);

  } else if(dataset=="TTH_HToGG_M-125_8TeV-pythia6"){

    finalize_oneDataset("TTH_HToGG_M-125_8TeV-pythia6_Summer12-PU_S7_START52_V9-v2", selectionType, bTaggerType, datasets);

  }else {
  
    finalize_oneDataset( dataset, selectionType, bTaggerType, datasets );

  }


  do_haddCommand( dataset, datasets, selectionType, bTaggerType );

  return 0;

}
Exemple #15
0
int main( int argc, char* argv[] ) {

  if( argc!=3 && argc!=4 ) {
    std::cout << "USAGE: ./finalize_TTW [dataset] [selectionType] [bTaggerType=\"SSVHE\"]" <<std::endl;
    return 13;
  }


  std::string dataset(argv[1]);
  std::string selectionType(argv[2]);

  std::string bTaggerType="TCHE";
  if( argc>3 ) {
    std::string bTaggerType_str(argv[3]);
    bTaggerType = bTaggerType_str;
  }




  Ntp1Finalizer_TTW* nf = new Ntp1Finalizer_TTW( dataset, selectionType, bTaggerType );


  if( dataset=="DATA_Run2011" ) {
   
    nf->addFile("DoubleMu_Run2011A_FULL"); //first muons! important!
    nf->addFile("DoubleMu_Run2011B_v2"); //first muons! important!
    nf->addFile("MuEG_Run2011A_FULL"); //first muons! important!
    nf->addFile("MuEG_Run2011B"); 
    //nf->addFile("SingleMu_Run2011A_FULL"); //first muons! important!
    //nf->addFile("SingleMu_Run2011B_v2"); //first muons! important!
    nf->addFile("DoubleElectron_Run2011A_FULL");
    nf->addFile("DoubleElectron_Run2011B_v2");

  } else if( dataset=="VV_TuneZ2_7TeV_pythia6_tauola_Summer11-PU_S4_START42_V11-v1" ) {

    nf->addFile("ZZ_TuneZ2_7TeV_pythia6_tauola_Summer11-PU_S4_START42_V11-v1");
    nf->addFile("WZ_TuneZ2_7TeV_pythia6_tauola_Summer11-PU_S4_START42_V11-v1");
    nf->addFile("WW_TuneZ2_7TeV_pythia6_tauola_Summer11-PU_S4_START42_V11-v1");

  } else if( dataset=="TT_TW" ) {

    nf->addFile("TTJ_Fall11_highstat");
    //nf->addFile("TTJets_TuneZ2_7TeV-madgraph-tauola_Fall11");
    nf->addFile("T_TuneZ2_tW-channel-DR_7TeV-powheg-tauola_Summer11-PU_S4_START42_V11-v1");
    nf->addFile("Tbar_TuneZ2_tW-channel-DR_7TeV-powheg-tauola_Summer11-PU_S4_START42_V11-v1");

  } else if( dataset=="SingleTop_Summer11" ) {

    nf->addFile("T_TuneZ2_tW-channel-DR_7TeV-powheg-tauola_Summer11-PU_S4_START42_V11-v1");
    nf->addFile("Tbar_TuneZ2_tW-channel-DR_7TeV-powheg-tauola_Summer11-PU_S4_START42_V11-v1");

  } else {
  
    nf->addFile( dataset );

  }

  nf->finalize();


  return 0;

}