How to run the tool
The executable combine
provided by the package allows to use the Higgs Combination Tool indicating by command line which is the method to use for limit combination and which are user's preferences to run it. To see the entire list of all available options ask for the help:
combine help
The option M
allows to chose the method used. There are several groups of statistical methods:
 Asymptotic likelihood methods:
AsymptoticLimits
: limits calculated according to the asymptotic formulas in arxiv:1007.1727Significance
: simple profile likelihood approximation, for calculating significances.
 Bayesian methods:
BayesianSimple
: performing a classical numerical integration (for simple models only)MarkovChainMC
: performing Markov Chain integration, for arbitrarily complex models.
 Frequentist or hybrid bayesianfrequentist methods:
HybridNew
: compute modified frequentist limits, significance/pvalues and confidence intervals according to several possible prescriptions with toys.
 Fitting
FitDiagnostics
: performs maximum likelihood fits to extract the signal yield and provide diagnostic tools such as pre and postfit models and correlationsMultiDimFit
: perform maximum likelihood fits in multiple parameters and likelihood scans
 Miscellaneous other modules that don't compute limits but use the same framework:
GoodnessOfFit
: perform a goodness of fit test for models including shape information using several GOF estimatorsChannelConsistencyCheck
: check how consistent are the individual channels of a combination areGenerateOnly
: generate random or asimov toy datasets for use as input to other methods
The command help is organized into five parts:
 Main options section indicates how to pass the datacard as input to the tool (
d datacardName
) and how to choose the statistical method (M MethodName
) to compute a limit and level of verbosity for outputv
 Common statistics options include options common to different statistical methods such as
cl
to specify the CL (default is 0.95) ort
to give the number of toy MC extractions required.  Common inputoutput options. Is it possible to specify hypothesis point under analysis using
m
or include specific string in output filenamename
.  Common miscellaneous options.
 Method specific options sections are dedicated to each method. By providing the Method name with the
M
option, only the options for that specific method are shown in addition to the common options
Those options reported above are just a sample of all available.The command help
provides documentation of all of them.
Common command line options
There are a number of useful command line options which can be used to alter the model (or parameters of the model) at run These are the most commonly used, generic options,

H
: run first another faster algorithm (e.g. the ProfileLikelihood described below) to get a hint of the limit, allowing the real algorithm to converge more quickly. We strongly recommend to use this option when using MarkovChainMC, HybridNew or FeldmanCousins calculators, unless you know in which range your limit lies and you set it manually (the default is[0, 20]
) 
rMax
,rMin
: manually restrict the range of signal strengths to consider. For Bayesian limits with MCMC,rMax
a rule of thumb is that rMax should be 35 times the limit (a too small value ofrMax
will bias your limit towards low values, since you are restricting the integration range, while a too large value will bias you to higher limits) 
setParameters name=value[,name2=value2,...]
sets the starting values of the parameters, useful e.g. when generating toy MC or when also setting the parameters as fixed. This option supports the use of regexp via by replacingname
withrgx{some regular expression}
. 
setParameterRanges name=min,max[:name2=min2,max2:...]
sets the ranges of the parameters (useful e.g. for scanning in MultiDimFit, or for Bayesian integration). This option supports the use of regexp via by replacingname
withrgx{some regular expression}
. 
redefineSignalPOIs name[,name2,...]
redefines the set of parameters of interest. if the parameters where constant in the input workspace, they are redefined to be floating.
 nuisances promoted to parameters of interest are removed from the list of nuisances, and thus they are not randomized in methods that randomize nuisances (e.g. HybridNew in nonfrequentist mode, or BayesianToyMC, or in toy generation with
t
but withouttoysFreq
). This doesn't have any impact on algorithms that don't randomize nuisances (e.g. fits, AsymptoticLimits, or HybridNew in fequentist mode) or on algorithms that treat all parameters in the same way (e.g. MarkovChainMC).  Note that constraint terms for the nuisances are dropped after promotion to a POI using
redefineSignalPOI
. To produce a likelihood scan for a nuisance parameter, using MultiDimFit withalgo grid
, you should instead use theparameters (P)
option which will not cause the loss of the constraint term when scanning.  parameters of interest of the input workspace that are not selected by this command become unconstrained nuisance parameters, but they are not added to the list of nuisances so they will not be randomized (see above).

