CbmRoot
CbmAnaJpsiSuperEvent.h
Go to the documentation of this file.
1 /*
2  * CbmAnaJpsiSuperEvent.h
3  *
4  * Created on: Jun 25, 2015
5  * Author: slebedev
6  */
7 
8 #ifndef ANALYSIS_JPSIANA_CBMANAJPSISUPEREVENT_H_
9 #define ANALYSIS_JPSIANA_CBMANAJPSISUPEREVENT_H_
10 
11 #include "TObject.h"
12 
13 #include "CbmAnaJpsiCandidate.h"
14 #include "CbmAnaJpsiCuts.h"
15 #include "CbmAnaJpsiHist.h"
17 #include "CbmHistManager.h"
18 #include "CbmSimulationReport.h"
19 
20 #include "TH1D.h"
21 #include "TSystem.h"
22 
23 #include <string>
24 #include <vector>
25 
26 class CbmAnaJpsiSuperEvent : public TObject {
27 
28 public:
30 
31  virtual ~CbmAnaJpsiSuperEvent();
32 
33  /*
34  * \brief Add file for super event.
35  */
36  void AddFile(const std::string& fileName) { fFileNames.push_back(fileName); }
37 
38  /*
39  * \brief Set output file.
40  */
41  void SetOutputFile(const std::string& fileName) { fOutputFile = fileName; }
42 
43  /*
44  * \brief Set to true if you want to do super event after ptcut.
45  * This will speed up calculation time.
46  */
47  void SetRunAfterPtCut(Bool_t b) { fRunAfterPtCut = b; }
48 
49  void SetRunAfterIdCut(Bool_t b) { fRunAfterIdCut = b; }
50 
51  void Run();
52 
53 private:
54  std::vector<std::string> fFileNames;
55  std::vector<CbmAnaJpsiCandidate> fMinusCandidates;
56  std::vector<CbmAnaJpsiCandidate> fPlusCandidates;
57 
58  std::string fOutputFile;
59 
61 
63 
66 
67  void InitHist();
68 
69  void ReadCandidates();
70 
71  void DoSuperEvent();
72 
73  void Draw(Option_t* = "");
74 
77 
79 };
80 
81 #endif /* ANALYSIS_JPSIANA_CBMANAJPSISUPEREVENT_H_ */
CbmAnaJpsiSuperEvent::SetOutputFile
void SetOutputFile(const std::string &fileName)
Definition: CbmAnaJpsiSuperEvent.h:41
CbmAnaJpsiSuperEvent::AddFile
void AddFile(const std::string &fileName)
Definition: CbmAnaJpsiSuperEvent.h:36
CbmAnaJpsiSuperEvent::fOutputFile
std::string fOutputFile
Definition: CbmAnaJpsiSuperEvent.h:58
CbmAnaJpsiSuperEvent::fPlusCandidates
std::vector< CbmAnaJpsiCandidate > fPlusCandidates
Definition: CbmAnaJpsiSuperEvent.h:56
CbmAnaJpsiSuperEvent::fMinusCandidates
std::vector< CbmAnaJpsiCandidate > fMinusCandidates
Definition: CbmAnaJpsiSuperEvent.h:55
CbmAnaJpsiSuperEvent::SetRunAfterIdCut
void SetRunAfterIdCut(Bool_t b)
Definition: CbmAnaJpsiSuperEvent.h:49
CbmAnaJpsiSuperEvent
Definition: CbmAnaJpsiSuperEvent.h:26
CbmAnaJpsiSuperEvent::Draw
void Draw(Option_t *="")
Definition: CbmAnaJpsiSuperEvent.cxx:403
CbmAnaJpsiSuperEvent::~CbmAnaJpsiSuperEvent
virtual ~CbmAnaJpsiSuperEvent()
Definition: CbmAnaJpsiSuperEvent.cxx:48
CbmHistManager.h
Histogram manager.
CbmAnaJpsiSuperEvent::CbmAnaJpsiSuperEvent
CbmAnaJpsiSuperEvent()
Definition: CbmAnaJpsiSuperEvent.cxx:37
CbmAnaJpsiCuts.h
CbmAnaJpsiHist.h
CbmHistManager
Histogram manager.
Definition: CbmHistManager.h:41
CbmAnaJpsiSuperEvent::ClassDef
ClassDef(CbmAnaJpsiSuperEvent, 1)
CbmAnaJpsiSuperEvent::CbmAnaJpsiSuperEvent
CbmAnaJpsiSuperEvent(const CbmAnaJpsiSuperEvent &)
CbmAnaJpsiSuperEvent::fRunAfterIdCut
Bool_t fRunAfterIdCut
Definition: CbmAnaJpsiSuperEvent.h:65
CbmAnaJpsiSuperEvent::SetRunAfterPtCut
void SetRunAfterPtCut(Bool_t b)
Definition: CbmAnaJpsiSuperEvent.h:47
CbmAnaJpsiSuperEvent::fHM
CbmHistManager * fHM
Definition: CbmAnaJpsiSuperEvent.h:60
CbmAnaJpsiSuperEvent::InitHist
void InitHist()
Definition: CbmAnaJpsiSuperEvent.cxx:68
CbmAnaJpsiSuperEvent::ReadCandidates
void ReadCandidates()
Definition: CbmAnaJpsiSuperEvent.cxx:232
CbmAnaJpsiSuperEvent::fCuts
CbmAnaJpsiCuts fCuts
Definition: CbmAnaJpsiSuperEvent.h:62
CbmAnaJpsiKinematicParams.h
CbmAnaJpsiCandidate.h
CbmSimulationReport.h
Base class for simulation reports.
CbmAnaJpsiSuperEvent::fFileNames
std::vector< std::string > fFileNames
Definition: CbmAnaJpsiSuperEvent.h:54
CbmAnaJpsiSuperEvent::Run
void Run()
Definition: CbmAnaJpsiSuperEvent.cxx:50
CbmAnaJpsiSuperEvent::operator=
CbmAnaJpsiSuperEvent operator=(const CbmAnaJpsiSuperEvent &)
CbmAnaJpsiSuperEvent::fRunAfterPtCut
Bool_t fRunAfterPtCut
Definition: CbmAnaJpsiSuperEvent.h:64
CbmAnaJpsiSuperEvent::DoSuperEvent
void DoSuperEvent()
Definition: CbmAnaJpsiSuperEvent.cxx:287
CbmAnaJpsiCuts
Definition: CbmAnaJpsiCuts.h:10