CbmRoot
riplet/Lx.h
Go to the documentation of this file.
1 #ifndef LX_INCLUDED
2 #define LX_INCLUDED
3 
4 #pragma GCC diagnostic ignored "-Weffc++"
5 
6 #include "CbmMuchPixelHit.h"
7 #include "CbmStsKFTrackFitter.h"
8 #include "CbmTrackMatch.h"
9 #include "CbmVertex.h"
10 #include "FairTask.h"
11 #include "LxCATriplets.h"
12 #include "LxEff.h"
13 #include "LxMC.h"
14 #include "TClonesArray.h"
15 #include "TH1.h"
16 #include "TProfile.h"
17 #include "TProfile2D.h"
18 #include <fstream>
19 
20 #ifdef FAST_CODE
21 #define LX_DYNAMIC_CAST static_cast
22 #else // FAST_CODE
23 #define LX_DYNAMIC_CAST dynamic_cast
24 #endif // FAST_CODE
25 
26 extern TString lxFinderParticleType;
27 
28 class LxFinderTriplet : public FairTask {
29  friend struct LxEff;
30  friend class LxDraw;
31 
32 public:
33  static LxFinderTriplet* Instance();
34  explicit LxFinderTriplet();
36  InitStatus Init(); // Inherited virtual.
37  void Exec(Option_t* opt); // Inherited virtual.
38 
39  void SetGenInvMass(bool value) { generateInvMass = value; }
40 
41  void SetGenBackground(bool value) { generateBackground = value; }
42 
43  void SetGenChi2(bool value) { generateChi2 = value; }
44 
45  void SetLinkWithSts(bool value) { linkWithSts = value; }
46 
47  void SetUseMCPInsteadOfHits(bool value) { useMCPInsteadOfHits = value; }
48 
49  void SetCalcMiddlePoints(bool value) { calcMiddlePoints = value; }
50 
51  void SetCutCoeff(Double_t value) { cutCoeff = value; }
52 
53  void SetParticleType(TString v) {
54  //particleType = v;
56 
57  if (v == "omega") {
59 #ifdef MAKE_EFF_CALC
60  pPtCut = false;
61 #endif //MAKE_EFF_CALC
62  }
63  }
64 
65 private:
66  void SaveRecoTracks();
67  void CalcInvMass();
68  void FinishTask(); // Inherited virtual.
69  void SaveEventTracks();
70  void SaveInvMass();
71  void SaveBackground();
72  void MatchRecoToMC();
74  TClonesArray* muchPixelHits;
75  TClonesArray* listMCTracks;
76  TClonesArray* listMuchPts;
77  TClonesArray* listMuchClusters;
78  TClonesArray* listMuchPixelDigiMatches;
79  TClonesArray* listStsTracks;
80  TClonesArray* listStsMatches;
81  TClonesArray*
82  listStsPts; // STS MC-points array. Used for experiments with STS matching.
83  TClonesArray* listRecoTracks; // It is an output array.
85  static TH1F* massHisto;
86  //static TH1F* backgroundMassHisto;
88  static TTree* superEventTracks;
89  static TH1F* signalChi2Histo;
90  static TH1F* backgroundChi2Histo;
91  static TH1F* unknownChi2Histo;
92  static TProfile* effByMomentumProfile;
94  static TH1F* bgrInterTracksDistance;
95  static TH1F* signalSignDefect;
96  static TH1F* bgrSignDefect;
97  static TH1F* signalYAtZ0;
98  static TH1F* bgrYAtZ0;
99  static TH1F* signalYAtZ0_2;
100  static TH1F* bgrYAtZ0_2;
103  // These two containers below accumulates respectively all positive and all negative reconstructed tracks for all events.
104  std::list<CbmStsTrack> positiveTracks;
105  std::list<CbmStsTrack> negativeTracks;
112  Double_t cutCoeff;
113  bool pPtCut;
114  std::vector<LxMCPoint>
115  MCPoints; // Points should lay here in the same order as in listMuchPts.
116  std::vector<LxMCTrack>
117  MCTracks; // Tracks should lay here in the same order as in listMCTracks.
118  std::list<LxStsMCPoint> MCStsPoints;
119  std::list<LxStsMCPoint*> MCStsPointsByStations[8];
120 #ifdef MAKE_DISPERSE_2D_HISTOS
121  std::list<LxMCPoint*> MCPointsByStations[LXSTATIONS][LXLAYERS];
123 #endif //MAKE_DISPERSE_2D_HISTOS
125  std::map<Int_t, std::map<Int_t, int>> particleCounts;
126 #ifdef MAKE_EFF_CALC
127  std::ofstream
128  incomplete_events; // Events where not all tracks are reconstructed.
129 #endif //MAKE_EFF_CALC
130  Int_t eventNumber;
131 #ifdef CALC_MUCH_DETECTORS_EFF
132  Int_t mcPointsCount;
133  Int_t mcPointsTriggered;
134 #endif //CALC_MUCH_DETECTORS_EFF
135 
137 };
138 
139 #endif //LX_INCLUDED
LxFinderTriplet::MCPoints
std::vector< LxMCPoint > MCPoints
Definition: riplet/Lx.h:115
LxFinderTriplet::superEventData
static CbmStsTrack * superEventData
Definition: riplet/Lx.h:87
LxFinderTriplet::MCStsPointsByStations
std::list< LxStsMCPoint * > MCStsPointsByStations[8]
Definition: riplet/Lx.h:119
CbmVertex.h
LxFinderTriplet::CalcInvMass
void CalcInvMass()
Definition: riplet/Lx.cxx:1018
LxFinderTriplet::extFitter
CbmStsKFTrackFitter extFitter
Definition: riplet/Lx.h:101
LxFinderTriplet::signalYAtZ0_2
static TH1F * signalYAtZ0_2
Definition: riplet/Lx.h:99
LxSpace::stationsInAlgo
Int_t stationsInAlgo
Definition: LxCA.h:333
LxFinderTriplet::eventNumber
Int_t eventNumber
Definition: riplet/Lx.h:130
LxFinderTriplet::bgrSignDefect
static TH1F * bgrSignDefect
Definition: riplet/Lx.h:96
LxFinderTriplet::fInstance
static LxFinderTriplet * fInstance
Definition: riplet/Lx.h:73
LxFinderTriplet
Definition: riplet/Lx.h:28
LxFinderTriplet::Instance
static LxFinderTriplet * Instance()
Definition: riplet/Lx.cxx:50
LxEff
Definition: LxEff.h:15
LxFinderTriplet::effByMomentumProfile
static TProfile * effByMomentumProfile
Definition: riplet/Lx.h:92
LxFinderTriplet::listStsMatches
TClonesArray * listStsMatches
Definition: riplet/Lx.h:80
LxFinderTriplet::pPtCut
bool pPtCut
Definition: riplet/Lx.h:113
LxFinderTriplet::SetCalcMiddlePoints
void SetCalcMiddlePoints(bool value)
Definition: riplet/Lx.h:49
LxFinderTriplet::muchPixelHits
TClonesArray * muchPixelHits
Definition: riplet/Lx.h:74
LxFinderTriplet::listRecoTracks
TClonesArray * listRecoTracks
Definition: riplet/Lx.h:83
LxDraw
Definition: Simple/LxDraw.h:9
LxFinderTriplet::positiveTracks
std::list< CbmStsTrack > positiveTracks
Definition: riplet/Lx.h:104
LxFinderTriplet::SetGenInvMass
void SetGenInvMass(bool value)
Definition: riplet/Lx.h:39
LxFinderTriplet::effCounter
LxEff effCounter
Definition: riplet/Lx.h:84
LXLAYERS
#define LXLAYERS
Definition: Simple/LxSettings.h:8
LxFinderTriplet::generateBackground
bool generateBackground
Definition: riplet/Lx.h:107
LxFinderTriplet::listStsPts
TClonesArray * listStsPts
Definition: riplet/Lx.h:82
LxFinderTriplet::LxFinderTriplet
LxFinderTriplet()
Definition: riplet/Lx.cxx:85
LxSpace
Definition: LxCA.h:309
LxFinderTriplet::MatchRecoToMC
void MatchRecoToMC()
Definition: riplet/LxEff.cxx:1052
CbmTrackMatch.h
LxFinderTriplet::cutCoeff
Double_t cutCoeff
Definition: riplet/Lx.h:112
LxFinderTriplet::Init
InitStatus Init()
Definition: riplet/Lx.cxx:179
LxFinderTriplet::SetLinkWithSts
void SetLinkWithSts(bool value)
Definition: riplet/Lx.h:45
LxFinderTriplet::superEventTracks
static TTree * superEventTracks
Definition: riplet/Lx.h:88
LxFinderTriplet::negativeTracks
std::list< CbmStsTrack > negativeTracks
Definition: riplet/Lx.h:105
LxFinderTriplet::SaveEventTracks
void SaveEventTracks()
Definition: riplet/LxUtils.cxx:6
LxFinderTriplet::massHisto
static TH1F * massHisto
Definition: riplet/Lx.h:85
lxFinderParticleType
TString lxFinderParticleType
Definition: Simple/Lx.cxx:282
LxFinderTriplet::FinishTask
void FinishTask()
Definition: riplet/Lx.cxx:1137
LxFinderTriplet::SetGenBackground
void SetGenBackground(bool value)
Definition: riplet/Lx.h:41
LxFinderTriplet::incomplete_events
std::ofstream incomplete_events
Definition: riplet/Lx.h:128
LxFinderTriplet::SetGenChi2
void SetGenChi2(bool value)
Definition: riplet/Lx.h:43
CbmStsKFTrackFitter
Definition: CbmStsKFTrackFitter.h:14
LxFinderTriplet::bgrYAtZ0
static TH1F * bgrYAtZ0
Definition: riplet/Lx.h:98
LxFinderTriplet::signalSignDefect
static TH1F * signalSignDefect
Definition: riplet/Lx.h:95
CbmVertex
Definition: CbmVertex.h:26
LxFinderTriplet::listMuchClusters
TClonesArray * listMuchClusters
Definition: riplet/Lx.h:77
LxFinderTriplet::zCoordsByStations
Double_t zCoordsByStations[LXSTATIONS][LXLAYERS]
Definition: riplet/Lx.h:122
LxFinderTriplet::SaveRecoTracks
void SaveRecoTracks()
Definition: riplet/Lx.cxx:982
LxFinderTriplet::generateChi2
bool generateChi2
Definition: riplet/Lx.h:108
LxFinderTriplet::MCStsPoints
std::list< LxStsMCPoint > MCStsPoints
Definition: riplet/Lx.h:118
LxFinderTriplet::listStsTracks
TClonesArray * listStsTracks
Definition: riplet/Lx.h:79
LxFinderTriplet::signalYAtZ0
static TH1F * signalYAtZ0
Definition: riplet/Lx.h:97
LxFinderTriplet::generateInvMass
bool generateInvMass
Definition: riplet/Lx.h:106
LxFinderTriplet::Exec
void Exec(Option_t *opt)
Definition: riplet/Lx.cxx:464
LxFinderTriplet::~LxFinderTriplet
~LxFinderTriplet()
Definition: riplet/Lx.cxx:130
LxFinderTriplet::SetParticleType
void SetParticleType(TString v)
Definition: riplet/Lx.h:53
LxFinderTriplet::listMuchPixelDigiMatches
TClonesArray * listMuchPixelDigiMatches
Definition: riplet/Lx.h:78
LxFinderTriplet::SaveBackground
void SaveBackground()
Definition: riplet/Lx.cxx:1222
LxFinderTriplet::signalInterTracksDistance
static TH1F * signalInterTracksDistance
Definition: riplet/Lx.h:93
LxFinderTriplet::signalChi2Histo
static TH1F * signalChi2Histo
Definition: riplet/Lx.h:89
LxFinderTriplet::SetCutCoeff
void SetCutCoeff(Double_t value)
Definition: riplet/Lx.h:51
LxFinderTriplet::MCPointsByStations
std::list< LxMCPoint * > MCPointsByStations[LXSTATIONS][LXLAYERS]
Definition: riplet/Lx.h:121
v
__m128 v
Definition: L1/vectors/P4_F32vec4.h:1
LxFinderTriplet::ClassDef
ClassDef(LxFinderTriplet, 1)
LxFinderTriplet::bgrYAtZ0_2
static TH1F * bgrYAtZ0_2
Definition: riplet/Lx.h:100
LxFinderTriplet::SaveInvMass
void SaveInvMass()
Definition: riplet/Lx.cxx:1211
LxEff.h
LxFinderTriplet::SetUseMCPInsteadOfHits
void SetUseMCPInsteadOfHits(bool value)
Definition: riplet/Lx.h:47
LxFinderTriplet::unknownChi2Histo
static TH1F * unknownChi2Histo
Definition: riplet/Lx.h:91
CbmMuchPixelHit.h
Class for pixel hits in MUCH detector.
LxCATriplets.h
LxFinderTriplet::fPrimVtx
CbmVertex * fPrimVtx
Definition: riplet/Lx.h:102
LxFinderTriplet::MCTracks
std::vector< LxMCTrack > MCTracks
Definition: riplet/Lx.h:117
LxFinderTriplet::backgroundChi2Histo
static TH1F * backgroundChi2Histo
Definition: riplet/Lx.h:90
LxFinderTriplet::listMCTracks
TClonesArray * listMCTracks
Definition: riplet/Lx.h:75
LxFinderTriplet::particleCounts
std::map< Int_t, std::map< Int_t, int > > particleCounts
Definition: riplet/Lx.h:125
LxFinderTriplet::linkWithSts
bool linkWithSts
Definition: riplet/Lx.h:109
LxFinderTriplet::calcMiddlePoints
bool calcMiddlePoints
Definition: riplet/Lx.h:111
LxFinderTriplet::caSpace
LxSpace caSpace
Definition: riplet/Lx.h:124
LxFinderTriplet::useMCPInsteadOfHits
bool useMCPInsteadOfHits
Definition: riplet/Lx.h:110
CbmStsTrack
Definition: CbmStsTrack.h:37
LXSTATIONS
#define LXSTATIONS
Definition: Simple/LxSettings.h:9
LxFinderTriplet::bgrInterTracksDistance
static TH1F * bgrInterTracksDistance
Definition: riplet/Lx.h:94
CbmStsKFTrackFitter.h
LxMC.h
LxFinderTriplet::listMuchPts
TClonesArray * listMuchPts
Definition: riplet/Lx.h:76