Go to the documentation of this file.00001
00002
00003
00004
00005
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #include <memory>
00023
00024
00025 #include "FWCore/Framework/interface/Frameworkfwd.h"
00026 #include "FWCore/Framework/interface/EDAnalyzer.h"
00027
00028 #include "FWCore/Framework/interface/Event.h"
00029 #include "FWCore/Framework/interface/MakerMacros.h"
00030
00031 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00032 #include "FWCore/ServiceRegistry/interface/Service.h"
00033 #include "CommonTools/UtilAlgos/interface/TFileService.h"
00034
00035 #include "DQMServices/Core/interface/DQMStore.h"
00036 #include "DQMServices/Core/interface/MonitorElement.h"
00037 #include "FWCore/ServiceRegistry/interface/Service.h"
00038
00039 #include "DataFormats/TrackReco/interface/Track.h"
00040 #include "DataFormats/TrackReco/interface/TrackFwd.h"
00041 #include "SimDataFormats/Track/interface/SimTrackContainer.h"
00042 #include "SimDataFormats/Vertex/interface/SimVertexContainer.h"
00043 #include "SimTracker/TrackAssociation/interface/TrackAssociatorByChi2.h"
00044 #include "SimTracker/TrackAssociation/interface/TrackAssociatorByHits.h"
00045 #include "SimTracker/TrackerHitAssociation/interface/TrackerHitAssociator.h"
00046 #include "SimTracker/Records/interface/TrackAssociatorRecord.h"
00047 #include "SimTracker/Records/interface/VertexAssociatorRecord.h"
00048 #include "SimTracker/TrackAssociation/interface/TrackAssociatorBase.h"
00049 #include "SimTracker/VertexAssociation/interface/VertexAssociatorBase.h"
00050 #include "SimDataFormats/TrackingAnalysis/interface/TrackingParticle.h"
00051 #include "SimDataFormats/TrackingAnalysis/interface/TrackingVertex.h"
00052 #include "TrackingTools/TrajectoryState/interface/FreeTrajectoryState.h"
00053 #include "TrackingTools/PatternTools/interface/TrajectoryStateClosestToBeamLineBuilder.h"
00054 #include "TrackingTools/PatternTools/interface/ClosestApproachInRPhi.h"
00055
00056 #include "DataFormats/Candidate/interface/Candidate.h"
00057 #include "DataFormats/Candidate/interface/VertexCompositeCandidate.h"
00058 #include "DataFormats/V0Candidate/interface/V0Candidate.h"
00059 #include "DataFormats/RecoCandidate/interface/RecoChargedCandidate.h"
00060 #include "RecoVertex/V0Producer/interface/V0Producer.h"
00061
00062 #include "SimTracker/TrackHistory/interface/TrackClassifier.h"
00063 #include "SimDataFormats/TrackingAnalysis/interface/TrackingParticleFwd.h"
00064
00065 #include "Geometry/CommonDetUnit/interface/TrackingGeometry.h"
00066 #include "Geometry/CommonDetUnit/interface/GeomDetUnit.h"
00067 #include "Geometry/TrackerGeometryBuilder/interface/TrackerGeometry.h"
00068 #include "Geometry/Records/interface/TrackerDigiGeometryRecord.h"
00069 #include "Geometry/CommonDetUnit/interface/GeomDet.h"
00070 #include "Geometry/TrackerGeometryBuilder/interface/GluedGeomDet.h"
00071
00072 #include "MagneticField/Records/interface/IdealMagneticFieldRecord.h"
00073 #include "MagneticField/VolumeBasedEngine/interface/VolumeBasedMagneticField.h"
00074
00075 #include "RecoVertex/VertexTools/interface/VertexDistance3D.h"
00076 #include "DataFormats/VertexReco/interface/Vertex.h"
00077
00078
00079 #include "HepMC/GenVertex.h"
00080 #include "HepMC/GenParticle.h"
00081
00082 #include "TROOT.h"
00083 #include "TMath.h"
00084 #include "TH1F.h"
00085 #include "TH1I.h"
00086 #include "TH2F.h"
00087
00088 class V0Validator : public edm::EDAnalyzer {
00089
00090 public:
00091 explicit V0Validator(const edm::ParameterSet&);
00092 ~V0Validator();
00093
00094
00095 private:
00096
00097 virtual void analyze(const edm::Event&, const edm::EventSetup&);
00098
00099 virtual void beginRun(const edm::Run&, const edm::EventSetup&);
00100 virtual void endRun(const edm::Run&, const edm::EventSetup&);
00101
00102
00103 float K0sGenEta, LamGenEta, K0sGenpT, LamGenpT, K0sGenR, LamGenR;
00104 float LamGenX, LamGenY, LamGenZ, KsGenX, KsGenY, KsGenZ;
00105 float K0sCandEta, LamCandEta, K0sCandpT, LamCandpT, K0sCandR, LamCandR;
00106 unsigned int K0sGenStatus, LamGenStatus, K0sCandStatus, LamCandStatus;
00107 unsigned int K0sPiCandStatus[2], LamPiCandStatus[2], K0sPiEff[2], LamPiEff[2];
00108
00109
00110 int genLam, genK0s, realLamFound, realK0sFound, realLamFoundEff, realK0sFoundEff;
00111 int lamTracksFound, k0sTracksFound, lamCandFound, k0sCandFound, noTPforK0sCand, noTPforLamCand;
00112
00113
00114
00115
00116
00117
00118
00119
00120
00121
00122
00123
00124
00125
00126
00127
00128
00129
00130
00131
00132
00133
00134
00135
00136
00137
00138
00139
00140
00141
00142
00143
00144
00145
00146
00147
00148
00149
00150
00151
00152
00153
00154
00155
00156
00157
00158
00159
00160
00161
00162
00163
00164
00165
00166
00167
00168
00169
00170
00171
00172
00173
00174
00175
00176
00177
00178
00179 DQMStore* theDQMstore;
00180
00181 MonitorElement* ksEffVsR;
00182 MonitorElement* ksEffVsEta;
00183 MonitorElement* ksEffVsPt;
00184 MonitorElement* ksTkEffVsR;
00185 MonitorElement* ksTkEffVsEta;
00186 MonitorElement* ksTkEffVsPt;
00187 MonitorElement* ksFakeVsR;
00188 MonitorElement* ksFakeVsEta;
00189 MonitorElement* ksFakeVsPt;
00190 MonitorElement* ksTkFakeVsR;
00191 MonitorElement* ksTkFakeVsEta;
00192 MonitorElement* ksTkFakeVsPt;
00193
00194 MonitorElement* ksEffVsR_num;
00195 MonitorElement* ksEffVsEta_num;
00196 MonitorElement* ksEffVsPt_num;
00197 MonitorElement* ksTkEffVsR_num;
00198 MonitorElement* ksTkEffVsEta_num;
00199 MonitorElement* ksTkEffVsPt_num;
00200 MonitorElement* ksFakeVsR_num;
00201 MonitorElement* ksFakeVsEta_num;
00202 MonitorElement* ksFakeVsPt_num;
00203 MonitorElement* ksTkFakeVsR_num;
00204 MonitorElement* ksTkFakeVsEta_num;
00205 MonitorElement* ksTkFakeVsPt_num;
00206
00207 MonitorElement* ksFakeVsR_denom;
00208 MonitorElement* ksFakeVsEta_denom;
00209 MonitorElement* ksFakeVsPt_denom;
00210 MonitorElement* ksEffVsR_denom;
00211 MonitorElement* ksEffVsEta_denom;
00212 MonitorElement* ksEffVsPt_denom;
00213
00214 MonitorElement* lamFakeVsR_denom;
00215 MonitorElement* lamFakeVsEta_denom;
00216 MonitorElement* lamFakeVsPt_denom;
00217 MonitorElement* lamEffVsR_denom;
00218 MonitorElement* lamEffVsEta_denom;
00219 MonitorElement* lamEffVsPt_denom;
00220
00221 MonitorElement* lamEffVsR;
00222 MonitorElement* lamEffVsEta;
00223 MonitorElement* lamEffVsPt;
00224 MonitorElement* lamTkEffVsR;
00225 MonitorElement* lamTkEffVsEta;
00226 MonitorElement* lamTkEffVsPt;
00227 MonitorElement* lamFakeVsR;
00228 MonitorElement* lamFakeVsEta;
00229 MonitorElement* lamFakeVsPt;
00230 MonitorElement* lamTkFakeVsR;
00231 MonitorElement* lamTkFakeVsEta;
00232 MonitorElement* lamTkFakeVsPt;
00233
00234 MonitorElement* lamEffVsR_num;
00235 MonitorElement* lamEffVsEta_num;
00236 MonitorElement* lamEffVsPt_num;
00237 MonitorElement* lamTkEffVsR_num;
00238 MonitorElement* lamTkEffVsEta_num;
00239 MonitorElement* lamTkEffVsPt_num;
00240 MonitorElement* lamFakeVsR_num;
00241 MonitorElement* lamFakeVsEta_num;
00242 MonitorElement* lamFakeVsPt_num;
00243 MonitorElement* lamTkFakeVsR_num;
00244 MonitorElement* lamTkFakeVsEta_num;
00245 MonitorElement* lamTkFakeVsPt_num;
00246
00247 MonitorElement* ksXResolution;
00248 MonitorElement* ksYResolution;
00249 MonitorElement* ksZResolution;
00250 MonitorElement* ksAbsoluteDistResolution;
00251 MonitorElement* lamXResolution;
00252 MonitorElement* lamYResolution;
00253 MonitorElement* lamZResolution;
00254 MonitorElement* lamAbsoluteDistResolution;
00255
00256 MonitorElement* nKs;
00257 MonitorElement* nLam;
00258
00259 MonitorElement* ksCandStatus;
00260 MonitorElement* lamCandStatus;
00261
00262 MonitorElement* fakeKsMass;
00263 MonitorElement* goodKsMass;
00264 MonitorElement* fakeLamMass;
00265 MonitorElement* goodLamMass;
00266
00267 MonitorElement* ksMassAll;
00268 MonitorElement* lamMassAll;
00269
00270
00271 MonitorElement* ksFakeDauRadDist;
00272 MonitorElement* lamFakeDauRadDist;
00273
00274
00275 std::string theDQMRootFileName;
00276 edm::InputTag k0sCollectionTag;
00277 edm::InputTag lamCollectionTag;
00278 std::string dirName;
00279
00280 };
00281