47 std::vector<o2::mch::DataBlock_t>& groupList)
49 double*
ptr =
new double[N * item_size];
51 o2::mch::vectorCopy(
values, N * item_size,
ptr);
52 groupList.push_back(std::make_pair(N,
ptr));
102 o2::mch::vectorSetShort(&thetaToGroup[sumK],
h + 1, k);
106 printf(
"collect theta grp=%d, grpSize=%d, adress=%p\n",
h, k,
112 printf(
"Bad allocation for collectTheta sumK=%d greater than K=%d\n", sumK,
114 throw std::overflow_error(
"Bad Allocation");
121 int element_size = 4;
159 if (inspectModel.
qProj !=
nullptr) {
160 delete[] inspectModel.
qProj;
161 inspectModel.
qProj =
nullptr;
183 for (
int i = 0;
i < 4;
i++) {
228 o2::mch::vectorCopy(pads->
getX(), nbrOfProjPads,
230 o2::mch::vectorCopy(pads->
getY(), nbrOfProjPads,
232 o2::mch::vectorCopy(pads->
getDX(), nbrOfProjPads,
234 o2::mch::vectorCopy(pads->
getDY(), nbrOfProjPads,
236 inspectModel.
qProj = qProj;
243 for (
int i = 0;
i < 4;
i++) {
244 for (
int k = 0; k < nbrOfProjPads; k++) {
245 xyDxy[
i * nbrOfProjPads + k] =
249 for (
int k = 0; k < nbrOfProjPads; k++) {
250 chA[k] = inspectModel.
qProj[k];
252 for (
int k = 0; k < nbrOfProjPads; k++) {
253 chB[k] = inspectModel.
qProj[k];
262 o2::mch::vectorCopyShort(projPadToGrp, N, inspectModel.
projGroups);
268 o2::mch::vectorCopyShort(inspectModel.
projGroups, N, projPadToGrp);
269 return o2::mch::vectorMaxShort(projPadToGrp, N);
279 if (cath0Grp !=
nullptr) {
280 for (
int p = 0; p < nCath0; p++) {
281 inspectModel.
padToCathGrp[mapCath0PadIdxToPadIdx[p]] = cath0Grp[p];
284 if (cath1Grp !=
nullptr) {
285 for (
int p = 0; p < nCath1; p++) {
288 inspectModel.
padToCathGrp[mapCath1PadIdxToPadIdx[p]] = cath1Grp[p];
296 printf(
"collectPadToCathGroup nPads=%d\n", nPads);
298 o2::mch::vectorCopyShort(inspectModel.
padToCathGrp, nPads, padToMGrp);
313 o2::mch::vectorSetShort(&padToGroup[sumN],
h + 1,
n);
320 printf(
"Bad allocation for collectTheta sumN=%d greater than N=%d\n", sumN,
322 throw std::overflow_error(
"Bad Allocation");
346 o2::mch::vectorCopy(inspectModel.
thetaInit, 5 * N, thetai);
373 &thetaEM[sumK], K, k);
378 printf(
"Bad allocation for collectThetaEMFinal sumN=%d greater than N=%d\n",
380 throw std::overflow_error(
"Bad Allocation");
392 &thetaExtra[sumK], K, k);
397 printf(
"Bad allocation for collectThetaEMFinal sumN=%d greater than N=%d\n",
399 throw std::overflow_error(
"Bad Allocation");
419 for (
int g = 0;
g < G;
g++) {
437 const double* xyDxySrc;
441 for (
int g = 0;
g < G;
g++) {
450 for (
int g = 0;
g < G;
g++) {
453 qSrc = &xyDxySrc[4 *
n];
454 o2::mch::vectorCopy(&xyDxySrc[0 *
n],
n, &xyDxy[0 * N + shift]);
455 o2::mch::vectorCopy(&xyDxySrc[1 *
n],
n, &xyDxy[1 * N + shift]);
456 o2::mch::vectorCopy(&xyDxySrc[2 *
n],
n, &xyDxy[2 * N + shift]);
457 o2::mch::vectorCopy(&xyDxySrc[3 *
n],
n, &xyDxy[3 * N + shift]);
458 o2::mch::vectorCopy(qSrc,
n, &q[shift]);
469 int N = inspectPadProcess.
xyDxyQPixels[which][G - 1].first;
471 double* xyDxyQ = inspectPadProcess.
xyDxyQPixels[which][G - 1].second;
472 double* q = &xyDxyQ[4 * N];
473 o2::mch::vectorCopy(qPixels, N, q);
480 int N =
pixels.getNbrOfPads();
481 double* xyDxyQ =
new double[5 * N];
482 double* xyDxy = xyDxyQ;
483 double* q = &xyDxyQ[4 * N];
484 o2::mch::vectorCopy(
pixels.getX(), N, xyDxy);
485 o2::mch::vectorCopy(
pixels.getY(), N, &xyDxy[N]);
486 o2::mch::vectorCopy(
pixels.getDX(), N, &xyDxy[2 * N]);
487 o2::mch::vectorCopy(
pixels.getDY(), N, &xyDxy[3 * N]);
488 o2::mch::vectorCopy(
pixels.getCharges(), N, q);
511 inspectModel.
startTime[
type] = std::chrono::high_resolution_clock::now();
513 std::chrono::time_point<std::chrono::high_resolution_clock> tEnd;
514 tEnd = std::chrono::high_resolution_clock::now();
515 std::chrono::duration<double> duration_ = tEnd - inspectModel.
startTime[
type];
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)
void copyInGroupList(const double *values, int N, int item_size, std::vector< o2::mch::DataBlock_t > &groupList)
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)
int getNbrOfPadsInGroups()
void saveProjPadToGroups(o2::mch::Groups_t *projPadToGrp, int N)
void inspectOverWriteQ(int which, const double *qPixels)
void collectPadToCathGroup(o2::mch::Mask_t *padToMGrp, int nPads)
void savePadToCathGroup(const o2::mch::Groups_t *cath0Grp, const o2::mch::PadIdx_t *mapCath0PadIdxToPadIdx, int nCath0, const o2::mch::Groups_t *cath1Grp, const o2::mch::PadIdx_t *mapCath1PadIdxToPadIdx, int nCath1)
void collectThetaInit(double *thetai, int N)
int getNbrOfThetaEMFinal()
void collectThetaEMFinal(double *thetaEM, int K)
int collectPixels(int which, int N, double *xyDxy, double *q)
void collectTheta(double *theta, o2::mch::Groups_t *thetaToGroup, int K)
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)
Class for time synchronization of RawReader instances.
const double * getX() const
static int getNbrOfPads(const Pads *pads)
const double * getDY() const
const double * getY() const
const double * getDX() const
GLint GLint GLsizei GLint GLenum GLenum type
GLenum GLsizei GLsizei GLint * values
GLint GLint GLsizei GLint GLenum GLenum const void * pixels
GLdouble GLdouble GLdouble z
std::pair< int, double * > DataBlock_t
void printTheta(const char *str, double meanCharge, const double *theta, int K)
void copyTheta(const double *theta0, int K0, double *theta, int K1, int K)
void vectorPrint(const char *str, const double *x, int K)
void copyXYdXY(const double *xyDxy0, int N0, double *xyDxy, int N1, int N)
ClusterConfig clusterConfig
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
std::vector< o2::mch::DataBlock_t > xyDxyQPixels[nPixelStorage]
static const int nPixelStorage
std::vector< o2::mch::DataBlock_t > subClusterPadList
std::vector< o2::mch::DataBlock_t > subClusterChargeList
o2::mch::Groups_t * projGroups
std::vector< o2::mch::DataBlock_t > subClusterThetaEMFinal
int totalNbrOfSubClusterThetaEMFinal
std::vector< o2::mch::DataBlock_t > subClusterThetaExtra
int totalNbrOfSubClusterPads
std::chrono::time_point< std::chrono::high_resolution_clock > startTime[3]
int totalNbrOfSubClusterThetaExtra
std::vector< o2::mch::DataBlock_t > subClusterThetaFitList
@ info
Describes main steps and high level behaviors.