00001 #ifndef ValidationMisalignedTracker_h
00002 #define ValidationMisalignedTracker_h
00003
00004
00005 #include <memory>
00006
00007
00008 #include "FWCore/Framework/interface/Frameworkfwd.h"
00009 #include "FWCore/Framework/interface/EDAnalyzer.h"
00010
00011
00012 #include "FWCore/Framework/interface/ESHandle.h"
00013 #include "SimTracker/TrackAssociation/interface/TrackAssociatorBase.h"
00014 #include "SimDataFormats/TrackingAnalysis/interface/TrackingParticleFwd.h"
00015 #include "DataFormats/TrackReco/interface/TrackFwd.h"
00016 #include "SimDataFormats/TrackingAnalysis/interface/TrackingVertex.h"
00017 #include "DataFormats/GeometryVector/interface/GlobalVector.h"
00018 #include "MagneticField/Engine/interface/MagneticField.h"
00019
00020 #include "TTree.h"
00021 #include "TFile.h"
00022
00023 #include <TROOT.h>
00024 #include <TSystem.h>
00025 #include <TCanvas.h>
00026 #include <cmath>
00027 #include "TStyle.h"
00028
00029
00030
00031
00032
00033 class ValidationMisalignedTracker : public edm::EDAnalyzer {
00034 public:
00035 explicit ValidationMisalignedTracker(const edm::ParameterSet&);
00036 ~ValidationMisalignedTracker();
00037
00038
00039 private:
00040 virtual void beginJob(const edm::EventSetup&) ;
00041 virtual void analyze(const edm::Event&, const edm::EventSetup&);
00042 virtual void endJob() ;
00043
00044
00045
00046 std::string simobject,trackassociator;
00047 bool selection_eff,selection_fake,ZmassSelection_;
00048 std::string rootfile_;
00049
00050 bool skip;
00051 int eventCount_;
00052 TTree* tree_eff;
00053 TTree* tree_fake;
00054 TFile* file_;
00055
00056
00057 int irun, ievt;
00058
00059 float mzmu,recmzmu,ptzmu,recptzmu,etazmu,thetazmu,phizmu,recetazmu,recthetazmu,recphizmu;
00060 float recenezmu, enezmu, pLzmu, recpLzmu,yzmu,recyzmu,mxptmu,recmxptmu,minptmu,recminptmu;
00061 int countpart[2],countpartrec[2];
00062 int flag,flagrec,count,countrec;
00063
00064 float ene[2][2],p[2][2],px[2][2],py[2][2],pz[2][2],ptmu[2][2];
00065 float recene[2][2],recp[2][2],recpx[2][2],recpy[2][2],recpz[2][2],recptmu[2][2];
00066
00067 int trackType;
00068 float pt, eta, cottheta, theta, costheta, phi, d0, z0;
00069 int nhit;
00070 float recpt, receta, rectheta, reccottheta, recphi, recd0, recz0;
00071 int nAssoc, recnhit;
00072 float recchiq;
00073 float reseta, respt, resd0, resz0, resphi,rescottheta,eff;
00074
00075 float fakemzmu,fakerecmzmu,fakeptzmu,fakerecptzmu,fakeetazmu,fakethetazmu,fakephizmu,fakerecetazmu,fakerecthetazmu,fakerecphizmu;
00076 float fakerecenezmu, fakeenezmu, fakepLzmu, fakerecpLzmu,fakeyzmu,fakerecyzmu,fakemxptmu,fakerecmxptmu,fakeminptmu,fakerecminptmu;
00077 int fakecountpart[2],fakecountpartrec[2],fakeflag,fakeflagrec,fakecount,fakecountsim,fakecountrec;
00078 float fakeene[2][2],fakep[2][2],fakepx[2][2],fakepy[2][2],fakepz[2][2],fakeptmu[2][2];
00079 float fakerecene[2][2],fakerecp[2][2],fakerecpx[2][2],fakerecpy[2][2],fakerecpz[2][2],fakerecptmu[2][2];
00080
00081 int faketrackType;
00082 float fakept, fakeeta, fakecottheta, faketheta, fakecostheta, fakephi, faked0, fakez0;
00083 int fakenhit;
00084 float fakerecpt, fakereceta, fakerectheta, fakereccottheta, fakerecphi, fakerecd0, fakerecz0;
00085 int fakenAssoc, fakerecnhit;
00086 float fakerecchiq;
00087 float fakereseta, fakerespt, fakeresd0, fakeresz0, fakeresphi,fakerescottheta,fake;
00088
00089 double chi2tmp;
00090 float fractiontmp;
00091 bool onlyDiag;
00092 edm::ESHandle<MagneticField> theMF;
00093 std::vector<std::string> associators;
00094 std::vector<const TrackAssociatorBase*> associatore;
00095
00096 std::vector<edm::InputTag> label;
00097 edm::InputTag label_tp_effic;
00098 edm::InputTag label_tp_fake;
00099
00100 GlobalVector magField;
00101 std::vector<float> ptused;
00102
00103
00104
00105 };
00106
00107 #endif
00108