Project
Loading...
Searching...
No Matches
InspectModel.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
17
18#ifndef O2_MCH_INSPECTMODEL_H_
19#define O2_MCH_INSPECTMODEL_H_
20
21#include <vector>
22#include <chrono>
23
24#include <gsl/gsl_blas.h>
25#include <gsl/gsl_multifit_nlin.h>
26#include <gsl/gsl_vector.h>
27
32
33// Inspect data
34typedef struct dummy_t {
35 // Data on Projected Pads
37 double* projectedPads = nullptr;
38 double* qProj = nullptr; // Projected charges
40 // Theta init
41 double* thetaInit = nullptr;
42 int kThetaInit = 0;
43 // Data about subGroups
47 std::vector<o2::mch::DataBlock_t> subClusterPadList;
48 std::vector<o2::mch::DataBlock_t> subClusterChargeList;
49 std::vector<o2::mch::DataBlock_t> subClusterThetaEMFinal;
50 std::vector<o2::mch::DataBlock_t> subClusterThetaFitList;
51 std::vector<o2::mch::DataBlock_t> subClusterThetaExtra;
52
53 // Cath groups
54 int nCathGroups = 0;
55 short* padToCathGrp = nullptr;
56
57 // Timing
58 std::chrono::time_point<std::chrono::high_resolution_clock> startTime[3];
59 double duration[4];
60
62//
63
64// PadProcessing
65typedef struct dummyPad_t {
66 // Data on Pixels
67 const static int nPixelStorage = 8;
68 std::vector<o2::mch::DataBlock_t> xyDxyQPixels[nPixelStorage];
70
71extern "C" {
74// ??? Internal void copyInGroupList( const double *values, int N, int
75// item_size, std::vector< DataBlock_t > &groupList);
76// ??? void appendInThetaList( const double *values, int N, std::vector<
77// DataBlock_t > &groupList);
78void saveThetaEMInGroupList(const double* thetaEM, int K);
79void saveThetaExtraInGroupList(const double* thetaExtra, int K);
80void saveThetaFitInGroupList(const double* thetaFit, int K);
81void collectTheta(double* theta, o2::mch::Groups_t* thetaToGroup, int K);
82void savePadsOfSubCluster(const double* xyDxy, const double* q, int n);
88//
89void saveProjectedPads(const o2::mch::Pads* pads, double* qProj);
90void collectProjectedPads(double* xyDxy, double* chA, double* chB);
91void savePadToCathGroup(const o2::mch::Groups_t* cath0Grp,
92 const o2::mch::PadIdx_t* mapCath1PadIdxToPadIdx, int nCath0,
93 const o2::mch::Groups_t* cath1Grp,
94 const o2::mch::PadIdx_t* mapCath0PadIdxToPadIdx, int nCath1);
95int collectProjGroups(o2::mch::Groups_t* projPadToGrp);
96void saveProjPadToGroups(o2::mch::Groups_t* projPadToGrp, int N);
97void collectPadToCathGroup(o2::mch::Mask_t* padToMGrp, int nPads);
98void collectPadsAndCharges(double* xyDxy, double* z, o2::mch::Groups_t* padToGroup,
99 int N);
100// Unused ??? void collectLaplacian( double *laplacian, int N);
101void collectResidual(double* residual, int N);
102int getKThetaInit();
103void collectThetaInit(double* thetai, int N);
104void collectThetaEMFinal(double* thetaEM, int K);
105void collectThetaExtra(double* thetaExtra, int K);
106void cleanPixels();
107int collectPixels(int which, int N, double* xyDxy, double* q);
108void inspectOverWriteQ(int which, const double* qPixels);
109void inspectSavePixels(int which, o2::mch::Pads& pixels);
111void setNbrProjectedPads(int n);
112// Only used for old Clusterind analysis
113// Perform a fit with fix coordinates
114int f_ChargeIntegralMag(const gsl_vector* gslParams, void* data,
115 gsl_vector* residual);
116
117void fitMathiesonMag(const double* xyDxDy, const double* q,
118 const o2::mch::Mask_t* cath, const o2::mch::Mask_t* sat, int chId,
119 double* thetaInit, int K, int N,
120 double* thetaFinal, double* khi2);
121}
122
123void InspectModelChrono(int type, bool end);
124
125#endif // O2_MCH_INSPECTMODEL_H_
Clustering and fifting parameters.
Definition of a class to reconstruct clusters with the MLEM algorithm.
void collectProjectedPads(double *xyDxy, double *chA, double *chB)
void saveThetaEMInGroupList(const double *thetaEM, int K)
void collectThetaExtra(double *thetaExtra, int K)
void inspectSavePixels(int which, o2::mch::Pads &pixels)
void InspectModelChrono(int type, bool end)
int getKThetaInit()
int getNbrProjectedPads()
int collectProjGroups(o2::mch::Groups_t *projPadToGrp)
void finalizeInspectModel()
void saveThetaExtraInGroupList(const double *thetaExtra, int K)
void savePadsOfSubCluster(const double *xyDxy, const double *q, int n)
void cleanThetaList()
int getNbrOfPadsInGroups()
void saveProjPadToGroups(o2::mch::Groups_t *projPadToGrp, int N)
void inspectOverWriteQ(int which, const double *qPixels)
void collectResidual(double *residual, int N)
void collectPadToCathGroup(o2::mch::Mask_t *padToMGrp, int nPads)
void savePadToCathGroup(const o2::mch::Groups_t *cath0Grp, const o2::mch::PadIdx_t *mapCath1PadIdxToPadIdx, int nCath0, const o2::mch::Groups_t *cath1Grp, const o2::mch::PadIdx_t *mapCath0PadIdxToPadIdx, int nCath1)
void fitMathiesonMag(const double *xyDxDy, const double *q, const o2::mch::Mask_t *cath, const o2::mch::Mask_t *sat, int chId, double *thetaInit, int K, int N, double *thetaFinal, double *khi2)
void cleanInspectModel()
void collectThetaInit(double *thetai, int N)
int getNbrOfThetaEMFinal()
void cleanPixels()
void collectThetaEMFinal(double *thetaEM, int K)
struct dummyPad_t InspectPadProcessing_t
struct dummy_t InspectModel
int collectPixels(int which, int N, double *xyDxy, double *q)
int getNbrOfThetaExtra()
void collectTheta(double *theta, o2::mch::Groups_t *thetaToGroup, int K)
int f_ChargeIntegralMag(const gsl_vector *gslParams, void *data, gsl_vector *residual)
void setNbrProjectedPads(int n)
void collectPadsAndCharges(double *xyDxy, double *z, o2::mch::Groups_t *padToGroup, int N)
???
void saveProjectedPads(const o2::mch::Pads *pads, double *qProj)
void saveThetaFitInGroupList(const double *thetaFit, int K)
int getNbrOfProjPads()
GLdouble n
Definition glcorearb.h:1982
GLuint GLuint end
Definition glcorearb.h:469
GLint GLint GLsizei GLint GLenum GLenum type
Definition glcorearb.h:275
GLboolean * data
Definition glcorearb.h:298
GLint GLint GLsizei GLint GLenum GLenum const void * pixels
Definition glcorearb.h:275
GLdouble GLdouble GLdouble z
Definition glcorearb.h:843
std::vector< o2::mch::DataBlock_t > xyDxyQPixels[nPixelStorage]
static const int nPixelStorage
double * projectedPads
std::vector< o2::mch::DataBlock_t > subClusterPadList
std::vector< o2::mch::DataBlock_t > subClusterChargeList
double * thetaInit
o2::mch::Groups_t * projGroups
std::vector< o2::mch::DataBlock_t > subClusterThetaEMFinal
int totalNbrOfSubClusterThetaEMFinal
double duration[4]
short * padToCathGrp
double * qProj
int kThetaInit
std::vector< o2::mch::DataBlock_t > subClusterThetaExtra
int totalNbrOfSubClusterPads
std::chrono::time_point< std::chrono::high_resolution_clock > startTime[3]
int totalNbrOfSubClusterThetaExtra
int nCathGroups
int nbrOfProjPads
std::vector< o2::mch::DataBlock_t > subClusterThetaFitList