CbmRoot
Loading...
Searching...
No Matches
CbmMuchFindHitsGem.h
Go to the documentation of this file.
1/* Copyright (C) 2008-2020 St. Petersburg Polytechnic University, St. Petersburg
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Ajay Kumar, Vikas Singhal, Evgeny Kryshen, Mikhail Ryzhinskiy [committer] */
4
5/* CbmMuchFindHitsGem.h
6 *
7 *@author V.Singhal <vikas@vecc.gov.in>
8 *@version 2.0 (removeing fDaq Time stream mode as per CbmDaqNew Scheme)
9 *@define Clusterization and Hit creation is not dependend of EBE or Time Based mode.
10 * fClusterSeprationTime taken as 100 ns which will work with Time Based mode.
11 *@since 22.08.17
12 *
13 *@author E.Kryshen <e.kryshen@gsi.de>
14 *@version 2.0
15 *@since 31.07.12
16 *
17 *@author M.Ryzhinskiy <m.ryzhinskiy@gsi.de>
18 *@version 1.0
19 *@since 11.02.08
20 *
21 * Produces hits in GEM-like modules using different
22 * clustering algorithms. Clustering algorithms can be chosen
23 * by the switch SetAlgorithm(Int_t iAlgorithm)
24 * Several clustering algorithms are supported
25 * 0 - one hit per fired pad
26 * 1 - one hit per cluster
27 * 2 - simple cluster deconvolution with charge threshold
28 * 3 - local maxima finder
29 */
30
31#ifndef CBMMUCHFINDHITSGEM_H
32#define CBMMUCHFINDHITSGEM_H 1
33#include "CbmEvent.h"
34#include "CbmMuchDigi.h"
35#include "FairTask.h"
36#include "TString.h"
37
38#include <vector>
39//#include "CbmStsReco.h"
40
41class CbmDigiManager;
42class CbmMuchPad;
43class CbmMuchCluster;
44class TClonesArray;
46
47// Root file for both the Event by Event Mode and Time Stream mode is same therefore
48// Time based data can be read directly from the Root Tree ( One Tree entry = One Time Slice)
49// class CbmTimeSlice;
50
51class CbmMuchFindHitsGem : public FairTask {
52 public:
53 CbmMuchFindHitsGem(const char* digiFileName, Int_t flag);
55 virtual void Exec(Option_t* opt);
56 void ProcessData(CbmEvent*);
57 void SetAlgorithm(Int_t iAlgorithm) { fAlgorithm = iAlgorithm; }
58 void SetThresholdRatio(Double_t thresholdRatio) { fThresholdRatio = thresholdRatio; }
59 void SetClusterSeparationTime(Double_t time) { fClusterSeparationTime = time; }
60 // Removing SetDaq functionality as Cluster and Hit Finder algorithm is same for both the Time Based and Event Based mode.
61 // void SetDaq(Bool_t daq) { fDaq = daq; }
62 // Set functionality for accepting CbmMuchBeamTimeDigi generated from mCBM data.
63 void SetBeamTimeDigi(Bool_t beam) { bBeamTimeDigi = beam; }
64
65 private:
66 virtual InitStatus Init();
68 void CreateCluster(CbmMuchPad* pad);
69 void ExecClusteringSimple(CbmMuchCluster* cluster, Int_t iCluster, CbmEvent* event);
70 void ExecClusteringPeaks(CbmMuchCluster* cluster, Int_t iCluster, CbmEvent* event);
71 void CreateHits(CbmMuchCluster* cluster, Int_t iCluster, CbmEvent* event);
72 TString fDigiFile; // Digitization file
73 Int_t fFlag;
74 Int_t fAlgorithm; // Defines which algorithm to use
75 Double_t fClusterSeparationTime; // Minimum required time between two clusters
76 Double_t fThresholdRatio; // Charge threshold ratio relative to max cluster charge
77 Int_t fEvent; // Event counter
78 Int_t fNofTimeslices; // TimeSlice Counter
79 //TClonesArray* fDigis; // Input array of CbmMuchDigi
81 TClonesArray* fEvents; // Input array of CbmEvent after Event Building
82 std::vector<Int_t> fClusterCharges;
83 std::vector<Bool_t> fLocalMax;
84 std::vector<CbmMuchPad*> fClusterPads;
85 std::vector<std::vector<Int_t>> fNeighbours;
86 std::vector<Double_t> IgnoredAddresses;
87
88 TClonesArray* fClusters; // Output array of CbmMuchCluster objects
89 TClonesArray* fHits; // Output array of CbmMuchHit
90 CbmMuchGeoScheme* fGeoScheme; // Geometry scheme
91 // auxiliary maps and vectors
92 std::vector<Int_t> fDigiIndices;
93 std::vector<CbmMuchPad*> fFiredPads;
94 Bool_t fEventMode = kFALSE;
95 //ECbmMode fMode = kCbmTimeslice; // To Select CbmEvent Branch in Time Based Event building mode
96 // Removing SetDaq functionality as Cluster and Hit Finder algorithm is same for both the Time Based and Event Based mode.
97 //Bool_t fDaq; // To daq or not to daq // TODO
98 //CbmTimeSlice* fTimeSlice; // Time slice object in the DAQ approach
99 // according to the input branch , below need to be used so using auto, such that runtime it will decide
100 //std::vector<CbmMuchDigi> fDigiData; // Vector of digis
101
102 // No need of fDigiDtata
103 //std::vector< auto > fDigiData; // Vector of digis
104 UInt_t fuClusters = 0; //Number of Clusters.
105 Bool_t bBeamTimeDigi = kFALSE; // Boolean for Using Beam Time Digi
106
107 //Below variables are applying X, Y correction for different mCBM geometries.
108 //In future we'll remove these and try to read directly from Geometry file.
109 // For GEM
110 Double_t fGemTX = 0.0;
111 Double_t fGemTY = 0.0;
112 // For RPC
113 Double_t fRpcTX = 0.0;
114 Double_t fRpcTY = 0.0;
115
118
120};
121
122#endif
CbmDigiManager.
Class characterising one event by a collection of links (indices) to data objects,...
Definition CbmEvent.h:34
Data container for MUCH clusters.
CbmDigiManager * fDigiManager
ClassDef(CbmMuchFindHitsGem, 1)
std::vector< Int_t > fClusterCharges
void SetThresholdRatio(Double_t thresholdRatio)
virtual void Exec(Option_t *opt)
void CreateHits(CbmMuchCluster *cluster, Int_t iCluster, CbmEvent *event)
void ExecClusteringPeaks(CbmMuchCluster *cluster, Int_t iCluster, CbmEvent *event)
std::vector< Bool_t > fLocalMax
void ProcessData(CbmEvent *)
std::vector< Double_t > IgnoredAddresses
CbmMuchFindHitsGem(const CbmMuchFindHitsGem &)
std::vector< CbmMuchPad * > fClusterPads
std::vector< CbmMuchPad * > fFiredPads
void CreateCluster(CbmMuchPad *pad)
TClonesArray * fClusters
CbmMuchGeoScheme * fGeoScheme
CbmMuchFindHitsGem(const char *digiFileName, Int_t flag)
void FindClusters(CbmEvent *)
void SetBeamTimeDigi(Bool_t beam)
void SetAlgorithm(Int_t iAlgorithm)
std::vector< Int_t > fDigiIndices
virtual InitStatus Init()
std::vector< std::vector< Int_t > > fNeighbours
void SetClusterSeparationTime(Double_t time)
CbmMuchFindHitsGem operator=(const CbmMuchFindHitsGem &)
TClonesArray * fEvents
Interface to digi branch.
void ExecClusteringSimple(CbmMuchCluster *cluster, Int_t iCluster, CbmEvent *event)