Skip to content

Commit 70ea5dc

Browse files
author
Markus
committed
more text
1 parent 0cd8b64 commit 70ea5dc

File tree

1 file changed

+21
-8
lines changed

1 file changed

+21
-8
lines changed

readme.txt

Lines changed: 21 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,28 +11,30 @@ When running the code make sure your root version understand eos and or you use
1111

1212

1313
_______________________________________________________________________________________________________
14-
changes to makeClass code:
14+
changes to makeClass code, e.g. XYZ.C
1515

1616

17-
// default from makeClass():
17+
// defaults from makeClass() that need to be changed
1818

19-
class markusTreeProducer {
19+
class XYZ {
20+
21+
public:
2022
...
2123
void Loop(); // return nothing
2224
...
2325

2426
}
2527

26-
markusTreeProducer::markusTreeProducer(TTree *tree) : fChain(0) // need to give it a tree
28+
XYZ::XYZ(TTree *tree) : fChain(0) // need to give it a tree
2729
{
2830
// if parameter tree is not specified (or zero), connect the file
2931
// used to generate this class and read the Tree.
3032
if (tree == 0) {
31-
TFile *f = (TFile*)gROOT->GetListOfFiles()->FindObject("data.root");
33+
TFile *f = (TFile*)gROOT->GetListOfFiles()->FindObject("XYZ.root");
3234
if (!f || !f->IsOpen()) {
3335
f = new TFile("data.root");
3436
}
35-
f->GetObject("markusTreeProducer",tree);
37+
f->GetObject("XYZ",tree);
3638

3739
}
3840
Init(tree);
@@ -42,10 +44,21 @@ markusTreeProducer::markusTreeProducer(TTree *tree) : fChain(0) // need to give
4244
Here the changes for SUSYLooperHists!!
4345

4446
//*** return a TFile pointer for the loop, allows to handle the TFile withplots afterwards easily***
47+
// add this +++++ to header
48+
#include "SampleInfo.h"
49+
#include <TString.h>
4550

4651
class SUSYLooperHists {
52+
53+
// add this +++++ (members)
54+
private:
55+
TString outputFileName;
56+
float weight;
57+
// ++++++++
58+
4759
...
48-
TFile* Loop();// returns Tfile with plots
60+
TFile* Loop();// returns Tfile with plots: replace void Loop();
61+
susySoftLepton(SampleInfo mySample);// constructor that takes sample info as input: replace default contructor susySoftLepton(TTree *tree=0);
4962
...
5063

5164
}
@@ -55,7 +68,7 @@ SUSYLooperHists::SUSYLooperHists(SampleInfo mySample)// need to give it a Sample
5568
{
5669

5770
TFile *f = TFile::Open(mySample.FilePath);
58-
TTree* tree = (TTree*) f->Get("markusTreeProducer");
71+
TTree* tree = (TTree*) f->Get(YOURTREENAME);
5972
outputFileName = mySample.OutputFileNameTag+".root";
6073
weight = mySample.weight();
6174
Init(tree);

0 commit comments

Comments
 (0)