BmnRoot
Loading...
Searching...
No Matches
BmnGemRaw2Digit.h
Go to the documentation of this file.
1#ifndef BMNGEMRAW2DIGIT_H
2#define BMNGEMRAW2DIGIT_H
3
4#include "BmnADCDigit.h"
5#include "BmnAdcProcessor.h"
6#include "BmnCSCDigit.h"
7#include "BmnGemStripDigit.h"
8#include "TClonesArray.h"
9#include "TH1F.h"
10#include "TMath.h"
11#include "TString.h"
12#include "TTree.h"
13
14#include <BmnEventHeader.h>
15#include <BmnFunctionSet.h>
16#include <TSystem.h>
17#include <UniDetector.h>
18#include <UniDetectorParameter.h>
19#include <fstream>
20#include <iostream>
21#include <list>
22#include <map>
23#include <vector>
24
25#define N_CH_BUF 4096
26
27using namespace std;
28using namespace TMath;
29
31{
32 Int_t strip;
33 Int_t lay; // strip type: 0 - x, 1 - y
34 Int_t mod; // hot zones: 1 - inner zone, 0 - outer zone
35
36 BmnGemMap(Int_t s, Int_t l, Int_t m)
37 : strip(s)
38 , lay(l)
39 , mod(m)
40 {}
41
43 : strip(-1)
44 , lay(-1)
45 , mod(-1)
46 {}
47};
48
50{
51 Int_t Serial;
52 Int_t Ch_lo;
53 Int_t Ch_hi;
54 Int_t GEM_id;
55 Int_t Side;
56 Int_t Type;
57 Int_t Station;
58 Int_t Module;
59 Int_t Zone;
60
61 void Print()
62 {
63 cout << Serial << " " << Ch_lo << " " << Ch_hi << " " << GEM_id << " " << Side << " " << Type << " " << Station
64 << " " << Module << " " << Zone << endl;
65 }
66
68 : Serial(-1)
69 , Ch_lo(-1)
70 , Ch_hi(-1)
71 , GEM_id(-1)
72 , Side(-1)
73 , Type(-1)
74 , Station(-1)
75 , Module(-1)
76 , Zone(-1)
77 {}
78};
79
81{
82 public:
83 BmnGemRaw2Digit(Int_t period, Int_t run, TString mapFileName, BmnSetup bmnSetup = kBMNSETUP);
85
86 BmnStatus FillEvent(TClonesArray* adc, TClonesArray* gem);
87 BmnStatus FillProfiles(TClonesArray* adc);
89
90 private:
91 // starting thresholds, number of iterations
92 Int_t niterped = 3;
93 Float_t thrped = 35;
94 Float_t thrpedcsc = 80;
95 vector<TH1I*> hNhits;
96
97 BmnGemMap* fSmall;
98 BmnGemMap* fMid;
99 vector<BmnGemMap*> fBigHot;
100 vector<BmnGemMap*> fBig;
101
102 unique_ptr<BmnGemStripStationSet> fGemStationSet;
103
104 TString fMapFileName;
105
106 vector<GemMapLine*> fMap;
107 inline void
108 MapStrip(GemMapLine* gemM, UInt_t ch, Int_t iSmpl, Int_t& station, Int_t& mod, Int_t& lay, Int_t& strip);
109 void ProcessAdc(TClonesArray* silicon, Bool_t doFill);
110 BmnStatus ReadMap(TString parName, BmnGemMap* m, Int_t lay, Int_t mod);
111 BmnStatus ReadLocalMap(TString parName, BmnGemMap* m, Int_t lay, Int_t mod);
112 BmnStatus ReadGlobalMap(TString FileName);
113
114 ClassDef(BmnGemRaw2Digit, 1);
115};
116
117#endif /* BMNGEMRAW2DIGIT_H */
__m128 m
Definition P4_F32vec4.h:27
BmnStatus
Definition BmnEnums.h:24
BmnSetup
Definition BmnEnums.h:89
@ kBMNSETUP
Definition BmnEnums.h:90
BmnStatus FillEvent(TClonesArray *adc, TClonesArray *gem)
BmnStatus FillNoisyChannels()
BmnStatus FillProfiles(TClonesArray *adc)
-clang-format
STL namespace.
BmnGemMap(Int_t s, Int_t l, Int_t m)