CbmRoot
CbmTrdOccupancyQa.h
Go to the documentation of this file.
1 #ifndef CBMTRDOCCUPANCYQA_H_
2 #define CBMTRDOCCUPANCYQA_H_
3 
4 #include "FairTask.h"
5 
6 #include <list>
7 #include <map>
8 //#include <vector>
9 #include "CbmTrdDigi.h"
10 
11 #include "TH1.h"
12 #include "TH2.h"
13 
14 class CbmTrdParSetDigi;
15 class CbmTrdParSetGeo;
16 class CbmTrdGeoHandler;
17 
18 class TClonesArray;
19 class TH1F;
20 //class TH1I;
21 //class TH2I;
22 class TH2F;
23 class TProfile;
24 class TProfile2D;
25 class TCanvas;
26 
27 typedef struct Pad {
28  Double_t SizeX;
29  Double_t SizeY;
30  Bool_t Fired;
31  Pad() : SizeX(0), SizeY(0), Fired(false) {}
32 } Pad;
33 
34 typedef struct OccupancyModule {
35  Int_t Station;
36  Int_t Layer;
38  Int_t nPad;
39  Int_t nxPad;
40  Int_t nyPad;
41  /*
42  Int_t NoSectors;
43  std::vector<std::vector<Pad*> > PadPlane;
44 
45  std::vector<Float_t> SectorSizeX;
46  std::vector<Float_t> SectorSizeY;
47  std::vector<Float_t> PadSizeX;
48  std::vector<Float_t> PadSizeY;
49  std::vector<Int_t> SecxPad;
50  std::vector<Int_t> SecyPad;
51  */
52  Float_t ModuleSizeX;
53  Float_t ModuleSizeY;
54  Float_t ModulePositionX;
55  Float_t ModulePositionY;
56  Float_t ModulePositionZ;
57 
59  : Station(-1)
60  , Layer(-1)
61  , moduleAddress(-1)
62  , //PadPlane(),
63  nPad(0)
64  , nxPad(0)
65  , nyPad(0)
66  ,
67  /* NoSectors(0), SectorSizeX(), SectorSizeY(), PadSizeX(),
68  PadSizeY(), SecxPad(), SecyPad(), */
69  ModuleSizeX(0.)
70  , ModuleSizeY(0.)
71  , ModulePositionX(0.)
72  , ModulePositionY(0.)
73  , ModulePositionZ() {}
75 
76 class CbmTrdOccupancyQa : public FairTask {
77 
78 public:
80  //CbmTrdOccupancyQa(const char *name, const char *title="CBM Task", const char *geo="");
81  CbmTrdOccupancyQa(const char* name,
82  const char* title = "CBM Task",
83  const char* geo = "",
84  Double_t triggerThreshold = 1.0e-6,
85  Bool_t plotMergedResults = false);
86  virtual ~CbmTrdOccupancyQa();
87  virtual InitStatus ReInit();
88  virtual InitStatus Init();
89  virtual void SetParContainers();
90  virtual void Exec(Option_t* option);
91  virtual void FinishEvent();
92  virtual void FinishTask();
93  void Register();
94  void SaveHistos2File();
95  void CreateLayerView();
96  void SwitchToMergedFile();
97  void CopyEvent2MemoryMap();
98  void SetNeighbourReadout(Bool_t neighbourReadout);
99  void SetTriggerThreshold(Double_t triggerthreshold);
100  void SetNeighbourTrigger(Bool_t trigger);
101 
102 private:
105  TClonesArray* fClusters;
110  TH2I* fLayerDummy;
111  Double_t fmin;
112  Double_t fmax;
113  std::map<Int_t, OccupancyModule*> fModuleMap;
114  std::map<Int_t, OccupancyModule*>::iterator fModuleMapIt;
115  std::map<Int_t, TH2I*> fModuleOccupancyMap;
116  std::map<Int_t, TH2I*>::iterator fModuleOccupancyMapIt;
117  std::map<Int_t, TH1F*> fModuleOccupancyMemoryMap;
118  std::map<Int_t, TH1F*>::iterator fModuleOccupancyMemoryMapIt;
119  std::map<Int_t, TCanvas*> fLayerOccupancyMap;
120  std::map<Int_t, TCanvas*>::iterator fLayerOccupancyMapIt;
121  std::map<Int_t, TProfile*> fLayerAverageOccupancyMap;
122  std::map<Int_t, TProfile*>::iterator fLayerAverageOccupancyMapIt;
126  TString fGeo;
127 
128  ClassDef(CbmTrdOccupancyQa, 4)
129 };
130 #endif //
OccupancyModule::ModulePositionX
Float_t ModulePositionX
Definition: CbmTrdOccupancyQa.h:54
Pad::SizeX
Double_t SizeX
Definition: CbmTrdOccupancyQa.h:28
Pad::SizeY
Double_t SizeY
Definition: CbmTrdOccupancyQa.h:29
CbmTrdOccupancyQa
Definition: CbmTrdOccupancyQa.h:76
CbmTrdOccupancyQa::CbmTrdOccupancyQa
CbmTrdOccupancyQa(const CbmTrdOccupancyQa &)
CbmTrdOccupancyQa::FinishTask
virtual void FinishTask()
Definition: CbmTrdOccupancyQa.cxx:396
CbmTrdOccupancyQa::fGeoHandler
CbmTrdGeoHandler * fGeoHandler
Definition: CbmTrdOccupancyQa.h:108
CbmTrdOccupancyQa::fTriggerThreshold
Double_t fTriggerThreshold
Definition: CbmTrdOccupancyQa.h:123
CbmTrdOccupancyQa::fNeigbourReadout
Bool_t fNeigbourReadout
Definition: CbmTrdOccupancyQa.h:124
CbmTrdOccupancyQa::Register
void Register()
Definition: CbmTrdOccupancyQa.cxx:401
CbmTrdOccupancyQa::ReInit
virtual InitStatus ReInit()
Definition: CbmTrdOccupancyQa.cxx:141
CbmTrdOccupancyQa::FinishEvent
virtual void FinishEvent()
Definition: CbmTrdOccupancyQa.cxx:385
CbmTrdOccupancyQa::CreateLayerView
void CreateLayerView()
Definition: CbmTrdOccupancyQa.cxx:444
CbmTrdOccupancyQa::fModuleOccupancyMemoryMap
std::map< Int_t, TH1F * > fModuleOccupancyMemoryMap
Definition: CbmTrdOccupancyQa.h:117
CbmTrdOccupancyQa::fModuleMap
std::map< Int_t, OccupancyModule * > fModuleMap
Definition: CbmTrdOccupancyQa.h:113
OccupancyModule::Station
Int_t Station
Definition: CbmTrdOccupancyQa.h:35
CbmTrdOccupancyQa::fLayerOccupancyMap
std::map< Int_t, TCanvas * > fLayerOccupancyMap
Definition: CbmTrdOccupancyQa.h:119
CbmTrdOccupancyQa::SwitchToMergedFile
void SwitchToMergedFile()
Definition: CbmTrdOccupancyQa.cxx:425
OccupancyModule
struct OccupancyModule OccupancyModule
CbmTrdOccupancyQa::SetNeighbourReadout
void SetNeighbourReadout(Bool_t neighbourReadout)
Definition: CbmTrdOccupancyQa.cxx:650
CbmTrdGeoHandler
Definition: CbmTrdGeoHandler.h:29
OccupancyModule
Definition: CbmTrdOccupancyQa.h:34
CbmTrdDigi.h
OccupancyModule::ModuleSizeX
Float_t ModuleSizeX
Definition: CbmTrdOccupancyQa.h:52
CbmTrdOccupancyQa::fDigiPar
CbmTrdParSetDigi * fDigiPar
Definition: CbmTrdOccupancyQa.h:106
CbmTrdOccupancyQa::fDigiChargeSpectrum
TH1I * fDigiChargeSpectrum
Definition: CbmTrdOccupancyQa.h:109
CbmTrdOccupancyQa::fmax
Double_t fmax
Definition: CbmTrdOccupancyQa.h:112
CbmTrdOccupancyQa::SaveHistos2File
void SaveHistos2File()
Definition: CbmTrdOccupancyQa.cxx:656
CbmTrdOccupancyQa::fModuleMapIt
std::map< Int_t, OccupancyModule * >::iterator fModuleMapIt
Definition: CbmTrdOccupancyQa.h:114
CbmTrdOccupancyQa::fLayerDummy
TH2I * fLayerDummy
Definition: CbmTrdOccupancyQa.h:110
CbmTrdOccupancyQa::CbmTrdOccupancyQa
CbmTrdOccupancyQa()
Definition: CbmTrdOccupancyQa.cxx:42
CbmTrdOccupancyQa::fLayerAverageOccupancyMap
std::map< Int_t, TProfile * > fLayerAverageOccupancyMap
Definition: CbmTrdOccupancyQa.h:121
OccupancyModule::Layer
Int_t Layer
Definition: CbmTrdOccupancyQa.h:36
CbmTrdOccupancyQa::fGeo
TString fGeo
Definition: CbmTrdOccupancyQa.h:126
Pad::Fired
Bool_t Fired
Definition: CbmTrdOccupancyQa.h:30
OccupancyModule::nyPad
Int_t nyPad
Definition: CbmTrdOccupancyQa.h:40
Pad
Definition: CbmTrdOccupancyQa.h:27
CbmTrdParSetGeo
Definition: CbmTrdParSetGeo.h:9
CbmTrdOccupancyQa::fClusters
TClonesArray * fClusters
Definition: CbmTrdOccupancyQa.h:105
CbmTrdOccupancyQa::fModuleOccupancyMemoryMapIt
std::map< Int_t, TH1F * >::iterator fModuleOccupancyMemoryMapIt
Definition: CbmTrdOccupancyQa.h:118
CbmTrdOccupancyQa::SetTriggerThreshold
void SetTriggerThreshold(Double_t triggerthreshold)
Definition: CbmTrdOccupancyQa.cxx:653
CbmTrdOccupancyQa::fPlotMergedResults
Bool_t fPlotMergedResults
Definition: CbmTrdOccupancyQa.h:125
CbmTrdOccupancyQa::fModuleOccupancyMapIt
std::map< Int_t, TH2I * >::iterator fModuleOccupancyMapIt
Definition: CbmTrdOccupancyQa.h:116
CbmTrdOccupancyQa::fmin
Double_t fmin
Definition: CbmTrdOccupancyQa.h:111
OccupancyModule::moduleAddress
Int_t moduleAddress
Definition: CbmTrdOccupancyQa.h:37
CbmTrdParSetDigi
Definition: CbmTrdParSetDigi.h:15
OccupancyModule::ModulePositionZ
Float_t ModulePositionZ
Definition: CbmTrdOccupancyQa.h:56
CbmTrdOccupancyQa::SetParContainers
virtual void SetParContainers()
Definition: CbmTrdOccupancyQa.cxx:132
CbmTrdOccupancyQa::Init
virtual InitStatus Init()
Definition: CbmTrdOccupancyQa.cxx:152
CbmTrdOccupancyQa::operator=
CbmTrdOccupancyQa & operator=(const CbmTrdOccupancyQa &)
Pad::Pad
Pad()
Definition: CbmTrdOccupancyQa.h:31
OccupancyModule::OccupancyModule
OccupancyModule()
Definition: CbmTrdOccupancyQa.h:58
Pad
struct Pad Pad
OccupancyModule::nxPad
Int_t nxPad
Definition: CbmTrdOccupancyQa.h:39
CbmTrdOccupancyQa::CopyEvent2MemoryMap
void CopyEvent2MemoryMap()
Definition: CbmTrdOccupancyQa.cxx:406
CbmTrdOccupancyQa::fLayerAverageOccupancyMapIt
std::map< Int_t, TProfile * >::iterator fLayerAverageOccupancyMapIt
Definition: CbmTrdOccupancyQa.h:122
CbmTrdOccupancyQa::SetNeighbourTrigger
void SetNeighbourTrigger(Bool_t trigger)
Definition: CbmTrdOccupancyQa.cxx:170
CbmTrdOccupancyQa::Exec
virtual void Exec(Option_t *option)
Definition: CbmTrdOccupancyQa.cxx:175
OccupancyModule::ModulePositionY
Float_t ModulePositionY
Definition: CbmTrdOccupancyQa.h:55
CbmTrdOccupancyQa::fGeoPar
CbmTrdParSetGeo * fGeoPar
Definition: CbmTrdOccupancyQa.h:107
OccupancyModule::ModuleSizeY
Float_t ModuleSizeY
Definition: CbmTrdOccupancyQa.h:53
CbmTrdOccupancyQa::fLayerOccupancyMapIt
std::map< Int_t, TCanvas * >::iterator fLayerOccupancyMapIt
Definition: CbmTrdOccupancyQa.h:120
CbmTrdOccupancyQa::~CbmTrdOccupancyQa
virtual ~CbmTrdOccupancyQa()
Definition: CbmTrdOccupancyQa.cxx:94
OccupancyModule::nPad
Int_t nPad
Definition: CbmTrdOccupancyQa.h:38
CbmTrdOccupancyQa::fModuleOccupancyMap
std::map< Int_t, TH2I * > fModuleOccupancyMap
Definition: CbmTrdOccupancyQa.h:115