CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_6_1_2_SLHC2/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.11 2013/04/17 09:48:46 itopsisg 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/PixelBarrelNameUpgrade.h"
00038 #include "DataFormats/SiPixelDetId/interface/PixelEndcapName.h"
00039 #include "DataFormats/SiPixelDetId/interface/PixelEndcapNameUpgrade.h"
00040 #include "DataFormats/TrackReco/interface/Track.h"
00041 #include "TrackingTools/PatternTools/interface/TrajTrackAssociation.h"
00042 
00043 class SiPixelTrackResidualSource : public edm::EDAnalyzer {
00044   public:
00045     explicit SiPixelTrackResidualSource(const edm::ParameterSet&);
00046             ~SiPixelTrackResidualSource();
00047 
00048     virtual void beginJob();
00049     virtual void endJob(void);
00050     virtual void beginRun(const edm::Run& r, edm::EventSetup const& iSetup);
00051     virtual void analyze(const edm::Event&, const edm::EventSetup&);
00052     void triplets(double x1,double y1,double z1,double x2,double y2,double z2,double x3,double y3,double z3,
00053                   double ptsig, double & dc,double & dz, double kap); 
00054   private: 
00055     edm::ParameterSet pSet_; 
00056     edm::InputTag src_; 
00057     edm::InputTag clustersrc_; 
00058     edm::InputTag tracksrc_; 
00059     std::string ttrhbuilder_; 
00060     DQMStore* dbe_; 
00061 
00062     bool debug_; 
00063     bool modOn; 
00064     bool reducedSet;
00065     //barrel:
00066     bool ladOn, layOn, phiOn;
00067     //forward:
00068     bool ringOn, bladeOn, diskOn; 
00069     bool isUpgrade;
00070     double ptminres_;
00071     bool firstRun;
00072     int NTotal;
00073     int NLowProb;
00074     
00075     std::map<uint32_t, SiPixelTrackResidualModule*> theSiPixelStructure; 
00076 
00077     MonitorElement* meSubdetResidualX[3];
00078     MonitorElement* meSubdetResidualY[3];
00079 
00080     MonitorElement* meNofTracks_;
00081     MonitorElement* meNofTracksInPixVol_;
00082     MonitorElement* meNofClustersOnTrack_;
00083     MonitorElement* meNofClustersNotOnTrack_;
00084     MonitorElement* meClChargeOnTrack_all; 
00085     MonitorElement* meClChargeOnTrack_bpix; 
00086     MonitorElement* meClChargeOnTrack_fpix; 
00087     MonitorElement* meClChargeOnTrack_layer1; 
00088     MonitorElement* meClChargeOnTrack_layer2; 
00089     MonitorElement* meClChargeOnTrack_layer3; 
00090     MonitorElement* meClChargeOnTrack_layer4;
00091     MonitorElement* meClChargeOnTrack_diskp1; 
00092     MonitorElement* meClChargeOnTrack_diskp2; 
00093     MonitorElement* meClChargeOnTrack_diskp3;
00094     MonitorElement* meClChargeOnTrack_diskm1; 
00095     MonitorElement* meClChargeOnTrack_diskm2; 
00096     MonitorElement* meClChargeOnTrack_diskm3;
00097     MonitorElement* meClChargeNotOnTrack_all; 
00098     MonitorElement* meClChargeNotOnTrack_bpix; 
00099     MonitorElement* meClChargeNotOnTrack_fpix; 
00100     MonitorElement* meClChargeNotOnTrack_layer1; 
00101     MonitorElement* meClChargeNotOnTrack_layer2; 
00102     MonitorElement* meClChargeNotOnTrack_layer3; 
00103     MonitorElement* meClChargeNotOnTrack_layer4; 
00104     MonitorElement* meClChargeNotOnTrack_diskp1; 
00105     MonitorElement* meClChargeNotOnTrack_diskp2; 
00106     MonitorElement* meClChargeNotOnTrack_diskp3;
00107     MonitorElement* meClChargeNotOnTrack_diskm1; 
00108     MonitorElement* meClChargeNotOnTrack_diskm2;
00109     MonitorElement* meClChargeNotOnTrack_diskm3;
00110     MonitorElement* meClSizeOnTrack_all; 
00111     MonitorElement* meClSizeOnTrack_bpix; 
00112     MonitorElement* meClSizeOnTrack_fpix; 
00113     MonitorElement* meClSizeOnTrack_layer1; 
00114     MonitorElement* meClSizeOnTrack_layer2; 
00115     MonitorElement* meClSizeOnTrack_layer3; 
00116     MonitorElement* meClSizeOnTrack_layer4; 
00117     MonitorElement* meClSizeOnTrack_diskp1; 
00118     MonitorElement* meClSizeOnTrack_diskp2; 
00119     MonitorElement* meClSizeOnTrack_diskp3;
00120     MonitorElement* meClSizeOnTrack_diskm1; 
00121     MonitorElement* meClSizeOnTrack_diskm2; 
00122     MonitorElement* meClSizeOnTrack_diskm3;
00123     MonitorElement* meClSizeNotOnTrack_all; 
00124     MonitorElement* meClSizeNotOnTrack_bpix; 
00125     MonitorElement* meClSizeNotOnTrack_fpix; 
00126     MonitorElement* meClSizeNotOnTrack_layer1; 
00127     MonitorElement* meClSizeNotOnTrack_layer2; 
00128     MonitorElement* meClSizeNotOnTrack_layer3; 
00129     MonitorElement* meClSizeNotOnTrack_layer4; 
00130     MonitorElement* meClSizeNotOnTrack_diskp1; 
00131     MonitorElement* meClSizeNotOnTrack_diskp2; 
00132     MonitorElement* meClSizeNotOnTrack_diskp3; 
00133     MonitorElement* meClSizeNotOnTrack_diskm1; 
00134     MonitorElement* meClSizeNotOnTrack_diskm2;
00135     MonitorElement* meClSizeNotOnTrack_diskm3;
00136     MonitorElement* meClSizeXOnTrack_all; 
00137     MonitorElement* meClSizeXOnTrack_bpix; 
00138     MonitorElement* meClSizeXOnTrack_fpix; 
00139     MonitorElement* meClSizeXOnTrack_layer1; 
00140     MonitorElement* meClSizeXOnTrack_layer2; 
00141     MonitorElement* meClSizeXOnTrack_layer3; 
00142     MonitorElement* meClSizeXOnTrack_layer4; 
00143     MonitorElement* meClSizeXOnTrack_diskp1; 
00144     MonitorElement* meClSizeXOnTrack_diskp2; 
00145     MonitorElement* meClSizeXOnTrack_diskp3; 
00146     MonitorElement* meClSizeXOnTrack_diskm1; 
00147     MonitorElement* meClSizeXOnTrack_diskm2; 
00148     MonitorElement* meClSizeXOnTrack_diskm3; 
00149     MonitorElement* meClSizeXNotOnTrack_all; 
00150     MonitorElement* meClSizeXNotOnTrack_bpix; 
00151     MonitorElement* meClSizeXNotOnTrack_fpix; 
00152     MonitorElement* meClSizeXNotOnTrack_layer1; 
00153     MonitorElement* meClSizeXNotOnTrack_layer2; 
00154     MonitorElement* meClSizeXNotOnTrack_layer3; 
00155     MonitorElement* meClSizeXNotOnTrack_layer4; 
00156     MonitorElement* meClSizeXNotOnTrack_diskp1; 
00157     MonitorElement* meClSizeXNotOnTrack_diskp2; 
00158     MonitorElement* meClSizeXNotOnTrack_diskp3; 
00159     MonitorElement* meClSizeXNotOnTrack_diskm1; 
00160     MonitorElement* meClSizeXNotOnTrack_diskm2;
00161     MonitorElement* meClSizeXNotOnTrack_diskm3;
00162     MonitorElement* meClSizeYOnTrack_all; 
00163     MonitorElement* meClSizeYOnTrack_bpix; 
00164     MonitorElement* meClSizeYOnTrack_fpix; 
00165     MonitorElement* meClSizeYOnTrack_layer1; 
00166     MonitorElement* meClSizeYOnTrack_layer2; 
00167     MonitorElement* meClSizeYOnTrack_layer3; 
00168     MonitorElement* meClSizeYOnTrack_layer4; 
00169     MonitorElement* meClSizeYOnTrack_diskp1; 
00170     MonitorElement* meClSizeYOnTrack_diskp2; 
00171     MonitorElement* meClSizeYOnTrack_diskp3; 
00172     MonitorElement* meClSizeYOnTrack_diskm1; 
00173     MonitorElement* meClSizeYOnTrack_diskm2; 
00174     MonitorElement* meClSizeYOnTrack_diskm3;
00175     MonitorElement* meClSizeYNotOnTrack_all; 
00176     MonitorElement* meClSizeYNotOnTrack_bpix; 
00177     MonitorElement* meClSizeYNotOnTrack_fpix; 
00178     MonitorElement* meClSizeYNotOnTrack_layer1; 
00179     MonitorElement* meClSizeYNotOnTrack_layer2; 
00180     MonitorElement* meClSizeYNotOnTrack_layer3; 
00181     MonitorElement* meClSizeYNotOnTrack_layer4; 
00182     MonitorElement* meClSizeYNotOnTrack_diskp1; 
00183     MonitorElement* meClSizeYNotOnTrack_diskp2; 
00184     MonitorElement* meClSizeYNotOnTrack_diskp3; 
00185     MonitorElement* meClSizeYNotOnTrack_diskm1; 
00186     MonitorElement* meClSizeYNotOnTrack_diskm2;
00187     MonitorElement* meClSizeYNotOnTrack_diskm3;
00188 
00189     //new
00190     MonitorElement* meNClustersOnTrack_all;
00191     MonitorElement* meNClustersOnTrack_bpix;
00192     MonitorElement* meNClustersOnTrack_fpix; 
00193     MonitorElement* meNClustersOnTrack_layer1; 
00194     MonitorElement* meNClustersOnTrack_layer2; 
00195     MonitorElement* meNClustersOnTrack_layer3; 
00196     MonitorElement* meNClustersOnTrack_layer4; 
00197     MonitorElement* meNClustersOnTrack_diskp1; 
00198     MonitorElement* meNClustersOnTrack_diskp2; 
00199     MonitorElement* meNClustersOnTrack_diskp3; 
00200     MonitorElement* meNClustersOnTrack_diskm1; 
00201     MonitorElement* meNClustersOnTrack_diskm2; 
00202     MonitorElement* meNClustersOnTrack_diskm3; 
00203     MonitorElement* meNClustersNotOnTrack_all; 
00204     MonitorElement* meNClustersNotOnTrack_bpix; 
00205     MonitorElement* meNClustersNotOnTrack_fpix; 
00206     MonitorElement* meNClustersNotOnTrack_layer1; 
00207     MonitorElement* meNClustersNotOnTrack_layer2; 
00208     MonitorElement* meNClustersNotOnTrack_layer3; 
00209     MonitorElement* meNClustersNotOnTrack_layer4; 
00210     MonitorElement* meNClustersNotOnTrack_diskp1; 
00211     MonitorElement* meNClustersNotOnTrack_diskp2; 
00212     MonitorElement* meNClustersNotOnTrack_diskp3; 
00213     MonitorElement* meNClustersNotOnTrack_diskm1; 
00214     MonitorElement* meNClustersNotOnTrack_diskm2;
00215     MonitorElement* meNClustersNotOnTrack_diskm3;
00216     //
00217 
00218     MonitorElement* meClPosLayer1OnTrack; 
00219     MonitorElement* meClPosLayer2OnTrack; 
00220     MonitorElement* meClPosLayer3OnTrack; 
00221     MonitorElement* meClPosLayer4OnTrack; 
00222     MonitorElement* meClPosLayer1NotOnTrack; 
00223     MonitorElement* meClPosLayer2NotOnTrack; 
00224     MonitorElement* meClPosLayer3NotOnTrack; 
00225     MonitorElement* meClPosLayer4NotOnTrack; 
00226 
00227     MonitorElement* meClPosDisk1pzOnTrack; 
00228     MonitorElement* meClPosDisk2pzOnTrack; 
00229     MonitorElement* meClPosDisk3pzOnTrack; 
00230     MonitorElement* meClPosDisk1mzOnTrack; 
00231     MonitorElement* meClPosDisk2mzOnTrack; 
00232     MonitorElement* meClPosDisk3mzOnTrack; 
00233     MonitorElement* meClPosDisk1pzNotOnTrack; 
00234     MonitorElement* meClPosDisk2pzNotOnTrack; 
00235     MonitorElement* meClPosDisk3pzNotOnTrack; 
00236     MonitorElement* meClPosDisk1mzNotOnTrack; 
00237     MonitorElement* meClPosDisk2mzNotOnTrack; 
00238     MonitorElement* meClPosDisk3mzNotOnTrack; 
00239     
00240     MonitorElement* meHitProbability;
00241 };
00242 
00243 #endif