Public Member Functions | Protected Attributes | List of all members
flat::FlatPixelMap Class Reference

Flat encoding of SRPixelMap. More...

#include "/cvmfs/nova-development.opensciencegrid.org/novasoft/releases/N20-11-28/FlatMaker/FlatPixelMap.h"

Public Member Functions

 FlatPixelMap (const std::string &prefix, TTree *tr, const IBranchPolicy *policy)
 
 ~FlatPixelMap ()
 
void Fill (const caf::SRPixelMap &sr)
 

Protected Attributes

unsigned int nplanes
 
unsigned int ncells
 
unsigned int nchan
 
unsigned int firstplane
 
unsigned int lastplane
 
unsigned int firstcellx
 
unsigned int lastcellx
 
unsigned int firstcelly
 
unsigned int lastcelly
 
float hitfracx
 
float hitfracy
 
TTree * cvnmap_tree
 
unsigned char cvnmap
 
long cvnmap_idx
 
int cvnmap_length
 

Detailed Description

Flat encoding of SRPixelMap.

Definition at line 20 of file FlatPixelMap.h.

Constructor & Destructor Documentation

flat::FlatPixelMap::FlatPixelMap ( const std::string prefix,
TTree *  tr,
const IBranchPolicy policy 
)

Definition at line 4605 of file FlatRecord.cxx.

References compare_h5_caf::branch, cvnmap, cvnmap_idx, cvnmap_length, cvnmap_tree, firstcellx, firstcelly, firstplane, hitfracx, hitfracy, lastcellx, lastcelly, lastplane, ncells, nchan, and nplanes.

4606  : cvnmap_tree(make_tree(prefix+"cvnmap", "cvnmap", tr)),
4607  cvnmap(0),
4609 {
4610  branch(tr, prefix+"nplanes", &nplanes, policy);
4611  branch(tr, prefix+"ncells", &ncells, policy);
4612  branch(tr, prefix+"nchan", &nchan, policy);
4613  branch(tr, prefix+"firstplane", &firstplane, policy);
4614  branch(tr, prefix+"lastplane", &lastplane, policy);
4615  branch(tr, prefix+"firstcellx", &firstcellx, policy);
4616  branch(tr, prefix+"lastcellx", &lastcellx, policy);
4617  branch(tr, prefix+"firstcelly", &firstcelly, policy);
4618  branch(tr, prefix+"lastcelly", &lastcelly, policy);
4619  branch(tr, prefix+"hitfracx", &hitfracx, policy);
4620  branch(tr, prefix+"hitfracy", &hitfracy, policy);
4621  branch(cvnmap_tree, prefix+"cvnmap", &cvnmap, policy);
4622  if(cvnmap_tree->GetNbranches() > 0){
4623  branch(tr, prefix+"cvnmap_idx", &cvnmap_idx, 0);
4624  branch(tr, prefix+"cvnmap_length", &cvnmap_length, 0);
4625  }
4626 }
unsigned int ncells
Definition: FlatPixelMap.h:30
unsigned int lastplane
Definition: FlatPixelMap.h:33
unsigned int nplanes
Definition: FlatPixelMap.h:29
unsigned int lastcelly
Definition: FlatPixelMap.h:37
const XML_Char * prefix
Definition: expat.h:380
unsigned int nchan
Definition: FlatPixelMap.h:31
unsigned char cvnmap
Definition: FlatPixelMap.h:42
unsigned int firstcelly
Definition: FlatPixelMap.h:36
unsigned int firstplane
Definition: FlatPixelMap.h:32
unsigned int firstcellx
Definition: FlatPixelMap.h:34
unsigned char cvnmap[16000]
store 1D array the size of the pixel map, currently 80 cells x 100 planes x 2 views. Although sparse, store this way for easier conversion and compression in hdf5. First element is channel 0, plane 0, cell 0, then channel 0, plane 0, cell 1, etc. Channel 0 is x view, 1 is y view
Definition: SRPixelMap.h:33
unsigned int lastcellx
Definition: FlatPixelMap.h:35
flat::FlatPixelMap::~FlatPixelMap ( )

Definition at line 4628 of file FlatRecord.cxx.

References cvnmap_tree.

4629 {
4630  if(cvnmap_tree->GetNbranches() > 0) cvnmap_tree->Write();
4631  delete cvnmap_tree;
4632 }

Member Function Documentation

void flat::FlatPixelMap::Fill ( const caf::SRPixelMap sr)

Definition at line 4634 of file FlatRecord.cxx.

References caf::SRPixelMap::cvnmap, cvnmap, cvnmap_idx, cvnmap_length, cvnmap_tree, caf::SRPixelMap::firstcellx, firstcellx, caf::SRPixelMap::firstcelly, firstcelly, caf::SRPixelMap::firstplane, firstplane, caf::SRPixelMap::hitfracx, hitfracx, caf::SRPixelMap::hitfracy, hitfracy, caf::SRPixelMap::lastcellx, lastcellx, caf::SRPixelMap::lastcelly, lastcelly, caf::SRPixelMap::lastplane, lastplane, caf::SRPixelMap::ncells, ncells, caf::SRPixelMap::nchan, nchan, caf::SRPixelMap::nplanes, nplanes, and submit_syst::x.

Referenced by flat::FlatProng::Fill(), and flat::FlatFuzzyKProng::Fill().

