Project
Loading...
Searching...
No Matches
AlpideSignalTrapezoid.h
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
14
15#ifndef ALICEO2_ITSMFT_ALPIDESIGNALTRAPEZOID_H
16#define ALICEO2_ITSMFT_ALPIDESIGNALTRAPEZOID_H
17
18#include <Rtypes.h>
19
20namespace o2
21{
22namespace itsmft
23{
24
26{
27 public:
28 AlpideSignalTrapezoid(float duration = 7500., float rise = 1100., float qrise0 = 450.);
32
33 float getCollectedCharge(float totalNEle, float tMin, float tMax) const;
34
35 float getDuration() const { return mDuration; }
36 float getMaxRiseTime() const { return mMaxRiseTime; }
37 float getChargeRise0() const { return mChargeRise0; }
38 float getExtraDuration(float riseTime) const { return riseTime * 0.5; }
39
40 // This method queried by digitizer to decided in home many ROFrames the hit can contribute
41 // In case we describe extra duration at small charges, it should be accounted here
42 float getMaxDuration() const { return getDuration(); }
43
44 void setParameters(float dur, float rise, float qrise0)
45 {
46 init(dur, rise, qrise0);
47 }
48 void setDuration(float d) { init(d, mMaxRiseTime, mChargeRise0); }
49 void setMaxRiseTime(float r) { init(mDuration, r, mChargeRise0); }
50 void setChargeRise0(float q) { init(mDuration, mMaxRiseTime, q); }
51
52 void print() const;
53
54 private:
55 void init(float dur, float rise, float qrise0);
56
57 float mDuration = 7500.f;
58 float mMaxRiseTime = 1100.f;
59 float mChargeRise0 = 450.f;
60 float mChargeRise0Inv = 1. / 450.f;
61
62 ClassDefNV(AlpideSignalTrapezoid, 1);
63};
64
65inline float AlpideSignalTrapezoid::getCollectedCharge(float totalNEle, float tMin, float tMax) const
66{
67 // calculate max number of electrons seen by the strobe from tMin to tMax (in nanosec),
68 // provided that the total injected charge was totalNEle electrons
69
70 // estimate rise time for given charge
71 float riseTime = totalNEle > mChargeRise0 ? 0. : mMaxRiseTime * (1.f - totalNEle * mChargeRise0Inv);
72
73 if (tMax >= riseTime && tMin <= mDuration) { // strobe overlaps flat top
74 return totalNEle;
75 }
76 if (tMax > 0. && tMin < riseTime) { // strobe overlaps with rise
77 return totalNEle * tMax / riseTime;
78 }
79 return 0;
80}
81} // namespace itsmft
82} // namespace o2
83
84#endif
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 Directory with events to Events directory is and not inside events d
void setParameters(float dur, float rise, float qrise0)
float getExtraDuration(float riseTime) const
AlpideSignalTrapezoid & operator=(const AlpideSignalTrapezoid &)=default
AlpideSignalTrapezoid(const AlpideSignalTrapezoid &)=default
float getCollectedCharge(float totalNEle, float tMin, float tMax) const
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...