This document is now obsolete. For more up to date documentation see https://plone3.fnal.gov/SAMGrid/Wiki/D0Documentation/
| Data Tier | Tape File Family e.g.top group (tape #) | Comment |
| generated | production effort | |
| generated-bygroup | group-phase1_top_mc_generated(1) | mc generated by group |
| simulated | production effort | |
| simulated-bygroup | group-phase1_top_mc_simulated(2) | mc d0gstar by group |
| digitized | production effort | |
| digitized-bygroup | group-phase1_top_mc_digitized(3) | mc d0sim by group |
| reconstructed | production effort | |
| reconstructed-bygroup | group-phase1_top_mc_reconstructed(4),
group-phase1_top_data_reconstructed(5) |
mc,data, reco'd by group |
| root-tuple | production effort | |
| root-tuple-bygroup | group-phase1_top_mc_root-tuple(6),
group-phase1_top_data_root-tuple(7) |
mc,data, root-tupled by group |
| trigsim | productin effort | |
| trigsim-bygroup | group-phase1_top_mc_reconstructed(4) | Trigger simulation by group |
| raw | production raw data file | |
| raw-bygroup | group-phase1_top_mc_raw(8) | raw data as streamed or picked by group |
Each output file in a processing chain must be recorded in SAM,
and in the order in which they were processed. However, if you do not wish
to actually store the physical data, you can just store the meta data with
a "declare". A typical example of a processing chain is gen > sim
> dig > reco > root-tuple. To add a data file into sam, use:
sam store --descrip=description_file.py --source=/path/to/file/ [--resubmit].
The --source flag is used to specify a source path so you do not need to be in the directory where the files are to store them. However, the file, description file, and the parameter file must all be in the same directory for the store to work. If your pwd is the location of these files, you must supply the flag "--source=.". The --resubmit flag is used to store a file that has failed part way through a store previously. Use this flag if you have trouble with the store and you do not fully understand the returned error message, but when you try the store again it says that the file is already in sam.
To just add the metadata, use:
sam declare description_file.py --source=/path/to/file/
This is sometimes needed to provide SAM with the information for
the file parentage, but you do not want to store the actuall parents to
tape.
To have files acceptable for farm operation you need to use a standard
naming convention. The character "_" is reserved in mc_runjob, so
if you use it in the wrong location you can get problems. An example filename
is
gen_test02_p10.06.00_lancs_pythia_hitv00+03+05+qcd-null-PtGt100.0_mb-none_282144137_2001
1 2 3
4 5 6
7 8
9
1, tier of code used to produce file: gen for four vectors
2, phase: This would be a group specific as given by Lee
3, release version of code used to produce file
4, production facility
5, generator
6, cardfile and decay string, no underscores use + or -
7, mb overlaid must me mb-none for gen files
8, request id (doesn't mean much yet) time stamp
9, wrid, number.....
setup sam
python my_description_file.py
If this test produces no errors, then you are ready to store or declare with the commands given in section 4.
class MyProcess(ProcFamily):
group="higgs"
origin_location="FNAL"
origin_facility="d0mino"
produced_for="Qizhong Li"
phase="group-phase1"
def __init__(self, stream, param_file, produced_by):
self.stream=stream
self.param_file=param_file
self.produced_by=produced_by
class Generator(MyProcess):
appfamily=my_generator
channel = Channel("bbh","bbbb")
minbi = MinBias("none","0.0")
gen_fil=Generator(stream="notstreamed", param_file="generator_test185201919.par
a
ms", produced_by="Avto Kharchilava")
gen_file_import = PrimaryMCFile("pythia_bbh_bbbb1.dat",
gen_fil, 1234, Events(1, 500, 500),
"07/02/2001 17:44", "07/03/2001 05:23",
1.960, channel)
gen_file_import.tier="generated-bygroup"
class MyProcess(ProcFamily):
group="higgs"
origin_location="FNAL"
origin_facility="d0mino"
produced_for="Qizhong Li"
phase="group-phase1"
def __init__(self, stream, param_file, produced_by):
self.stream=stream
self.param_file=param_file
self.produced_by=produced_by
class Simulator(MyProcess):
appfamily=my_d0gstar
channel = Channel("bbh","bbbb")
minbi = MinBias("none","0.0")
d0g_fil=Simulator(stream="notstreamed",
param_file="d0gstar_test185201919.params",
produced_by="Avto Kharchilava")
d0g_file_import =SimulatedFile("d0g.pythia_bbh_bbbb1.dat",
d0g_fil, 65123, Events(1, 500, 500),
"07/03/2001 17:44", "07/04/2001 05:23",
"pythia_bbh_bbbb1.dat", 1, 1, channel)
d0g_file_import.tier="simulated-bygroup"
class MyProcess(ProcFamily):
group="higgs"
origin_location="FNAL"
origin_facility="d0mino"
produced_for="Qizhong Li"
phase="group-phase1"
def __init__(self, stream, param_file, produced_by):
self.stream=stream
self.param_file=param_file
self.produced_by=produced_by
class Digitizer(MyProcess):
appfamily=my_d0sim
channel = Channel("bbh","bbbb")
minbi = MinBias("none","0.0")
dig_fil=Digitizer(stream="notstreamed",
param_file="d0sim_test185201919.params",
produced_by="Avto Kharchilava")
dig_file_import = DigitizedFile("sim.d0g.pythia_bbh_bbbb1.dat",
dig_fil, 90346, Events(1, 500, 500),
"07/04/2001 17:44", "07/05/2001 05:23",
"d0g.pythia_bbh_bbbb1.dat", 1, 1, channel, minbi)
dig_file_import.tier="digitized-bygroup"
class MyProcess(ProcFamily):
group="higgs"
origin_location="FNAL"
origin_facility="d0mino"
produced_for="Qizhong Li"
phase="group-phase1"
def __init__(self, stream, param_file, produced_by):
self.stream=stream
self.param_file=param_file
self.produced_by=produced_by
class Reconstruction(MyProcess):
appfamily=my_reco
channel = Channel("bbh","bbbb")
minbi = MinBias("none","0.0")
rec_fil=Reconstruction(stream="notstreamed",
param_file="d0reco_test185201919.params",
produced_by="Avto Kharchilava")
rec_file_import = ReconstructedMCFile("reco.sim.d0g.pythia_bbh_bbbb1.dat",
rec_fil, 253859, Events(1, 500, 500),
"07/05/2001 17:44", "07/06/2001 05:23",
"sim.d0g.pythia_bbh_bbbb1.dat", 1, 1, channel,
minbi)
rec_file_import.tier="reconstructed-bygroup"
class MyProcess(ProcFamily):
group="higgs"
origin_location="FNAL"
origin_facility="d0mino"
produced_for="Qizhong Li"
phase="group-phase1"
def __init__(self, stream, param_file, produced_by):
self.stream=stream
self.param_file=param_file
self.produced_by=produced_by
class Reconstruction(MyProcess):
appfamily=my_recoA
channel = Channel("bbh","bbbb")
recA_fil=Reconstruction(stream="notstreamed",
param_file="recoA_test185201919.params",
produced_by="Avto Kharchilava")
recA_file_import = RecoAnalyzedMCFile("recoA.reco.sim.d0g.pythia_bbh_bbbb1.root",
recA_fil, 21600, Events(1, 500, 500),
"07/05/2001 17:44", "07/06/2001 05:23",
"reco.sim.d0g.pythia_bbh_bbbb1.dat", 1, 1, channel)
recA_file_import.tier="root-tuple-bygroup"
class MyProcess(ProcFamily):
group="higgs"
origin_location="FNAL"
origin_facility="d0mino"
produced_for="Qizhong Li"
phase="group-phase1"
def __init__(self, stream, param_file, produced_by):
self.stream=stream
self.param_file=param_file
self.produced_by=produced_by
class Reconstruction(MyProcess):
appfamily=my_recoA
channel = Channel("bbh","bbbb")
recA_fil=Reconstruction(stream="notstreamed",
param_file="recoA_test185201919.params",
produced_by="Avto Kharchilava")
recA_file_import = RecoAnalyzedMCFile("recoA.reco.sim.d0g.pythia_bbh_bbbb1.root",
recA_fil, 21600, Events(1, 500, 500),
"07/05/2001 17:44", "07/06/2001 05:23",
["parent1.dat","parent2.dat","parent3.dat"],
1, 1, channel)
recA_file_import.tier="root-tuple-bygroup"
Note: This example is slightly different from the others as it is a description file generated by SAMManager and is produced automatically when you run a sam project, for example, with d0tools. In this case, you put in your stream name and tier in the rcp parameters (see documentation on running sam projects). The tier must have the "-bygroup" ending in the name. The "pick-event" stream is special for files produced by pick event.