Pluto
v6.3.0
Loading...
Searching...
No Matches
analyze_eta_dalitz.C
Go to the documentation of this file.
1
//TITLE Analyze the eta Dalitz output file
2
3
{
4
// This macro uses the output of
5
// * complete_eta.C
6
// * parse_eta.C
7
// * hello_world.C (can have an filter)
8
9
TFile *
f
=
new
TFile(
"eta_dalitz.root"
);
10
TTree *
Reaction
= (TTree*)gDirectory->Get(
"data"
);
11
TClonesArray *
evt
=
new
TClonesArray(
"PParticle"
, 100);
12
Reaction
->SetBranchAddress(
"Particles"
, &
evt
);
13
PParticle
*
ep
, *
em
;
14
15
TH1F *
hf1
=
new
TH1F(
"hf2"
,
"Di-Lepton mass"
, 100, 0., 0.6);
16
Int_t
nentries
=
Reaction
->GetEntries();
17
if
(
nentries
> 1000)
18
nentries
= 1000;
//limit number of events
19
20
for
(Int_t i=0; i<
nentries
; i++) {
21
ep
= NULL;
22
em
= NULL;
23
Reaction
->GetEntry(i);
24
25
for
(
int
j=0; j<
evt
->GetEntriesFast(); j++) {
26
PParticle
*current = (
PParticle
*)
evt
->At(j);
27
//current->Print();
28
if
(current->
Is
(
"e+"
))
ep
= current;
29
if
(current->
Is
(
"e-"
))
em
= current;
30
}
31
32
if
(
ep
&&
em
) {
33
//particles found
34
35
//It is very important to parse the PParticle
36
//to a TLorentzVector, because the "+" operator
37
//is reserved for a reaction (i.e. a compound
38
//particle is created
39
40
TLorentzVector
dilepton
=
41
(*(TLorentzVector *)
ep
) + (*(TLorentzVector *)
em
);
42
hf1
->Fill(
dilepton
.M());
43
}
44
}
45
46
hf1
->Draw();
47
}
hf1
TH1F * hf1
Definition
anaAngularDistribution.C:14
ep
PParticle * ep
Definition
analyze_eta_dalitz.C:13
em
PParticle * em
Definition
analyze_eta_dalitz.C:13
nentries
Int_t nentries
Definition
analyze_g12C.C:51
Reaction
TTree * Reaction
Definition
analyze_g12C.C:10
f
TFile * f
Definition
analyze_g12C.C:8
evt
TClonesArray * evt
Definition
analyze_g12C.C:12
PParticle
Definition
PParticle.h:25
PParticle::Is
Int_t Is(const char *id)
Definition
PParticle.h:61
dilepton
PParticle * dilepton
Definition
embeddedParticles.C:16
pluto6
macros
analyze_eta_dalitz.C
Generated by
1.14.0