MarlinTPC
1.2.0
|
This processor takes all ions from the primary ionisation and stores there charges in voxels. More...
#include <IonsInVoxelsProcessor.h>
Public Member Functions | |
virtual Processor * | newProcessor () |
virtual void | init () |
Called at the begin of the job before anything is read. More... | |
virtual void | processRunHeader (lcio::LCRunHeader *run) |
Called for every run. | |
virtual void | processEvent (lcio::LCEvent *evt) |
Called for every event - the working horse. | |
virtual void | end () |
Write the root file and close it porperly. | |
int | getPad (gear::PadRowLayout2D const *padLayout, SimTrackerHit *hit) |
Function to get the pad corresponding to a hit for the different pad layouts. | |
Protected Member Functions | |
void | fillTree (LCCollectionVec *outputVoxelCollection) |
a helper function to avoid code duplication. | |
Protected Attributes | |
std::string | _inputIonsColName |
std::string | _outputVoxelColName |
gear::PadRowLayout2D const * | _padLayout |
int | _padLayoutType |
marlintpc::VoxelTPC * | _voxelTPC |
bool | _outputIsPersistent |
Flag whether to write the output to disk. | |
int | _outputType |
Output type: event based or total. | |
int | _nEvt |
double | _binLength |
Length of the zBins. | |
double | _ionisationEnergy |
The mean ionisation energy in the gas. | |
int | _writeAfterNEvents |
Only write after n events (and summ up until then) | |
std::string | _rootFileName |
Name of the file for the debug tree. | |
double | _maxDriftLength |
std::vector< double > | _leaf_chargePerVolume |
the charge per volume in the voxel (in C/mm^2) | |
std::vector< int > | _leaf_charge |
charge per voxel | |
std::vector< int > | _leaf_padIndex |
the gear pad index | |
std::vector< int > | _leaf_zIndex |
the z index | |
std::vector< double > | _leaf_x |
std::vector< double > | _leaf_y |
std::vector< double > | _leaf_z |
the coordinates of the voxel centre | |
TTree * | _chargeInVoxelsTree |
TFile * | _rootFile |
bool | _useNegativeHalf |
This processor takes all ions from the primary ionisation and stores there charges in voxels.
The binning of the voxels is given in the x,y-plane by the pads of the readout plane. The length of the voxel in the z-direction can be chosen via the steering file. For storing and management of the voxels the helper class VoxelTPC is used. Output collections contain the charges of all the ions which emerged to the given event or all ions which appeared up to the given events in the TPC.
A root tree for debugging can be written out. This happens for every event if OutputType==0 or once at the end if OutputType==1. I case WriteAfterNEvents is turned on, the tree is also written after n events.
Collection of SimTrackerHits with charge values set as dEdx
Collection containing the charges of the primary ions in TPCVoxels.
InputCollectionName | Name of input collection, SimTrackerHits |
OutputCollectionName | Name of output collection, TPCVoxel |
WriteOutputToStorage | If true the output collection is written (default: true) |
OutputType | If 0 only ions from one event are written, else all events are summed up (default 0) |
BinLength | Length of the bins in z direction ( default: 2.5 mm) |
IonisationEnergy | The energy in GeV needed to ionize a gas particle (default: 26.E-9 = Argon) |
WriteAfterNEvents | Force readout of the full TPC after overlaying n events (optional) Forses the OutputType to 1 |
WriteRootFile | File name for a root tree with the charge per voxel for debugging (optional) |
UseNegativeHalfTPC | Use the negative instead of the positive half TPC (default: false) |
|
virtual |
Called at the begin of the job before anything is read.
Use to initialize the processor, e.g. book histograms.
References _binLength, _leaf_charge, _leaf_chargePerVolume, _leaf_padIndex, _leaf_z, _leaf_zIndex, _outputType, and _rootFileName.