KaliVeda
Toolkit for HIC analysis
|
Filter simulated events with multidetector response.
Use this KVEventSelector on simulated data TTrees containing a branch with KVSimEvent-derived objects:
where "[options]"
is the list of options in the form "BranchName=toto,Dataset=titi,System=tata, ..."
.
The following options must be given:
SimFileName
= name of file containing simulated eventsSimTitle
= description of simulationBranchName
= name of branch containing simulated eventsDataset
= name of experimental dataset (defines multidetector array to use etc.)System
= name of experimental dataset system (defines collision kinematics etc.)Geometry
= type of geometry, either 'KV' (KaliVeda geometry) or 'ROOT' (ROOT TGeometry package)Filter
= type of filter, either Geo
(geometric filter), GeoThresh
(geometry + detector thresholds), or Full
(full simulation of detector response, including experimental identification and calibration routines)OutputDir
= directory path in which to write filtered data fileKinematics
= kinematical frame for simulation, either cm
, projectile
or lab
. if cm
/projectile
, we use the c.m./projectile velocity of the selected System
to transform events into the detector (laboratory) frame. if lab
no transformation is performed: simulated events are already in laboratory frame.The following are optional options:
Run
: run number to use for detector status, setup, parameters, etc. if not given, first run of the given experimental system is used.PhiRot
: by default, a random rotation around the beam axis will be performed before simulating detection of the event. If you don't want this to happen, give option PhiRot=no
If used, filtered events will have a parameter RANDOM_PHI
with the applied rotation (in radians)Gemini
: if option Gemini=yes, then each event will be "decayed" with Gemini++, if KaliVeda has been compiled with Gemini++ support. See below for extra information on Gemini decay stored in particle parameter lists.GemDecayPerEvent
: if option Gemini=yes then by default 1 Gemini++ decay will be performed for each event. you can change this by giving a value for this optionThe filtered data will be written in the directory given as option "OutputDir". The filename is built up from the original simulation filename and the values of various options:
The data will be stored in a TTree with name ReconstructedEvents
, in a branch with name ReconEvent
. The class used for reconstructed events depends on the dataset, it is given by KVDataSet::GetReconstructedEventClassName() (usually KVReconstructedEvent).
Each filtered event will have some or all of the following parameters in its list:
SIMEVENT_TREE_ENTRY
= index of simulated event in TTree we are readingSIMEVENT_NUMBER
= event number of simulated event in TTree we are reading (if defined i.e. if !=0)RANDOM_PHI
= rotation around beam axis [in radians]When using Gemini++ to decay simulated events before filtering, each particle will have the following parameter defined:
GEMINI_PARENT_INDEX
= index of parent nucleus in simulated eventThe combination of SIMEVENT_TREE_ENTRY
and GEMINI_PARENT_INDEX
allows to connect primary fragments in the simulated events with their detected decay products in the filtered event.
Example: suppose recev
is a filtered event and sim_tree
is the TTree containing the original simulation, while simev
is a pointer to a KVSimEvent object connected to the appropriate branch in sim_tree
. Then we can retrieve the parent nucleus responsible for producing a particular nucleus in recev
like so:
Definition at line 97 of file KVEventFiltering.h.
#include <KVEventFiltering.h>
Public Attributes | |
TVector3 | fCMVelocity |
TString | fNewFrame |
allow the definition of a specific frame | |
TVector3 | fProjVelocity |
KVReconstructedEvent * | fReconEvent |
Bool_t | fTransformKinematics |
=kTRUE if simulation not in lab frame | |
Public Attributes inherited from TSelector | |
kAbortFile | |
kAbortProcess | |
kContinue | |
Public Attributes inherited from TObject | |
kBitMask | |
kCanDelete | |
kCannotPick | |
kHasUUID | |
kInconsistent | |
kInvalidObject | |
kIsOnHeap | |
kIsReferenced | |
kMustCleanup | |
kNoContextMenu | |
kNotDeleted | |
kObjInCanvas | |
kOverwrite | |
kSingleKey | |
kWriteDelete | |
kZombie | |
Private Member Functions | |
void | RandomRotation (KVEvent *to_rotate, const TString &frame_name="") const |
Private Attributes | |
Long64_t | fEVN |
event number counter | |
Bool_t | fGemAddRotEner |
true if rotational energy has to be added to excitation energy [default: no] | |
Int_t | fGemDecayPerEvent |
number of Gemini++ decays to be performed for each event [default:1] | |
KVSimEvent | fGemEvent |
event after decay with Gemini | |
Bool_t | fGemini |
true if Gemini++ decay should be performed before detection [default: no] | |
TString | fIdCalMode |
original exp setup hasIDandCalib to be reset in case of modifications | |
Bool_t | fRotate |
true if random phi rotation should be applied [default: yes] | |
KVGemini | GEM |
Additional Inherited Members | |
Public Types inherited from TSelector | |
enum | EAbort |
Public Types inherited from TObject | |
enum | EDeprecatedStatusBits |
enum | EStatusBits |
Static Public Member Functions inherited from TSelector | |
static TClass * | Class () |
static const char * | Class_Name () |
static constexpr Version_t | Class_Version () |
static const char * | DeclFileName () |
static TSelector * | GetSelector (const char *filename) |
static Bool_t | IsStandardDraw (const char *selec) |
Static Public Member Functions inherited from TObject | |
static TClass * | Class () |
static const char * | Class_Name () |
static constexpr Version_t | Class_Version () |
static const char * | DeclFileName () |
static Longptr_t | GetDtorOnly () |
static Bool_t | GetObjectStat () |
static void | SetDtorOnly (void *obj) |
static void | SetObjectStat (Bool_t stat) |
Protected Member Functions inherited from TObject | |
virtual void | DoError (int level, const char *location, const char *fmt, va_list va) const |
void | MakeZombie () |
Protected Attributes inherited from TSelector | |
EAbort | fAbort |
TList * | fInput |
TObject * | fObject |
TString | fOption |
TSelectorList * | fOutput |
Long64_t | fStatus |
Protected Attributes inherited from TObject | |
kOnlyPrepStep | |
KVEventFiltering::KVEventFiltering | ( | ) |
Default constructor.
Definition at line 21 of file KVEventFiltering.cpp.
KVEventFiltering::KVEventFiltering | ( | const KVEventFiltering & | obj | ) |
Copy constructor This ctor is used to make a copy of an existing object (for example when a method returns an object), and it is always a good idea to implement it. If your class allocates memory in its constructor(s) then it is ESSENTIAL :-)
Definition at line 48 of file KVEventFiltering.cpp.
|
virtual |
Destructor.
Definition at line 66 of file KVEventFiltering.cpp.
Event-by-event filtering of simulated data. If needed (fTransformKinematics = kTRUE), kinematics of event are transformed to laboratory frame using C.M. velocity calculated in InitAnalysis(). Detection of particles in event is simulated with KVMultiDetArray::DetectEvent, then the reconstructed detected event is treated by the same identification and calibration procedures as for experimental data. few event counter print at the beginning to be sure the process started properly because in case GEMINI decay is used, it sometimes stops (randomly) after few events
Reimplemented from KVEventSelector.
Definition at line 137 of file KVEventFiltering.cpp.
This method copies the current state of 'this' object into 'obj' You should add here any member variables, for example: (supposing a member variable KVEventFiltering::fToto) CastedObj.fToto = fToto; or CastedObj.SetToto( GetToto() );
Reimplemented from TObject.
Definition at line 85 of file KVEventFiltering.cpp.
|
virtual |
Reimplemented from KVEventSelector.
Definition at line 212 of file KVEventFiltering.cpp.
|
virtual |
Reimplemented from KVEventSelector.
Definition at line 221 of file KVEventFiltering.cpp.
|
virtual |
Select required dataset for filtering (option "Dataset") Build the associated multidetector geometry. Calculate C.M. velocity associated with required experimental collision kinematics (option "System").
Set the parameters of the detectors according to the required run if given (option "Run"), or the first run of the given system otherwise. If ROOT/TGeo geometry is required (option "Geometry"="ROOT"), build the TGeometry representation of the detector array.
Open file for filtered data (see KVEventFiltering::OpenOutputFile), which will be stored in a TTree with name 'ReconstructedEvents', in a branch with name 'ReconEvent'. The class used for reconstructed events depends on the dataset, it is given by KVDataSet::GetReconstructedEventClassName().
Reimplemented from KVEventSelector.
Definition at line 243 of file KVEventFiltering.cpp.
Reimplemented from KVEventSelector.
Definition at line 413 of file KVEventFiltering.cpp.
void KVEventFiltering::OpenOutputFile | ( | KVDBSystem * | S, |
Int_t | run | ||
) |
Open ROOT file for new filtered events TTree. The file will be written in the directory given as option "OutputDir". The filename is built up from the original simulation filename and the values of various options:
[simfile]_[Gemini]_geo=[geometry]_filt=[filter-type]_[dataset]_[system]_run=[run-number].root
In addition, informations on the filtered data are stored in the file as TNamed objects. These can be read by KVSimDir::AnalyseFile:
KEY: TNamed System;1 title=[full system name] KEY: TNamed Dataset;1 title=[dataset name] KEY: TNamed Run;1 title=[run-number] KEY: TNamed Geometry;1 title=[geometry-type] KEY: TNamed Filter;1 title=[filter-type] KEY: TNamed Origin;1 title=[name of simulation file] KEY: TNamed RandomPhi;1 title=[yes/no, random rotation about beam axis] KEY: TNamed Gemini++;1 title=[yes/no, Gemini++ decay before detection] KEY: TNamed GemDecayPerEvent;1 title=[number of Gemini++ decays per primary event] KEY: TNamed GemAddRotEner;1 title=[Enable or not the addition of the rotational energy to the excitation energy]
Definition at line 446 of file KVEventFiltering.cpp.
|
private |
do random phi rotation around z-axis if frame_name is given, apply rotation to that frame
store phi rotation angle [radians] in event parameter "RANDOM_PHI"
Definition at line 111 of file KVEventFiltering.cpp.
TVector3 KVEventFiltering::fCMVelocity |
Definition at line 128 of file KVEventFiltering.h.
|
private |
event number counter
Definition at line 101 of file KVEventFiltering.h.
|
private |
true if rotational energy has to be added to excitation energy [default: no]
Definition at line 105 of file KVEventFiltering.h.
|
private |
number of Gemini++ decays to be performed for each event [default:1]
Definition at line 106 of file KVEventFiltering.h.
|
private |
event after decay with Gemini
Definition at line 107 of file KVEventFiltering.h.
|
private |
true if Gemini++ decay should be performed before detection [default: no]
Definition at line 104 of file KVEventFiltering.h.
|
private |
original exp setup hasIDandCalib to be reset in case of modifications
Definition at line 111 of file KVEventFiltering.h.
TString KVEventFiltering::fNewFrame |
allow the definition of a specific frame
Definition at line 131 of file KVEventFiltering.h.
TVector3 KVEventFiltering::fProjVelocity |
Definition at line 129 of file KVEventFiltering.h.
KVReconstructedEvent* KVEventFiltering::fReconEvent |
Definition at line 127 of file KVEventFiltering.h.
|
private |
true if random phi rotation should be applied [default: yes]
Definition at line 102 of file KVEventFiltering.h.
Bool_t KVEventFiltering::fTransformKinematics |
=kTRUE if simulation not in lab frame
Definition at line 130 of file KVEventFiltering.h.
|
private |
Definition at line 108 of file KVEventFiltering.h.