17#include <TClonesArray.h>
18#include <TGeoMatrix.h>
38using std::setprecision;
51 , fClusters(new TClonesArray(
"CbmMvdCluster", 10000))
52 , fPixelChargeHistos(nullptr)
53 , fTotalChargeInNpixelsArray(nullptr)
54 , fResolutionHistoX(nullptr)
55 , fResolutionHistoY(nullptr)
56 , fResolutionHistoCleanX(nullptr)
57 , fResolutionHistoCleanY(nullptr)
58 , fResolutionHistoMergedX(nullptr)
59 , fResolutionHistoMergedY(nullptr)
60 , fBadHitHisto(nullptr)
63 , fGausArrayLimit(5000)
71 , fFullClusterHisto(nullptr)
79 , fShowDebugHistos(kFALSE)
83 , fLayerRadiusInner(0.)
91 , fBranchName(
"MvdHit")
108 , fClusters(new TClonesArray(
"CbmMvdCluster", 10000))
109 , fPixelChargeHistos(nullptr)
110 , fTotalChargeInNpixelsArray(nullptr)
111 , fResolutionHistoX(nullptr)
112 , fResolutionHistoY(nullptr)
113 , fResolutionHistoCleanX(nullptr)
114 , fResolutionHistoCleanY(nullptr)
115 , fResolutionHistoMergedX(nullptr)
116 , fResolutionHistoMergedY(nullptr)
117 , fBadHitHisto(nullptr)
118 , fGausArray(nullptr)
120 , fGausArrayLimit(5000)
128 , fFullClusterHisto(nullptr)
135 , fNeighThreshold(1.)
136 , fShowDebugHistos(kFALSE)
140 , fLayerRadiusInner(0.)
145 , fHitPosErrX(0.0005)
146 , fHitPosErrY(0.0005)
148 , fBranchName(
"MvdHit")
183 LOG(debug) <<
"CbmMvdSensorHitfinderTask: Initialisation of sensor " <<
fSensor->GetName();
213 LOG(info) <<
"CbmMvdSensorHitfinderTask::ReInt---------------";
236 for (Int_t i = 0; i <
fInputBuffer->GetEntriesFast(); i++) {
238 TVector3
pos(0, 0, 0);
239 TVector3
dpos(0, 0, 0);
252 double startTime = 0;
254 double indicatedTime = 0;
259 Int_t indexX, indexY;
260 Double_t local[3] = {
pos.X(),
pos.Y(),
pos.Z()};
277 currentHit->
SetTime(indicatedTime);
295 double& indicatedTime,
double& startTime,
double& endTime)
306 Double_t
lab[3] = {0, 0, 0};
307 std::map<pair<Int_t, Int_t>, Int_t> PixelMap = cluster->
GetPixelMap();
314 Double_t sigmaIn[3] = {0., 0., 0.}, sigmaOut[3] = {0., 0., 0.}, shiftIn[3] = {0., 0., 0.}, shiftOut[3] = {0., 0., 0.};
351 indicatedTime = startTime + (endTime - startTime) / 2;
354 for (map<pair<Int_t, Int_t>, Int_t>::iterator it = PixelMap.begin(); it != PixelMap.end(); ++it) {
355 pair<Int_t, Int_t> pixel = it->first;
370 LOG(debug) <<
"CbmMvdSensorHitfinderTask:: iCluster= " << cluster->
GetRefId() <<
" , clusterSize= " << clusterSize;
371 LOG(debug) <<
"CbmMvdSensorHitfinderTask::xIndex " <<
xIndex <<
" , yIndex " <<
yIndex <<
" , charge = " << charge;
378 Double_t xc =
x * charge;
379 Double_t yc =
y * charge;
386 LOG(debug) <<
"CbmMvdSensorHitfinderTask::=========================";
387 LOG(debug) <<
"CbmMvdSensorHitfinderTask::numeratorX: " <<
numeratorX <<
" , numeratorY: " <<
numeratorY
388 <<
", denominator: " <<
denominator <<
", indicated time: " << indicatedTime;
402 LOG(debug) <<
"CbmMvdSensorHitfinderTask::-----------------------------------";
404 LOG(debug) <<
"CbmMvdSensorHitfinderTask::-----------------------------------";
499 TGeoHMatrix RotMatrix;
500 RotMatrix.SetRotation(RecoMatrix->GetRotationMatrix());
502 RotMatrix.LocalToMaster(sigmaIn, sigmaOut);
503 RotMatrix.LocalToMaster(shiftIn, shiftOut);
const constexpr Int_t fCounter(0)
ClassImp(CbmMvdSensorHitfinderTask)
int32_t GetNofDigis() const
Number of digis in cluster.
void SetTimeError(double error)
void SetRefId(int32_t refId)
void SetTime(double time)
int32_t GetEarliestFrameNumber()
std::map< std::pair< int32_t, int32_t >, int32_t > GetPixelMap()
void SetValidityStartTime(double time)
void SetValidityEndTime(double time)
virtual Double_t GetDelaySigma(Float_t charge)
virtual Double_t GetJitter(Float_t charge)
virtual Int_t GetAnalogThreshold()
virtual Double_t GetDelay(Float_t charge)
virtual ~CbmMvdSensorHitfinderTask()
Int_t GetAdcCharge(Float_t charge)
TObjArray * fTotalChargeInNpixelsArray
void InitTask(CbmMvdSensor *mySensor)
void ComputeCenterOfGravity(CbmMvdCluster *clusterArray, TVector3 &pos, TVector3 &dpos, double &indicatedTime, double &startTime, double &endTime)
CbmMvdSensorHitfinderTask()
void CreateHit(CbmMvdCluster *clusterArray, TVector3 &pos, TVector3 &dpos)
TObjArray * fPixelChargeHistos
TClonesArray * fOutputBuffer
TClonesArray * fInputBuffer
void PixelToTop(Int_t pixelNumberX, Int_t pixelNumberY, Double_t *lab)
Double_t GetFrameStartTime(Int_t frameNumber)
TGeoHMatrix * GetRecoMatrix()
Double_t GetFrameEndTime(Int_t frameNumber)
Int_t GetStationNr() const
void TopToPixel(Double_t *lab, Int_t &pixelNumberX, Int_t &pixelNumberY)
CbmMvdSensorDataSheet * GetDataSheet()
Data class with information on a STS local track.