Overlay  0.16.0
Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | List of all members
overlay::OverlayBX Class Reference

Helper struct for TPC parameters. More...

#include <OverlayBX.h>

Inheritance diagram for overlay::OverlayBX:

Public Member Functions

virtual marlin::Processor * newProcessor ()
 
virtual const std::string & name () const
 
virtual void modifyEvent (LCEvent *evt)
 
virtual void init ()
 Called at the begin of the job before anything is read. More...
 
virtual void processRunHeader (LCRunHeader *run)
 Called for every run.
 
virtual void check (LCEvent *evt)
 Called for every event - the working horse.
 
virtual void end ()
 Called after data processing for clean up.
 

Protected Types

typedef std::map< std::string,
std::string > 
StrMap
 

Protected Member Functions

LCEvent * readNextEvent (int bxNum)
 helper function for (randomly) reading the next event More...
 
void init_geometry ()
 helper function
 
int mergeVXDColsFromBX (LCCollection *vxdCol, LCCollection *vxdBGCol, int bxNum)
 helper function
 
int mergeTPCColsFromBX (LCCollection *tpcCol, LCCollection *tpcBGCol, float zPosShift)
 helper function
 

Protected Attributes

StringVec _inputFileNames
 
int _eventsPerBX
 
float _bxTime_s
 
float _tpcVdrift_mm_s
 
int _maxBXsTPC
 
bool _keepPairsTruthInfo
 
bool _phiRotateTPCHits
 
FloatVec _vxdLayerReadOutTimes
 
StringVec _tpcCollections
 
std::string _mcpCollection
 
std::string _vxdCollection
 
StringVec _mergeCollections
 
int _ranSeed
 
StrMap _tpcMap
 
StrMap _colMap
 
std::vector< LCReader * > _lcReaders
 
int _maxBXs
 
int _nRun
 
int _nEvt
 
VXDLayers _vxdLayers
 
int _lastBXNum
 
int _lastEvent
 
int _currentRdr
 

Detailed Description

Helper struct for TPC parameters.

OverlayBX processor for overlaying (pair) background from many bunch crossings. SimTrackerHits from the TPC and the VXD detectors are overlayed for the number of bunchcrossings that will be visible for a given physics event, according to the bunch crossing frequency and the corresponding readout characteristics (drift time) of the devices. Hits from different bunch crossings are shifted in z for the TPC accordingly. No shift in r-phi (along the ladders) is applied for the VXD so far. For all other detectors high time resolution is assumed and only one bunch crosing will be overalayd.
Note: code assumes that background files contain exactly one bunch crossing - this is necesassary as guineapig files are ordered.

Author
F. Gaede DESY (based on Overlay processor by N. Chiapolini)
Version
Id:
OverlayBX.h 951 2016-07-27 14:28:38Z voutsina
Parameters
BackgroundFileNames(StringVec) The names (with absolute or relative pathes) of the files from which the background should be read. Events are read in random order from the files in the list with possible dublication. It is the users responsibility to provide sufficient statistics for the signal sample under study.
BunchCrossingTime[s] (float) - default 3.0e-7 (300 ns)
TPCDriftvelocity[mm/s] (float) - default 5.0e+7 (5cm/us)
MaxBXsTPC(int) - maximum of BXs to be overlayed for the TPC; -1: compute from length and BXtime; default 10
TPCCollectionspairs of collection names with TPC SimTrackerHits to be overlaid. The input collection (given first) will be merged into the output collection. If the output collectiondoes not exist, it will be created.
PhiRotateTPCHits- if set to true the bg events are rotated in azimuth by a random angle allows to re-use the same bg events more often
VXDLayerReadOutTimes[us] (FloatVec) - default "50. 50. 200. 200. 200. 200."
VXDCollectioncollection of VXD SimTrackerHits
RandomSeed(int) random seed - default 42
MergeCollections(StringVec) Pairs of collection names from detectors that will have one bunch crossing of beam background overlayd. The input collection (given first) will be merged into the output collection. If the output collectiondoes not exist, it will be created.
MaxNumberOfEventsPerFile(int) Maximum number of background events to be read from one file. Default: -1, i.e. read one file per BX. This option is essentially for testing.

Member Function Documentation

void overlay::OverlayBX::init ( )
virtual

Called at the begin of the job before anything is read.

Use to initialize the processor, e.g. book histograms.

References init_geometry().

LCEvent * overlay::OverlayBX::readNextEvent ( int  bxNum)
protected

helper function for (randomly) reading the next event

helper function for reading the next event of BX bxNum


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