9 #ifndef ERTelescopePID_H 10 #define ERTelescopePID_H 16 #include "TClonesArray.h" 22 #include "ERTelescopeTrack.h" 23 #include "ERTelescopeParticle.h" 24 #include "ERTelescopeSetup.h" 26 class G4ParticleDefinition;
37 enum EdepAccountingStrategy {EdepFromXChannel, EdepFromYChannel, AverageEdep, SummarizedEdep};
40 const TString fDeStation;
41 const std::list<TString> fEStations;
42 const Double_t fNormalizedThickness = 0.002;
43 const std::vector<TString> stations_to_use_em_calculator_for_de_e_;
44 const std::vector<TString> stations_to_use_em_calculator_for_kinetic_energy_;
47 const std::list<TString>& eStations, Double_t normalizedThickness,
48 const std::vector<TString>& stations_to_use_em_calculator_for_de_e,
49 const std::vector<TString>& stations_to_use_em_calculator_for_kinetic_energy)
50 : fPDG(pdg), fDeStation(deStation), fEStations(eStations),
51 fNormalizedThickness(normalizedThickness),
52 stations_to_use_em_calculator_for_de_e_(stations_to_use_em_calculator_for_de_e),
53 stations_to_use_em_calculator_for_kinetic_energy_(stations_to_use_em_calculator_for_kinetic_energy) {}
56 const TString fBranch;
58 const Double_t fSensetiveThickness = 0.;
61 fBranch(branch), fDigi(digi), fSensetiveThickness(sensetiveThickness) {}
62 bool IsFound()
const {
return fDigi !=
nullptr; }
74 void SetParticle(
const TString& trackBranchName,
const PDG pdg,
75 const TString& deStation =
"",
const TString& eStation =
"",
76 Double_t deNormalizedThickness = 0.002,
77 const std::vector<TString>& stations_to_use_em_calculator_for_de_e = {},
78 const std::vector<TString>& stations_to_use_em_calculator_for_kinetic_energy = {});
79 void SetParticle(
const TString& trackBranchName,
const PDG pdg,
80 const TString& deStation =
"",
const std::list<TString>& eStations = {},
81 Double_t deNormalizedThickness = 0.002,
82 const std::vector<TString>& stations_to_use_em_calculator_for_de_e = {},
83 const std::vector<TString>& stations_to_use_em_calculator_for_kinetic_energy = {});
84 void SetEdepAccountingStrategy(
85 const TString& station, EdepAccountingStrategy strategy) {
86 fEdepAccountingStrategies[station] = strategy;
92 virtual InitStatus
Init();
96 virtual void Exec(Option_t* opt);
102 std::map<TString, std::list<ParticleDescription>> fParticleDescriptions;
103 std::map<TString, EdepAccountingStrategy> fEdepAccountingStrategies;
105 std::map<TString, TClonesArray*> fQTelescopeDigi;
106 std::map<TString, TClonesArray*> fQTelescopeTrack;
108 std::map<TString, std::map<PDG, TClonesArray*> > fQTelescopeParticle;
111 std::pair<Double_t, Double_t> CalcEnergyDeposites (
113 const G4ParticleDefinition& particle, std::list<DigiOnTrack>& digisOnTrack,
114 const std::vector<TString>& stations_to_use_em_calculator_for_de_e,
115 const std::vector<TString>& stations_to_use_em_calculator_for_kinetic_energy);
116 std::map<TString, ERDigi*> FindDigisByNode(
const TGeoNode& node,
const TString& nodePath);
117 void FindEnergiesForDeEAnalysis(
const TString& trackBranch,
118 const std::list<DigiOnTrack>& digisOnTrack,
119 const std::list<TString>& eStations,
120 const TString& deStation,
121 const Double_t normalizedThickness,
122 Double_t& edepInThickStation, Double_t& edepInThinStation,
123 Double_t& edepInThickStationCorrected, Double_t& edepInThinStationCorrected,
124 ERChannel& channelOfThinStation, ERChannel& channelOfThickStation);
125 Double_t ApplyEdepAccountingStrategy(
const std::map<TString, ERDigi*>& digisByBranchName);
126 Double_t ApplyEdepAccountingStrategy(
const std::list<DigiOnTrack>& digisOnTrack);
129 Double_t deadEloss, Double_t edepInThickStation, Double_t edepInThinStation,
130 Double_t edepInThickStationCorrected, Double_t edepInThinStationCorrected,
131 ERChannel channelOfThinStaion, ERChannel channelOfThickStation,
virtual void Exec(Option_t *opt)
Defines the transformation actions for all input data (Digi) to output data (Track) for each event...
virtual void Reset()
Resets all output data.
ERTelescopeSetup * fQTelescopeSetup
access to ERTelescopeSetup class instance
virtual InitStatus Init()
Defines all input and output object colletions participates in track finding.
ERTelescopePID()
Default constructor.
ERTelescopeParticle * AddParticle(const TLorentzVector &lvInteraction, Double_t kineticEnergy, Double_t deadEloss, Double_t edepInThickStation, Double_t edepInThinStation, Double_t edepInThickStationCorrected, Double_t edepInThinStationCorrected, ERChannel channelOfThinStaion, ERChannel channelOfThickStation, TClonesArray &col)
Adds a ERTelescopeParticles to the output Collection.
~ERTelescopePID()=default
Destructor.
Base abstract class for all tasks in er.