forked from ltikvica/WZanalysis
-
Notifications
You must be signed in to change notification settings - Fork 0
/
howto_classes
61 lines (47 loc) · 2.05 KB
/
howto_classes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
A few words on how to use Vuko's analysis classes
to run on the latino tree:
Basic goals:
- Be as much as possible independent of the latino
tree flat structure and variable names, especially
for things which are subject to frequent changes,
like leptons, jets, ...
- Declare vector of more intelligent objects to
use in the analysis, e.g. LorentzVectors, that
are easy to work with and to loop over
- Corrolary of the two first goals: "intelligent" objects
are created from the flat latino tree variables in JUST ONE
place: if the tree variable change, there's just one
place that needs to be modified.
- Writing a new analysis should require as little
new code as possible and be able to built on basic
stuff: event accepted? List of used leptons, ...
Basic design features:
- Defined new class "WZEvent" which inherits from the
tree class created with MakeClass() in ROOT. That
class among others contain:
> vectors of reco and gen leptons, jets
> has method telling you whether the event
is passing selection and in which channel
- Defined simple reco and gen lepton classes,
inherit from TLorentzVector and contain the
basic info you want to know about a vector.
The WZEvent has vectors of these objects.
TODO:
> the reco lepton class should implement scale factors per
lepton, as these depend only on the lepton id and kinematics
> WZEvent should tell you which of these leptons were used
for the WZ final state
- To do an analysis on selected (or all events)
and build on all of the above, I am defining
a WZAnalysis class, look at the example which
currently does the a gen analysis to check
that BRs are correctly implemented in the WZ MC.
A similar class is used for the Unfolding analysis.
Random instructions
- If you change the base tree class because
more variables are added, names are changed, etc.
You need to change:
> Define the new class name at the top of WZEvent.h
> If needed modify the implementation of the ReadEvent()
method in WZEvent.C
> Define the new class name in wzToolsNew.C