HighLAND
highland2
baseP0DAnalysis
v2r6
src
p0dExampleSelection.hxx
1
#ifndef p0dExampleSelection_h
2
#define p0dExampleSelection_h
3
4
#include "SelectionBase.hxx"
5
#include "Parameters.hxx"
6
#include "P0DDataClasses.hxx"
7
#include "ToyBoxND280.hxx"
8
9
//---- Define an specific box for this selection -------
10
class
ToyBoxP0D
:
public
ToyBoxND280
{
11
12
public
:
13
ToyBoxP0D
(){
14
Reset
();
15
}
16
17
virtual
void
Reset
(){
18
19
if
(!_ResetCheckDone){
20
if
(
typeid
(*
this
) !=
typeid
(
ToyBoxP0D
)){
21
std::cerr <<
"ERROR in ToyBoxP0D::Reset(). Either this mandatory method is not implemented "
22
<<
"by the derived class '"
<<
typeid
(*this).name() <<
"' "
23
<<
"or ToyBoxP0D::Reset() is called from the Reset method of the derived class. "
24
<<
"Please correct any of these bugs. "
<< std::endl;
25
26
exit(1);
27
}
28
_ResetCheckDone=
true
;
29
}
30
}
31
32
/// Reset this base class
33
virtual
void
ResetBase
(){
34
nShowers = 0;
35
Shower1=Shower2=NULL;
36
nTracks = 0;
37
ToyBoxND280::ResetBase
();
38
}
39
40
41
42
virtual
~
ToyBoxP0D
(){}
43
44
Short_t nShowers;
45
AnaP0DParticle
* Shower1;
46
AnaP0DParticle
* Shower2;
47
48
Short_t nTracks;
49
};
50
51
52
53
54
55
class
p0dExampleSelection
:
public
SelectionBase
{
56
57
public
:
58
p0dExampleSelection
(
bool
forcebreak=
true
);
59
virtual
~
p0dExampleSelection
(){}
60
61
//************************Mandatory Functions ****************
62
63
void
DefineSteps();
64
void
DefineDetectorFV();
65
66
ToyBoxB
*
MakeToyBox
() {
return
new
ToyBoxP0D
();}
67
68
void
InitializeEvent(
AnaEventC
& event);
69
70
//************************************************************
71
72
};
73
74
class
CountTracksAndShowersAction
:
public
StepBase
{
75
public
:
76
using
StepBase::Apply
;
77
bool
Apply(
AnaEventC
& event,
ToyBoxB
& box)
const
;
78
StepBase
*
MakeClone
(){
return
new
CountTracksAndShowersAction
();}
79
};
80
81
82
class
TwoShowersCut
:
public
StepBase
{
83
public
:
84
using
StepBase::Apply
;
85
bool
Apply(
AnaEventC
& event,
ToyBoxB
& box)
const
;
86
StepBase
*
MakeClone
(){
return
new
TwoShowersCut
();}
87
};
88
89
class
NoTracksCut
:
public
StepBase
{
90
public
:
91
using
StepBase::Apply
;
92
bool
Apply(
AnaEventC
& event,
ToyBoxB
& box)
const
;
93
StepBase
*
MakeClone
(){
return
new
NoTracksCut
();}
94
};
95
96
class
NoMichelElectronsCut
:
public
StepBase
{
97
public
:
98
using
StepBase::Apply
;
99
bool
Apply(
AnaEventC
& event,
ToyBoxB
& box)
const
;
100
StepBase
*
MakeClone
(){
return
new
NoMichelElectronsCut
();}
101
};
102
103
104
class
FindTrueVertexAction
:
public
StepBase
{
105
public
:
106
using
StepBase::Apply
;
107
bool
Apply(
AnaEventC
& event,
ToyBoxB
& box)
const
;
108
StepBase
*
MakeClone
(){
return
new
FindTrueVertexAction
();}
109
};
110
111
112
#endif
p0dExampleSelection::MakeToyBox
ToyBoxB * MakeToyBox()
Create the appropriate type of box.
Definition:
p0dExampleSelection.hxx:66
NoMichelElectronsCut
Definition:
p0dExampleSelection.hxx:96
ToyBoxB
Definition:
ToyBoxB.hxx:13
CountTracksAndShowersAction::MakeClone
StepBase * MakeClone()
MANDATORY FUNCTIONS !!!
Definition:
p0dExampleSelection.hxx:78
NoTracksCut
Definition:
p0dExampleSelection.hxx:89
CountTracksAndShowersAction
Definition:
p0dExampleSelection.hxx:74
AnaEventC
Definition:
CoreDataClasses.hxx:226
NoMichelElectronsCut::MakeClone
StepBase * MakeClone()
MANDATORY FUNCTIONS !!!
Definition:
p0dExampleSelection.hxx:100
ToyBoxND280
Definition:
ToyBoxND280.hxx:7
p0dExampleSelection
Definition:
p0dExampleSelection.hxx:55
FindTrueVertexAction::MakeClone
StepBase * MakeClone()
MANDATORY FUNCTIONS !!!
Definition:
p0dExampleSelection.hxx:108
StepBase::Apply
virtual bool Apply(AnaEventC &event, ToyBoxB &box) const
Definition:
StepBase.hxx:46
ToyBoxND280::ResetBase
virtual void ResetBase()
Reset this base class.
Definition:
ToyBoxND280.cxx:30
ToyBoxP0D::Reset
virtual void Reset()
This method should be implemented by the derived class. If so it does nothing here.
Definition:
p0dExampleSelection.hxx:17
ToyBoxP0D
Definition:
p0dExampleSelection.hxx:10
ToyBoxP0D::ResetBase
virtual void ResetBase()
Reset this base class.
Definition:
p0dExampleSelection.hxx:33
TwoShowersCut::MakeClone
StepBase * MakeClone()
MANDATORY FUNCTIONS !!!
Definition:
p0dExampleSelection.hxx:86
TwoShowersCut
Definition:
p0dExampleSelection.hxx:82
StepBase
Definition:
StepBase.hxx:18
NoTracksCut::MakeClone
StepBase * MakeClone()
MANDATORY FUNCTIONS !!!
Definition:
p0dExampleSelection.hxx:93
AnaP0DParticle
Definition:
P0DDataClasses.hxx:78
SelectionBase
Definition:
SelectionBase.hxx:86
FindTrueVertexAction
Definition:
p0dExampleSelection.hxx:104
Generated by
1.8.13