BmnRoot
Loading...
Searching...
No Matches
BmnSiliconRaw2Digit.h
Go to the documentation of this file.
1#ifndef BMNSILICONRAW2DIGIT_H
2#define BMNSILICONRAW2DIGIT_H
3
4#include "BmnADCDigit.h"
5#include "BmnAdcProcessor.h"
6#include "BmnEnums.h"
7#include "BmnSiliconDigit.h"
8#include "TClonesArray.h"
9#include "TColor.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 <fstream>
18#include <iostream>
19#include <list>
20#include <map>
21#include <vector>
22
23using std::map;
24using std::string;
25using std::unordered_map;
26using std::vector;
27using namespace TMath;
28
30{
31 Short_t layer; // X = 0 or X' = 1
32 UInt_t serial;
33 Short_t module;
34 Short_t channel_low;
35 Short_t channel_high;
36 Short_t station;
37 bool inverted;
38};
39typedef map<Int_t, BmnSiliconMapping*> InChanMapSil;
40
42{
43 public:
44 BmnSiliconRaw2Digit(Int_t period, Int_t run, TString MapFileName, BmnSetup bmnSetup = kBMNSETUP);
46
47 BmnStatus FillEvent(TClonesArray* adc, TClonesArray* sts);
48 BmnStatus FillProfiles(TClonesArray* adc);
51
52 vector<BmnSiliconMapping*>& GetMap() { return fMap; };
53
54 private:
55 vector<BmnSiliconMapping*> fMap;
56 unordered_map<UInt_t, InChanMapSil> fOuterMap; // serial map
57 Int_t fEventId;
58 TString fMapFileName;
59
60 TCanvas* canStrip = nullptr;
61 TH2F* hraw = nullptr;
62 TH2F* hrms = nullptr;
63 TH2F* hcorrp = nullptr;
64 TH2F* hcorr = nullptr;
65 TH2F* hfilter = nullptr;
66 TH2F* hped = nullptr;
67 TH2F* hcms = nullptr;
68 // TH2F* hscms;
69 TH2F* hscms = nullptr;
70 TH1F* hscms1 = nullptr;
71 TH1F* hscms1full = nullptr;
72 TH1F* hped1 = nullptr;
73 TH1F* hsig = nullptr;
74 Int_t nev = -1;
75 // Int_t nradc = 0;
76 Int_t niterped;
77 Int_t nchip;
78 Int_t nchmin;
79 Int_t npevents;
80
81 Int_t zeroCnt = 0;
82 Int_t allCnt = 0;
83
84 unique_ptr<BmnSiliconStationSet> fSilStationSet;
85
86 Double_t thresh;
87
88 Double_t thrnoise;
89
90 BmnStatus ReadMapFile();
91 inline Int_t MapStrip(BmnSiliconMapping* v, Int_t& iCh, Short_t& iSmpl)
92 {
93 if (v->inverted)
94 return (v->channel_high - iCh) * GetNSamples() + iSmpl;
95 else
96 return (iCh - v->channel_low) * GetNSamples() + iSmpl;
97 }
98 void ProcessAdc(TClonesArray* silicon, Bool_t doFill);
99
100 ClassDef(BmnSiliconRaw2Digit, 1);
101};
102
103#endif /* BMNSILICONRAW2DIGIT_H */
__m128 v
Definition P4_F32vec4.h:1
BmnStatus
Definition BmnEnums.h:24
BmnSetup
Definition BmnEnums.h:89
@ kBMNSETUP
Definition BmnEnums.h:90
BmnStatus FillProfiles(TClonesArray *adc)
vector< BmnSiliconMapping * > & GetMap()
BmnStatus FillEvent(TClonesArray *adc, TClonesArray *sts)
BmnStatus FillNoisyChannels()
BmnSiliconRaw2Digit(Int_t period, Int_t run, TString MapFileName, BmnSetup bmnSetup=kBMNSETUP)
virtual ~BmnSiliconRaw2Digit()
Define enumerations used in tracking.
map< Int_t, BmnSiliconMapping * > InChanMapSil
-clang-format
Short_t Short_t channel_low