FairShip
Loading...
Searching...
No Matches
MuDISProcessor.h
Go to the documentation of this file.
1// SPDX-License-Identifier: LGPL-3.0-or-later
2// SPDX-FileCopyrightText: Copyright CERN for the benefit of the SHiP
3// Collaboration
4
5#ifndef NEWMUONDIS_MUDISPROCESSOR_H_
6#define NEWMUONDIS_MUDISPROCESSOR_H_
7
8#include "FairLogger.h" // for FairLogger, MESSAGE_ORIGIN
9#include "MuDISDefs.h"
10#include "MuGeoProcessor.h"
11#include "MuonPath.h"
12#include "TChain.h" // for TTree
13#include "TPythia6.h"
14#include "TPythia6Calls.h"
15#include "TROOT.h"
16#include "TVector3.h"
17#include "vector"
18
20 public:
23
25 ~MuDISProcessor() { delete ftree; }
26
27 bool init(const int& aEvts, const int& aStart, const double& aMinPythiaP,
28 const int& aDIS, const int& aSeed, const double& aZmax,
29 const double& aZmin = 2500);
30 void initPythia6();
31
32 void rotate(const TVector3& pvec, const double& theta, const double& phi,
33 TVector3& newp);
34
35 Bool_t InitFile(const char*, int);
36 Bool_t InitFile(const char*);
37 Bool_t InitFiles(const std::vector<std::string>&, int);
38 Bool_t InitFiles(const std::vector<std::string>&);
39 void process_file(const std::string& input, const std::string& output);
40 void process_file(const std::vector<std::string>& input,
41 const std::string& output);
42 void initEvent();
43 void fillMCTracks(const Int_t aIdx);
44 void fillSBTHits(const Int_t aIdx);
45 void fillUBTHits(const Int_t aIdx);
46 void fillSSTHits(const Int_t aIdx);
47 void fillTDHits(const Int_t aIdx);
48 void CheckAllVolumes() { fGeoProcessor.CheckAllVolumes(); }
49 void SetMuonShieldField(ShipBFieldMap* field, TGeoManager* geometry) {
50 fGeoProcessor.SetMuonShieldField(field, geometry);
51 }
52 void SetPocaJumpThreshold(double threshold) {
53 fGeoProcessor.SetPocaJumpThreshold(threshold);
54 }
55
56 void generateDISevents(const std::string& tType, const double& amuonW,
57 const std::string& aLabel, const MuonPath& aPath,
59
60 void ProcessMuons();
61
62 private:
63 TChain* ftree;
65
66 TTree* fouttree;
68
69 FairLogger* fLogger;
70 int fnEvts;
72
73 TPythia6* fPythia;
74
76 int fnDIS;
78
80
81 // void FillMuonTracks(int muon_id);
82 // void FillVetoPoints(int muon_id);
83 // void FillUBTPoints(int muon_id);
84 // void FillSSTPoints(int muon_id);
85};
86
87#endif // NEWMUONDIS_MUDISPROCESSOR_H_
ShipMuDIS::CBMSimBranches finEv
void process_file(const std::string &input, const std::string &output)
bool init(const int &aEvts, const int &aStart, const double &aMinPythiaP, const int &aDIS, const int &aSeed, const double &aZmax, const double &aZmin=2500)
MuGeoProcessor fGeoProcessor
void fillMCTracks(const Int_t aIdx)
void fillSSTHits(const Int_t aIdx)
void SetPocaJumpThreshold(double threshold)
Bool_t InitFile(const char *, int)
void rotate(const TVector3 &pvec, const double &theta, const double &phi, TVector3 &newp)
void SetMuonShieldField(ShipBFieldMap *field, TGeoManager *geometry)
Bool_t InitFiles(const std::vector< std::string > &, int)
int fnEvts
don't make it persistent, magic ROOT command
TPythia6 * fPythia
void fillTDHits(const Int_t aIdx)
ShipMuDIS::MuonBranches foutEv
FairLogger * fLogger
void fillSBTHits(const Int_t aIdx)
void generateDISevents(const std::string &tType, const double &amuonW, const std::string &aLabel, const MuonPath &aPath, ShipMuDIS::MuonDISBranches &aDISBr)
void fillUBTHits(const Int_t aIdx)
Class that defines a (3d) magnetic field map (distances in cm, fields in tesla).