65 parFileName = parFileName + geoTag +
"_" + digiTag +
".digi.par";
67 parFile = fopen(parFileName.
Data(),
"w");
69 cout <<
"-E- Could not open parameter " << parFileName << endl;
72 fprintf(parFile,
"%s\n",
"[CbmStsDigiPar]");
75 TString geoPath = getenv(
"VMCWORKDIR");
78 TString geoFileName =
"data/geofile_full.root";
81 cout <<
"-E- Could not read STS geometry!" << endl;
92 if (!
geoMan->cd(
"STS1_0")) {
93 cout <<
"-E- Mother volume sts1 not found " << endl;
99 cout <<
"-E- Illegal STS node name " << sts->
GetName() << endl;
119 cout <<
"Station Nr. " << statNr <<
", node " << station->
GetName() <<
", modules: " << nModules << endl;
120 fprintf(parFile,
"%d %d %d\n", statNr, 0, nModules);
146 fprintf(parFile,
"%4d %4d\n", moduleNr,
GetNofDaughters(module,
"Sensor"));
192 "%6d %6d %9.3f %9.3f %9.3f %8.2f %8.2f %8.2f %8.2f %8.4f %8.4f %8.2f %8.2f\n",
194 sensNr,
gkSensorType, xTrans[0], xTrans[1], xTrans[2], phiStat, dx, dy, dz,
210 cout <<
"-I- Parameters successfully written to " << parFileName << endl;
227 geoMan->SetTopVolume(cave);
230 cout <<
"Reading geometry from file " << fileName << endl;
233 cout <<
"-E- Could not open file!" << endl;
242 while ((key = (
TKey*)next())) {
243 TString className(key->GetClassName());
245 top =
dynamic_cast<TGeoVolume*
>(key->ReadObj());
246 std::cout <<
"Found volume " << top->
GetName() << endl;
254 std::cout <<
"Found GeoManager " <<
gGeoManager->GetName() << endl;
260 cout <<
"-E- Could not find volume object in file" << endl;
266 cout <<
"-E- No STS volume found on second level" << endl;
271 cout <<
"Geometry version " << stsVersion << endl;
276 cave->
AddNode(sts, 0, stsmatrix);
293 for (
Int_t iLadder = 0; iLadder < nLadders; iLadder++) {
298 for (
Int_t iHladder = 0; iHladder < nHladders; iHladder++) {
315 Int_t nDaughters = 0;
R__EXTERN TGeoManager * gGeoManager
TList * GetListOfKeys() const override
virtual Bool_t IsOpen() const
void Close(Option_t *option="") override
virtual Double_t GetDX() const
virtual Double_t GetDZ() const
virtual Double_t GetDY() const
virtual const Double_t * GetTranslation() const=0
virtual const Double_t * GetRotationMatrix() const=0
TGeoVolume * GetVolume() const
Int_t GetNdaughters() const
TGeoNode * GetDaughter(Int_t ind) const
virtual TGeoMatrix * GetMatrix() const=0
virtual TGeoNode * AddNode(TGeoVolume *vol, Int_t copy_no, TGeoMatrix *mat=nullptr, Option_t *option="")
TGeoNode * GetNode(const char *name) const
TGeoShape * GetShape() const
const char * GetName() const override
const char * Data() const
Bool_t BeginsWith(const char *s, ECaseCompare cmp=kExact) const
TString & Remove(EStripType s, char c)
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
Double_t gkStripPitchBack
Double_t gkStripPitchFront
Double_t gkGuardRingWidth
Int_t GetNofDaughters(TGeoNode *node, const char *name)
Int_t GetNofModules(TGeoNode *station)
=======================================================================
Bool_t CreateGeoFromFile(const char *fileName)
=========================================================================== CreateGeoFromFile
void create_stsdigipar_gem(const char *geoTag=gkGeoTag, const char *digiTag=gkDigiTag)
constexpr Double_t RadToDeg()