CbmRoot
Loading...
Searching...
No Matches
CbmTrdOccupancyQa.h
Go to the documentation of this file.
1/* Copyright (C) 2012-2018 Institut fuer Kernphysik, Westfaelische Wilhelms-Universitaet Muenster, Muenster
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Cyrano Bergmann [committer] */
4
5#ifndef CBMTRDOCCUPANCYQA_H_
6#define CBMTRDOCCUPANCYQA_H_
7
8#include "FairTask.h"
9
10#include <list>
11#include <map>
12//#include <vector>
13#include "CbmTrdDigi.h"
14#include "TH1.h"
15#include "TH2.h"
16
18class CbmTrdParSetGeo;
20
21class TClonesArray;
22class TH1F;
23//class TH1I;
24//class TH2I;
25class TH2F;
26class TProfile;
27class TProfile2D;
28class TCanvas;
29
30typedef struct Pad {
31 Double_t SizeX;
32 Double_t SizeY;
33 Bool_t Fired;
34 Pad() : SizeX(0), SizeY(0), Fired(false) {}
36
37typedef struct OccupancyModule {
38 Int_t Station;
39 Int_t Layer;
41 Int_t nPad;
42 Int_t nxPad;
43 Int_t nyPad;
44 /*
45 Int_t NoSectors;
46 std::vector<std::vector<Pad*> > PadPlane;
47
48 std::vector<Float_t> SectorSizeX;
49 std::vector<Float_t> SectorSizeY;
50 std::vector<Float_t> PadSizeX;
51 std::vector<Float_t> PadSizeY;
52 std::vector<Int_t> SecxPad;
53 std::vector<Int_t> SecyPad;
54 */
55 Float_t ModuleSizeX;
56 Float_t ModuleSizeY;
60
62 : Station(-1)
63 , Layer(-1)
64 , moduleAddress(-1)
65 , //PadPlane(),
66 nPad(0)
67 , nxPad(0)
68 , nyPad(0)
69 ,
70 /* NoSectors(0), SectorSizeX(), SectorSizeY(), PadSizeX(),
71 PadSizeY(), SecxPad(), SecyPad(), */
72 ModuleSizeX(0.)
73 , ModuleSizeY(0.)
74 , ModulePositionX(0.)
75 , ModulePositionY(0.)
77 {
78 }
80
81class CbmTrdOccupancyQa : public FairTask {
82
83 public:
85 //CbmTrdOccupancyQa(const char *name, const char *title="CBM Task", const char *geo="");
86 CbmTrdOccupancyQa(const char* name, const char* title = "CBM Task", const char* geo = "",
87 Double_t triggerThreshold = 1.0e-6, Bool_t plotMergedResults = false);
88 virtual ~CbmTrdOccupancyQa();
89 virtual InitStatus ReInit();
90 virtual InitStatus Init();
91 virtual void SetParContainers();
92 virtual void Exec(Option_t* option);
93 virtual void FinishEvent();
94 virtual void FinishTask();
95 void Register();
96 void SaveHistos2File();
97 void CreateLayerView();
98 void SwitchToMergedFile();
100 void SetNeighbourReadout(Bool_t neighbourReadout);
101 void SetTriggerThreshold(Double_t triggerthreshold);
102 void SetNeighbourTrigger(Bool_t trigger);
103
104 private:
107 TClonesArray* fClusters;
113 Double_t fmin;
114 Double_t fmax;
115 std::map<Int_t, OccupancyModule*> fModuleMap;
116 std::map<Int_t, OccupancyModule*>::iterator fModuleMapIt;
117 std::map<Int_t, TH2I*> fModuleOccupancyMap;
118 std::map<Int_t, TH2I*>::iterator fModuleOccupancyMapIt;
119 std::map<Int_t, TH1F*> fModuleOccupancyMemoryMap;
120 std::map<Int_t, TH1F*>::iterator fModuleOccupancyMemoryMapIt;
121 std::map<Int_t, TCanvas*> fLayerOccupancyMap;
122 std::map<Int_t, TCanvas*>::iterator fLayerOccupancyMapIt;
123 std::map<Int_t, TProfile*> fLayerAverageOccupancyMap;
124 std::map<Int_t, TProfile*>::iterator fLayerAverageOccupancyMapIt;
128 TString fGeo;
129
130 ClassDef(CbmTrdOccupancyQa, 4)
131};
132#endif //
struct OccupancyModule OccupancyModule
struct Pad Pad
std::map< Int_t, TCanvas * >::iterator fLayerOccupancyMapIt
std::map< Int_t, OccupancyModule * >::iterator fModuleMapIt
void SetNeighbourReadout(Bool_t neighbourReadout)
CbmTrdParSetGeo * fGeoPar
CbmTrdOccupancyQa(const CbmTrdOccupancyQa &)
virtual void FinishEvent()
virtual void FinishTask()
std::map< Int_t, TH2I * > fModuleOccupancyMap
virtual InitStatus ReInit()
std::map< Int_t, TProfile * >::iterator fLayerAverageOccupancyMapIt
void SetTriggerThreshold(Double_t triggerthreshold)
CbmTrdParSetDigi * fDigiPar
virtual void SetParContainers()
std::map< Int_t, TH1F * > fModuleOccupancyMemoryMap
std::map< Int_t, TH1F * >::iterator fModuleOccupancyMemoryMapIt
std::map< Int_t, TH2I * >::iterator fModuleOccupancyMapIt
std::map< Int_t, OccupancyModule * > fModuleMap
virtual InitStatus Init()
CbmTrdOccupancyQa & operator=(const CbmTrdOccupancyQa &)
CbmTrdGeoHandler * fGeoHandler
void SetNeighbourTrigger(Bool_t trigger)
std::map< Int_t, TProfile * > fLayerAverageOccupancyMap
virtual void Exec(Option_t *option)
std::map< Int_t, TCanvas * > fLayerOccupancyMap
TClonesArray * fClusters
Double_t SizeY
Bool_t Fired
Double_t SizeX