BmnRoot
Loading...
Searching...
No Matches
BmnNdetGeoPar.cxx
Go to the documentation of this file.
1/*************************************************************************************
2 *
3 * Class BmnNdetGeoPar
4 *
5 * Adopted for BMN by: Elena Litvinenko
6 * e-mail: litvin@nf.jinr.ru
7 * Version: 06-11-2015
8 * Modified by M.Golubeva July 2022
9 *
10 ************************************************************************************/
11
12#include "BmnNdetGeoPar.h"
13
14#include "BmnNdet.h"
15#include "FairParamList.h"
16
17#include <iomanip>
18#include <iostream>
19using namespace std;
20
21BmnNdetGeoPar::BmnNdetGeoPar(const char* name, const char* title, const char* context)
22 : FairParGenericSet(name, title, context)
23{
24
25 fGeoSensNodes = new TObjArray();
26 fGeoPassNodes = new TObjArray();
27}
28
30
31// probably the next funtions can be deleted
32
34{
35 if (fGeoSensNodes)
36 delete fGeoSensNodes;
37 if (fGeoPassNodes)
38 delete fGeoPassNodes;
39}
40
41void BmnNdetGeoPar::putParams(FairParamList* l)
42{
43 if (!l)
44 return;
45 l->addObject("FairGeoNodes Sensitive List", fGeoSensNodes);
46 l->addObject("FairGeoNodes Passive List", fGeoPassNodes);
47}
48
49Bool_t BmnNdetGeoPar::getParams(FairParamList* l)
50{
51 if (!l)
52 return kFALSE;
53 if (!l->fillObject("FairGeoNodes Sensitive List", fGeoSensNodes))
54 return kFALSE;
55 if (!l->fillObject("FairGeoNodes Passive List", fGeoPassNodes))
56 return kFALSE;
57
58 return kTRUE;
59}
60
61//------ CheckIfSensitive -----------------------------------------------
62bool BmnNdetGeoPar::CheckIfSensitive(std::string name)
63{
64 return (name.find(SensitiveVolume_name_NICA) != std::string::npos)
65 || (name.find(SensitiveVolume_name_VETO) != std::string::npos);
66}
TObjArray * fGeoPassNodes
void clear(void)
Bool_t getParams(FairParamList *)
BmnNdetGeoPar(const char *name="BmnNdetGeoPar", const char *title="Ndet Geometry Parameters", const char *context="NdetDefaultContext")
static bool CheckIfSensitive(std::string name)
static const TString SensitiveVolume_name_VETO
void putParams(FairParamList *)
TObjArray * fGeoSensNodes
static const TString SensitiveVolume_name_NICA
STL namespace.