MarlinTPC  1.2.0
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
marlintpc::IonsInVoxelsProcessor Class Reference

This processor takes all ions from the primary ionisation and stores there charges in voxels. More...

#include <IonsInVoxelsProcessor.h>

Inheritance diagram for marlintpc::IonsInVoxelsProcessor:

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
 

Detailed Description

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.

Input - Prerequisites

Collection of SimTrackerHits with charge values set as dEdx

Output

Collection containing the charges of the primary ions in TPCVoxels.

Parameters
InputCollectionNameName of input collection, SimTrackerHits
OutputCollectionNameName of output collection, TPCVoxel
WriteOutputToStorageIf true the output collection is written (default: true)
OutputTypeIf 0 only ions from one event are written, else all events are summed up (default 0)
BinLengthLength of the bins in z direction ( default: 2.5 mm)
IonisationEnergyThe energy in GeV needed to ionize a gas particle (default: 26.E-9 = Argon)
WriteAfterNEventsForce readout of the full TPC after overlaying n events (optional) Forses the OutputType to 1
WriteRootFileFile name for a root tree with the charge per voxel for debugging (optional)
UseNegativeHalfTPCUse the negative instead of the positive half TPC (default: false)
Author
Thorsten Krautscheid (University of Bonn)
Martin Killenberg (CERN)

Member Function Documentation

void marlintpc::IonsInVoxelsProcessor::init ( )
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.


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