Project
Loading...
Searching...
No Matches
genEvents.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 GENEVENTS_H
16#define GENEVENTS_H
17
18#include "GPUCommonDef.h"
19
20namespace o2::gpu
21{
22class GPUChainTracking;
23struct GPUParam;
25#if !defined(GPUCA_BUILD_QA) || defined(_WIN32)
27{
28 public:
31 int32_t GenerateEvent(const GPUParam& sectorParam, char* filename) { return 1; }
33
35};
36
37#else
38
39class genEvents
40{
41 public:
42 genEvents(GPUChainTracking* rec) : mRec(rec) {}
43 void InitEventGenerator();
44 int32_t GenerateEvent(const GPUParam& sectorParam, char* filename);
46
47 static void RunEventGenerator(GPUChainTracking* rec);
48
49 private:
50 int32_t GetSector(double GlobalPhi);
51 int32_t GetDSector(double LocalPhi);
52 double GetSectorAngle(int32_t iSector);
53 int32_t RecalculateSector(GPUTPCGMPhysicalTrackModel& t, int32_t& iSector);
54 double GetGaus(double sigma);
55
56 TH1F* mClusterError[3][2] = {{nullptr, nullptr}, {nullptr, nullptr}, {nullptr, nullptr}};
57
58 struct GenCluster {
59 int32_t sector;
60 int32_t row;
61 int32_t mcID;
62 float x;
63 float y;
64 float z;
65 uint32_t id;
66 };
67
68 const double mTwoPi = 2 * M_PI;
69 const double mSectorDAngle = mTwoPi / 18.;
70 const double mSectorAngleOffset = mSectorDAngle / 2;
71
72 GPUChainTracking* mRec;
73};
74
75#endif
76} // namespace o2::gpu
77
78#endif
genEvents(GPUChainTracking *rec)
Definition genEvents.h:29
static void RunEventGenerator(GPUChainTracking *rec)
Definition genEvents.h:34
void InitEventGenerator()
Definition genEvents.h:30
int32_t GenerateEvent(const GPUParam &sectorParam, char *filename)
Definition genEvents.h:31
void FinishEventGenerator()
Definition genEvents.h:32
GLint GLenum GLint x
Definition glcorearb.h:403
GLint y
Definition glcorearb.h:270
GLuint id
Definition glcorearb.h:650
GLdouble GLdouble GLdouble z
Definition glcorearb.h:843
std::string filename()
GPUReconstruction * rec
std::vector< int > row