LArSoft  v06_85_00
Liquid Argon Software toolkit - http://larsoft.org/
LArVoxelID.h File Reference

Unique identifier for a given LAr voxel. More...

#include <TLorentzVector.h>
#include <TVector3.h>
#include <vector>
#include <functional>
#include <iostream>

Go to the source code of this file.

Classes

class  sim::LArVoxelID
 
class  std::less< sim::LArVoxelID * >
 

Namespaces

 sim
 Monte Carlo Simulation.
 

Detailed Description

Unique identifier for a given LAr voxel.

Author
selig.nosp@m.man@.nosp@m.nevis.nosp@m..col.nosp@m.umbia.nosp@m..edu
selig.nosp@m.man@.nosp@m.nevis.nosp@m..col.nosp@m.umbia.nosp@m..edu

This class defines a unique identifier for a given volume element ("voxel") in the LAr volume. It is sortable, can be tested for equality, and is persistent under ROOT I/O.

(Actually, the term "voxel" is a mis-nomer, since we're also keeping track of the time slice. What's a four-dimensional volume element? A "tesseract element" or "tessel"?)

A LArVoxelID is created by supplying the (x,y,z,t) co-ordinates, which can be in the form of a TLorentzVector:

sim::LArVoxelID id(1,2,3,4); TLorentzVector v(1,2,3,4); sim::LArVoxelID otherID(v);

There are several ways to "get" at the contents of a LArVoxelID:

sim::LArVoxelID id; double x = id.X(); // axis-by-axis int xBinNumber = id.XBin(); // bin number; might be useful for debugging TLorentzVector pos(id); // convert to TLorentzVector

Note that the first and third methods above both return the bin-center value(s).

If you need to know the sizes of the bins (voxels), see LArVoxelCalculator.

Output methods are implemented so this class can be a good "citizen":

sim::LArVoxelID voxelID; std::cout << voxelID << std::endl; // C++ ostream method

Definition in file LArVoxelID.h.