BmnRoot 26.10.0-19-g6979a6c6
Software framework of the BM@N experiment
Loading...
Searching...
No Matches
BmnTof1HitProducer.h
Go to the documentation of this file.
1#ifndef BMNTOF1HITPRODUCER_H
2#define BMNTOF1HITPRODUCER_H 1
3
4#include "BmnTOF1Detector.h"
5#include "BmnTof1GeoUtils.h"
7#include "BmnTrigDigit.h"
8#include "BmnTrigWaveDigit.h"
9
10#include <TEfficiency.h>
11#include <TH1D.h>
12#include <TH2D.h>
13#include <TRandom2.h>
14
16{
17 Int_t fVerbose; // reimplement fVerbose variable from FairTask
18 Double_t fTimeSigma; // Uncertainties of time, gaus sigma [ns], default: 100 ps
19 Double_t fErrX, fErrY; // Uncertainties of coordinates, gaus sigma [cm], dX= 10./sqrt(12.) mm, default: dY= 5 mm.
25 DetectorId fDetectorId;
26
28
30
31 Bool_t HitExist(const Double_t& val, const Bool_t& isWide_strip);
32 Bool_t DoubleHitExist(const Double_t& val, const Bool_t& isWide_strip, const DetectorId& flag);
33 Bool_t TripleHitExist(const Double_t& val, const Bool_t& isWide_strip, const DetectorId& flag);
34
38
40 Bool_t IsFile(TString NameFile);
42 Bool_t OutOfRange(Int_t iPlane);
46
47 InitStatus LoadDetectorConfiguration();
48
49 public:
50 BmnTof1HitProducer(const char* name,
51 DetectorId detId,
52 Bool_t useMCdata = true,
53 Int_t verbose = 1,
54 Bool_t DoTest = false);
55 virtual ~BmnTof1HitProducer();
56
57 virtual InitStatus Init();
58 virtual void Exec(Option_t* opt);
59 virtual void Finish();
60
61 virtual void OnlineWrite(const std::unique_ptr<TTree>& resultTree);
62
63 void SetTimeResolution(Double_t sigma) { fTimeSigma = sigma; };
64 void SetAlongStripResolution(Double_t Xerr) { fErrX = Xerr; };
65 void SetSeed(UInt_t seed = 0);
66 void SetPeriodRun(Int_t p, Int_t r);
67
69 {
70 char s[32];
71 TString buf = "\n Run parameters: fTimeSigma=";
72 sprintf(s, "%.5g", fTimeSigma);
73 buf += (s);
74 buf += " ns, fErrX=";
75 sprintf(s, "%.4g", fErrX);
76 buf += (s);
77 buf += " cm, fErrY=";
78 sprintf(s, "%.4g", fErrY);
79 buf += (s);
80 buf += " cm, fDoTest=";
81 buf += fDoTest;
82 buf += ", fDoMergeHits=";
83 buf += fDoMergeHits;
84 return buf;
85 }
86
88};
89
90#endif
bool Bool_t
int Int_t
unsigned int UInt_t
double Double_t
const char Option_t
#define ClassDef(name, id)
BmnTof1HitProducerIdeal(const char *name="TOF1 Ideal HitProducer", Bool_t useMCdata=true, Int_t verbose=1, Bool_t DoTest=false, Bool_t DoMergeHits=false)
BmnTrigDigit * FingT0Digit()
Int_t extract_number_ev(TString fn)
void SetSeed(UInt_t seed=0)
virtual InitStatus Init()
virtual void Exec(Option_t *opt)
Bool_t OutOfRange(Int_t iPlane)
void SetPeriodRun(Int_t p, Int_t r)
Bool_t TripleHitExist(const Double_t &val, const Bool_t &isWide_strip, const DetectorId &flag)
TString extract_path(TString fn)
Int_t extract_number_p(TString fn)
InitStatus LoadDetectorConfiguration()
Bool_t IsFile(TString NameFile)
void SetAlongStripResolution(Double_t Xerr)
void SetTimeResolution(Double_t sigma)
BmnTOF1Detector ** pDetector
BmnTof1GeoUtils * pGeoUtils
BmnTof1HitProducer(const char *name, DetectorId detId, Bool_t useMCdata=true, Int_t verbose=1, Bool_t DoTest=false)
Bool_t HitExist(const Double_t &val, const Bool_t &isWide_strip)
virtual void OnlineWrite(const std::unique_ptr< TTree > &resultTree)
Write task resul to tree.
BmnEventHeader * fEventHeader
Bool_t DoubleHitExist(const Double_t &val, const Bool_t &isWide_strip, const DetectorId &flag)