ATTPCROOT  0.3.0-alpha
A ROOT-based framework for analyzing data from active target detectors
AtCoreSpecMAT.cxx
Go to the documentation of this file.
1 // =================================================
2 // AtCore Class
3 // Original author : Genie Jhang ( geniejhang@majimak.com )
4 // Adapted for AtTPCROOT by Y. Ayyad (ayyadlim@nscl.msu.edu)
5 // =================================================
6 
7 #include "AtCoreSpecMAT.h"
8 
9 #include <FairLogger.h>
10 
11 #include "GETCoboFrame.h"
12 #include "GETLayeredFrame.h"
13 
14 #include <cmath>
15 #include <fstream>
16 #include <iostream>
17 
18 constexpr auto cRED = "\033[1;31m";
19 constexpr auto cYELLOW = "\033[1;33m";
20 constexpr auto cNORMAL = "\033[0m";
21 constexpr auto cGREEN = "\033[1;32m";
22 
24 
25 AtCoreSpecMAT::AtCoreSpecMAT() : AtPadCoordArr(boost::extents[3174][3][2])
26 {
27  Initialize();
28 }
29 
30 AtCoreSpecMAT::AtCoreSpecMAT(std::shared_ptr<AtSpecMATMap> map) : AtPadCoordArr(boost::extents[3174][3][2]), fMap(map)
31 {
32  Initialize();
33  SetNumTbs(512);
34 }
35 
36 AtCoreSpecMAT::AtCoreSpecMAT(TString filename, std::shared_ptr<AtSpecMATMap> map)
37  : AtPadCoordArr(boost::extents[3174][3][2]), fMap(map)
38 {
39  Initialize();
40  AddData(filename);
41  SetNumTbs(512);
42 }
43 
44 AtCoreSpecMAT::AtCoreSpecMAT(TString filename, Int_t numTbs, Int_t windowNumTbs, Int_t windowStartTb)
45  : AtPadCoordArr(boost::extents[3174][3][2])
46 {
47  Initialize();
48  AddData(filename);
49  SetNumTbs(numTbs);
50 }
51 
53 {
54  /*for(Int_t i=0;i<10;i++)
55  {
56  delete fDecoderPtr[i];
57  delete fPedestalPtr[i];
58  }
59  delete fAtMapPtr;*/
60 }
61 
63 {
64  fRawEventPtr = new AtRawEvent();
65 
66  fPedestalPtr[0] = new AtPedestal();
67  for (Int_t iCobo = 1; iCobo < 16; iCobo++)
68  fPedestalPtr[iCobo] = NULL;
69 
70  // fPlotPtr = NULL;
71 
72  fDecoderPtr[0] = new GETDecoder2();
73  // fDecoderPtr[0] -> SetDebugMode(1);
74  fPadArray = new TClonesArray("AtPad", 3174);
75 
76  fIsData = kFALSE;
77  fFPNSigmaThreshold = 5;
78 
79  // fGainCalibrationPtr = new STGainCalibration();
80  // fIsGainCalibrationData = kFALSE;
81 
82  fNumTbs = 512;
83 
84  fTargetFrameID = -1;
85  memset(fCurrentEventID, 0, sizeof(Int_t) * 16);
86 
87  fIsSeparatedData = kFALSE;
88 
89  /* old map style
90  kEnableAuxChannel = kFALSE;
91  fAuxChannels.clear();
92  fAtMapPtr = new AtSpecMATMap(3174);
93  */
94 
95  fNumCobo = 4;
96 
97  for (Int_t i = 0; i < fNumCobo; i++) {
98  fIsPadPlaneCobo[i] = kTRUE;
99  fIsNegativePolarity[i] = kTRUE;
100  }
101 }
102 
103 /* old map style
104 Bool_t AtCoreSpecMAT::SetAtTpcMap(Char_t const *lookup)
105 {
106 
107  dynamic_cast<AtSpecMATMap *>(fAtMapPtr)->GenerateAtTpc();
108  // NOTE: In the case of the AtTPC Map we need to generate
109  // the coordinates to calculate the Pad Center
110 
111  Bool_t MapIn = fAtMapPtr->ParseXMLMap(lookup);
112  if (!MapIn)
113  return false;
114  // Bool_t kIsIniParsed = fAtMapPtr->ParseInhibitMap(fIniMap, fLowgMap,
115  // fXtalkMap);
116 
117  // AtPadCoordArr = fAtMapPtr->GetPadCoordArr();//TODO Use a pointer to a
118  // simpler container
119 
120  // For debugging purposes only!
121  // fAtMapPtr->SetGUIMode();
122  // fAtMapPtr->GetAtTPCPlane();
123  return true;
124 }
125 
126 Bool_t AtCoreSpecMAT::SetInhibitMaps(TString inimap, TString lowgmap, TString xtalkmap)
127 {
128  fIniMap = inimap;
129  fLowgMap = lowgmap;
130  fXtalkMap = xtalkmap;
131  return kTRUE;
132 }
133 void AtCoreSpecMAT::SetAuxChannel(std::vector<Int_t> AuxCh)
134 {
135  kEnableAuxChannel = kTRUE;
136  fAuxChannels = AuxCh;
137 
138  if (AuxCh.size() == 0)
139  std::cout << cRED << " AtPSAtask : No auxiliary channels found --" << cNORMAL << std::endl;
140  else {
141  std::cout << cGREEN << " AtPSAtask : Auxiliary pads found : " << std::endl;
142  for (Int_t i = 0; i < AuxCh.size(); i++)
143  std::cout << " " << AuxCh.at(i) << std::endl;
144  }
145  std::cout << cNORMAL << std::endl;
146 }
147 
148 Bool_t AtCoreSpecMAT::GetIsAuxChannel(Int_t val)
149 {
150 
151  return std::find(fAuxChannels.begin(), fAuxChannels.end(), val) != fAuxChannels.end();
152 }
153 */
154 
155 Bool_t AtCoreSpecMAT::AddData(TString filename, Int_t coboIdx)
156 {
157  fFileName = filename;
158  return fDecoderPtr[coboIdx]->AddData(filename);
159 }
160 
162 {
163  for (Int_t i = 0; i < fNumCobo; i++) {
164  fIsNegativePolarity[i] = !(value[i]);
165  }
166 }
167 
168 Bool_t AtCoreSpecMAT::SetData(Int_t value)
169 {
170  fIsData = fDecoderPtr[0]->SetData(value);
171  GETDecoder2::EFrameType frameType = fDecoderPtr[0]->GetFrameType();
172 
173  if (fIsSeparatedData) {
174  for (Int_t iCobo = 1; iCobo < fNumCobo; iCobo++) {
175  if (fPedestalPtr[iCobo] == nullptr)
176  fPedestalPtr[iCobo] = new AtPedestal();
177 
178  fIsData &= fDecoderPtr[iCobo]->SetData(value);
179  frameType = fDecoderPtr[iCobo]->GetFrameType();
180  /*
181  if (frameType != GETDecoder2::kCobo || frameType !=
182  GETDecoder2::kBasic) { std::cout << cRED << "== [AtCore] When using
183  separated data, only accepted are not merged frame data files!" <<
184  cNORMAL << std::endl;
185 
186  fIsData = kFALSE;
187  return fIsData;
188  }
189  */
190  fIsData = kTRUE;
191  }
192  }
193 
194  fTargetFrameID = -1;
195  memset(fCurrentEventID, 0, sizeof(Int_t) * 16);
196 
197  return fIsData;
198 }
199 
200 Int_t AtCoreSpecMAT::GetNumData(Int_t coboIdx)
201 {
202  return fDecoderPtr[coboIdx]->GetNumData();
203 }
204 
205 TString AtCoreSpecMAT::GetDataName(Int_t ind, Int_t coboIdx)
206 {
207  return fDecoderPtr[coboIdx]->GetDataName(ind);
208 }
209 
210 void AtCoreSpecMAT::SetNumTbs(Int_t value)
211 {
212  fNumTbs = value;
213  fDecoderPtr[0]->SetNumTbs(value);
214 
215  if (fIsSeparatedData)
216  for (Int_t iCobo = 1; iCobo < fNumCobo; iCobo++)
217  fDecoderPtr[iCobo]->SetNumTbs(value);
218 }
219 
220 void AtCoreSpecMAT::SetFPNPedestal(Double_t sigmaThreshold)
221 {
222  fFPNSigmaThreshold = sigmaThreshold;
223 
224  std::cout << "== [AtCoreSpecMAT] Using FPN pedestal is set!" << std::endl;
225 }
226 
227 void AtCoreSpecMAT::SetIsPadPlaneCobo(Bool_t *IsPadPlane)
228 {
229  for (Int_t i = 0; i < fNumCobo; i++) {
230  fIsPadPlaneCobo[i] = IsPadPlane[i];
231  }
232 }
233 
234 // type = 0 for padplane pads
235 // type = 1 for scintillators
236 // for padplane the channels 11,22,45 & 56 are used as fpn channels
237 // for scintillators 43,44,46 & 47 are used
239 {
240 
241  Int_t type{0};
242  std::vector<int> ChannelsFPNpp = {11, 22, 45, 56}; // fpn channels for
243  // padplane
244  std::vector<int> ChannelsFPNsc = {43, 44, 46, 47}; // fpn channels for scintillators
245  Int_t Nr_fpn_found{0};
246 
247  LOG(debug) << "Opening " << fFileName;
248  TFile *RawDataTreeFile = new TFile(fFileName, "READ");
249  if (RawDataTreeFile->IsZombie()) {
250  std::cout << cRED
251  << "[AtCoreSpecMAT] File containing tree not found, check if "
252  "input file name is correct ("
253  << fFileName << ")" << cNORMAL << std::endl;
254  return;
255  }
256  TTree *RawDataTree = (TTree *)RawDataTreeFile->Get("EventDataTree");
257  if (!RawDataTree) {
258  std::cout << cRED
259  << "[AtCoreSpecMAT] File does not contain raw data ttree (must "
260  "be named EventDataTree)"
261  << cNORMAL << std::endl;
262  std::cout << "Input file " << fFileName << " contains: " << std::endl;
263  RawDataTreeFile->ls();
264  return;
265  }
266 
267  // Read the raw data tree
268  TTreeReader myReader(RawDataTree);
269 
270  // setting reader addresses
271  TTreeReaderValue<Int_t> myInternalEventNr(myReader, "InternalEventNr");
272  TTreeReaderValue<UChar_t> myCoboNr(myReader, "CoboNr");
273  TTreeReaderValue<UChar_t> myAsadNr(myReader, "AsadNr");
274  TTreeReaderValue<UChar_t> myAgetNr(myReader, "AgetNr");
275  TTreeReaderValue<UChar_t> myChannelNr(myReader, "ChannelNr");
276  TTreeReaderArray<UShort_t> mySamples(myReader, "Samples");
277 
278  // Fill vectors
279  Bool_t EventCompleted = false;
280  while (myReader.Next() && (!EventCompleted)) {
281  if (*myInternalEventNr == eventID) {
282  PadReference PadRef = {*myCoboNr, *myAsadNr, *myAgetNr, *myChannelNr};
283  for (Int_t i = 0; i < 4; i++) { // loop over number of fpn channels
284  if ((PadRef.ch == ChannelsFPNpp[i]) && fIsPadPlaneCobo[PadRef.cobo]) {
285  Nr_fpn_found++;
286  // std::cout << "Added fpnchannel" << std::endl;
287  // std::cout << ", corresponding to Cobo: " << PadRef[0] << " Asad:
288  // " << PadRef[1] << " Aget: " << PadRef[2] << " Ch: " <<
289  // PadRef[3] << std::endl;
290  for (Int_t j = 0; j < 512; j++) {
291  fFPNChannels[i][PadRef.cobo][PadRef.asad][PadRef.aget][j] = mySamples[j];
292  }
293  } else if ((PadRef.ch == ChannelsFPNsc[i]) && !(fIsPadPlaneCobo[PadRef.cobo])) {
294  Nr_fpn_found++;
295  // std::cout << "Added fpnchannel" << std::endl;
296  // std::cout << ", corresponding to Cobo: " << PadRef[0] << " Asad:
297  // " << PadRef[1] << " Aget: " << PadRef[2] << " Ch: " <<
298  // PadRef[3] << std::endl;
299  for (Int_t j = 0; j < 512; j++) {
300  fFPNChannels[i][PadRef.cobo][PadRef.asad][PadRef.aget][j] = mySamples[j];
301  }
302  }
303  }
304 
305  } else if (*myInternalEventNr > eventID) {
306  EventCompleted = true;
307  }
308  }
309  std::cout << "A total of " << Nr_fpn_found << " fpn channels were found for event nr " << eventID << std::endl;
310 }
311 
312 void AtCoreSpecMAT::ProcessROOTFILE(Long64_t eventID)
313 {
314 
315  fRawEventPtr->SetEventID(eventID);
316 
317  TFile *RawDataTreeFile = new TFile(fFileName, "READ");
318  if (RawDataTreeFile->IsZombie()) {
319  std::cout << cRED
320  << "[AtCoreSpecMAT] File containing tree not found, check if "
321  "input file name is correct ("
322  << fFileName << ")" << cNORMAL << std::endl;
323  return;
324  }
325  TTree *RawDataTree = (TTree *)RawDataTreeFile->Get("EventDataTree");
326  if (!RawDataTree) {
327  std::cout << cRED
328  << "[AtCoreSpecMAT] File does not contain raw data ttree (must "
329  "be named EventDataTree)"
330  << cNORMAL << std::endl;
331  return;
332  }
333 
334  // Read the raw data tree
335  TTreeReader myReader(RawDataTree);
336 
337  // setting reader addresses
338  TTreeReaderValue<Int_t> myInternalEventNr(myReader, "InternalEventNr");
339  TTreeReaderValue<UChar_t> myCoboNr(myReader, "CoboNr");
340  TTreeReaderValue<UChar_t> myAsadNr(myReader, "AsadNr");
341  TTreeReaderValue<UChar_t> myAgetNr(myReader, "AgetNr");
342  TTreeReaderValue<UChar_t> myChannelNr(myReader, "ChannelNr");
343  TTreeReaderArray<UShort_t> mySamples(myReader, "Samples");
344 
345  // Fill vectors
346  Bool_t EventCompleted = false;
347  while (myReader.Next() && (!EventCompleted)) {
348  // std::cout << "InternalEventNr is" << *myInternalEventNr << " eventID is
349  // " << eventID << std::endl;
350  if (*myInternalEventNr == eventID) {
351  PadReference PadRef = {*myCoboNr, *myAsadNr, *myAgetNr, *myChannelNr};
352  fCurrentEventID[0] = *myInternalEventNr;
353  Int_t PadRefNum = fMap->GetPadNum(PadRef);
354  // std::cout << "Fired pad nr: " << PadRefNum << std::endl;
355  // std::cout << ", corresponding to Cobo: " << PadRef[0] << " Asad: " <<
356  // PadRef[1] << " Aget: " << PadRef[2] << " Ch: " << PadRef[3] <<
357  // std::endl;
358  auto PadCenterCoord = fMap->CalcPadCenter(PadRefNum);
359  Bool_t IsInhibited = fMap->IsInhibited(PadRefNum);
360 
361  if (PadRefNum != -1 && !IsInhibited) {
362  // AtPad *pad = new ((*fPadArray)[PadRefNum]) AtPad(PadRefNum);
363  AtPad *pad = fRawEventPtr->AddPad(PadRefNum);
364  pad->SetPadCoord(PadCenterCoord);
365 
366  // std::cout << "pad coordinates are (" << PadCenterCoord[0] << ", " <<
367  // PadCenterCoord[1] << ")" << std::endl;
368 
369  if ((PadRefNum == -1) || IsInhibited)
370  pad->SetValidPad(kFALSE);
371  else
372  pad->SetValidPad(kTRUE);
373 
374  Int_t rawadc[512] = {0};
375  for (int i = 0; i < 512; i++) {
376  rawadc[i] = mySamples[i];
377  }
378 
379  for (Int_t iTb = 0; iTb < fNumTbs; iTb++)
380  pad->SetRawADC(iTb, rawadc[iTb]);
381 
382  Int_t fpnCh = GetFPNChannel(*myChannelNr);
383  Double_t adc[512] = {0};
384  Int_t fpn_adc[512] = {0};
385  for (int i = 0; i < 512; i++) {
386  fpn_adc[i] = (fFPNChannels[0][PadRef.cobo][PadRef.asad][PadRef.aget][i] +
387  fFPNChannels[1][PadRef.cobo][PadRef.asad][PadRef.aget][i] +
388  fFPNChannels[2][PadRef.cobo][PadRef.asad][PadRef.aget][i] +
389  fFPNChannels[3][PadRef.cobo][PadRef.asad][PadRef.aget][i]) /
390  4;
391  }
392  Bool_t good = fPedestalPtr[0]->SubtractPedestal(fNumTbs, fpn_adc, rawadc, adc, 5,
393  fIsNegativePolarity[PadRef.cobo], 5, 20);
394  // std::cout << "Is this pad good? " << good << std::endl;
395 
396  for (Int_t iTb = 0; iTb < fNumTbs; iTb++) {
397  pad->SetADC(iTb, adc[iTb]);
398  // if(iTb ==100) std::cout << "First time sample is: " << rawadc[iTb]
399  // << "after subtraction " << adc[iTb] << std::endl;
400  }
401  pad->SetPedestalSubtracted(kTRUE);
402  fRawEventPtr->SetIsGood(good);
403  }
404  } else if (*myInternalEventNr > eventID) {
405  EventCompleted = true;
406  }
407  }
408 }
409 
410 Bool_t AtCoreSpecMAT::SetWriteFile(TString filename, Int_t coboIdx, Bool_t overwrite)
411 {
412  return fDecoderPtr[coboIdx]->SetWriteFile(filename, overwrite);
413 }
414 
416 {
417  if (fRawEventPtr == NULL) {
418  std::cout << "== [AtCore] Call this method after GetRawEvent()!" << std::endl;
419 
420  return;
421  }
422 
423  if (fIsSeparatedData) {
424  for (Int_t iCobo = 0; iCobo < fNumCobo; iCobo++) {
425  fDecoderPtr[iCobo]->GetCoboFrame(fTargetFrameID);
426  fDecoderPtr[iCobo]->WriteFrame();
427  }
428  } else
429  fDecoderPtr[0]->WriteFrame();
430 }
431 
433 {
434 
435  if (!fIsData) {
436  std::cout << cRED << "== [AtCore] Data file is not set!" << cNORMAL << std::endl;
437 
438  return NULL;
439  }
440 
441  fRawEventPtr->Clear();
442  fPadArray->Clear("C");
443 
444  if (eventID == -1)
445  fTargetFrameID++;
446  else
447  fTargetFrameID = eventID;
448 
449  std::cout << "Start processing event " << eventID + 1 << std::endl;
450  std::cout << "Getting fpn channels " << std::endl;
451  GetFPNChannelsFromROOTFILE(eventID + 1);
452  std::cout << "Getting raw data " << std::endl;
453  ProcessROOTFILE(eventID + 1);
454  std::cout << "finished getting event from root file" << std::endl;
455 
456  fRawEventPtr->SetEventID(fCurrentEventID[0]);
457 
458  /* Int_t iNumPads = 3174;
459  for (Int_t i = 0; i < iNumPads; i++) {
460  AtPad *pad = (AtPad *)fPadArray->At(i);
461  if (pad != NULL)
462  fRawEventPtr->SetPad(pad);
463  }
464  */
465  if (fRawEventPtr->GetNumPads() == 0 && fRawEventPtr->IsGood() == kFALSE)
466  return NULL;
467  else
468  return fRawEventPtr;
469 
470  return NULL;
471 }
472 
474 {
475  return fRawEventPtr->GetEventID();
476 }
477 
478 Int_t AtCoreSpecMAT::GetNumTbs(Int_t coboIdx)
479 {
480  return fDecoderPtr[coboIdx]->GetNumTbs();
481 }
482 
484 {
485  Int_t fpn = -1;
486 
487  if (chIdx < 17)
488  fpn = 11;
489  else if (chIdx < 34)
490  fpn = 22;
491  else if (chIdx < 51)
492  fpn = 45;
493  else
494  fpn = 56;
495 
496  return fpn;
497 }
498 
499 void AtCoreSpecMAT::SetPseudoTopologyFrame(Int_t asadMask, Bool_t check)
500 {
501  for (Int_t i = 0; i < fNumCobo; i++)
502  fDecoderPtr[i]->SetPseudoTopologyFrame(asadMask, check);
503 }
504 
505 void AtCoreSpecMAT::SetNumCobo(Int_t numCobo)
506 {
507  fNumCobo = numCobo;
508 }
AtCoreSpecMAT::AddData
Bool_t AddData(TString filename, Int_t coboIdx=0)
Definition: AtCoreSpecMAT.cxx:155
AtCoreSpecMAT::ProcessROOTFILE
void ProcessROOTFILE(Long64_t EventNr)
Definition: AtCoreSpecMAT.cxx:312
AtCoreSpecMAT::GetRawEvent
AtRawEvent * GetRawEvent(Long64_t eventID=-1)
Returns STRawEvent object filled with the data.
Definition: AtCoreSpecMAT.cxx:432
AtCoreSpecMAT::SetWriteFile
Bool_t SetWriteFile(TString filename, Int_t coboIdx=0, Bool_t overwrite=kFALSE)
Definition: AtCoreSpecMAT.cxx:410
AtCoreSpecMAT::SetIsPadPlaneCobo
void SetIsPadPlaneCobo(Bool_t *IsPadPlane)
Definition: AtCoreSpecMAT.cxx:227
AtRawEvent::Clear
void Clear(Option_t *opt=nullptr) override
Copy everything but the data (pads, aux pads, and MCPointMap) to this event.
Definition: AtRawEvent.cxx:39
AtPad::SetValidPad
void SetValidPad(Bool_t val=kTRUE)
Definition: AtPad.h:82
GETDecoder2::GetFrameType
EFrameType GetFrameType()
Definition: GETDecoder2.cxx:338
AtCoreSpecMAT.h
AtPad::SetPadCoord
void SetPadCoord(const XYPoint &point)
Definition: AtPad.h:87
AtCoreSpecMAT
Definition: AtCoreSpecMAT.h:29
AtPad::SetRawADC
void SetRawADC(const rawTrace &val)
Definition: AtPad.h:89
cYELLOW
constexpr auto cYELLOW
Definition: AtCoreSpecMAT.cxx:19
AtPad::SetPedestalSubtracted
void SetPedestalSubtracted(Bool_t val=kTRUE)
Definition: AtPad.h:86
GETDecoder2::GetDataName
TString GetDataName(Int_t index)
Return the filename of data at index.
Definition: GETDecoder2.cxx:323
ClassImp
ClassImp(AtCoreSpecMAT)
AtPad::SetADC
void SetADC(const trace &val)
Definition: AtPad.h:91
AtBaseEvent::SetEventID
void SetEventID(ULong_t evtid)
Definition: AtBaseEvent.h:60
AtCoreSpecMAT::GetEventID
Int_t GetEventID()
Returns the current event ID.
Definition: AtCoreSpecMAT.cxx:473
AtBaseEvent::SetIsGood
void SetIsGood(Bool_t value)
Definition: AtBaseEvent.h:61
AtRawEvent
Definition: AtRawEvent.h:34
AtCoreSpecMAT::~AtCoreSpecMAT
~AtCoreSpecMAT()
Definition: AtCoreSpecMAT.cxx:52
AtCoreSpecMAT::GetNumData
Int_t GetNumData(Int_t coboIdx=0)
Definition: AtCoreSpecMAT.cxx:200
AtCoreSpecMAT::SetNumCobo
void SetNumCobo(Int_t numCobo)
Definition: AtCoreSpecMAT.cxx:505
GETDecoder2::SetNumTbs
void SetNumTbs(Int_t value=512)
Setting the number of time buckets.
Definition: GETDecoder2.cxx:179
GETDecoder2::WriteFrame
void WriteFrame()
Write current frame.
Definition: GETDecoder2.cxx:665
GETDecoder2
Definition: GETDecoder2.h:38
AtCoreSpecMAT::SetPseudoTopologyFrame
void SetPseudoTopologyFrame(Int_t asadMask, Bool_t check=kFALSE)
Definition: AtCoreSpecMAT.cxx:499
GETDecoder2::GetNumData
Int_t GetNumData()
Return the number of data added in the list.
Definition: GETDecoder2.cxx:318
GETDecoder2::GetNumTbs
Int_t GetNumTbs()
Return the number of time buckets.
Definition: GETDecoder2.cxx:334
GETCoboFrame.h
GETDecoder2::SetData
Bool_t SetData(Int_t index)
Set the data file to the class.
Definition: GETDecoder2.cxx:210
AtCoreSpecMAT::SetData
Bool_t SetData(Int_t value)
Definition: AtCoreSpecMAT.cxx:168
AtBaseEvent::IsGood
Bool_t IsGood() const
Definition: AtBaseEvent.h:70
AtCoreSpecMAT::SetFPNPedestal
void SetFPNPedestal(Double_t sigmaThreshold=5)
Definition: AtCoreSpecMAT.cxx:220
AtPedestal
Definition: AtPedestal.h:27
cNORMAL
constexpr auto cNORMAL
Definition: AtCoreSpecMAT.cxx:20
AtCoreSpecMAT::GetFPNChannel
Int_t GetFPNChannel(Int_t chIdx)
Definition: AtCoreSpecMAT.cxx:483
AtCoreSpecMAT::WriteData
void WriteData()
Definition: AtCoreSpecMAT.cxx:415
cGREEN
constexpr auto cGREEN
Definition: AtCoreSpecMAT.cxx:21
AtCoreSpecMAT::GetFPNChannelsFromROOTFILE
void GetFPNChannelsFromROOTFILE(Long64_t EventNr)
Definition: AtCoreSpecMAT.cxx:238
AtCoreSpecMAT::GetNumTbs
Int_t GetNumTbs(Int_t coboIdx=0)
Returns the number of time buckets of the data.
Definition: AtCoreSpecMAT.cxx:478
AtRawEvent::AddPad
AtPad * AddPad(Ts &&...params)
Create a new pad in this event.
Definition: AtRawEvent.h:82
AtBaseEvent::GetEventID
ULong_t GetEventID() const
Definition: AtBaseEvent.h:67
GETLayeredFrame.h
GETDecoder2::SetWriteFile
Bool_t SetWriteFile(TString filename, Bool_t overwrite=kFALSE)
Set the file for writing frame.
Definition: GETDecoder2.cxx:627
GETDecoder2::GetCoboFrame
GETCoboFrame * GetCoboFrame(Int_t frameID=-1)
Definition: GETDecoder2.cxx:419
AtRawEvent::GetNumPads
Int_t GetNumPads() const
Definition: AtRawEvent.h:122
AtCoreSpecMAT::AtCoreSpecMAT
AtCoreSpecMAT()
Definition: AtCoreSpecMAT.cxx:25
AtPad
Container class for AtPadBase objects.
Definition: AtPad.h:38
AtCoreSpecMAT::SetNumTbs
void SetNumTbs(Int_t value)
Definition: AtCoreSpecMAT.cxx:210
cRED
constexpr auto cRED
Definition: AtCoreSpecMAT.cxx:18
AtCoreSpecMAT::GetDataName
TString GetDataName(Int_t index, Int_t coboIdx=0)
Definition: AtCoreSpecMAT.cxx:205
AtCoreSpecMAT::SetPositivePolarity
void SetPositivePolarity(Bool_t *value)
Definition: AtCoreSpecMAT.cxx:161
GETDecoder2::AddData
Bool_t AddData(TString filename)
Add the data file to the list of rawdata.
Definition: GETDecoder2.cxx:184
GETDecoder2::EFrameType
EFrameType
Frame type enumerator.
Definition: GETDecoder2.h:48
AtPedestal::SubtractPedestal
Bool_t SubtractPedestal(Int_t numTbs, Int_t *fpn, Int_t *rawADC, Double_t *dest, Double_t rmsCut=5, Bool_t signalNegativePolarity=kFALSE, Int_t startTb=3, Int_t averageTbs=10)
Definition: AtPedestal.cxx:25
AtCoreSpecMAT::Initialize
void Initialize()
Definition: AtCoreSpecMAT.cxx:62