PandaRoot
PndRichHitProducer.h
Go to the documentation of this file.
1 //****************************************************************************
2 //* This file is part of PandaRoot. *
3 //* *
4 //* PandaRoot is distributed under the terms of the *
5 //* GNU General Public License (GPL) version 3, *
6 //* copied verbatim in the file "LICENSE". *
7 //* *
8 //* Copyright (C) 2006 - 2024 FAIR GmbH and copyright holders of PandaRoot *
9 //* The copyright holders are listed in the file "COPYRIGHTHOLDERS". *
10 //* The authors are listed in the file "AUTHORS". *
11 //****************************************************************************
12 
13 #ifndef PNDRICHHITPRODUCER_H
14 #define PNDRICHHITPRODUCER_H 1
15 
16 #include <PndPersistencyTask.h>
17 #include "PndRichDigi.h"
18 #include "PndRichHit.h"
19 #include "PndRichGeo.h"
20 #include "PndRichPDHit.h"
21 //#include "PndRichTSPDHit.h"
22 #include "PndRichResolution.h"
23 #include "TVector3.h"
24 
25 class TClonesArray;
27 
29 
30  public:
33 
36 
38  virtual InitStatus Init();
39 
41  virtual void Exec(Option_t *opt);
42 
43  void AddXPDHit(Int_t detID, Int_t sensorId, TVector3 &pos, TVector3 &dpos, Int_t index, Double_t time);
44  PndRichDigi *AddDigi(Int_t detID, Int_t sensorId, TVector3 &pos, TVector3 &dpos, Int_t index, Double_t time);
45  PndRichPDHit *AddPDHit(Int_t detID, Int_t sensorId, TVector3 &pos, TVector3 &dpos, Int_t index, Double_t time);
46  PndRichHit *AddHit(Int_t detID, Int_t sensorId, TVector3 &pos, TVector3 &dpos, Double_t thetaC, Double_t errThetaC, Int_t index);
47 
48  void SetPositionSmearing(Float_t res) { fPosResolution = res; };
49 
50  void SetGeoVersion(UInt_t version) { fGeoVersion = version; };
51 
52  void SetPhDetNoiseON(UInt_t phDetNoise) { fPhDetNoise = phDetNoise; };
53 
54  void FinishEvent();
55  void FinishTask();
56 
57  void RunTimeBased() { fTimeOrderedDigi = kTRUE; }
58 
59  private:
60  PndRichGeo *fGeo;
61  UInt_t fGeoVersion;
62  Bool_t fPhDetNoise;
63  UInt_t fNumRand;
64  Bool_t fTimeOrderedDigi;
65  Double_t fDeadTime;
66  Double_t fEventTime;
67  Double_t fPreviousEventTime;
68 
69  Float_t fPosResolution; // Position smearing [cm]
70  PndRichResolution *fRichResolution;
71 
73  TClonesArray *fPDPointArray;
74  TClonesArray *fBarPointArray;
75 
77  TClonesArray *fPDHitArray;
78  TClonesArray *fHitArray;
79 
80  std::vector<Double_t> PhDetNoise();
81 
82  PndRichHitWriteoutBuffer *fDataBuffer;
83 
84  ClassDef(PndRichHitProducer, 1);
85 };
86 
87 #endif
void SetPhDetNoiseON(UInt_t phDetNoise)
void AddXPDHit(Int_t detID, Int_t sensorId, TVector3 &pos, TVector3 &dpos, Int_t index, Double_t time)
PndRichHit * AddHit(Int_t detID, Int_t sensorId, TVector3 &pos, TVector3 &dpos, Double_t thetaC, Double_t errThetaC, Int_t index)
PndRichPDHit * AddPDHit(Int_t detID, Int_t sensorId, TVector3 &pos, TVector3 &dpos, Int_t index, Double_t time)
virtual void Exec(Option_t *opt)
void SetGeoVersion(UInt_t version)
PndRichDigi * AddDigi(Int_t detID, Int_t sensorId, TVector3 &pos, TVector3 &dpos, Int_t index, Double_t time)
void SetPositionSmearing(Float_t res)
virtual InitStatus Init()