Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-03-23 04:29:16

0001 
0002 // File: SiPixelTrackingRecHitsValid.hh
0003 // // Authors:  Xingtao Huang (Puerto Rico Univ.)
0004 //              Gavril Giurgiu (JHU)
0005 // Creation Date:  Oct. 2006.
0006 //
0007 //--------------------------------------------
0008 
0009 #ifndef Validation_RecoTrack_SiPixelTrackingRecHitsValid_h
0010 #define Validation_RecoTrack_SiPixelTrackingRecHitsValid_h
0011 
0012 //DQM services for histogram
0013 #include "DQMServices/Core/interface/DQMOneEDAnalyzer.h"
0014 
0015 #include "FWCore/Framework/interface/Event.h"
0016 #include "DataFormats/Common/interface/Handle.h"
0017 #include "FWCore/Framework/interface/EventSetup.h"
0018 #include "DataFormats/GeometryVector/interface/GlobalPoint.h"
0019 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0020 #include "DataFormats/TrackingRecHit/interface/TrackingRecHit.h"
0021 #include "DataFormats/TrajectorySeed/interface/TrajectorySeed.h"
0022 #include "TrackingTools/TrajectoryState/interface/TrajectoryStateOnSurface.h"
0023 #include "Geometry/TrackerGeometryBuilder/interface/TrackerGeometry.h"
0024 #include "MagneticField/Records/interface/IdealMagneticFieldRecord.h"
0025 #include "TrackingTools/MaterialEffects/interface/PropagatorWithMaterial.h"
0026 #include "TrackingTools/KalmanUpdators/interface/KFUpdator.h"
0027 #include "TrackingTools/TrackFitters/interface/KFTrajectoryFitter.h"
0028 #include "TrackingTools/TrackFitters/interface/KFTrajectorySmoother.h"
0029 #include "RecoTracker/TransientTrackingRecHit/interface/TkTransientTrackingRecHitBuilder.h"
0030 #include "TrackingTools/TrajectoryState/interface/TrajectoryStateTransform.h"
0031 #include "FWCore/MessageLogger/interface/MessageLogger.h"
0032 #include "DataFormats/TrackerRecHit2D/interface/SiPixelRecHitCollection.h"
0033 #include "DataFormats/TrackReco/interface/TrackFwd.h"
0034 //#include "Validation/RecoTrack/interface/TrackLocalAngle.h"
0035 #include <TROOT.h>
0036 #include <TTree.h>
0037 #include <TFile.h>
0038 #include <TH1F.h>
0039 #include <TProfile.h>
0040 
0041 #include "FWCore/Framework/interface/Frameworkfwd.h"
0042 #include "FWCore/Framework/interface/EventSetup.h"
0043 #include "FWCore/Framework/interface/ESHandle.h"
0044 #include "FWCore/Framework/interface/MakerMacros.h"
0045 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0046 
0047 //--- for SimHit association
0048 #include "SimDataFormats/TrackingHit/interface/PSimHit.h"
0049 #include "SimTracker/TrackerHitAssociation/interface/TrackerHitAssociator.h"
0050 #include "Geometry/CommonTopologies/interface/PixelTopology.h"
0051 #include "Geometry/CommonDetUnit/interface/PixelGeomDetUnit.h"
0052 #include "Geometry/CommonDetUnit/interface/GeomDetType.h"
0053 #include "Geometry/CommonDetUnit/interface/GeomDet.h"
0054 #include "Geometry/CommonDetUnit/interface/GluedGeomDet.h"
0055 #include "Geometry/TrackerGeometryBuilder/interface/TrackerGeometry.h"
0056 #include "Geometry/Records/interface/TrackerDigiGeometryRecord.h"
0057 #include "Geometry/TrackerNumberingBuilder/interface/GeometricDet.h"
0058 #include "Geometry/CommonDetUnit/interface/PixelGeomDetType.h"
0059 
0060 #include <string>
0061 
0062 class TTree;
0063 class TFile;
0064 
0065 class SiPixelTrackingRecHitsValid : public DQMOneEDAnalyzer<> {
0066 public:
0067   explicit SiPixelTrackingRecHitsValid(const edm::ParameterSet& conf);
0068 
0069   ~SiPixelTrackingRecHitsValid() override;
0070 
0071   void analyze(const edm::Event& e, const edm::EventSetup& c) override;
0072   void bookHistograms(DQMStore::IBooker& ibooker, const edm::Run& run, const edm::EventSetup& es) override;
0073   void beginJob() override;
0074   void endJob() override;
0075 
0076   //xt std::pair<LocalPoint,LocalVector> projectHit( const PSimHit& hit, const StripGeomDetUnit* stripDet,const BoundPlane& plane);
0077   std::pair<LocalPoint, LocalVector> projectHit(const PSimHit& hit,
0078                                                 const PixelGeomDetUnit* pixelDet,
0079                                                 const BoundPlane& plane);
0080 
0081 private:
0082   const edm::ESGetToken<TrackerTopology, TrackerTopologyRcd> tTopoEsToken_;
0083   const edm::ESGetToken<TrackerGeometry, TrackerDigiGeometryRecord> tGeomEsToken_;
0084 
0085   TrackerHitAssociator::Config trackerHitAssociatorConfig_;
0086   //TrackLocalAngle *anglefinder_;
0087   DQMStore* dbe_;
0088   bool runStandalone;
0089   std::string outputFile_;
0090   std::string debugNtuple_;
0091   std::string builderName_;
0092   edm::EDGetTokenT<SiPixelRecHitCollection> siPixelRecHitCollectionToken_;
0093   edm::EDGetTokenT<reco::TrackCollection> recoTrackCollectionToken_;
0094   bool MTCCtrack_;
0095 
0096   bool checkType_;  // do we check that the simHit associated with recHit is of the expected particle type ?
0097   int genType_;     // the type of particle that the simHit associated with recHits should be
0098 
0099   // Pixel barrel detector has 3 layers and 8 modules; book histograms for each module = (layer, ring) pair
0100 
0101   MonitorElement* mePosxBarrelLayerModule[3][8];
0102   MonitorElement* mePosyBarrelLayerModule[3][8];
0103   MonitorElement* meErrxBarrelLayerModule[3][8];
0104   MonitorElement* meErryBarrelLayerModule[3][8];
0105   MonitorElement* meResxBarrelLayerModule[3][8];
0106   MonitorElement* meResyBarrelLayerModule[3][8];
0107   MonitorElement* mePullxBarrelLayerModule[3][8];
0108   MonitorElement* mePullyBarrelLayerModule[3][8];
0109   MonitorElement* meNpixBarrelLayerModule[3][8];
0110   MonitorElement* meNxpixBarrelLayerModule[3][8];
0111   MonitorElement* meNypixBarrelLayerModule[3][8];
0112   MonitorElement* meChargeBarrelLayerModule[3][8];
0113   MonitorElement* meResXvsAlphaBarrelLayerModule[3][8];
0114   MonitorElement* meResYvsAlphaBarrelLayerModule[3][8];
0115   MonitorElement* meResXvsBetaBarrelLayerModule[3][8];
0116   MonitorElement* meResYvsBetaBarrelLayerModule[3][8];
0117   MonitorElement* mePullXvsAlphaBarrelLayerModule[3][8];
0118   MonitorElement* mePullYvsAlphaBarrelLayerModule[3][8];
0119   MonitorElement* mePullXvsBetaBarrelLayerModule[3][8];
0120   MonitorElement* mePullYvsBetaBarrelLayerModule[3][8];
0121   MonitorElement* mePullXvsPhiBarrelLayerModule[3][8];
0122   MonitorElement* mePullYvsPhiBarrelLayerModule[3][8];
0123   MonitorElement* mePullXvsEtaBarrelLayerModule[3][8];
0124   MonitorElement* mePullYvsEtaBarrelLayerModule[3][8];
0125 
0126   // All layers and modules together
0127   MonitorElement* mePosxBarrel;
0128   MonitorElement* mePosyBarrel;
0129   MonitorElement* meErrxBarrel;
0130   MonitorElement* meErryBarrel;
0131   MonitorElement* meResxBarrel;
0132   MonitorElement* meResyBarrel;
0133   MonitorElement* mePullxBarrel;
0134   MonitorElement* mePullyBarrel;
0135   MonitorElement* meNpixBarrel;
0136   MonitorElement* meNxpixBarrel;
0137   MonitorElement* meNypixBarrel;
0138   MonitorElement* meChargeBarrel;
0139   MonitorElement* meResXvsAlphaBarrel;
0140   MonitorElement* meResYvsAlphaBarrel;
0141   MonitorElement* meResXvsBetaBarrel;
0142   MonitorElement* meResYvsBetaBarrel;
0143   MonitorElement* mePullXvsAlphaBarrel;
0144   MonitorElement* mePullYvsAlphaBarrel;
0145   MonitorElement* mePullXvsBetaBarrel;
0146   MonitorElement* mePullYvsBetaBarrel;
0147   MonitorElement* mePullXvsPhiBarrel;
0148   MonitorElement* mePullYvsPhiBarrel;
0149   MonitorElement* mePullXvsEtaBarrel;
0150   MonitorElement* mePullYvsEtaBarrel;
0151 
0152   MonitorElement* mePosxBarrelHalfModule;
0153   MonitorElement* mePosxBarrelFullModule;
0154   MonitorElement* mePosxBarrelFlippedLadders;
0155   MonitorElement* mePosxBarrelNonFlippedLadders;
0156   MonitorElement* mePosyBarrelHalfModule;
0157   MonitorElement* mePosyBarrelFullModule;
0158   MonitorElement* mePosyBarrelFlippedLadders;
0159   MonitorElement* mePosyBarrelNonFlippedLadders;
0160 
0161   MonitorElement* meResXvsAlphaBarrelFlippedLadders;
0162   MonitorElement* meResYvsAlphaBarrelFlippedLadders;
0163   MonitorElement* meResXvsBetaBarrelFlippedLadders;
0164   MonitorElement* meResYvsBetaBarrelFlippedLadders;
0165   MonitorElement* mePullXvsAlphaBarrelFlippedLadders;
0166   MonitorElement* mePullYvsAlphaBarrelFlippedLadders;
0167   MonitorElement* mePullXvsBetaBarrelFlippedLadders;
0168   MonitorElement* mePullYvsBetaBarrelFlippedLadders;
0169   MonitorElement* mePullXvsPhiBarrelFlippedLadders;
0170   MonitorElement* mePullYvsPhiBarrelFlippedLadders;
0171   MonitorElement* mePullXvsEtaBarrelFlippedLadders;
0172   MonitorElement* mePullYvsEtaBarrelFlippedLadders;
0173 
0174   MonitorElement* meResXvsAlphaBarrelNonFlippedLadders;
0175   MonitorElement* meResYvsAlphaBarrelNonFlippedLadders;
0176   MonitorElement* meResXvsBetaBarrelNonFlippedLadders;
0177   MonitorElement* meResYvsBetaBarrelNonFlippedLadders;
0178   MonitorElement* mePullXvsAlphaBarrelNonFlippedLadders;
0179   MonitorElement* mePullYvsAlphaBarrelNonFlippedLadders;
0180   MonitorElement* mePullXvsBetaBarrelNonFlippedLadders;
0181   MonitorElement* mePullYvsBetaBarrelNonFlippedLadders;
0182   MonitorElement* mePullXvsPhiBarrelNonFlippedLadders;
0183   MonitorElement* mePullYvsPhiBarrelNonFlippedLadders;
0184   MonitorElement* mePullXvsEtaBarrelNonFlippedLadders;
0185   MonitorElement* mePullYvsEtaBarrelNonFlippedLadders;
0186 
0187   MonitorElement* meWPullXvsAlphaBarrelFlippedLadders;
0188   MonitorElement* meWPullYvsAlphaBarrelFlippedLadders;
0189   MonitorElement* meWPullXvsBetaBarrelFlippedLadders;
0190   MonitorElement* meWPullYvsBetaBarrelFlippedLadders;
0191   MonitorElement* meWPullXvsAlphaBarrelNonFlippedLadders;
0192   MonitorElement* meWPullYvsAlphaBarrelNonFlippedLadders;
0193   MonitorElement* meWPullXvsBetaBarrelNonFlippedLadders;
0194   MonitorElement* meWPullYvsBetaBarrelNonFlippedLadders;
0195 
0196   // Split barrel x/y residuals and pulls in 3 layers
0197   MonitorElement* meResxBarrelLayer[3];
0198   MonitorElement* meResyBarrelLayer[3];
0199   MonitorElement* mePullxBarrelLayer[3];
0200   MonitorElement* mePullyBarrelLayer[3];
0201 
0202   MonitorElement* meResXvsAlphaBarrelFlippedLaddersLayer[3];
0203   MonitorElement* meResYvsAlphaBarrelFlippedLaddersLayer[3];
0204   MonitorElement* meResXvsBetaBarrelFlippedLaddersLayer[3];
0205   MonitorElement* meResYvsBetaBarrelFlippedLaddersLayer[3];
0206   MonitorElement* meResXvsAlphaBarrelNonFlippedLaddersLayer[3];
0207   MonitorElement* meResYvsAlphaBarrelNonFlippedLaddersLayer[3];
0208   MonitorElement* meResXvsBetaBarrelNonFlippedLaddersLayer[3];
0209   MonitorElement* meResYvsBetaBarrelNonFlippedLaddersLayer[3];
0210 
0211   // Pixel forward detector has 2 sides, 2 disks per side, 2 panels per disk and either 3 or 4 plaquettes per blade
0212   // Panel 1 has 4 plaquettes
0213   // Panel 2 has 3 plaquettes
0214 
0215   // Negative Z side
0216   // Panel 1: 2 disks, 4 plaquets
0217 
0218   MonitorElement* mePosxZmPanel1DiskPlaq[2][4];
0219   MonitorElement* mePosyZmPanel1DiskPlaq[2][4];
0220   MonitorElement* meErrxZmPanel1DiskPlaq[2][4];
0221   MonitorElement* meErryZmPanel1DiskPlaq[2][4];
0222   MonitorElement* meResxZmPanel1DiskPlaq[2][4];
0223   MonitorElement* meResyZmPanel1DiskPlaq[2][4];
0224   MonitorElement* mePullxZmPanel1DiskPlaq[2][4];
0225   MonitorElement* mePullyZmPanel1DiskPlaq[2][4];
0226   MonitorElement* meNpixZmPanel1DiskPlaq[2][4];
0227   MonitorElement* meNxpixZmPanel1DiskPlaq[2][4];
0228   MonitorElement* meNypixZmPanel1DiskPlaq[2][4];
0229   MonitorElement* meChargeZmPanel1DiskPlaq[2][4];
0230   MonitorElement* meResXvsAlphaZmPanel1DiskPlaq[2][4];
0231   MonitorElement* meResYvsAlphaZmPanel1DiskPlaq[2][4];
0232   MonitorElement* meResXvsBetaZmPanel1DiskPlaq[2][4];
0233   MonitorElement* meResYvsBetaZmPanel1DiskPlaq[2][4];
0234   MonitorElement* mePullXvsAlphaZmPanel1DiskPlaq[2][4];
0235   MonitorElement* mePullYvsAlphaZmPanel1DiskPlaq[2][4];
0236   MonitorElement* mePullXvsBetaZmPanel1DiskPlaq[2][4];
0237   MonitorElement* mePullYvsBetaZmPanel1DiskPlaq[2][4];
0238   MonitorElement* mePullXvsPhiZmPanel1DiskPlaq[2][4];
0239   MonitorElement* mePullYvsPhiZmPanel1DiskPlaq[2][4];
0240   MonitorElement* mePullXvsEtaZmPanel1DiskPlaq[2][4];
0241   MonitorElement* mePullYvsEtaZmPanel1DiskPlaq[2][4];
0242 
0243   // Panel 2: 2 disks, 3 plaquets
0244   MonitorElement* mePosxZmPanel2DiskPlaq[2][3];
0245   MonitorElement* mePosyZmPanel2DiskPlaq[2][3];
0246   MonitorElement* meErrxZmPanel2DiskPlaq[2][3];
0247   MonitorElement* meErryZmPanel2DiskPlaq[2][3];
0248   MonitorElement* meResxZmPanel2DiskPlaq[2][3];
0249   MonitorElement* meResyZmPanel2DiskPlaq[2][3];
0250   MonitorElement* mePullxZmPanel2DiskPlaq[2][3];
0251   MonitorElement* mePullyZmPanel2DiskPlaq[2][3];
0252   MonitorElement* meNpixZmPanel2DiskPlaq[2][3];
0253   MonitorElement* meNxpixZmPanel2DiskPlaq[2][3];
0254   MonitorElement* meNypixZmPanel2DiskPlaq[2][3];
0255   MonitorElement* meChargeZmPanel2DiskPlaq[2][3];
0256   MonitorElement* meResXvsAlphaZmPanel2DiskPlaq[2][3];
0257   MonitorElement* meResYvsAlphaZmPanel2DiskPlaq[2][3];
0258   MonitorElement* meResXvsBetaZmPanel2DiskPlaq[2][3];
0259   MonitorElement* meResYvsBetaZmPanel2DiskPlaq[2][3];
0260   MonitorElement* mePullXvsAlphaZmPanel2DiskPlaq[2][3];
0261   MonitorElement* mePullYvsAlphaZmPanel2DiskPlaq[2][3];
0262   MonitorElement* mePullXvsBetaZmPanel2DiskPlaq[2][3];
0263   MonitorElement* mePullYvsBetaZmPanel2DiskPlaq[2][3];
0264   MonitorElement* mePullXvsPhiZmPanel2DiskPlaq[2][3];
0265   MonitorElement* mePullYvsPhiZmPanel2DiskPlaq[2][3];
0266   MonitorElement* mePullXvsEtaZmPanel2DiskPlaq[2][3];
0267   MonitorElement* mePullYvsEtaZmPanel2DiskPlaq[2][3];
0268 
0269   // Positive Z side
0270   // Panel 1: 2 disks, 4 plaquets
0271   MonitorElement* mePosxZpPanel1DiskPlaq[2][4];
0272   MonitorElement* mePosyZpPanel1DiskPlaq[2][4];
0273   MonitorElement* meErrxZpPanel1DiskPlaq[2][4];
0274   MonitorElement* meErryZpPanel1DiskPlaq[2][4];
0275   MonitorElement* meResxZpPanel1DiskPlaq[2][4];
0276   MonitorElement* meResyZpPanel1DiskPlaq[2][4];
0277   MonitorElement* mePullxZpPanel1DiskPlaq[2][4];
0278   MonitorElement* mePullyZpPanel1DiskPlaq[2][4];
0279   MonitorElement* meNpixZpPanel1DiskPlaq[2][4];
0280   MonitorElement* meNxpixZpPanel1DiskPlaq[2][4];
0281   MonitorElement* meNypixZpPanel1DiskPlaq[2][4];
0282   MonitorElement* meChargeZpPanel1DiskPlaq[2][4];
0283   MonitorElement* meResXvsAlphaZpPanel1DiskPlaq[2][4];
0284   MonitorElement* meResYvsAlphaZpPanel1DiskPlaq[2][4];
0285   MonitorElement* meResXvsBetaZpPanel1DiskPlaq[2][4];
0286   MonitorElement* meResYvsBetaZpPanel1DiskPlaq[2][4];
0287   MonitorElement* mePullXvsAlphaZpPanel1DiskPlaq[2][4];
0288   MonitorElement* mePullYvsAlphaZpPanel1DiskPlaq[2][4];
0289   MonitorElement* mePullXvsBetaZpPanel1DiskPlaq[2][4];
0290   MonitorElement* mePullYvsBetaZpPanel1DiskPlaq[2][4];
0291   MonitorElement* mePullXvsPhiZpPanel1DiskPlaq[2][4];
0292   MonitorElement* mePullYvsPhiZpPanel1DiskPlaq[2][4];
0293   MonitorElement* mePullXvsEtaZpPanel1DiskPlaq[2][4];
0294   MonitorElement* mePullYvsEtaZpPanel1DiskPlaq[2][4];
0295 
0296   // Panel 2: 2 disks, 3 plaquets
0297   MonitorElement* mePosxZpPanel2DiskPlaq[2][3];
0298   MonitorElement* mePosyZpPanel2DiskPlaq[2][3];
0299   MonitorElement* meErrxZpPanel2DiskPlaq[2][3];
0300   MonitorElement* meErryZpPanel2DiskPlaq[2][3];
0301   MonitorElement* meResxZpPanel2DiskPlaq[2][3];
0302   MonitorElement* meResyZpPanel2DiskPlaq[2][3];
0303   MonitorElement* mePullxZpPanel2DiskPlaq[2][3];
0304   MonitorElement* mePullyZpPanel2DiskPlaq[2][3];
0305   MonitorElement* meNpixZpPanel2DiskPlaq[2][3];
0306   MonitorElement* meNxpixZpPanel2DiskPlaq[2][3];
0307   MonitorElement* meNypixZpPanel2DiskPlaq[2][3];
0308   MonitorElement* meChargeZpPanel2DiskPlaq[2][3];
0309   MonitorElement* meResXvsAlphaZpPanel2DiskPlaq[2][3];
0310   MonitorElement* meResYvsAlphaZpPanel2DiskPlaq[2][3];
0311   MonitorElement* meResXvsBetaZpPanel2DiskPlaq[2][3];
0312   MonitorElement* meResYvsBetaZpPanel2DiskPlaq[2][3];
0313   MonitorElement* mePullXvsAlphaZpPanel2DiskPlaq[2][3];
0314   MonitorElement* mePullYvsAlphaZpPanel2DiskPlaq[2][3];
0315   MonitorElement* mePullXvsBetaZpPanel2DiskPlaq[2][3];
0316   MonitorElement* mePullYvsBetaZpPanel2DiskPlaq[2][3];
0317   MonitorElement* mePullXvsPhiZpPanel2DiskPlaq[2][3];
0318   MonitorElement* mePullYvsPhiZpPanel2DiskPlaq[2][3];
0319   MonitorElement* mePullXvsEtaZpPanel2DiskPlaq[2][3];
0320   MonitorElement* mePullYvsEtaZpPanel2DiskPlaq[2][3];
0321 
0322   // All disks and plaquettes together
0323 
0324   // Negative Z side, panel 1
0325   MonitorElement* mePosxZmPanel1;
0326   MonitorElement* mePosyZmPanel1;
0327   MonitorElement* meErrxZmPanel1;
0328   MonitorElement* meErryZmPanel1;
0329   MonitorElement* meResxZmPanel1;
0330   MonitorElement* meResyZmPanel1;
0331   MonitorElement* mePullxZmPanel1;
0332   MonitorElement* mePullyZmPanel1;
0333   MonitorElement* meNpixZmPanel1;
0334   MonitorElement* meNxpixZmPanel1;
0335   MonitorElement* meNypixZmPanel1;
0336   MonitorElement* meChargeZmPanel1;
0337   MonitorElement* meResXvsAlphaZmPanel1;
0338   MonitorElement* meResYvsAlphaZmPanel1;
0339   MonitorElement* meResXvsBetaZmPanel1;
0340   MonitorElement* meResYvsBetaZmPanel1;
0341   MonitorElement* mePullXvsAlphaZmPanel1;
0342   MonitorElement* mePullYvsAlphaZmPanel1;
0343   MonitorElement* mePullXvsBetaZmPanel1;
0344   MonitorElement* mePullYvsBetaZmPanel1;
0345   MonitorElement* mePullXvsPhiZmPanel1;
0346   MonitorElement* mePullYvsPhiZmPanel1;
0347   MonitorElement* mePullXvsEtaZmPanel1;
0348   MonitorElement* mePullYvsEtaZmPanel1;
0349 
0350   MonitorElement* meWPullXvsAlphaZmPanel1;
0351   MonitorElement* meWPullYvsAlphaZmPanel1;
0352   MonitorElement* meWPullXvsBetaZmPanel1;
0353   MonitorElement* meWPullYvsBetaZmPanel1;
0354 
0355   // Negative Z side, panel 2
0356   MonitorElement* mePosxZmPanel2;
0357   MonitorElement* mePosyZmPanel2;
0358   MonitorElement* meErrxZmPanel2;
0359   MonitorElement* meErryZmPanel2;
0360   MonitorElement* meResxZmPanel2;
0361   MonitorElement* meResyZmPanel2;
0362   MonitorElement* mePullxZmPanel2;
0363   MonitorElement* mePullyZmPanel2;
0364   MonitorElement* meNpixZmPanel2;
0365   MonitorElement* meNxpixZmPanel2;
0366   MonitorElement* meNypixZmPanel2;
0367   MonitorElement* meChargeZmPanel2;
0368   MonitorElement* meResXvsAlphaZmPanel2;
0369   MonitorElement* meResYvsAlphaZmPanel2;
0370   MonitorElement* meResXvsBetaZmPanel2;
0371   MonitorElement* meResYvsBetaZmPanel2;
0372   MonitorElement* mePullXvsAlphaZmPanel2;
0373   MonitorElement* mePullYvsAlphaZmPanel2;
0374   MonitorElement* mePullXvsBetaZmPanel2;
0375   MonitorElement* mePullYvsBetaZmPanel2;
0376   MonitorElement* mePullXvsPhiZmPanel2;
0377   MonitorElement* mePullYvsPhiZmPanel2;
0378   MonitorElement* mePullXvsEtaZmPanel2;
0379   MonitorElement* mePullYvsEtaZmPanel2;
0380 
0381   MonitorElement* meWPullXvsAlphaZmPanel2;
0382   MonitorElement* meWPullYvsAlphaZmPanel2;
0383   MonitorElement* meWPullXvsBetaZmPanel2;
0384   MonitorElement* meWPullYvsBetaZmPanel2;
0385 
0386   // Positive Z side, panel 1
0387   MonitorElement* mePosxZpPanel1;
0388   MonitorElement* mePosyZpPanel1;
0389   MonitorElement* meErrxZpPanel1;
0390   MonitorElement* meErryZpPanel1;
0391   MonitorElement* meResxZpPanel1;
0392   MonitorElement* meResyZpPanel1;
0393   MonitorElement* mePullxZpPanel1;
0394   MonitorElement* mePullyZpPanel1;
0395   MonitorElement* meNpixZpPanel1;
0396   MonitorElement* meNxpixZpPanel1;
0397   MonitorElement* meNypixZpPanel1;
0398   MonitorElement* meChargeZpPanel1;
0399   MonitorElement* meResXvsAlphaZpPanel1;
0400   MonitorElement* meResYvsAlphaZpPanel1;
0401   MonitorElement* meResXvsBetaZpPanel1;
0402   MonitorElement* meResYvsBetaZpPanel1;
0403   MonitorElement* mePullXvsAlphaZpPanel1;
0404   MonitorElement* mePullYvsAlphaZpPanel1;
0405   MonitorElement* mePullXvsBetaZpPanel1;
0406   MonitorElement* mePullYvsBetaZpPanel1;
0407   MonitorElement* mePullXvsPhiZpPanel1;
0408   MonitorElement* mePullYvsPhiZpPanel1;
0409   MonitorElement* mePullXvsEtaZpPanel1;
0410   MonitorElement* mePullYvsEtaZpPanel1;
0411 
0412   MonitorElement* meWPullXvsAlphaZpPanel1;
0413   MonitorElement* meWPullYvsAlphaZpPanel1;
0414   MonitorElement* meWPullXvsBetaZpPanel1;
0415   MonitorElement* meWPullYvsBetaZpPanel1;
0416 
0417   // Positive Z side, panel 2
0418   MonitorElement* mePosxZpPanel2;
0419   MonitorElement* mePosyZpPanel2;
0420   MonitorElement* meErrxZpPanel2;
0421   MonitorElement* meErryZpPanel2;
0422   MonitorElement* meResxZpPanel2;
0423   MonitorElement* meResyZpPanel2;
0424   MonitorElement* mePullxZpPanel2;
0425   MonitorElement* mePullyZpPanel2;
0426   MonitorElement* meNpixZpPanel2;
0427   MonitorElement* meNxpixZpPanel2;
0428   MonitorElement* meNypixZpPanel2;
0429   MonitorElement* meChargeZpPanel2;
0430   MonitorElement* meResXvsAlphaZpPanel2;
0431   MonitorElement* meResYvsAlphaZpPanel2;
0432   MonitorElement* meResXvsBetaZpPanel2;
0433   MonitorElement* meResYvsBetaZpPanel2;
0434   MonitorElement* mePullXvsAlphaZpPanel2;
0435   MonitorElement* mePullYvsAlphaZpPanel2;
0436   MonitorElement* mePullXvsBetaZpPanel2;
0437   MonitorElement* mePullYvsBetaZpPanel2;
0438   MonitorElement* mePullXvsPhiZpPanel2;
0439   MonitorElement* mePullYvsPhiZpPanel2;
0440   MonitorElement* mePullXvsEtaZpPanel2;
0441   MonitorElement* mePullYvsEtaZpPanel2;
0442 
0443   MonitorElement* meWPullXvsAlphaZpPanel2;
0444   MonitorElement* meWPullYvsAlphaZpPanel2;
0445   MonitorElement* meWPullXvsBetaZpPanel2;
0446   MonitorElement* meWPullYvsBetaZpPanel2;
0447 
0448   // all hits (not only from tracks)
0449   MonitorElement* mePosxBarrel_all_hits;
0450   MonitorElement* mePosyBarrel_all_hits;
0451 
0452   MonitorElement* mePosxZmPanel1_all_hits;
0453   MonitorElement* mePosyZmPanel1_all_hits;
0454   MonitorElement* mePosxZmPanel2_all_hits;
0455   MonitorElement* mePosyZmPanel2_all_hits;
0456 
0457   MonitorElement* mePosxZpPanel1_all_hits;
0458   MonitorElement* mePosyZpPanel1_all_hits;
0459   MonitorElement* mePosxZpPanel2_all_hits;
0460   MonitorElement* mePosyZpPanel2_all_hits;
0461 
0462   // control histograms
0463   MonitorElement* meTracksPerEvent;
0464   MonitorElement* mePixRecHitsPerTrack;
0465 
0466   // variables that go in the output tree
0467   float rechitx;     // x position of hit
0468   float rechity;     // y position of hit
0469   float rechitz;     // z position of hit
0470   float rechiterrx;  // x position error of hit (error not squared)
0471   float rechiterry;  // y position error of hit (error not squared)
0472 
0473   float rechitresx;   // difference between reconstructed hit x position and 'true' x position
0474   float rechitresy;   // difference between reconstructed hit y position and 'true' y position
0475   float rechitpullx;  // x residual divideded by error
0476   float rechitpully;  // y residual divideded by error
0477 
0478   int npix;      // number of pixel in the cluster
0479   int nxpix;     // size of cluster (number of pixels) along x direction
0480   int nypix;     // size of cluster (number of pixels) along y direction
0481   float charge;  // total charge in cluster
0482 
0483   float alpha;  // track angle in the xz plane of the module local coordinate system
0484   float beta;   // track angle in the yz plane of the module local coordinate system
0485 
0486   float phi;  // polar track angle
0487   float eta;  // pseudo-rapidity (function of theta, the azimuthal angle)
0488 
0489   int subdetId;
0490   int layer;
0491   int ladder;
0492   int mod;
0493   int side;
0494   int disk;
0495   int blade;
0496   int panel;
0497   int plaq;
0498   int half;     // half = 1 if the barrel module is half size and 0 if it is full size (only defined for barrel)
0499   int flipped;  // flipped = 1 if the module is flipped and 0 if non-flipped (only defined for barrel)
0500 
0501   int nsimhit;  // number of simhits associated with a rechit
0502   int pidhit;   // PID of the particle that produced the simHit associated with the recHit
0503 
0504   float simhitx;  // true x position of hit
0505   float simhity;  // true y position of hit
0506 
0507   edm::EventNumber_t evt;
0508   edm::RunNumber_t run;
0509 
0510   TFile* tfile_;
0511   TTree* t_;
0512 };
0513 
0514 #endif