freezeParameters name1[,name2,...]
Will freeze the parameters with the given names to their set values. This option supports the use of regexps via by replacingname
withrgx{some regular expression}
for matching to constrained nuisance parameters orvar{some regular expression}
for matching to any parameter. For examplefreezeParameters rgx{CMS_scale_j.*}
will freeze all constrained nuisance parameters with the prefixCMS_scale_j
, whilefreezeParameters var{.*rate_scale}
will freeze any parameter (constrained nuisance or otherwise) with the suffixrate_scale
. use the option
freezeParameters allConstrainedNuisances
to freeze all nuisance parameters that have a constraint term (i.e notflatParams
orrateParams
or other freely floating parameters).  similarly the option
floatParameters
sets the parameter floating.  groups of nuisances (constrained or otherwise), as defined in the datacard, can be frozen using
freezeNuisanceGroups
. You can also specify to freeze nuisances which are not contained in a particular group using a ^ before the group name (freezeNuisanceGroups=^group_name
will freeze everything except nuisance parameters in the group "group_name".)  all constrained nuisance parameters (not
flatParam
orrateParam
) can be set floating usingfloatAllNuisances
.
 use the option
Warning
Note that the floating/freezing options have a priority ordering from lowest to highest as floatParameters < freezeParameters < freezeNuisanceGroups < floatAllNuisances
. Options with higher priority will override those with lower priority.

trackParameters name1[,name2,...]
will add a branch to the output tree for each of the named parameters. This option supports the use of regexp via by replacingname
withrgx{some regular expression}
 the name of the branch will be trackedParam_name.
 the exact behaviour depends on the method. For example, when using
MultiDimFit
with thealgo scan
, the value of the parameter at each point in the scan will be saved while forFitDiagnostics
, only the value at the end of the method will be saved.

trackErrors name1[,name2,...]
will add a branch to the output tree for the error of each of the named parameters. This option supports the use of regexp via by replacingname
withrgx{some regular expression}
 the name of the branch will be trackedError_name.
 the behaviour is the same as
trackParameters
above.
By default, the dataset used by combine will be the one pointed to in the datacard. You can tell combine to use a different dataset (for example a toy one that you generated) by using the option dataset
. The argument should be rootfile.root:workspace:location
or rootfile.root:location
. In order to use this option, you must first convert your datacard to a binary workspace and use this binary workspace as the input to the command line.
Generic Minimizer Options
Combine uses its own minimizer class which is used to steer Minuit (via RooMinimizer) named the CascadeMinimizer
. This allows for sequential minimization which can help in case a particular setting/algo fails. Also, the CascadeMinimizer
knows about extra features of Combine such as discrete nuisance parameters.
All of the fits which are performed in several of the methods available use this minimizer. This means that the fits can be tuned using these common options,
cminPoiOnlyFit
: First, perform a fit floating only the parameters of interest. This can be useful to find, roughly, where the global minimum is.cminPreScan
: Do a scan before first minimizationcminPreFit
arg: If set to a value N > 0, the minimizer will perform a prefit with strategy (N1) with frozen nuisance parameters.cminApproxPreFitTolerance arg
: If nonzero, do first a prefit with this tolerance (or 10 times the final tolerance, whichever is largest)cminApproxPreFitStrategy arg
: Strategy to use in the prefit. The default is strategy 0.
cminDefaultMinimizerType arg
: Set the default minimizer Type. Default is Minuit2.cminDefaultMinimizerAlgo arg
: Set the default minimizer Algo. The default is MigradcminDefaultMinimizerTolerance arg
: Set the default minimizer Tolerance, the default is 0.1cminDefaultMinimizerStrategy arg
: Set the default minimizer Strategy between 0 (speed), 1 (balance  default), 2 (robustness). The Minuit documentation for this is pretty sparse but in general, 0 means evaluate the function less often, while 2 will waste function calls to get precise answers. An important note is that Hesse (error/correlation estimation) will be run only if the strategy is 1 or 2.cminFallbackAlgo arg
: Provides a list of fallback algorithms if the default minimizer fails. You can provide multiple ones using the syntax isType[,algo],strategy[:tolerance]
: egcminFallbackAlgo Minuit2,Simplex,0:0.1
will fall back to the simplex algo of Minuit2 with strategy 0 and a tolerance 0.1, whilecminFallbackAlgo Minuit2,1
will use the default algo (migrad) of Minuit2 with strategy 1.cminSetZeroPoint (0/1)
: Set the reference of the NLL to 0 when minimizing, this can help faster convergence to the minimum if the NLL itself is large. The default is true (1), set to 0 to turn off.
The allowed combinations of minimizer types and minimizer algos are as follows
Minimizer Type  Minimizer Algo 

