4#include "KVEventFiltering.h"
5#include "KVMultiDetArray.h"
10#include "KVDataSetManager.h"
11#include "KVGeoNavigator.h"
24 fTransformKinematics =
kTRUE;
29 fGemDecayPerEvent = 1;
34 SetEventsReadInterval(100);
122 to_rotate->SetParameter(
"RANDOM_PHI", phi);
148 if ((
fEVN <= 10))
Info(
"Analysis",
"%d events processed", (
int)
fEVN);
149 else if ((
fEVN <= 1000) && !(
fEVN % 100))
Info(
"Analysis",
"%d events processed", (
int)
fEVN);
157 Int_t iterations = 1;
201 while (
fGemini && --iterations);
263 if (!gDataSetManager) {
265 gDataSetManager->
Init();
279 tb->CalculateKinematics();
295 Info(
"InitAnalysis",
"Run given in options = %d", run);
299 run = ((
KVDBRun*)
sys->GetRuns()->First())->GetNumber();
300 Info(
"InitAnalysis",
"Using first run for system = %d", run);
303 Info(
"InitAnalysis",
"No run information");
311 if (
filt ==
"GeoThresh") {
324 Info(
"InitAnalysis",
"Filtering with ROOT geometry");
329 Info(
"InitAnalysis",
"Filtering with KaliVeda geometry");
334 Info(
"InitAnalysis",
"Geometric filter");
336 else if (
filt ==
"GeoThresh") {
338 Info(
"InitAnalysis",
"Geometry + thresholds filter");
340 else if (
filt ==
"Full") {
342 Info(
"InitAnalysis",
"Geometry + thresholds filter + implemented identifications and calibrations.");
347 Info(
"InitAnalysis",
"Simulation is in laboratory/detector frame");
351 Info(
"InitAnalysis",
"Simulation will be transformed to laboratory/detector frame");
357 if (
fRotate)
Info(
"InitAnalysis",
"Random phi rotation around beam axis performed for each event");
369 Info(
"InitAnalysis",
"Statistical decay with Gemini++ for each event before detection");
371 if (
fGemAddRotEner)
Info(
"InitAnalysis",
" -- Rotational energy will be added to excitation energy");
387 Info(
"InitAnalysis",
"Setting identification bilan...");
402 else t =
AddTree(
"ReconstructedEvents",
Form(
"%s filtered with %s",
GetOpt(
"SimTitle").Data(), gMultiDetArray->
GetTitle()));
490 else if (
GetOpt(
"System")) {
492 tmp.ReplaceAll(
" ",
"");
493 tmp.ReplaceAll(
"@",
"");
494 tmp.ReplaceAll(
"MeV/A",
"");
495 tmp.ReplaceAll(
"+",
"");
R__EXTERN TRandom * gRandom
char * Form(const char *fmt,...)
void AssignAndDelete(TString &target, char *tobedeleted)
R__EXTERN TSystem * gSystem
Relativistic binary kinematics calculator.
virtual void SetNumber(UInt_t num)
static Bool_t SearchKVFile(const Char_t *name, TString &fullpath, const Char_t *kvsubdir="")
static KVClassMonitor * GetInstance()
Return pointer to unique instance of class monitor class.
Description of an experimental run in database ,,.
Database class used to store information on different colliding systems studied during an experiment....
Manage all datasets contained in a given data repository.
virtual Bool_t Init(KVDataRepository *=0)
KVDataSet * GetDataSet(Int_t) const
Return pointer to DataSet using index in list of all datasets, index>=0.
virtual const Char_t * GetReconstructedEventClassName() const
Bool_t HasCalibIdentInfos() const
Filter simulated events with multidetector response.
TString fNewFrame
allow the definition of a specific frame
KVSimEvent fGemEvent
event after decay with Gemini
void OpenOutputFile(KVDBSystem *, Int_t)
Bool_t fTransformKinematics
=kTRUE if simulation not in lab frame
void RandomRotation(KVEvent *to_rotate, const TString &frame_name="") const
Bool_t fGemini
true if Gemini++ decay should be performed before detection [default: no]
void Copy(TObject &) const
TString fIdCalMode
original exp setup hasIDandCalib to be reset in case of modifications
KVReconstructedEvent * fReconEvent
KVEventFiltering()
Default constructor.
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]
virtual ~KVEventFiltering()
Destructor.
Long64_t fEVN
event number counter
Bool_t fRotate
true if random phi rotation should be applied [default: yes]
General purpose analysis base class for TTree containing KVEvent objects.
Bool_t fDisableCreateTreeFile
used with PROOF
KVEvent * GetEvent() const
Long64_t fTreeEntry
current tree entry number
void AddTree(TTree *tree)
void SetEventsReadInterval(Long64_t N)
void SetJobOutputFileName(const TString &filename)
void AddHisto(TH1 *histo)
Bool_t IsOptGiven(const Char_t *option)
TString GetOpt(const Char_t *option) const
void FillTree(const Char_t *tree_name="")
Abstract base class container for multi-particle events.
static void MakeEventBranch(TTree *tree, const TString &branchname, T &event, Int_t bufsize=10000000)
KVNameValueList * GetParameters() const
virtual KVDBSystem * GetSystem(const Char_t *system) const
void DecayEvent(const KVSimEvent *, KVSimEvent *, bool=true)
const Char_t * GetDetectorNameFormat() const
Base class for all detectors or associations of detectors in array which can identify charged particl...
void CheckIdentificationBilan(const TString &system)
Set status of ID Telescope for given system.
static void OpenIdentificationBilan(const TString &path)
Open IdentificationBilan.dat file with given path.
Bool_t IsROOTGeometry() const
virtual void DetectEvent(KVEvent *event, KVReconstructedEvent *rec_event, const Char_t *detection_frame="")
void SetFilterType(Int_t t)
KVGeoNavigator * GetNavigator() const
KVSeqCollection * GetListOfIDTelescopes() const
static KVMultiDetArray * MakeMultiDetector(const Char_t *dataset_name, Int_t run=-1, TString classname="KVMultiDetArray")
virtual void InitializeIDTelescopes()
virtual void SetROOTGeometry(Bool_t on=kTRUE)
void PrintStatusOfIDTelescopes()
virtual void SetSimMode(Bool_t on=kTRUE)
void Copy(TObject &nvl) const
Event containing KVReconstructedNucleus nuclei reconstructed from hits in detectors.
Container class for simulated nuclei, KVSimNucleus.
void SetFrame(const Char_t *frame, const KVFrameTransform &ft)
void SetFrameName(const KVString &name)
const char * GetName() const override
void * New(ENewType defConstructor=kClassNew, Bool_t quiet=kFALSE) const
virtual const char * GetValue(const char *name, const char *dflt) const
virtual void SetValue(const char *name, const char *value, EEnvLevel level=kEnvChange, const char *type=nullptr)
const char * GetName() const override
const char * GetTitle() const override
virtual Int_t Write(const char *name=nullptr, Int_t option=0, Int_t bufsize=0)
virtual void Copy(TObject &object) const
virtual void Info(const char *method, const char *msgfmt,...) const
virtual Double_t Uniform(Double_t x1, Double_t x2)
const char * Data() const
virtual char * ConcatFileName(const char *dir, const char *name)
RooArgSet S(Args_t &&... args)
constexpr Double_t TwoPi()