Project
Loading...
Searching...
No Matches
ChamberResponse.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
16
17#ifndef O2_MID_CHAMBERRESPONSE_H
18#define O2_MID_CHAMBERRESPONSE_H
19
20#include <unordered_map>
21
26
27namespace o2
28{
29namespace mid
30{
32{
33 public:
39 virtual ~ChamberResponse() = default;
40
48 inline bool isFired(double prob, double distance, int cathode, int deId, double theta = 0.) const
49 {
50 return (prob < getFiredProbability(distance, cathode, deId, theta));
51 }
52
59 double getFiredProbability(double distance, int cathode, int deId, double theta = 0.) const;
60
65 double firedProbabilityFunction(double* var, double* par);
66
69 ChamberResponseParams getResponseParams() const { return mParams; }
70
73 inline void setHV(const std::unordered_map<o2::dcs::DataPointIdentifier, std::vector<o2::dcs::DataPointValue>>& dpMap) { mHV.setHV(dpMap); }
74
75 private:
76 ChamberResponseParams mParams;
77 ChamberHV mHV;
78};
79
80ChamberResponse createDefaultChamberResponse();
81
82} // namespace mid
83} // namespace o2
84
85#endif /* O2_MID_CHAMBERRESPONSE_H */
HV values for MID RPCs.
Parameters for MID RPC response.
void setHV(int deId, double hv)
Sets the HV for detection element.
Definition ChamberHV.h:42
virtual ~ChamberResponse()=default
Default destructor.
double getFiredProbability(double distance, int cathode, int deId, double theta=0.) const
Returns the fired probability.
void setHV(const std::unordered_map< o2::dcs::DataPointIdentifier, std::vector< o2::dcs::DataPointValue > > &dpMap)
Sets the HV from the DCS data points.
double firedProbabilityFunction(double *var, double *par)
Fired probability distribution.
bool isFired(double prob, double distance, int cathode, int deId, double theta=0.) const
Checks if the strip at a certain distance from the impact point is fired given a probability prob.
ChamberResponseParams getResponseParams() const
Gets the response parameters.
GLsizei GLsizei GLfloat distance
Definition glcorearb.h:5506
GLenum const GLfloat * params
Definition glcorearb.h:272
ChamberResponse createDefaultChamberResponse()
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...