Minuit 
Migrad , Simplex , Combined , Scan 
Minuit2 
Migrad , Simplex , Combined , Scan 
GSLMultiMin 
ConjugateFR , ConjugatePR , BFGS , BFGS2 , SteepestDescent 
You can find details about these in the Minuit2 documentation here.
More of these options can be found in the Cascade Minimizer options section when running help
.
Output from combine
Most methods will print the results of the computation to the screen, however, in addition, combine will also produce a root file containing a tree called limit with these results. The name of this file will be of the format,
higgsCombineTest.MethodName.mH$MASS.[word$WORD].root
where $WORD is any user defined keyword from the datacard which has been set to a particular value.
A few command line options of combine can be used to control this output:
 The option
n
allows you to specify part of the name of the rootfile. e.g. if you don HWW
the roofile will be calledhiggsCombineHWW....
instead ofhiggsCombineTest
 The option
m
allows you to specify the higgs boson mass, which gets written in the filename and also in the tree (this simplifies the bookeeping because you can merge together multiple trees corresponding to different higgs masses usinghadd
and then use the tree to plot the value of the limit vs mass) (default is m=120)  The option
s
allows to specify the seed (egs 12345
) used in toy generation. If this option is given, the name of the file will be extended by this seed, eghiggsCombineTest.AsymptoticLimits.mH120.12345.root
 The option
keywordvalue
allows you to specify the value of a keyword in the datacard such that $WORD (in the datacard) will be given the value of VALUE in the commandkeywordvalue WORD=VALUE
, eghiggsCombineTest.AsymptoticLimits.mH120.WORDVALUE.12345.root
The output file will contain a TDirectory
named toys, which will be empty if no toys are generated (see below for details) and a TTree
called limit with the following branches;
Branch name  Type  Description 

limit 
Double_t 
Main result of combine run with method dependent meaning 
limitErr 
Double_t 
Estimated uncertainty on the result 
mh 
Double_t 
Value of MH, specified with m option 
iToy 
Int_t 
Toy number identifier if running with t 
iSeed 
Int_t 
Seed specified with s 
t_cpu 
Float_t 
Estimated CPU time for algorithm 
t_real 
Float_t 
Estimated real time for algorithm 
quantileExpected 
Float_t 
Quantile identifier for methods which calculated expected (quantiles) and observed results (eg conversions from \Delta\ln L values) with method dependent meaning. Negative values are reserved for entries which do not related to quantiles of a calculation with the default being set to 1 (usually meaning the observed result). 
The value of any user defined keyword $WORD which is set using keywordvalue
described above will also be included as a branch with type string
named WORD. The option can be repeated multiple times for multiple keywords.
In some cases, the precise meanings of the branches will depend on the Method being used, which is included in this documentation.
Toy data generation
By default, each of these methods will be run using the observed data as the input. In several cases (as detailed below), it might be useful to run the tool using toy datasets, including Asimov data.
The option t
is used to specify to combine to first generate a toy dataset(s) which will be used in replacement of the real data. There are two versions of this,

t N
with N > 0. Combine will generate N toy datasets from the model and rerun the method once per toy. The seed for the toy generation can be modified with the options
(uses 1
for a random seed). The output file will contain one entry in the tree for each of these toys. 
t 1
will produce an Asimov dataset in which statistical fluctuations are suppressed. The procedure to generate this Asimov dataset depends on which type of analysis you are using, see below for details.
Warning
The default values of the nuisance parameters (or any parameter) are used to generate the toy. This means that if, for example, you are using parametric shapes and the parameters inside the workspace are set to arbitrary values, those arbitrary values will be used to generate the toy. This behaviour can be modified through the use of the option setParameters x=value_x,y=value_y...
which will set the values of the parameters (x
and y
) before toy generation. You can also load a snapshot from a previous fit to set the nuisances to their postfit values (see below).
The output file will contain the toys (as RooDataSets
for the observables, including global observables) in the toys directory if the option saveToys
is provided. If you include this option, the limit
TTree in the output will have an entry corresponding to the state of the POI used for the generation of the toy, with the value of quantileExpected
set to 2.
Info
The branches that are created by methods like MultiDimFit
will not show the values used to generate the toy. If you also want the TTree to show the values of the POIs used to generate to toy, you should add additional branches using the trackParameters
option as described in the common command line options section above. These branches will behave as expected when adding the option saveToys
.
Asimov datasets
If you are using wither t 1
or using AsymptoticLimits
, combine will calculate results based on an Asimov dataset.

