1 | #configuration of the ControlPlot machinery
|
---|
2 |
|
---|
3 | from collections import namedtuple
|
---|
4 | controlPlot = namedtuple("controlPlot", ["label","module","classname","kwargs"])
|
---|
5 | eventCollection = namedtuple("eventCollection",["label","collection"])
|
---|
6 | eventProducer = namedtuple("eventProducer", ["label","module","function","kwargs"])
|
---|
7 | eventWeight = namedtuple("eventWeight", ["label","module","classname","kwargs"])
|
---|
8 |
|
---|
9 | class configuration:
|
---|
10 | # default I/O
|
---|
11 | defaultFilename = "controlPlots"
|
---|
12 | RDSname = "rds_delphes"
|
---|
13 | WSname = "workspace_ras"
|
---|
14 |
|
---|
15 | # mode: plots or dataset
|
---|
16 | runningMode = "plots"
|
---|
17 |
|
---|
18 | # event selection class
|
---|
19 | eventSelection = ""
|
---|
20 |
|
---|
21 | # control plot classes
|
---|
22 | controlPlots = [ ]
|
---|
23 |
|
---|
24 | # event content: lists of eventCollection, eventProducer, and eventWeight objects respectively.
|
---|
25 | eventCollections = [ ]
|
---|
26 | eventProducers = [ ]
|
---|
27 | eventWeights = [ ]
|
---|
28 |
|
---|
29 | class eventDumpConfig:
|
---|
30 | # fine-tuning of the event content for display
|
---|
31 | productsToPrint = [ ] # list of product to display (use the producer label)
|
---|
32 | collectionsToHide = [ ] # collections used in the analysis but not printed (use the collection label)
|
---|
33 |
|
---|
34 | # import the actual implementation of the configuration
|
---|
35 | import os
|
---|
36 | theConfig = os.getenv("DelphesAnalysisCfg")
|
---|
37 | if theConfig is not None:
|
---|
38 | configImplementation = __import__(os.path.splitext(theConfig)[0])
|
---|
39 | configuration = configImplementation.configuration
|
---|
40 | eventDumpConfig = configImplementation.eventDumpConfig
|
---|
41 |
|
---|