What are the JobModule Registry Config parameters for DigitListModule?
// JobModule Registry parameters (with default values) are: // // "ListsToMake" - DigitListModule::kDataList (i.e., = 1) // "NameDataList" - "canddigitlist" // "NameMCList" - "candmcdigitlist" // "TitleDataList" - "Created by DigitListModule from raw data." // "TitleMCList" - "Created by DigitListModule from MCTruth data." // "DigitListAlgorithm" - "AlgDigitList" // "DigitListAlgConfig" - "default" // "MCDigitListAlgorithm" - "AlgMCDigitList" // "MCDigitListAlgConfig" - "default"
How do I set the JobModule Registry Config parameters for DigitListModule?
Use the DigitListModule::Config method in the standard JobModule::Config way.
How do I turn off Calibrations when I run DigitListModule::Reco?
Put the following line in your job macro. This causes DigitListModule
to override the default AlgConfig for AlgDigitList with that represented
by the text file CandDigit/DBtxt_AlgDigitList_nocalib.C. This assumes
that "Reco" is your JobPath name.
jc.Path("Reco").Mod("DigitListModule").Set("DigitListAlgConfig=nocalib");
What are the JobModule Registry Config parameters for DeMuxDigitListModule?
// JobModule Registry parameters (with default values) are: // // "NameListIn" - "canddigitlist" // "NameListOut" - "canddigitlist" // "TitleListOut" - "Created by DeMuxDigitListModule from CandDigitList" // "DeMuxDigitListAlgorithm" - "AlgDeMuxDigitList" // "DeMuxDigitListAlgConfig" - "default" // "SwitchPersToTemp" - 1 (means don't write out original CandDigitList)
How do I set the JobModule Registry Config parameters for DeMuxDigitListModule?
Use the DeMuxDigitListModule::Config method in the standard JobModule::Config way.
How do I select a particular demuxing Algorithm when I run DeMuxDigitListModule::Reco?
This selection is made by AlgDeMuxDigitList, which has its own AlgConfig.
You can override the "default" AlgConfig with a new one called, say, "golden"
to cause AlgDeMuxDigitList to call AlgDeMuxGolden. You would put this
segment of code in your job macro to run AlgDeMuxGolden instead of the
default AlgDeMuxCosmics:
// AlgDeMuxDigitList AlgConfig parameters to use AlgDeMuxGolden
af.Register("AlgDeMuxDigitList", "golden");
AlgHandle ah = af.GetAlgHandle("AlgDeMuxDigitList", "golden");
AlgConfig &acd = ah.GetAlgConfig();
acd.UnLockValues();
acd.Set("DeMuxAlgorithm", "AlgDeMuxGolden");
acd.Set("DeMuxAlgConfig", "default");
acd.Set("NormalizeWeights", 1); // Normalize weights to 1 if non-zero
acd.Set("TrimHyps", 1); // Drop "0" weights if neg., or keep top N
acd.LockValues();
acd.LockKeys();
How do I run more than one demuxer in a loon job?
> Suppose one wants to run both Brian's and Mark's demuxer in the
> same job, either in the same JobC path, or in separate paths
> (that could optionally get merged together after demuxing).
> It wasn't clear to me how one would do this via your method
> of selecting demuxers via the algconfig. So I must be missing
> something about how the algconfigs work w.r.t. JobC paths,
> since I know that the ability to run multiple versions of the
> same algorithm step in a single job is something we are supporting.
> Can you enlighten me on this?
Appended is the sort of job macro one could have to run two
demuxers (AlgDeMuxCosmics and AlgDeMuxGolden in this example).
The CandDeMuxDigitLists filled by the two demuxers are named
"demuxcosmiclist" and "demuxgoldenlist" instead of "canddigitlist".
They go into Roy's reconstruction routines on two separate JobPaths
so that the fitters can be configured differently. Both of these
CandDeMuxDigitLists are written out and the original "canddigitlist"
is not written out.
There are a number of variations possible on this kind of job
depending on what one wants to do.
{
// Link dynamic libraries
gSystem->Load("libBField");
gSystem->Load("libSwimmer");
gSystem->Load("libRecoBase");
gSystem->Load("libDeMux");
gSystem->Load("libCandStripSR");
gSystem->Load("libCandSliceSR");
gSystem->Load("libCandTrackSR");
gSystem->Load("libCandClusterSR");
gSystem->Load("libCandShowerSR");
gSystem->Load("libCandFitTrackSR");
gSystem->Load("libCandEventSR");
gSystem->Load("libNoiseFilter");
JobC jc;
// Create Reco path rubric
c.Path.Create("Reco");
jc.Path.Add("Reco", "NoiseFilterModule::Ana");
jc.Path.Add("Reco", "DigitListModule::Get");
jc.Path.Add("Reco", "DigitListModule::Reco");
// Create Cosmic portion of path
jc.Path.Create("Cosmic");
jc.Path.Add("Cosmic", "DeMuxDigitListModule::Reco");
jc.Path.Add("Cosmic", "StripSRListModule::Reco");
jc.Path.Add("Cosmic", "SliceSRListModule::Reco");
jc.Path.Add("Cosmic", "TrackSRListModule::Reco");
jc.Path.Add("Cosmic", "FitTrackSRListModule::Reco");
jc.Path.Add("Cosmic", "EventSRListModule::Reco");
// Create Golden portion of path
jc.Path.Create("Golden");
jc.Path.Add("Golden", "DeMuxDigitListModule::Reco");
jc.Path.Add("Golden", "StripSRListModule::Reco");
jc.Path.Add("Golden", "SliceSRListModule::Reco");
jc.Path.Add("Golden", "TrackSRListModule::Reco");
jc.Path.Add("Golden", "FitTrackSRListModule::Reco");
jc.Path.Add("Golden", "EventSRListModule::Reco");
// Create Output portion of path
jc.Path.Create("Output");
jc.Path.Add("Output", "Output::Put");
// Connect paths
jc.Path.Attach("Cosmic", "Output");
jc.Path.Attach("Golden", "Output");
jc.Path.Attach("Reco", "Cosmic");
jc.Path.Attach("Reco", "Golden");
// Set Input stream directives
// jc.Input.AddFile("${ROOT_DATA}/F0000${RUN}_0000.mdaq.root");
jc.Input.Set("Format=input");
jc.Input.Set("Streams=DaqSnarl");
// Set Output stream directives
jc.Path("Output").Mod("Output").Set(
"DefaultFileName=candoutput.${RUN}.root");
jc.Path("Output").Mod("Output").Set("AccessMode=Recreate");
jc.Path("Output").Mod("Output").Set("Streams=DaqSnarl,Cand");
// Get the AlgFactory
AlgFactory &af = AlgFactory::GetInstance();
// AlgDeMuxDigitList AlgConfig parameters: AlgDeMuxCosmics path
af.Register("AlgDeMuxDigitList", "cosmic");
AlgHandle ah = af.GetAlgHandle("AlgDeMuxDigitList", "cosmic");
AlgConfig &acd = ah.GetAlgConfig();
acd.UnLockValues();
acd.Set("DeMuxAlgorithm", "AlgDeMuxCosmics");
acd.Set("DeMuxAlgConfig", "default");
acd.Set("NormalizeWeights", 1); // Normalize weights to 1 if non-zero
acd.Set("TrimHyps", 1); // Drop "0" weights if neg., or keep top N
acd.LockValues();
acd.LockKeys();
// AlgDeMuxDigitList AlgConfig parameters: AlgDeMuxGolden path
af.Register("AlgDeMuxDigitList", "golden");
AlgHandle ah = af.GetAlgHandle("AlgDeMuxDigitList", "golden");
AlgConfig &acd = ah.GetAlgConfig();
acd.UnLockValues();
acd.Set("DeMuxAlgorithm", "AlgDeMuxGolden");
acd.Set("DeMuxAlgConfig", "default");
acd.Set("NormalizeWeights", 1); // Normalize weights to 1 if non-zero
acd.Set("TrimHyps", 1); // Drop "0" weights if neg., or keep top N
acd.LockValues();
acd.LockKeys();
// DigitListModule parameters
jc.Path("Reco").Mod("DigitListModule").Set("ListsToMake=1");
// Cosmic path parameters
jc.Path("Cosmic").Mod("DeMuxDigitListModule").
Set("NameListOut=demuxcosmiclist");
jc.Path("Cosmic").Mod("StripSRListModule").Set("ListIn=demuxcosmiclist");
jc.Path("Cosmic").Mod("EventSRListModule").Set("FilterEvent=1");
// Golden path parameters
jc.Path("Golden").Mod("DeMuxDigitListModule").
Set("NameListOut=demuxgoldenlist");
jc.Path("Golden").Mod("StripSRListModule").Set("ListIn=demuxgoldenlist");
jc.Path("Golden").Mod("EventSRListModule").Set("FilterEvent=1");
// Run the combined path
jc.Path("Reco").Run(${NEVTS});
jc.Path("Reco").Report();
}
How do I get my own demuxing code to be recognized and called by DeMuxDigitListModule::Reco?
Only "Algorithms" can write into "Candidates." You can't
write into a Candidate from a JobModule. So you need to put
your demuxing code in the RunAlg method of an Algorithm,
say "AlgDeMuxMyOwn".
This is the procedure that I recommend:
1) In your package directory, write an AlgDeMuxMyOwn class that inherits
from AlgBase and implements the required RunAlg method, i.e.,
virtual void RunAlg(AlgConfig &ac, CandHandle &ch, CandContext &cx);
You migrate your pre-existing code from the Reco method of your module
to this RunAlg method. The CandDeMuxDigitListHandle through which
you write into the CandDeMuxDigitList is the "ch" argument of the
RunAlg method.
2) Put DeMuxDigitListModule::Reco in your JobPath after DigitListModule.
3) To get AlgDeMuxDigitList::RunAlg() (called from DeMuxDigitListModule)
to run your Algorithm (AlgDeMuxMyOwn), instead of the default
AlgDeMuxCosmics, you put the following lines in your job ROOT macro.
Put these lines in your loon job macro:
//**********************************************************************
// Get the AlgConfig object
AlgFactory &af = AlgFactory::GetInstance();
AlgHandle ah = af.GetAlgHandle("AlgDeMuxDigitList", "default");
AlgConfig &acd = ah.GetAlgConfig();
// Set the AlgConfig parameters
acd.UnLockValues();
acd.Set("DeMuxAlgorithm", "AlgDeMuxMyOwn"); // Use AlgDeMuxMyOwn
acd.Set("DeMuxAlgConfig", "default");
acd.LockValues();
acd.LockKeys();
//**********************************************************************
4) You need to put in your package a file called:
DBtxt_AlgDeMuxMyOwn_default.C
This file is where you set the AlgConfig parameters for your
demuxing Algorithm. An example of such a file is Brian's
DBtxt_AlgDeMuxCosmics_default.C in the DeMux package.
5) Make sure that the following line appears in the GNUmakefile
of your demuxing package:
ROOTMACROS = $(wildcard *.C)
If it's not there, you should add it. It's necessary to
get your DBtxt_AlgDeMuxMyOwn_default.C file recognized
by ROOT. The line causes the file to be copied to the
macros subdirectory of the release. See the GNUmakefile
in CandDigit or DeMux, where the line appears.
There is no requirement to have a JobModule in your demuxing package.
You would add one if you want to run a JobModule::Ana() method to do
some diagnostics on your demuxing output. However, you can also do
this monitoring using a ROOT macro, which you put in your job path
using JobCRootCommandModule.
What are the JobModule Registry Config parameters for FilterDigitListModule?
// JobModule Registry parameters (with default values) are: // // "NameListIn" - "canddigitlist" // "NameListOut" - "canddigitlist" // "TitleListOut" -"Created by FilterDigitListModule from CandDigitList" // "FilterDigitListAlgorithm" - "AlgFilterDigitList" // "FilterDigitListAlgConfig" - "default" // "SwitchPersToTemp" - 0 (means also write out original CandDigitList)
How do I set the JobModule Registry Config parameters for FilterDigitListModule?
Use the DigitListModule::Config method in the standard JobModule::Config way.
How do I select a particular digit filtering Algorithm when I run FilterDigitListModule::Reco?
Put the following line in your job macro. This causes FilterDigitListModule
to override the default Algorithm (AlgFilterDigitList) with another Algorithm
called AlgFilterDigitListMyOwn. This assumes that "Reco" is your JobPath name.
jc.Path("Reco").Mod("FilterDigitListModule").Set("FilterDigitListAlgorithm=AlgFilterDigitListMyOwn");
What are the AlgConfig parameters for AlgDigitList?
// AlgDigitList AlgConfig parameters (with default values) are: // // "DigitAlgorithm" - "AlgDigit" // "DigitAlgConfig" - "default"
How do I set the AlgConfig parameters for AlgDigitList?
See file: $SRT_PUBLIC_CONTEXT/CandDigit/DBtxt_AlgDigitList_default.C You can transfer contents to your job macro and edit it, or you can clone it into your ROOT macro path and edit the cloned file. Using the cloned file, you can also change the string "default" to your own name, say, "myown" to define your own AlgConfig set.
What are the AlgConfig parameters for AlgDigit?
// AlgDigit AlgConfig parameters (with default values) are: // // "CalPEMode" - 1 // "CalSigLinMode" - 1 // "CalSigCorrMode" - 1 // "CalTimeMode" - 1
How do I set the AlgConfig parameters for AlgDigit?
See file: $SRT_PUBLIC_CONTEXT/CandDigit/DBtxt_AlgDigit_default.C You can transfer contents to your job macro and edit it, or you can clone it into your ROOT macro path and edit the cloned file. Using the cloned file, you can also change the string "default" to your own name, say, "myown" to define your own AlgConfig set.
What are AlgMCDigitList and AlgMCDigit for?
They produce a MCTruth CandDigitList called "candmcdigitlist" with the true demuxing choice set in each CandDigit's PlexSEIDAltL.
What are the AlgConfig parameters for AlgMCDigitList and AlgMCDigit?
// AlgMCDigitList AlgConfig parameters (with default values) are: // // "MCDigitAlgorithm" - "AlgMCDigit" // "MCDigitAlgConfig" - "default" // // AlgMCDigit AlgConfig parameters (with default values) are: // // "CalPEMode" - 1 // "CalSigLinMode" - 1 // "CalSigCorrMode" - 1 // "CalTimeMode" - 1
How are AlgMCDigitList and AlgMCDigit turned on/off?
The default is "on" for Monte Carlo REROOT'ed input files.
They are turned off automatically unless the input data comes from
a REROOT'ed file.
You can turn them off manually for REROOT'ed files by putting the
following line in your job macro, assuming JobPath name "Reco":
jc.Path("Reco").Mod("DigitListModule").Set("ListsToMake=1");
How do I set the AlgConfig parameters for AlgMCDigitList and AlgMCDIgit?
See files: $SRT_PUBLIC_CONTEXT/CandDigit/DBtxt_Alg(MC)DigitList_default.C You can transfer contents to your job macro and edit it, or you can clone it into your ROOT macro path and edit the cloned file. Using the cloned file, you can also change the string "default" to your own name, say, "myown" to define your own AlgConfig set.
What are the AlgConfig parameters for AlgDeMuxDigitList?
// "DeMuxAlgorithm" - "AlgDeMuxCosmics" // "DeMuxAlgConfig" - "default" // "NormalizeWeights" - 0 // Normalize weights to 1 if non-zero // "TrimHyps" - 0; // Drop "0" weights if neg., or keep top N
How do I set the AlgConfig parameters for AlgDeMuxDigitList?
See file: $SRT_PUBLIC_CONTEXT/CandDigit/DBtxt_AlgDeMuxDigitList_default.C You can transfer contents to your job macro and edit it, or you can clone it into your ROOT macro path and edit the cloned file. Using the cloned file, you can also change the string "default" to your own name, say, "myown" to define your own AlgConfig set.
What are the AlgConfig parameters for AlgDeMuxDigit?
These depend on the particular demuxing algorithm, such as AlgDeMuxCosmics, AlgDeMuxGolden or AlgDeMuxBeam.
How do I set the AlgConfig parameters for AlgDeMuxDigit?
See, e.g.: $SRT_PUBLIC_CONTEXT/DeMux/DBtxt_AlgDEMuxCosmics_default.C You can transfer contents to your job macro and edit it, or you can clone it into your ROOT macro path and edit the cloned file. Using the cloned file, you can also change the string "default" to your own name, say, "myown" to define your own AlgConfig set.