For counting experiments, the Asimov data will just be set to the total number of expected events (given the values of the nuisance parameters and POIs of the model)

For shape analyses with templates, the Asimov dataset will be constructed as a histogram using the same binning which is defined for your analysis.

If your model uses parametric shapes (for example when you are using binned data, there are some options as to what Asimov dataset to produce. By default, combine will produce the Asimov data as a histogram using the binning which is associated to each observable (ie as set using
RooRealVar::setBins
). If this binning doesn't exist, combine will guess a suitable binning  it is therefore best to useRooRealVar::setBins
to associate a binning to each observable, even if your data is unbinned, if you intend to use Asimov datasets.
You can also ask combine to use a PseudoAsimov dataset, which is created from many weighted unbinned events.
Setting Xrtd TMCSO_AdaptivePseudoAsimov=
\beta with \beta>0 will trigger the internal logic of whether to produce a PseudoAsimov dataset. This logic is as follows;

For each observable in your dataset, the number of bins, n_{b} is determined either from the value of
RooRealVar::getBins
if it exists or assumed to be 100. 
If N_{b}=\prod_{b}n_{b}>5000, the number of expected events N_{ev} is determined. Note if you are combining multiple channels, N_{ev} refers to the number of expected events in a single channel, the logic is separate for each channel. If N_{ev}/N_{b}<0.01 then a PseudoAsimov dataset is created with the number of events equal to \beta \cdot \mathrm{max}\{100*N_{ev},1000\}. If N_{ev}/N_{b}\geq 0.01 , then a normal Asimov dataset is produced.

If N_{b}\leq 5000 then a normal Asimov dataset will be produced
The production of a PseudoAsimov dataset can be forced by using the option Xrtd TMCSO_PseudoAsimov=X
where X>0
will determine the number of weighted events for the PseudoAsimov dataset. You should try different values of X
since larger values leads to more events in the PseudoAsimov dataset resulting in higher precision but in general the fit will be slower.
You can turn off the internal logic by setting Xrtd TMCSO_AdaptivePseudoAsimov=0 Xrtd TMCSO_PseudoAsimov=0
thereby forcing histograms to be generated.
Info
If you set Xrtd TMCSO_PseudoAsimov=X
with X>0
and also turn on Xrtd TMCSO_AdaptivePseudoAsimov=
\beta, with \beta>0, the internal logic will be used but this time the default will be to generate PseudoAsimov datasets, rather than the normal Asimov ones.
Nuisance parameter generation
The default method of dealing with systematics is to generate random values (around their nominal values, see above) for the nuisance parameters, according to their prior pdfs centred around their default values, before generating the data. The unconstrained nuisance parameters (eg flatParam
or rateParam
) or those with flat priors are not randomised before the data generation. If you wish to also randomise these parameters, you must declare these as flatParam
in your datacard and when running text2workspace you must add the option XassignflatParamprior
in the command line.
The following are options which define how the toys will be generated,

toysNoSystematics
the nuisance parameters in each toy are not randomised when generating the toy datasets  i.e their nominal values are used to generate the data. Note that for methods which profile (fit) the nuisances, the parameters are still floating when evaluating the likelihood. 
toysFrequentist
the nuisance parameters in each toy are set to their nominal values which are obtained after fitting first to the data, with POIs fixed, before generating the data. For evaluating likelihoods, the constraint terms are instead randomised within their pdfs around the postfit nuisance parameter values.
If you are using toysFrequentist
, be aware that the values set by setParameters
will be ignored for the toy generation as the postfit values will instead be used (except for any parameter which is also a parameter of interest). You can override this behaviour and choose the nominal values for toy generation for any parameter by adding the option bypassFrequentistFit
which will skip the initial fit to data or by loading a snapshot (see below).
Warning
The methods such as AsymptoticLimits
and HybridNew LHCmode LHClimits
, the "nominal" nuisance parameter values are taken from fits to the data and are therefore not "blind" to the observed data by default (following the fully frequentist paradigm). See the detailed documentation on these methods for avoiding this and running in a completely "blind" mode.
Generate only
It is also possible to generate the toys first and then feed them to the Methods in combine. This can be done using M GenerateOnly saveToys
. The toys can then be read and used with the other methods by specifying toysFile=higgsCombineTest.GenerateOnly...
and using the same options for the toy generation.
Warning
Some Methods also use toys within the method itself (eg AsymptoticLimits
and HybridNew
). For these, you should not specify the toy generation with t
or the options above and instead follow the specific instructions.
Loading snapshots
Snapshots from workspaces can be loaded and used in order to generate toys using the option snapshotName <name of snapshot>
. This will first set the parameters to the values in the snapshot before any other parameter options are set and toys are generated.
See the section on saving postfit workspaces for creating workspaces with postfit snapshots from MultiDimFit
.
Here are a few examples of calculations with toys from postfit workspaces using a workspace with r, m_{H} as parameters of interest

Throw postfit toy with b from s+b(floating r,m_{H}) fit, s with r=1.0, m=best fit MH, using nuisance values and constraints recentered on s+b(floating r,m_{H}) fit values (aka frequentist postfit expected) and compute postfit expected r uncertainty profiling MH
combine higgsCombinemumhfit.MultiDimFit.mH125.root snapshotName MultiDimFit M MultiDimFit verbose 9 n randomtest toysFrequentist bypassFrequentistFit t 1 expectSignal=1 P r floatOtherPOIs=1 algo singles

Throw postfit toy with b from s+b(floating r,m_{H}) fit, s with r=1.0, m=128.0, using nuisance values and constraints recentered on s+b(floating r,m_{H}) fit values (aka frequentist postfit expected) and compute postfit expected significance (with MH fixed at 128 implicitly)
combine higgsCombinemumhfit.MultiDimFit.mH125.root m 128 snapshotName MultiDimFit M ProfileLikelihood significance verbose 9 n randomtest toysFrequentist bypassFrequentistFit overrideSnapshotMass t 1 expectSignal=1 redefineSignalPOIs r freezeParameters MH

Throw postfit toy with b from s+b(floating r,m_{H}) fit, s with r=0.0, using nuisance values and constraints recentered on s+b(floating r,m_{H}) fit values (aka frequentist postfit expected) and compute postfit expected and observed asymptotic limit (with MH fixed at 128 implicitly)
combine higgsCombinemumhfit.MultiDimFit.mH125.root m 128 snapshotName MultiDimFit M AsymptoticLimits verbose 9 n randomtest bypassFrequentistFit overrideSnapshotMassredefineSignalPOIs r freezeParameters MH
combineTool for job submission
For longer tasks which cannot be run locally, several methods in combine can be split to run on the LSF batch or the Grid. The splitting and submission is handled using the combineTool
(see this getting started section to get the tool)
Submission to Condor
The syntax for running on condor with the tool is
combineTool.py M ALGO [options] jobmode condor subopts='CLASSADS' taskname NAME [dryrun]
with options
being the usual list of combine
options. The help option h
will give a list of both combine
and combineTool
sets of options. This can be used with several different methods from combine
.
The subopts
option takes a string with the different ClassAds that you want to set, separated by \n
as argument (e.g. '+JobFlavour="espresso"\nRequestCpus=1'
).
The dryrun
option will show what will be run without actually doing so / submitting the jobs.
For example, to generate toys (eg for use with limit setting) users running on lxplus at CERN the condor mode can be used eg
combineTool.py d workspace.root M HybridNew LHCmode LHClimits clsAcc 0 T 2000 s 1 singlePoint 0.2:2.0:0.05 saveHybridResult m 125 jobmode condor taskname condortest subopts='+JobFlavour="tomorrow"'
The singlePoint
option is overridden so that this will produce a script for each value of the POI in the range 0.2 to 2.0 in steps of 0.05. You can merge multiple points into a script using merge
 e.g adding merge 10
to the above command will mean that each job contains at most 10 of the values. The scripts are labelled by the taskname
option. These will be submitted directly to condor adding any options in subopts
to the condor submit script. Make sure multiple options are separated by \n
. The jobs will run and produce output in the current directory.
Below is an example for splitting points in a multidimensional likelihood scan.
Splitting jobs for a multidimensional likelihood scan
The option splitpoints
issues the command to split the jobs for MultiDimFit
when using algo grid
. The following example will split the jobs such that there are 10 points in each of the jobs, which will be submitted to the 8nh queue.
combineTool.py datacard.txt M MultiDimFit algo grid points 50 rMin 0 rMax 1 jobmode condor splitpoints 10 subopts='+JobFlavour="workday"' taskname mytask n mytask
Remember, any usual options (such as redefining POIs or freezing parameters) are passed to combine and can be added to the command line for combineTool
.
Info
The option n NAME
should be included to avoid overwriting output files as the jobs will be run inside the directory from which the command is issued.
Running combine jobs on the Grid
For more CPUintensive tasks, for example determining limits for complex models using toys, it is generally not feasible to compute all the results interactively. Instead, these jobs can be submitted to the Grid.
In this example we will use the HybridNew
method of combine to determine an upper limit for a subchannel of the Run 1 SM H\rightarrow\tau\tau analysis. For full documentation, see the section on computing limits with toys.
With this model it would take too long to find the limit in one go, so instead we create a set of jobs in which each one throws toys and builds up the test statistic distributions for a fixed value of the signal strength. These jobs can then be submitted to a batch system or to the Grid using crab3
. From the set of output distributions it is possible to extract the expected and observed limits.
For this we will use combineTool.py
First we need to build a workspace from the H\rightarrow\tau\tau datacard,
$ text2workspace.py data/tutorials/htt/125/htt_mt.txt m 125
$ mv data/tutorials/htt/125/htt_mt.root ./
To get an idea of the range of signal strength values we will need to build teststatistic distributions for we will first use the AsymptoticLimits
method of combine,
$ combine M Asymptotic htt_mt.root m 125
<< Combine >>
[...]
 AsymptoticLimits (CLs) 
Observed Limit: r < 1.7384
Expected 2.5%: r < 0.4394
Expected 16.0%: r < 0.5971
Expected 50.0%: r < 0.8555
Expected 84.0%: r < 1.2340
Expected 97.5%: r < 1.7200
Based on this, a range of 0.2 to 2.0 should be suitable.
We can use the same command for generating the distribution of test statistics with combineTool
. The singlePoint
option is now enhanced to support expressions that generate a set of calls to combine with different values. The accepted syntax is of the form MIN:MAX:STEPSIZE, and multiple commaseparated expressions can be specified.
The script also adds an option dryrun
which will not actually call combine but just prints out the commands that would be run, e.g,
combineTool.py M HybridNew d htt_mt.root LHCmode LHClimits singlePoint 0.2:2.0:0.2 T 2000 s 1 saveToys saveHybridResult m 125 dryrun
...
[DRYRUN]: combine d htt_mt.root LHCmode LHClimits T 2000 s 1 saveToys saveHybridResult M HybridNew m 125 singlePoint 0.2 n .Test.POINT.0.2
[DRYRUN]: combine d htt_mt.root LHCmode LHClimits T 2000 s 1 saveToys saveHybridResult M HybridNew m 125 singlePoint 0.4 n .Test.POINT.0.4
[...]
[DRYRUN]: combine d htt_mt.root LHCmode LHClimits T 2000 s 1 saveToys saveHybridResult M HybridNew m 125 singlePoint 2.0 n .Test.POINT.2.0
When the dryrun
option is removed each command will be run in sequence.
Grid submission
Submission to the grid with crab3
works in a similar way. Before doing so ensure that the crab3
environment has been sourced in addition to the CMSSW environment. We will use the example of generating a grid of teststatistic distributions for limits.
$ cmsenv; source /cvmfs/cms.cern.ch/crab3/crab.sh
$ combineTool.py d htt_mt.root M HybridNew LHCmode LHClimits clsAcc 0 T 2000 s 1 singlePoint 0.2:2.0:0.05 saveToys saveHybridResult m 125 jobmode crab3 taskname gridtest customcrab custom_crab.py
The option customcrab
should point to a python file python containing a function of the form custom_crab(config)
that will be used to modify the default crab configuration. You can use this to set the output site to your local grid site, or modify other options such as the voRole, or the site blacklist/whitelist.
For example
def custom_crab(config):
print '>> Customising the crab config'
config.Site.storageSite = 'T2_CH_CERN'
config.Site.blacklist = ['SOME_SITE', 'SOME_OTHER_SITE']
Again it is possible to use the option dryrun
to see what the complete crab config will look like before actually submitted it.
Once submitted the progress can be monitored using the standard crab
commands. When all jobs are completed copy the output from your sites storage element to the local output folder.
$ crab getoutput d crab_gridtest
# Now we have to untar the output files
$ cd crab_gridtest/results/
$ for f in *.tar; do tar xf $f; done
$ mv higgsCombine*.root ../../
$ cd ../../
These output files should be combined with hadd
, after which we invoke combine as usual to calculate observed and expected limits from the merged grid as usual.