LCFIVertex  0.7.2
RPCutProcessor.h
1 #ifndef RPCutProcessor_h
2 #define RPCutProcessor_h 1
3 
4 #include <EVENT/ReconstructedParticle.h>
5 #include <UTIL/LCRelationNavigator.h>
6 
7 #include <gear/VXDParameters.h>
8 #include <gear/GearParameters.h>
9 #ifdef MCFAIL_DIAGNOSTICS
10 #include "TH1.h"
11 #include "TH2.h"
12 #include "TFile.h"
13 #endif
14 
15 #include "marlin/Processor.h"
16 #include "lcio.h"
17 #include <string>
18 using namespace lcio ;
19 using namespace marlin ;
20 
21 
23 
75 class RPCutProcessor : public Processor {
76 
77  public:
78  //The usual Marlin processor methods
79  virtual Processor* newProcessor() { return new RPCutProcessor ; }
80  RPCutProcessor() ;
81  virtual void init() ;
82  virtual void processRunHeader( LCRunHeader* run ) ;
83  virtual void processEvent( LCEvent * evt ) ;
84  virtual void check( LCEvent * evt ) ;
85  virtual void end() ;
86  protected:
87 
88  bool _Chi2OverDOFFail(ReconstructedParticle* RPTrack);
89  bool _D0Fail(ReconstructedParticle* RPTrack);
90  bool _D0ErrFail(ReconstructedParticle* RPTrack);
91  bool _Z0Fail(ReconstructedParticle* RPTrack);
92  bool _Z0ErrFail(ReconstructedParticle* RPTrack);
93  bool _PTFail(ReconstructedParticle* RPTrack);
94  bool _DetectorHitsFail(ReconstructedParticle* RPTrack,std::map<std::string,int> SubdetectorIndex);
95  bool _MCPIDFail( lcio::ReconstructedParticle* RPTrack, UTIL::LCRelationNavigator* pMCRelationNavigator );
96  bool _BadParametersFail(lcio::ReconstructedParticle* RPTrack);
97  bool _MCVertexFail(lcio::ReconstructedParticle* RPTrack, UTIL::LCRelationNavigator* pMCRelationNavigator );
98 
99  std::string _InRCPColName ;
100  std::string _TrackColName;
101  std::string _OutRCPColName ;
102  bool _WriteNewCollection;
103  bool _SubParticleLists;
104 
105  bool _Chi2OverDOFEnable;
106  bool _Chi2OverDOFCutLowerThan;
107  float _Chi2OverDOFCutValue;
108 
109  bool _D0Enable;
110  bool _D0CutLowerThan;
111  float _D0CutValue;
112 
113  bool _D0ErrEnable;
114  bool _D0ErrCutLowerThan;
115  float _D0ErrCutValue;
116 
117  bool _Z0Enable;
118  bool _Z0CutLowerThan;
119  float _Z0CutValue;
120 
121  bool _Z0ErrEnable;
122  bool _Z0ErrCutLowerThan;
123  float _Z0ErrCutValue;
124 
125  bool _PTEnable;
126  bool _PTCutLowerThan;
127  float _PTCutValue;
128 
129  bool _MonteCarloPIDEnable;
130  std::vector<int> _MonteCarloPIDsToCut;
131  std::string _MonteCarloRelationColName;
132 
133  bool _BadParametersEnable;
134 
135  bool _DetectorHitsEnable;
136  std::vector<std::string> _DetectorHitsBoundaryDetectorNames;
137  std::vector<int> _DetectorHitsBoundaryCuts;
138  std::vector<std::string> _DetectorHitsRegion1DetectorNames;
139  std::vector<int> _DetectorHitsRegion1Cuts;
140  std::vector<std::string> _DetectorHitsRegion2DetectorNames;
141  std::vector<int> _DetectorHitsRegion2Cuts;
142  std::vector<std::string> _DetectorNames;
143 
144  bool _MCVertexEnable;
145  const gear::VXDParameters* _VxdPar;
146  double _BeamPipeInnerRadius;
147  double _BeamPipeOuterRadius;
148  double _BeamPipeHalfZ;
149  double _CutDistance;
150 
151 #ifdef MCFAIL_DIAGNOSTICS
152  TH2F *_diaghist_bpmat_xy;
153  TH2F *_diaghist_vxmat_xy;
154  TH2F *_diaghist_nomat_xy;
155  TH2F *_diaghist_bpmat_rz;
156  TH2F *_diaghist_vxmat_rz;
157  TH2F *_diaghist_nomat_rz;
158  TH1F *_diaghist_dist;
159  TH1F *_diaghist_dist_vxmat;
160  TH1F *_diaghist_dist_nomat;
161 #endif
162 
163  int _nRun ;
164  int _nEvt ;
165 } ;
166 
167 #endif
168 
169 
170 
Cuts ReconstuctedParticles(RPs) from a collection (or from a list of RPs held by another RP) based on...