CbmRoot
CbmCheckEvents.h
Go to the documentation of this file.
1 /********************************************************************************
2  * Copyright (C) 2014 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH *
3  * *
4  * This software is distributed under the terms of the *
5  * GNU Lesser General Public Licence (LGPL) version 3, *
6  * copied verbatim in the file "LICENSE" *
7  ********************************************************************************/
8 #ifndef CBMCHECKEVENTS_H
9 #define CBMCHECKEVENTS_H
10 
11 #include "FairTask.h"
12 
13 #include "CbmDefs.h"
14 
15 #include "CbmTofDigi.h"
16 #include "TString.h"
17 #include <vector>
18 
19 class CbmEvent;
20 
21 class TClonesArray;
22 class TH1;
23 class TH2;
24 class TProfile;
25 class CbmDigiManager;
26 
27 class CbmCheckEvents : public FairTask {
28 public:
31 
32  CbmCheckEvents(const CbmCheckEvents&) = delete;
34 
36  // CbmCheckEvents(Int_t verbose);
37 
38 
41 
42 
44  virtual InitStatus Init();
45 
47  virtual InitStatus ReInit();
48 
49 
51  virtual void Exec(Option_t*);
52 
54  virtual void SetParContainers();
55 
57  virtual void Finish();
58 
59 private:
60  void CreateHistos();
61  void AnalyseEvent(CbmEvent* event);
62 
63  void GetTimeDiffT0(CbmEvent*, TH1*, TH1*);
64 
65  template<class Digi>
66  void GetTimeDiff(CbmEvent* event, TH1*, TH1*, ECbmDataType type);
67 
68  CbmDigiManager* fDigiMan = nullptr;
69 
70  const std::vector<CbmTofDigi>* fT0DigiVec = nullptr;
71  TClonesArray* fT0DigiArr {nullptr};
72  TClonesArray* fEvents {nullptr};
73 
74  // Variables to store the previous digi time
75  Double_t fPrevEventTime {0.};
76 
77  //
78  Int_t fNrTs {0};
79 
80  // Histograms
81  TH1* fEventSize = nullptr;
82  TH1* fEventLength = nullptr;
83  TH1* fEventsPerTS = nullptr;
84  TH1* fT0InEvent = nullptr;
85  TH1* fStsInEvent = nullptr;
86  TH1* fMuchInEvent = nullptr;
87  TH1* fTofInEvent = nullptr;
88 
89  TH1* fT0DeltaT = nullptr;
90  TH1* fStsDeltaT = nullptr;
91  TH1* fMuchDeltaT = nullptr;
92  TH1* fTofDeltaT = nullptr;
93 
94  TH2* fEventsvsTS = nullptr;
95  TProfile* fLengthvsTS = nullptr;
96 
98 };
99 
100 #endif
CbmCheckEvents::fTofInEvent
TH1 * fTofInEvent
Definition: CbmCheckEvents.h:87
CbmCheckEvents::fMuchDeltaT
TH1 * fMuchDeltaT
Definition: CbmCheckEvents.h:91
CbmCheckEvents::CbmCheckEvents
CbmCheckEvents()
Definition: CbmCheckEvents.cxx:34
CbmCheckEvents::GetTimeDiffT0
void GetTimeDiffT0(CbmEvent *, TH1 *, TH1 *)
Definition: CbmCheckEvents.cxx:233
CbmCheckEvents::fEventsvsTS
TH2 * fEventsvsTS
Definition: CbmCheckEvents.h:94
CbmCheckEvents::ReInit
virtual InitStatus ReInit()
Definition: CbmCheckEvents.cxx:91
CbmCheckEvents::Exec
virtual void Exec(Option_t *)
Definition: CbmCheckEvents.cxx:165
CbmTofDigi.h
CbmCheckEvents::fEventLength
TH1 * fEventLength
Definition: CbmCheckEvents.h:82
CbmCheckEvents::fDigiMan
CbmDigiManager * fDigiMan
Definition: CbmCheckEvents.h:68
CbmCheckEvents::GetTimeDiff
void GetTimeDiff(CbmEvent *event, TH1 *, TH1 *, ECbmDataType type)
Definition: CbmCheckEvents.cxx:214
CbmCheckEvents::fMuchInEvent
TH1 * fMuchInEvent
Definition: CbmCheckEvents.h:86
CbmCheckEvents::fStsInEvent
TH1 * fStsInEvent
Definition: CbmCheckEvents.h:85
CbmCheckEvents::fT0DigiArr
TClonesArray * fT0DigiArr
Definition: CbmCheckEvents.h:71
CbmCheckEvents::fLengthvsTS
TProfile * fLengthvsTS
Definition: CbmCheckEvents.h:95
ECbmDataType
ECbmDataType
Definition: CbmDefs.h:76
CbmCheckEvents::SetParContainers
virtual void SetParContainers()
Definition: CbmCheckEvents.cxx:40
CbmCheckEvents::ClassDef
ClassDef(CbmCheckEvents, 1)
CbmCheckEvents::fTofDeltaT
TH1 * fTofDeltaT
Definition: CbmCheckEvents.h:92
CbmCheckEvents::fT0DigiVec
const std::vector< CbmTofDigi > * fT0DigiVec
Interface to digi data.
Definition: CbmCheckEvents.h:70
CbmCheckEvents::fEventsPerTS
TH1 * fEventsPerTS
Definition: CbmCheckEvents.h:83
CbmCheckEvents::fStsDeltaT
TH1 * fStsDeltaT
Definition: CbmCheckEvents.h:90
CbmDigiManager
CbmDigiManager.
Definition: CbmDigiManager.h:37
CbmCheckEvents::AnalyseEvent
void AnalyseEvent(CbmEvent *event)
Definition: CbmCheckEvents.cxx:201
CbmCheckEvents::operator=
CbmCheckEvents operator=(const CbmCheckEvents &)=delete
CbmCheckEvents
Definition: CbmCheckEvents.h:27
CbmCheckEvents::fNrTs
Int_t fNrTs
Definition: CbmCheckEvents.h:78
CbmCheckEvents::CreateHistos
void CreateHistos()
Definition: CbmCheckEvents.cxx:93
CbmEvent
Class characterising one event by a collection of links (indices) to data objects,...
Definition: CbmEvent.h:30
CbmCheckEvents::Finish
virtual void Finish()
Definition: CbmCheckEvents.cxx:254
CbmCheckEvents::fEventSize
TH1 * fEventSize
Definition: CbmCheckEvents.h:81
CbmCheckEvents::fT0InEvent
TH1 * fT0InEvent
Definition: CbmCheckEvents.h:84
CbmCheckEvents::CbmCheckEvents
CbmCheckEvents(const CbmCheckEvents &)=delete
CbmCheckEvents::~CbmCheckEvents
~CbmCheckEvents()
Definition: CbmCheckEvents.cxx:37
CbmCheckEvents::Init
virtual InitStatus Init()
Definition: CbmCheckEvents.cxx:52
CbmCheckEvents::fEvents
TClonesArray * fEvents
Definition: CbmCheckEvents.h:72
CbmCheckEvents::fPrevEventTime
Double_t fPrevEventTime
Definition: CbmCheckEvents.h:75
CbmCheckEvents::fT0DeltaT
TH1 * fT0DeltaT
Definition: CbmCheckEvents.h:89
CbmDefs.h