PandaRoot
PndPidCalorimeterInfo.h
Go to the documentation of this file.
1 //****************************************************************************
2 //* This file is part of PandaRoot. *
3 //* *
4 //* PandaRoot is distributed under the terms of the *
5 //* GNU General Public License (GPL) version 3, *
6 //* copied verbatim in the file "LICENSE". *
7 //* *
8 //* Copyright (C) 2006 - 2024 FAIR GmbH and copyright holders of PandaRoot *
9 //* The copyright holders are listed in the file "COPYRIGHTHOLDERS". *
10 //* The authors are listed in the file "AUTHORS". *
11 //****************************************************************************
12 
13 #ifndef PID_CALORIMETER_INFO_H
14 #define PID_CALORIMETER_INFO_H
15 
16 #include <map>
17 #include <memory>
18 
19 #include "TClonesArray.h"
20 
21 #include "FairRootManager.h"
22 #include "FairRuntimeDb.h"
23 #include "FairPropagator.h"
24 #include "PndPropagator.h"
25 #include "FairGeane.h"
26 #include "FairLogger.h"
27 
28 #include "PndTrack.h"
29 #include "PndEmcErrorMatrix.h"
31 #include "PndEmcErrorMatrixPar.h"
32 #include "PndEmcGeoPar.h"
34 #include "PndEmcCluster.h"
35 #include "PndEmcBump.h"
36 
37 #include "PndPidDetectorInfo.h"
38 
47  protected:
48 
49  std::map<Int_t, Bool_t> fClusterList{};
50  std::map<Int_t, Double_t> fClusterQ{};
51  std::map<Int_t, std::pair<Double_t, Int_t>> fCorrelatedTracks;
52  Bool_t fTracksCorrelated = kFALSE;
53 
55  Int_t EmcIndex;
56  Double_t Quality;
57  bool operator<(const EmcQualityEntry_t &other) const {return Quality<other.Quality;}
58  };
59 
61  Int_t TrackId;
62  std::vector<EmcQualityEntry_t> Qualities;
63  bool operator<(const TrackQualities_t &other) const {return Qualities[0].Quality < other.Qualities[0].Quality;}
64  EmcQualityEntry_t & operator [](Int_t index) {return Qualities[index];}
65  const EmcQualityEntry_t & operator [](Int_t index) const {return Qualities[index];}
66  };
67 
69  Int_t TrackId;
70  };
71 
72  struct QualityTable_t {
73  std::vector<TrackQualities_t> Table;
74 
75  TrackQuality_t GetNextBestFit();
76  void Remove(Int_t trackId, Int_t emcIndex);
77  void Clear();
78  };
79 
81 
82  private:
83 
84  virtual void FillCorrelationMap() = 0;
85 
86  public:
89 
90  virtual Int_t GetClusterCount() {
91  LOG(warn) << "PndPidCalorimeterInfo::GetClusterCount: Function not implemented in base class.";
92  return 0;
93  };
94 
100  Bool_t SetParContainers(FairRuntimeDb *db) = 0;
101 
102  void Reset() = 0;
103 
108  virtual Int_t SetDetectorHits(FairRootManager *manager) = 0;
109 
117  Bool_t Setup(FairRootManager *manager, PndPropagator *propagator, PndPidDetectorParams::DetectorParams *params);
118 
124  virtual void ActivateDebugNtuple(Bool_t debug_mode);
125 
131  void GetNeutralInfo(Int_t nbr_tracks, TClonesArray *neutralArray) = 0;
132 
140  virtual Bool_t GetInfo(PndTrack *track, PndPidCandidate *pidCand) = 0;
141 
143 };
144 
145 #endif // PID_CALORIMETER_INFO_H
PndPidCalorimeterInfo()
Default constructor.
Base class for accessing PID detector information of calorimeter system (EMC, FSC).
Bool_t SetParContainers(FairRuntimeDb *db)=0
Set parameter containers.
virtual Int_t GetClusterCount()
Default destructor.
bool operator<(const TrackQualities_t &other) const
virtual Bool_t GetInfo(PndTrack *track, PndPidCandidate *pidCand)=0
Add calorimeter information to PidCandidate.
virtual Int_t SetDetectorHits(FairRootManager *manager)=0
Fill detector hit TCAs and adjust detector mode.
std::vector< EmcQualityEntry_t > Qualities
void GetNeutralInfo(Int_t nbr_tracks, TClonesArray *neutralArray)=0
Include calorimeter information in neutral PndPidCandidate.
float & operator[](int i)
Definition: P4_F32vec4.h:17
std::vector< TrackQualities_t > Table
std::map< Int_t, Bool_t > fClusterList
List of clusters for track correlation.
Base class for accessing PID detector information.
Propagator interface class for PandaRoot.
Definition: PndPropagator.h:64
bool operator<(const EmcQualityEntry_t &other) const
std::map< Int_t, Double_t > fClusterQ
List of emc quality correlated to clusters.
virtual void ActivateDebugNtuple(Bool_t debug_mode)
Set debug mode of detector.
Bool_t Setup(FairRootManager *manager, PndPropagator *propagator, PndPidDetectorParams::DetectorParams *params)
Setup calorimeter info.
std::map< Int_t, std::pair< Double_t, Int_t > > fCorrelatedTracks
Map of matched track and emc id&#39;s.
ClassDef(PndPidCalorimeterInfo, 2)