Project
Loading...
Searching...
No Matches
ChipDigitsContainer.cxx
Go to the documentation of this file.
1// Copyright 2019-2020 CERN and copyright holders of ALICE O2.
2// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
3// All rights not expressly granted are reserved.
4//
5// This software is distributed under the terms of the GNU General Public
6// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
7//
8// In applying this license CERN does not waive the privileges and immunities
9// granted to it by virtue of its status as an Intergovernmental Organization
10// or submit itself to any jurisdiction.
11
12//
13// ChipDigitsContainer.cpp
14// ALICEO2
15//
16
19#include <TRandom.h>
20
21using namespace o2::itsmft;
23
25
26//______________________________________________________________________
27void ChipDigitsContainer::addNoise(UInt_t rofMin, UInt_t rofMax, const o2::itsmft::DigiParams* params, int maxRows, int maxCols)
28{
29 UInt_t row = 0;
30 UInt_t col = 0;
31 Int_t nhits = 0;
32 constexpr float ns2sec = 1e-9;
33
34 float mean = params->getNoisePerPixel() * Segmentation::NPixels;
35 int nel = params->getChargeThreshold() * 1.1; // RS: TODO: need realistic spectrum of noise above the threshold
36
37 for (UInt_t rof = rofMin; rof <= rofMax; rof++) {
38 nhits = gRandom->Poisson(mean);
39 for (Int_t i = 0; i < nhits; ++i) {
40 row = gRandom->Integer(maxRows);
41 col = gRandom->Integer(maxCols);
43 continue;
44 }
46 continue;
47 }
48 // RS TODO: why the noise was added with 0 charge? It should be above the threshold!
49 auto key = getOrderingKey(rof, row, col);
50 if (!findDigit(key)) {
51 addDigit(key, rof, row, col, nel, o2::MCCompLabel(true));
52 }
53 }
54 }
55}
Simulation parameters for the ALIPIDE chip.
int32_t i
Timeframe settings Average distance in cm of events merged into Randomize distance around average distance of merged events Simulate correct bunch interactions instead of placing only the average number of events A value[n] sets TFlen for[n] collisions in Number of bunches per trainsort Number of bunch trains Instantaneous interaction rate Do not simulate border Total number of collisions to be placed in the interior of all time Do not select random but walk over array of events in stride steps h Event generator settings h configStandalone Use CPU for GPU Force usage of the specified GPU device no CPU fallback Continue processing after an error First event to Number of events to Number of iterations to Number of iterations to Number of initial iterations excluded from const char e
transient container for single chip digits accumulation
ClassImp(o2::itsmft::ChipDigitsContainer)
StringRef key
Container for similated points connected to a given chip.
void addDigit(ULong64_t key, UInt_t roframe, UShort_t row, UShort_t col, int charge, o2::MCCompLabel lbl)
const o2::itsmft::NoiseMap * mNoiseMap
o2::itsmft::PreDigit * findDigit(ULong64_t key)
void addNoise(UInt_t rofMin, UInt_t rofMax, const o2::itsmft::DigiParams *params, int maxRows=o2::itsmft::SegmentationAlpide::NRows, int maxCols=o2::itsmft::SegmentationAlpide::NCols)
static ULong64_t getOrderingKey(UInt_t roframe, UShort_t row, UShort_t col)
Get global ordering key made of readout frame, column and row.
const o2::itsmft::NoiseMap * mDeadChanMap
bool isNoisy(int chip, int row, int col) const
Definition NoiseMap.h:151
GLenum const GLfloat * params
Definition glcorearb.h:272
const int float col
std::vector< int > row