-
Notifications
You must be signed in to change notification settings - Fork 3
/
SoLIDECal.h
84 lines (73 loc) · 2.9 KB
/
SoLIDECal.h
1
2
3
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
#ifndef ROOT_SoLID_ECAL
#define ROOT_SoLID_ECAL
//temperory class to emulate the trigger information
//should be replaced if more realistic simulation is ready
//c++
#include <map>
#include <vector>
//ROOT
#include "TRandom.h"
#include "TClonesArray.h"
//Hall A Analyzer
#include "THaDetMap.h"
#include "THaSubDetector.h"
//SoLIDTracking
#include "SoLIDUtility.h"
using namespace std;
enum ECalDataType{ kLAECPos = 0, kLAECEdp, kFAECPos, kFAECEdp};
enum ECalMapKey { kECalXPos = 0, kECalYPos, kECalEdp };
class SoLIDECal : public THaSubDetector
{
public:
SoLIDECal( const char* name, const char* description = "",
THaDetectorBase* parent = 0 );
SoLIDECal():fCaloHits(0) {}
virtual ~SoLIDECal();
virtual void Clear( Option_t* opt="" );
virtual Int_t Decode( const THaEvData& );
virtual EStatus Init( const TDatime& date );
virtual void Print( Option_t* opt="" ) const;
virtual void PrintDataBase() const;
virtual Int_t Begin( THaRunBase* r=0 );
virtual Int_t End( THaRunBase* r=0 );
Bool_t IsFAECTriggered() const { return fIsFAECTriggered; }
Bool_t IsLAECTriggered() const { return fIsLAECTriggered; }
UInt_t GetNLAECHits() const { return fNLAECHits; }
UInt_t GetNFAECHits() const { return fNFAECHits; }
TClonesArray * GetCaloHits() { return fCaloHits; }
const Double_t & GetECZ(ECType type) const { if (type == kFAEC) return fFAECZ;
else return fLAECZ; }
inline Double_t GetPosReso() const { return fPosReso; }
inline Double_t GetEReso() const { return fEReso; }
void SmearPosition(Float_t *x, Float_t *y, Int_t* id, Int_t mode = 0);
void SmearEnergy(Float_t *energy);
protected:
virtual Int_t ReadDatabase( const TDatime& date );
virtual Int_t DefineVariables( EMode mode = kDefine );
Bool_t fIsLAECTriggered;
Bool_t fIsFAECTriggered;
UInt_t fNLAECHits;
UInt_t fNFAECHits;
Double_t fLAECZ;
Double_t fFAECZ;
Double_t fLAECEdpCut;
Double_t fFAECEdpCut;
Double_t fPosReso;
Double_t fEReso;
#ifdef SIDIS
Int_t fUseMRPC;
Double_t fMRPCPitchWidth;
Int_t fMRPCNSectors;
Double_t fMRPCPhiCover;
Double_t fMRPCPhiReso;
Double_t fMRPCRmin;
Int_t fUseSPD;
Int_t fSPDNRSegment;
Int_t fSPDNPhiSegment;
vector<Double_t> fSPDRSegment;
Double_t fSPDPhiCover;
#endif
TClonesArray* fCaloHits;
ClassDef(SoLIDECal,0)
};
#endif