CbmMvdDetector.h 4.13 KB
Newer Older
1
/* Copyright (C) 2014-2020 Institut fuer Kernphysik, Goethe-Universitaet Frankfurt, Frankfurt
2
   SPDX-License-Identifier: GPL-3.0-only
Administrator's avatar
Administrator committed
3
   Authors: Michael Deveaux, Philipp Sitzmann [committer] */
4

5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
// -------------------------------------------------------------------------
// -----                      CbmMvdDetector header file              -----
// -----                  Created 02/12/08  by M. Deveaux             -----
// -------------------------------------------------------------------------


/** CbmMvdDetector.h
 *@author M.Deveaux <deveaux@physik.uni-frankfurt.de>
 **
 ** Singleton holding information on all sensors of the MVD.
 ** User interface to the MVD-Software
 **
 **/


#ifndef CBMMVDDETECTOR_H
#define CBMMVDDETECTOR_H 1


/// includes from c
//#include <vector>

/// includes from ROOT
#include "TClonesArray.h"
#include "TNamed.h"

/// includes from CbmRoot
#include "CbmMvdStationPar.h"
//#include "CbmMvdDigi.h"
#include "tools/CbmMvdHelper.h"

class CbmMvdPoint;
class CbmMvdSensorDataSheet;
class CbmMvdSensorPlugin;
class CbmMvdSensor;

class CbmDigiManager;

Administrator's avatar
Administrator committed
43
class CbmMvdDetector : public TNamed {
44

Administrator's avatar
Administrator committed
45
46
47
private:
  CbmMvdDetector();
  CbmMvdDetector(const char* name);
48
49

public:
Administrator's avatar
Administrator committed
50
  /**
51
52
   * static instance
   */
Administrator's avatar
Administrator committed
53
  static CbmMvdDetector* Instance();
54
55
56
57
58
59
60
61
62
63
64


  /** Destructor **/
  virtual ~CbmMvdDetector();

  /** Data interface */
  void SendInput(TClonesArray* input);
  void SendInputDigis(CbmDigiManager* digiMan);
  void SendInputDigis(TClonesArray* digis);
  void SendInputDigisToHits(TClonesArray* digis);
  void SendInputCluster(TClonesArray* cluster);
Administrator's avatar
Administrator committed
65
  // void SendClonesArray(TClonesArray* addedStructures, Int_t dataLevel=0){;}
66

Administrator's avatar
Administrator committed
67
  TClonesArray* GetOuput() { return 0; }
68
69
70
  TClonesArray* GetOutputHits();
  TClonesArray* GetOutputDigis();
  TClonesArray* GetOutputDigiMatchs();
Administrator's avatar
Administrator committed
71
  TClonesArray* GetOutputCluster();  //khun
72
  TClonesArray* GetOutputArray(Int_t nPlugin);
Administrator's avatar
Administrator committed
73
74
75
76
77
78
  // TClonesArray* GetClonesArray(Int_t dataLevel){ return 0;}
  Int_t GetSensorArraySize() { return (fSensorArray->GetEntriesFast()); }
  UInt_t GetPluginArraySize() { return fPluginCount - 1; }


  TClonesArray* GetCurrentEvent();
79
  /** Initialisation */
Administrator's avatar
Administrator committed
80

81
82
  void AddSensor(TString clearName, TString fullName, TString nodeName, CbmMvdSensorDataSheet* sensorData,
                 Int_t sensorNr, Int_t volumeId, Double_t sensorStartTime, Int_t stationNr);
83
  void AddPlugin(CbmMvdSensorPlugin* plugin);
Administrator's avatar
Administrator committed
84
  void BuildDebugHistograms() { ; };
85
  void Init();
86
87
  void SetMisalignment(Float_t misalignment[3])
  {
Administrator's avatar
Administrator committed
88
89
90
    for (Int_t i = 0; i < 3; i++)
      fepsilon[i] = misalignment[i];
  };
91
  void SetParameterFile(CbmMvdStationPar* parameter) { fParameter = parameter; };
92
93
94
  void ShowDebugHistos();
  /** Data Processing */

Administrator's avatar
Administrator committed
95
96
97
98

  void ExecChain();          //Processes the full execution chain
  void Exec(UInt_t nLevel);  //Processes Element nLevel of the chain
  // void ExecTo(UInt_t nLevel){;}; // Processes Elements to a given Level of Plugins
99
  void ExecFrom(UInt_t nLevel);  //Preocesses Elements from a given level till the end
Administrator's avatar
Administrator committed
100

101
  /** Finish */
Administrator's avatar
Administrator committed
102

103
  void Finish();
Administrator's avatar
Administrator committed
104
105
  // void StoreDebugHistograms(TString fileName){;}

106
  /** Accessors */
Administrator's avatar
Administrator committed
107
  CbmMvdStationPar* GetParameterFile() { return fParameter; };
108
  CbmMvdSensor* GetSensor(UInt_t nSensor) { return (CbmMvdSensor*) fSensorArray->At(nSensor); };
Administrator's avatar
Administrator committed
109
  void PrintParameter() { fParameter->Print(); };
110
111
112

  void SetProduceNoise();

Administrator's avatar
Administrator committed
113
  static void SetSensorTyp(CbmMvdSensorTyp typ) { fSensorTyp = typ; };
114
115
116
117
118

private:
  static CbmMvdSensorTyp fSensorTyp;

  TClonesArray* fSensorArray;
Administrator's avatar
Administrator committed
119
  TClonesArray* fSensorIDArray;  //Array of Sensor ID
120
121
122
123
  UInt_t fPluginCount;
  TClonesArray* foutput;
  TClonesArray* foutputHits;
  TClonesArray* foutputDigis;
Administrator's avatar
Administrator committed
124
  TClonesArray* foutputCluster;  //khun
125
126
127
128
  TClonesArray* foutputDigiMatchs;
  TClonesArray* foutputHitMatchs;
  TClonesArray* fcurrentEvent;
  Float_t fepsilon[3];
Administrator's avatar
Administrator committed
129
130
131
  /** Data members */

  Int_t fDigiPlugin;
132
133
  Int_t fHitPlugin;
  Int_t fClusterPlugin;
Administrator's avatar
Administrator committed
134
135


136
137
138
139
140
141
142
143
144
145
146
147
  static CbmMvdDetector* fInstance;
  Bool_t fSensorArrayFilled;
  Bool_t initialized;
  Bool_t fFinished;

  TString fName;

  CbmMvdStationPar* fParameter;


  CbmMvdDetector(const CbmMvdDetector&);
  CbmMvdDetector operator=(const CbmMvdDetector&);
Administrator's avatar
Administrator committed
148
149

  ClassDef(CbmMvdDetector, 1);
150
151
152
};

#endif