4 #include "KVEventFiltering.h"
5 #include "KVMultiDetArray.h"
7 #include "KVDBSystem.h"
10 #include "KVDataSetManager.h"
11 #include "KVGeoNavigator.h"
24 fTransformKinematics =
kTRUE;
29 fGemDecayPerEvent = 1;
34 SetEventsReadInterval(100);
120 if (frame_name !=
"") to_rotate->
SetFrame(
"rotated_frame", frame_name,
r);
121 else to_rotate->
SetFrame(
"rotated_frame",
r);
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);
152 if (
fEVN == 2500) memory_check->SetInitStatistics();
153 else if (
fEVN > 4995) memory_check->CompareToInit();
157 Int_t iterations = 1;
201 while (
fGemini && --iterations);
263 if (!gDataSetManager) {
265 gDataSetManager->
Init();
277 else if (system !=
"") {
295 Info(
"InitAnalysis",
"Run given in options = %d", run);
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()));
474 outfile +=
"_Gemini";
480 outfile +=
GetOpt(
"Geometry");
482 outfile +=
GetOpt(
"Filter");
484 outfile += gDataSet->
GetName();
488 outfile +=
S->GetBatchName();
490 else if (
GetOpt(
"System")) {
497 outfile += tmp.
Data();
501 outfile +=
Form(
"%d", run);
527 (
new TNamed(
"Origin", (basefile +
".root").Data()))->
Write();
R__EXTERN TRandom * gRandom
char * Form(const char *fmt,...)
void AssignAndDelete(TString &target, char *tobedeleted)
R__EXTERN TSystem * gSystem
Relativistic binary kinematics calculator.
TVector3 GetCMVelocity() const
Return vector velocity of centre of mass of reaction (units: cm/ns)
void CalculateKinematics()
KVNucleus * GetNucleus(Int_t i) const
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....
KVUnownedList * GetRuns() const
Returns a sorted list of all the runs associated with this system.
KV2Body * GetKinematics()
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.
Bool_t HasCalibIdentInfos() const
virtual const Char_t * GetReconstructedEventClassName() 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
Long64_t fTreeEntry
current tree entry number
void AddTree(TTree *tree)
void SetEventsReadInterval(Long64_t N)
void SetJobOutputFileName(const TString &filename)
Bool_t IsOptGiven(const Char_t *option)
KVEvent * GetEvent() const
TString GetOpt(const Char_t *option) const
void FillTree(const Char_t *tree_name="")
Abstract base class container for multi-particle events.
KVNameValueList * GetParameters() const
static void MakeEventBranch(TTree *tree, const TString &branchname, T &event, Int_t bufsize=10000000)
virtual void SetFrame(const Char_t *, const KVFrameTransform &)=0
void SetParameter(const Char_t *name, ValType value) 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
KVSeqCollection * GetListOfIDTelescopes() const
virtual void DetectEvent(KVEvent *event, KVReconstructedEvent *rec_event, const Char_t *detection_frame="")
void SetFilterType(Int_t t)
KVGeoNavigator * GetNavigator() 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
TVector3 GetVelocity() const
returns velocity vector in cm/ns units
Event containing KVReconstructedNucleus nuclei reconstructed from hits in detectors.
virtual TObject * First() const
Container class for simulated nuclei, KVSimNucleus.
void SetFrameName(const KVString &name)
const char * GetName() const override
void * New(ENewType defConstructor=kClassNew, Bool_t quiet=kFALSE) const
static TClass * GetClass(Bool_t load=kTRUE, Bool_t silent=kFALSE)
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
TString & Remove(EStripType s, char c)
TString & ReplaceAll(const char *s1, const char *s2)
Ssiz_t Index(const char *pat, Ssiz_t i=0, ECaseCompare cmp=kExact) const
virtual char * ConcatFileName(const char *dir, const char *name)
RooArgSet S(Args_t &&... args)
constexpr Double_t TwoPi()