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

Flat encoding of SRPixelObjMap. More...

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

Public Member Functions

 FlatPixelObjMap (const std::string &prefix, TTree *tr, const IBranchPolicy *policy)
 
 ~FlatPixelObjMap ()
 
void Fill (const caf::SRPixelObjMap &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
 
TTree * cvnlabmap_tree
 
unsigned char cvnlabmap
 
long cvnlabmap_idx
 
int cvnlabmap_length
 
TTree * cvnobjmap_tree
 
unsigned char cvnobjmap
 
long cvnobjmap_idx
 
int cvnobjmap_length
 

Detailed Description

Flat encoding of SRPixelObjMap.

Definition at line 20 of file FlatPixelObjMap.h.

Constructor & Destructor Documentation

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

Definition at line 180 of file FlatRecord.cxx.

References compare_h5_caf::branch, cvnlabmap, cvnlabmap_idx, cvnlabmap_length, cvnlabmap_tree, cvnmap, cvnmap_idx, cvnmap_length, cvnmap_tree, cvnobjmap, cvnobjmap_idx, cvnobjmap_length, cvnobjmap_tree, firstcellx, firstcelly, firstplane, hitfracx, hitfracy, lastcellx, lastcelly, lastplane, ncells, nchan, and nplanes.

181  : cvnmap_tree(make_tree(prefix+"cvnmap", "cvnmap", tr)),
182  cvnmap(0),
184  cvnlabmap_tree(make_tree(prefix+"cvnlabmap", "cvnlabmap", tr)),
185  cvnlabmap(0),
187  cvnobjmap_tree(make_tree(prefix+"cvnobjmap", "cvnobjmap", tr)),
188  cvnobjmap(0),
190 {
191  branch(tr, prefix+"nplanes", &nplanes, policy);
192  branch(tr, prefix+"ncells", &ncells, policy);
193  branch(tr, prefix+"nchan", &nchan, policy);
194  branch(tr, prefix+"firstplane", &firstplane, policy);
195  branch(tr, prefix+"lastplane", &lastplane, policy);
196  branch(tr, prefix+"firstcellx", &firstcellx, policy);
197  branch(tr, prefix+"lastcellx", &lastcellx, policy);
198  branch(tr, prefix+"firstcelly", &firstcelly, policy);
199  branch(tr, prefix+"lastcelly", &lastcelly, policy);
200  branch(tr, prefix+"hitfracx", &hitfracx, policy);
201  branch(tr, prefix+"hitfracy", &hitfracy, policy);
202  branch(cvnmap_tree, prefix+"cvnmap", &cvnmap, policy);
203  if(cvnmap_tree->GetNbranches() > 0){
204  branch(tr, prefix+"cvnmap_idx", &cvnmap_idx, 0);
205  branch(tr, prefix+"cvnmap_length", &cvnmap_length, 0);
206  }
207  branch(cvnlabmap_tree, prefix+"cvnlabmap", &cvnlabmap, policy);
208  if(cvnlabmap_tree->GetNbranches() > 0){
209  branch(tr, prefix+"cvnlabmap_idx", &cvnlabmap_idx, 0);
210  branch(tr, prefix+"cvnlabmap_length", &cvnlabmap_length, 0);
211  }
212  branch(cvnobjmap_tree, prefix+"cvnobjmap", &cvnobjmap, policy);
213  if(cvnobjmap_tree->GetNbranches() > 0){
214  branch(tr, prefix+"cvnobjmap_idx", &cvnobjmap_idx, 0);
215  branch(tr, prefix+"cvnobjmap_length", &cvnobjmap_length, 0);
216  }
217 }
unsigned char cvnlabmap[16000]
store 1D array with hit labels
Definition: SRPixelObjMap.h:33
unsigned char cvnobjmap[16000]
store 1D array with hit object id
Definition: SRPixelObjMap.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: SRPixelObjMap.h:32
const XML_Char * prefix
Definition: expat.h:380
unsigned char cvnobjmap
unsigned char cvnlabmap
flat::FlatPixelObjMap::~FlatPixelObjMap ( )

Definition at line 219 of file FlatRecord.cxx.

References cvnlabmap_tree, cvnmap_tree, and cvnobjmap_tree.

220 {
221  if(cvnmap_tree->GetNbranches() > 0) cvnmap_tree->Write();
222  delete cvnmap_tree;
223  if(cvnlabmap_tree->GetNbranches() > 0) cvnlabmap_tree->Write();
224  delete cvnlabmap_tree;
225  if(cvnobjmap_tree->GetNbranches() > 0) cvnobjmap_tree->Write();
226  delete cvnobjmap_tree;
227 }

Member Function Documentation

void flat::FlatPixelObjMap::Fill ( const caf::SRPixelObjMap sr)

Definition at line 229 of file FlatRecord.cxx.

References caf::SRPixelObjMap::cvnlabmap, cvnlabmap, cvnlabmap_idx, cvnlabmap_length, cvnlabmap_tree, caf::SRPixelObjMap::cvnmap, cvnmap, cvnmap_idx, cvnmap_length, cvnmap_tree, caf::SRPixelObjMap::cvnobjmap, cvnobjmap, cvnobjmap_idx, cvnobjmap_length, cvnobjmap_tree, caf::SRPixelObjMap::firstcellx, firstcellx, caf::SRPixelObjMap::firstcelly, firstcelly, caf::SRPixelObjMap::firstplane, firstplane, caf::SRPixelObjMap::hitfracx, hitfracx, caf::SRPixelObjMap::hitfracy, hitfracy, caf::SRPixelObjMap::lastcellx, lastcellx, caf::SRPixelObjMap::lastcelly, lastcelly, caf::SRPixelObjMap::lastplane, lastplane, caf::SRPixelObjMap::ncells, ncells, caf::SRPixelObjMap::nchan, nchan, caf::SRPixelObjMap::nplanes, nplanes, and submit_syst::x.

Referenced by flat::FlatTrainingBranch::Fill().

230 {
231  nplanes = sr.nplanes;
232  ncells = sr.ncells;
233  nchan = sr.nchan;
234  firstplane = sr.firstplane;
235  lastplane = sr.lastplane;
236  firstcellx = sr.firstcellx;
237  lastcellx = sr.lastcellx;
238  firstcelly = sr.firstcelly;
239  lastcelly = sr.lastcelly;
240  hitfracx = sr.hitfracx;
241  hitfracy = sr.hitfracy;
242 
243  cvnmap_idx += cvnmap_length; // increment taken by previous record
244  for(const auto& x: sr.cvnmap){
245  cvnmap = x;
246  cvnmap_tree->Fill();
247  }
248 
249  cvnlabmap_idx += cvnlabmap_length; // increment taken by previous record
250  for(const auto& x: sr.cvnlabmap){
251  cvnlabmap = x;
252  cvnlabmap_tree->Fill();
253  }
254 
255  cvnobjmap_idx += cvnobjmap_length; // increment taken by previous record
256  for(const auto& x: sr.cvnobjmap){
257  cvnobjmap = x;
258  cvnobjmap_tree->Fill();
259  }
260 }
unsigned char cvnlabmap[16000]
store 1D array with hit labels
Definition: SRPixelObjMap.h:33
unsigned int nplanes
number of planes in pixel map
Definition: SRPixelObjMap.h:17
unsigned int ncells
number of cells in pixel map
Definition: SRPixelObjMap.h:21
unsigned int lastplane
global position of last plane in map
Definition: SRPixelObjMap.h:24
unsigned char cvnobjmap[16000]
store 1D array with hit object id
Definition: SRPixelObjMap.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: SRPixelObjMap.h:32
unsigned char cvnobjmap
unsigned int nchan
number of channels in pixel map
Definition: SRPixelObjMap.h:22
unsigned int firstcellx
global position of first x cell in map
Definition: SRPixelObjMap.h:25
unsigned int lastcelly
global position of last y cell in map
Definition: SRPixelObjMap.h:28
unsigned int lastcellx
global position of last x cell in map
Definition: SRPixelObjMap.h:26
unsigned char cvnlabmap
unsigned int firstcelly
global position of first y cell in map
Definition: SRPixelObjMap.h:27
float hitfracy
fraction of y hits in slice in y view pixel map
Definition: SRPixelObjMap.h:30
float hitfracx
faction of x hits in slice in x view pixel map
Definition: SRPixelObjMap.h:29
unsigned int firstplane
global position of first plane in map
Definition: SRPixelObjMap.h:23

Member Data Documentation

unsigned char flat::FlatPixelObjMap::cvnlabmap
protected

Definition at line 47 of file FlatPixelObjMap.h.

Referenced by Fill(), and FlatPixelObjMap().

long flat::FlatPixelObjMap::cvnlabmap_idx
protected

Definition at line 48 of file FlatPixelObjMap.h.

Referenced by Fill(), and FlatPixelObjMap().

int flat::FlatPixelObjMap::cvnlabmap_length
protected

Definition at line 49 of file FlatPixelObjMap.h.

Referenced by Fill(), and FlatPixelObjMap().

TTree* flat::FlatPixelObjMap::cvnlabmap_tree
protected

Definition at line 46 of file FlatPixelObjMap.h.

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

unsigned char flat::FlatPixelObjMap::cvnmap
protected

Definition at line 42 of file FlatPixelObjMap.h.

Referenced by Fill(), and FlatPixelObjMap().

long flat::FlatPixelObjMap::cvnmap_idx
protected

Definition at line 43 of file FlatPixelObjMap.h.

Referenced by Fill(), and FlatPixelObjMap().

int flat::FlatPixelObjMap::cvnmap_length
protected

Definition at line 44 of file FlatPixelObjMap.h.

Referenced by Fill(), and FlatPixelObjMap().

TTree* flat::FlatPixelObjMap::cvnmap_tree
protected

Definition at line 41 of file FlatPixelObjMap.h.

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

unsigned char flat::FlatPixelObjMap::cvnobjmap
protected

Definition at line 52 of file FlatPixelObjMap.h.

Referenced by Fill(), and FlatPixelObjMap().

long flat::FlatPixelObjMap::cvnobjmap_idx
protected

Definition at line 53 of file FlatPixelObjMap.h.

Referenced by Fill(), and FlatPixelObjMap().

int flat::FlatPixelObjMap::cvnobjmap_length
protected

Definition at line 54 of file FlatPixelObjMap.h.

Referenced by Fill(), and FlatPixelObjMap().

TTree* flat::FlatPixelObjMap::cvnobjmap_tree
protected

Definition at line 51 of file FlatPixelObjMap.h.

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

unsigned int flat::FlatPixelObjMap::firstcellx
protected

Definition at line 34 of file FlatPixelObjMap.h.

Referenced by Fill(), and FlatPixelObjMap().

unsigned int flat::FlatPixelObjMap::firstcelly
protected

Definition at line 36 of file FlatPixelObjMap.h.

Referenced by Fill(), and FlatPixelObjMap().

unsigned int flat::FlatPixelObjMap::firstplane
protected

Definition at line 32 of file FlatPixelObjMap.h.

Referenced by Fill(), and FlatPixelObjMap().

float flat::FlatPixelObjMap::hitfracx
protected

Definition at line 38 of file FlatPixelObjMap.h.

Referenced by Fill(), and FlatPixelObjMap().

float flat::FlatPixelObjMap::hitfracy
protected

Definition at line 39 of file FlatPixelObjMap.h.

Referenced by Fill(), and FlatPixelObjMap().

unsigned int flat::FlatPixelObjMap::lastcellx
protected

Definition at line 35 of file FlatPixelObjMap.h.

Referenced by Fill(), and FlatPixelObjMap().

unsigned int flat::FlatPixelObjMap::lastcelly
protected

Definition at line 37 of file FlatPixelObjMap.h.

Referenced by Fill(), and FlatPixelObjMap().

unsigned int flat::FlatPixelObjMap::lastplane
protected

Definition at line 33 of file FlatPixelObjMap.h.

Referenced by Fill(), and FlatPixelObjMap().

unsigned int flat::FlatPixelObjMap::ncells
protected

Definition at line 30 of file FlatPixelObjMap.h.

Referenced by Fill(), and FlatPixelObjMap().

unsigned int flat::FlatPixelObjMap::nchan
protected

Definition at line 31 of file FlatPixelObjMap.h.

Referenced by Fill(), and FlatPixelObjMap().

unsigned int flat::FlatPixelObjMap::nplanes
protected

Definition at line 29 of file FlatPixelObjMap.h.

Referenced by Fill(), and FlatPixelObjMap().


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