CMS 3D CMS Logo

/afs/cern.ch/work/a/aaltunda/public/www/CMSSW_5_3_14/src/DQM/SiPixelMonitorTrack/interface/SiPixelTrackResidualSource.h

Go to the documentation of this file.
00001 #ifndef SiPixelTrackResidualSource_H
00002 #define SiPixelTrackResidualSource_H
00003 
00004 // Package: SiPixelMonitorTrack
00005 // Class:   SiPixelTrackResidualSource
00006 // 
00007 // class SiPixelTrackResidualSource SiPixelTrackResidualSource.h 
00008 //       DQM/SiPixelMonitorTrack/interface/SiPixelTrackResidualSource.h
00009 // 
00010 // Description:    <one line class summary>
00011 // Implementation: <Notes on implementation>
00012 //
00013 // Original Author: Shan-Huei Chuang
00014 //         Created: Fri Mar 23 18:41:42 CET 2007
00015 // $Id: SiPixelTrackResidualSource.h,v 1.9 2012/09/11 09:37:41 clseitz Exp $
00016 //
00017 // Updated by: Lukas Wehrli
00018 // for pixel offline DQM 
00019 
00020 #include <boost/cstdint.hpp>
00021 
00022 #include "FWCore/Framework/interface/EDAnalyzer.h"
00023 #include "FWCore/Framework/interface/Event.h"
00024 #include "FWCore/Framework/interface/EventSetup.h"
00025 #include "FWCore/Framework/interface/MakerMacros.h"
00026 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00027 #include "FWCore/ServiceRegistry/interface/Service.h"
00028 #include "DQMServices/Core/interface/DQMStore.h"
00029 #include "DQMServices/Core/interface/MonitorElement.h"
00030 #include "DQM/SiPixelMonitorTrack/interface/SiPixelTrackResidualModule.h"
00031 
00032 //Files added for monitoring track quantities
00033 #include "Alignment/TrackerAlignment/interface/TrackerAlignableId.h"
00034 #include "Alignment/OfflineValidation/interface/TrackerValidationVariables.h"
00035 #include "DataFormats/TrackerRecHit2D/interface/SiPixelRecHitCollection.h"
00036 #include "DataFormats/SiPixelDetId/interface/PixelBarrelName.h"
00037 #include "DataFormats/SiPixelDetId/interface/PixelEndcapName.h"
00038 #include "DataFormats/TrackReco/interface/Track.h"
00039 #include "TrackingTools/PatternTools/interface/TrajTrackAssociation.h"
00040 
00041 class SiPixelTrackResidualSource : public edm::EDAnalyzer {
00042   public:
00043     explicit SiPixelTrackResidualSource(const edm::ParameterSet&);
00044             ~SiPixelTrackResidualSource();
00045 
00046     virtual void beginJob();
00047     virtual void endJob(void);
00048     virtual void beginRun(const edm::Run& r, edm::EventSetup const& iSetup);
00049     virtual void analyze(const edm::Event&, const edm::EventSetup&);
00050     void triplets(double x1,double y1,double z1,double x2,double y2,double z2,double x3,double y3,double z3,
00051                   double ptsig, double & dc,double & dz, double kap); 
00052   private: 
00053     edm::ParameterSet pSet_; 
00054     edm::InputTag src_; 
00055     edm::InputTag clustersrc_; 
00056     edm::InputTag tracksrc_; 
00057     std::string ttrhbuilder_; 
00058     DQMStore* dbe_; 
00059 
00060     bool debug_; 
00061     bool modOn; 
00062     bool reducedSet;
00063     //barrel:
00064     bool ladOn, layOn, phiOn;
00065     //forward:
00066     bool ringOn, bladeOn, diskOn; 
00067     double ptminres_;
00068     bool firstRun;
00069     int NTotal;
00070     int NLowProb;
00071     
00072     std::map<uint32_t, SiPixelTrackResidualModule*> theSiPixelStructure; 
00073 
00074     MonitorElement* meSubdetResidualX[3];
00075     MonitorElement* meSubdetResidualY[3];
00076 
00077     MonitorElement* meNofTracks_;
00078     MonitorElement* meNofTracksInPixVol_;
00079     MonitorElement* meNofClustersOnTrack_;
00080     MonitorElement* meNofClustersNotOnTrack_;
00081     MonitorElement* meClChargeOnTrack_all; 
00082     MonitorElement* meClChargeOnTrack_bpix; 
00083     MonitorElement* meClChargeOnTrack_fpix; 
00084     MonitorElement* meClChargeOnTrack_layer1; 
00085     MonitorElement* meClChargeOnTrack_layer2; 
00086     MonitorElement* meClChargeOnTrack_layer3; 
00087     MonitorElement* meClChargeOnTrack_diskp1; 
00088     MonitorElement* meClChargeOnTrack_diskp2; 
00089     MonitorElement* meClChargeOnTrack_diskm1; 
00090     MonitorElement* meClChargeOnTrack_diskm2; 
00091     MonitorElement* meClChargeNotOnTrack_all; 
00092     MonitorElement* meClChargeNotOnTrack_bpix; 
00093     MonitorElement* meClChargeNotOnTrack_fpix; 
00094     MonitorElement* meClChargeNotOnTrack_layer1; 
00095     MonitorElement* meClChargeNotOnTrack_layer2; 
00096     MonitorElement* meClChargeNotOnTrack_layer3; 
00097     MonitorElement* meClChargeNotOnTrack_diskp1; 
00098     MonitorElement* meClChargeNotOnTrack_diskp2; 
00099     MonitorElement* meClChargeNotOnTrack_diskm1; 
00100     MonitorElement* meClChargeNotOnTrack_diskm2;
00101     MonitorElement* meClSizeOnTrack_all; 
00102     MonitorElement* meClSizeOnTrack_bpix; 
00103     MonitorElement* meClSizeOnTrack_fpix; 
00104     MonitorElement* meClSizeOnTrack_layer1; 
00105     MonitorElement* meClSizeOnTrack_layer2; 
00106     MonitorElement* meClSizeOnTrack_layer3; 
00107     MonitorElement* meClSizeOnTrack_diskp1; 
00108     MonitorElement* meClSizeOnTrack_diskp2; 
00109     MonitorElement* meClSizeOnTrack_diskm1; 
00110     MonitorElement* meClSizeOnTrack_diskm2; 
00111     MonitorElement* meClSizeNotOnTrack_all; 
00112     MonitorElement* meClSizeNotOnTrack_bpix; 
00113     MonitorElement* meClSizeNotOnTrack_fpix; 
00114     MonitorElement* meClSizeNotOnTrack_layer1; 
00115     MonitorElement* meClSizeNotOnTrack_layer2; 
00116     MonitorElement* meClSizeNotOnTrack_layer3; 
00117     MonitorElement* meClSizeNotOnTrack_diskp1; 
00118     MonitorElement* meClSizeNotOnTrack_diskp2; 
00119     MonitorElement* meClSizeNotOnTrack_diskm1; 
00120     MonitorElement* meClSizeNotOnTrack_diskm2;
00121     MonitorElement* meClSizeXOnTrack_all; 
00122     MonitorElement* meClSizeXOnTrack_bpix; 
00123     MonitorElement* meClSizeXOnTrack_fpix; 
00124     MonitorElement* meClSizeXOnTrack_layer1; 
00125     MonitorElement* meClSizeXOnTrack_layer2; 
00126     MonitorElement* meClSizeXOnTrack_layer3; 
00127     MonitorElement* meClSizeXOnTrack_diskp1; 
00128     MonitorElement* meClSizeXOnTrack_diskp2; 
00129     MonitorElement* meClSizeXOnTrack_diskm1; 
00130     MonitorElement* meClSizeXOnTrack_diskm2; 
00131     MonitorElement* meClSizeXNotOnTrack_all; 
00132     MonitorElement* meClSizeXNotOnTrack_bpix; 
00133     MonitorElement* meClSizeXNotOnTrack_fpix; 
00134     MonitorElement* meClSizeXNotOnTrack_layer1; 
00135     MonitorElement* meClSizeXNotOnTrack_layer2; 
00136     MonitorElement* meClSizeXNotOnTrack_layer3; 
00137     MonitorElement* meClSizeXNotOnTrack_diskp1; 
00138     MonitorElement* meClSizeXNotOnTrack_diskp2; 
00139     MonitorElement* meClSizeXNotOnTrack_diskm1; 
00140     MonitorElement* meClSizeXNotOnTrack_diskm2;
00141     MonitorElement* meClSizeYOnTrack_all; 
00142     MonitorElement* meClSizeYOnTrack_bpix; 
00143     MonitorElement* meClSizeYOnTrack_fpix; 
00144     MonitorElement* meClSizeYOnTrack_layer1; 
00145     MonitorElement* meClSizeYOnTrack_layer2; 
00146     MonitorElement* meClSizeYOnTrack_layer3; 
00147     MonitorElement* meClSizeYOnTrack_diskp1; 
00148     MonitorElement* meClSizeYOnTrack_diskp2; 
00149     MonitorElement* meClSizeYOnTrack_diskm1; 
00150     MonitorElement* meClSizeYOnTrack_diskm2; 
00151     MonitorElement* meClSizeYNotOnTrack_all; 
00152     MonitorElement* meClSizeYNotOnTrack_bpix; 
00153     MonitorElement* meClSizeYNotOnTrack_fpix; 
00154     MonitorElement* meClSizeYNotOnTrack_layer1; 
00155     MonitorElement* meClSizeYNotOnTrack_layer2; 
00156     MonitorElement* meClSizeYNotOnTrack_layer3; 
00157     MonitorElement* meClSizeYNotOnTrack_diskp1; 
00158     MonitorElement* meClSizeYNotOnTrack_diskp2; 
00159     MonitorElement* meClSizeYNotOnTrack_diskm1; 
00160     MonitorElement* meClSizeYNotOnTrack_diskm2;
00161 
00162     //new
00163     MonitorElement* meNClustersOnTrack_all;
00164     MonitorElement* meNClustersOnTrack_bpix;
00165     MonitorElement* meNClustersOnTrack_fpix; 
00166     MonitorElement* meNClustersOnTrack_layer1; 
00167     MonitorElement* meNClustersOnTrack_layer2; 
00168     MonitorElement* meNClustersOnTrack_layer3; 
00169     MonitorElement* meNClustersOnTrack_diskp1; 
00170     MonitorElement* meNClustersOnTrack_diskp2; 
00171     MonitorElement* meNClustersOnTrack_diskm1; 
00172     MonitorElement* meNClustersOnTrack_diskm2; 
00173     MonitorElement* meNClustersNotOnTrack_all; 
00174     MonitorElement* meNClustersNotOnTrack_bpix; 
00175     MonitorElement* meNClustersNotOnTrack_fpix; 
00176     MonitorElement* meNClustersNotOnTrack_layer1; 
00177     MonitorElement* meNClustersNotOnTrack_layer2; 
00178     MonitorElement* meNClustersNotOnTrack_layer3; 
00179     MonitorElement* meNClustersNotOnTrack_diskp1; 
00180     MonitorElement* meNClustersNotOnTrack_diskp2; 
00181     MonitorElement* meNClustersNotOnTrack_diskm1; 
00182     MonitorElement* meNClustersNotOnTrack_diskm2;
00183     //
00184 
00185     MonitorElement* meClPosLayer1OnTrack; 
00186     MonitorElement* meClPosLayer2OnTrack; 
00187     MonitorElement* meClPosLayer3OnTrack; 
00188     MonitorElement* meClPosLayer1NotOnTrack; 
00189     MonitorElement* meClPosLayer2NotOnTrack; 
00190     MonitorElement* meClPosLayer3NotOnTrack; 
00191 
00192     MonitorElement* meClPosDisk1pzOnTrack; 
00193     MonitorElement* meClPosDisk2pzOnTrack; 
00194     MonitorElement* meClPosDisk1mzOnTrack; 
00195     MonitorElement* meClPosDisk2mzOnTrack; 
00196     MonitorElement* meClPosDisk1pzNotOnTrack; 
00197     MonitorElement* meClPosDisk2pzNotOnTrack; 
00198     MonitorElement* meClPosDisk1mzNotOnTrack; 
00199     MonitorElement* meClPosDisk2mzNotOnTrack; 
00200     
00201     MonitorElement* meHitProbability;
00202 };
00203 
00204 #endif