CMS 3D CMS Logo

/afs/cern.ch/work/a/aaltunda/public/www/CMSSW_6_2_5/src/Alignment/OfflineValidation/plugins/ValidationMisalignedTracker.h

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