4635 {
4636  nplanes = sr.nplanes;
4637  ncells = sr.ncells;
4638  nchan = sr.nchan;
4639  firstplane = sr.firstplane;
4640  lastplane = sr.lastplane;
4641  firstcellx = sr.firstcellx;
4642  lastcellx = sr.lastcellx;
4643  firstcelly = sr.firstcelly;
4644  lastcelly = sr.lastcelly;
4645  hitfracx = sr.hitfracx;
4646  hitfracy = sr.hitfracy;
4647 
4648  cvnmap_idx += cvnmap_length; // increment taken by previous record
4649  for(const auto& x: sr.cvnmap){
4650  cvnmap = x;
4651  cvnmap_tree->Fill();
4652  }
4653 }
unsigned int firstcellx
global position of first x cell in map
Definition: SRPixelMap.h:26
unsigned int lastcelly
global position of last y cell in map
Definition: SRPixelMap.h:29
float hitfracy
fraction of y hits in slice in y view pixel map
Definition: SRPixelMap.h:31
unsigned int ncells
number of cells in pixel map
Definition: SRPixelMap.h:22
unsigned int ncells
Definition: FlatPixelMap.h:30
unsigned int lastplane
Definition: FlatPixelMap.h:33
unsigned int nplanes
number of planes in pixel map
Definition: SRPixelMap.h:18
unsigned int firstplane
global position of first plane in map
Definition: SRPixelMap.h:24
unsigned int nplanes
Definition: FlatPixelMap.h:29
unsigned int lastcelly
Definition: FlatPixelMap.h:37
unsigned int lastcellx
global position of last x cell in map
Definition: SRPixelMap.h:27
unsigned int nchan
number of channels in pixel map
Definition: SRPixelMap.h:23
float hitfracx
faction of x hits in slice in x view pixel map
Definition: SRPixelMap.h:30
unsigned int nchan
Definition: FlatPixelMap.h:31
unsigned char cvnmap
Definition: FlatPixelMap.h:42
unsigned int firstcelly
Definition: FlatPixelMap.h:36
unsigned int lastplane
global position of last plane in map
Definition: SRPixelMap.h:25
unsigned int firstplane
Definition: FlatPixelMap.h:32
unsigned int firstcelly
global position of first y cell in map
Definition: SRPixelMap.h:28
unsigned int firstcellx
Definition: FlatPixelMap.h:34
unsigned char cvnmap[16000]
store 1D array the size of the pixel map, currently 80 cells x 100 planes x 2 views. Although sparse, store this way for easier conversion and compression in hdf5. First element is channel 0, plane 0, cell 0, then channel 0, plane 0, cell 1, etc. Channel 0 is x view, 1 is y view
Definition: SRPixelMap.h:33
unsigned int lastcellx
Definition: FlatPixelMap.h:35

Member Data Documentation

unsigned char flat::FlatPixelMap::cvnmap
protected

Definition at line 42 of file FlatPixelMap.h.

Referenced by Fill(), and FlatPixelMap().

long flat::FlatPixelMap::cvnmap_idx
protected

Definition at line 43 of file FlatPixelMap.h.

Referenced by Fill(), and FlatPixelMap().

int flat::FlatPixelMap::cvnmap_length
protected

Definition at line 44 of file FlatPixelMap.h.

Referenced by Fill(), and FlatPixelMap().

TTree* flat::FlatPixelMap::cvnmap_tree
protected

Definition at line 41 of file FlatPixelMap.h.

Referenced by Fill(), FlatPixelMap(), and ~FlatPixelMap().

unsigned int flat::FlatPixelMap::firstcellx
protected

Definition at line 34 of file FlatPixelMap.h.

Referenced by Fill(), and FlatPixelMap().

unsigned int flat::FlatPixelMap::firstcelly
protected

Definition at line 36 of file FlatPixelMap.h.

Referenced by Fill(), and FlatPixelMap().

unsigned int flat::FlatPixelMap::firstplane
protected

Definition at line 32 of file FlatPixelMap.h.

Referenced by Fill(), and FlatPixelMap().

float flat::FlatPixelMap::hitfracx
protected

Definition at line 38 of file FlatPixelMap.h.

Referenced by Fill(), and FlatPixelMap().

float flat::FlatPixelMap::hitfracy
protected

Definition at line 39 of file FlatPixelMap.h.

Referenced by Fill(), and FlatPixelMap().

unsigned int flat::FlatPixelMap::lastcellx
protected

Definition at line 35 of file FlatPixelMap.h.

Referenced by Fill(), and FlatPixelMap().

unsigned int flat::FlatPixelMap::lastcelly
protected

Definition at line 37 of file FlatPixelMap.h.

Referenced by Fill(), and FlatPixelMap().

unsigned int flat::FlatPixelMap::lastplane
protected

Definition at line 33 of file FlatPixelMap.h.

Referenced by Fill(), and FlatPixelMap().

unsigned int flat::FlatPixelMap::ncells
protected

Definition at line 30 of file FlatPixelMap.h.

Referenced by Fill(), and FlatPixelMap().

unsigned int flat::FlatPixelMap::nchan
protected

Definition at line 31 of file FlatPixelMap.h.

Referenced by Fill(), and FlatPixelMap().

unsigned int flat::FlatPixelMap::nplanes
protected

Definition at line 29 of file FlatPixelMap.h.

Referenced by Fill(), and FlatPixelMap().


The documentation for this class was generated from the following files: