Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 12:54:54

0001 #include "DataFormats/TrajectoryState/interface/PTrajectoryStateOnDet.h"
0002 #include "DataFormats/DetId/interface/DetId.h"
0003 
0004 // from Surface
0005 namespace {
0006   namespace sn {
0007     enum Side { positiveSide, negativeSide, onSurface };
0008     enum GlobalFace { outer, inner, zplus, zminus, phiplus, phiminus };
0009   }  // namespace sn
0010 }  // namespace
0011 #include <cassert>
0012 
0013 namespace {
0014   void verify(DetId id, sn::Side ss) {
0015     LocalTrajectoryParameters tp(0., 0., 0., 0., 0., 0.);
0016     PTrajectoryStateOnDet p(tp, 0., id, ss);
0017     assert(p.detId() == id);
0018     assert(p.surfaceSide() == ss);
0019   }
0020 }  // namespace
0021 
0022 int main() {
0023   DetId tracker(DetId::Tracker, 2);
0024   DetId muon(DetId::Muon, 3);
0025 
0026   verify(tracker, sn::positiveSide);
0027   verify(tracker, sn::negativeSide);
0028   verify(tracker, sn::onSurface);
0029 
0030   verify(muon, sn::positiveSide);
0031   verify(muon, sn::negativeSide);
0032   verify(muon, sn::onSurface);
0033 
0034   return 0;
0035 }