{"action":"created","comment":{"url":"https://api.github.com/repos/cms-sw/cmssw/pulls/comments/62468501","id":62468501,"diff_hunk":"@@ -0,0 +1,119 @@\n+#ifndef GEMRecHit_GEMSegment_h\n+#define GEMRecHit_GEMSegment_h\n+\n+/** \\class GEMSegment derived by the CSC segment\n+ *  Describes a reconstructed track segment in the 2+ layers of a GEM chamber.\n+ *  This is 4-dimensional since it has an origin (x,y) and a direction (x,y)\n+ *  in the local coordinate system of the chamber.\n+ *\n+ *  \\author Piet Verwilligen\n+ */\n+\n+#include <DataFormats/TrackingRecHit/interface/RecSegment.h>\n+#include <DataFormats/GEMRecHit/interface/GEMRecHitCollection.h>\n+\n+#include <iosfwd>\n+\n+class GEMDetId;\n+\n+class GEMSegment GCC11_FINAL : public RecSegment {\n+\n+public:\n+\n+    /// Default constructor\n+    GEMSegment() : theChi2(0.){}\n+\t\n+    /// Constructor\n+    GEMSegment(const std::vector<const GEMRecHit*>& proto_segment, LocalPoint origin, \n+\t       LocalVector direction, AlgebraicSymMatrix errors, double chi2);\n+\n+    GEMSegment(const std::vector<const GEMRecHit*>& proto_segment, LocalPoint origin, \n+\t       LocalVector direction, AlgebraicSymMatrix errors, double chi2, float bx);\n+\n+    GEMSegment(const std::vector<const GEMRecHit*>& proto_segment, LocalPoint origin, \n+\t      LocalVector direction, AlgebraicSymMatrix errors, double chi2, double time, double timeErr);\n+  \n+    /// Destructor\n+    virtual ~GEMSegment();\n+\n+    //--- Base class interface\n+    GEMSegment* clone() const { return new GEMSegment(*this); }\n+\n+    LocalPoint localPosition() const { return theOrigin; }\n+    LocalError localPositionError() const ;\n+\t\n+    LocalVector localDirection() const { return theLocalDirection; }\n+    LocalError localDirectionError() const ;\n+\n+    /// Parameters of the segment, for the track fit in the order (dx/dz, dy/dz, x, y )\n+    AlgebraicVector parameters() const;\n+\n+    /// Covariance matrix of parameters()\n+    AlgebraicSymMatrix parametersError() const { return theCovMatrix; }\n+\n+    /// The projection matrix relates the trajectory state parameters to the segment parameters().\n+    virtual AlgebraicMatrix projectionMatrix() const;\n+\n+    virtual std::vector<const TrackingRecHit*> recHits() const;\n+\n+    virtual std::vector<TrackingRecHit*> recHits();\n+\n+    double chi2() const { return theChi2; };\n+\n+    virtual int dimension() const { return 4; }\n+\n+    virtual int degreesOfFreedom() const { return 2*nRecHits() - 4;}\t \n+\n+    //--- Extension of the interface\n+        \n+    const std::vector<GEMRecHit>& specificRecHits() const { return theGEMRecHits; }\n+\n+    int nRecHits() const { return theGEMRecHits.size(); }        \n+\n+    GEMDetId gemDetId() const {\n+      DetId detid = geographicalId();\n+      GEMDetId rollid = GEMDetId(detid);\n+      GEMDetId chamid = rollid.superChamberId();\n+\treturn chamid;\n+    }\n+\n+    /*\n+    GEMDetId gemDetId() const {\n+    // this geographical id comes from the RecSegment. \n+    // in .cc we have defined to choose always ST3 for GE2/1\n+    // and always choose Layer 1 in general\n+      DetId detid = geographicalId(); \n+      GEMDetId rollid = GEMDetId(detid);\n+      GEMDetId chamid = rollid.chamberId();\n+      // for GE1/1 this chamber id is fine\n+      // for GE2/1 the station can be 2 or 3 and we want to fix it to 3\n+      if(chamid.station()==1)      return chamid;\n+      else if(chamid.station()==2) {\n+\t// GEMDetId:: Re Ri St La Ch Ro\n+\treturn GEMDetId(chamid.region(),1,3,1,chamid.chamber(),0);\n+      }\n+      else if(chamid.station()==3) return chamid;\n+      else return chamid;\n+    }  \n+    */\n+\n+    float time()    const { return theTimeValue; }\n+    float timeErr() const { return theTimeUncrt; }\n+    float BunchX()  const { return theBX; }","path":"DataFormats/GEMRecHit/interface/GEMSegment.h","position":102,"original_position":102,"commit_id":"f971a0a048c8d32a0a34ca9eafa51ecebbb41be0","original_commit_id":"f971a0a048c8d32a0a34ca9eafa51ecebbb41be0","user":{"login":"jshlee","id":5427173,"avatar_url":"https://avatars.githubusercontent.com/u/5427173?v=3","gravatar_id":"","url":"https://api.github.com/users/jshlee","html_url":"https://github.com/jshlee","followers_url":"https://api.github.com/users/jshlee/followers","following_url":"https://api.github.com/users/jshlee/following{/other_user}","gists_url":"https://api.github.com/users/jshlee/gists{/gist_id}","starred_url":"https://api.github.com/users/jshlee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jshlee/subscriptions","organizations_url":"https://api.github.com/users/jshlee/orgs","repos_url":"https://api.github.com/users/jshlee/repos","events_url":"https://api.github.com/users/jshlee/events{/privacy}","received_events_url":"https://api.github.com/users/jshlee/received_events","type":"User","site_admin":false},"body":"yes will do","created_at":"2016-05-09T09:01:15Z","updated_at":"2016-05-09T09:01:15Z","html_url":"https://github.com/cms-sw/cmssw/pull/14400#discussion_r62468501","pull_request_url":"https://api.github.com/repos/cms-sw/cmssw/pulls/14400","_links":{"self":{"href":"https://api.github.com/repos/cms-sw/cmssw/pulls/comments/62468501"},"html":{"href":"https://github.com/cms-sw/cmssw/pull/14400#discussion_r62468501"},"pull_request":{"href":"https://api.github.com/repos/cms-sw/cmssw/pulls/14400"}}},"pull_request":{"url":"https://api.github.com/repos/cms-sw/cmssw/pulls/14400","id":69173289,"html_url":"https://github.com/cms-sw/cmssw/pull/14400","diff_url":"https://github.com/cms-sw/cmssw/pull/14400.diff","patch_url":"https://github.com/cms-sw/cmssw/pull/14400.patch","issue_url":"https://api.github.com/repos/cms-sw/cmssw/issues/14400","number":14400,"state":"open","locked":false,"title":"Gem segments 81 x","user":{"login":"jshlee","id":5427173,"avatar_url":"https://avatars.githubusercontent.com/u/5427173?v=3","gravatar_id":"","url":"https://api.github.com/users/jshlee","html_url":"https://github.com/jshlee","followers_url":"https://api.github.com/users/jshlee/followers","following_url":"https://api.github.com/users/jshlee/following{/other_user}","gists_url":"https://api.github.com/users/jshlee/gists{/gist_id}","starred_url":"https://api.github.com/users/jshlee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jshlee/subscriptions","organizations_url":"https://api.github.com/users/jshlee/orgs","repos_url":"https://api.github.com/users/jshlee/repos","events_url":"https://api.github.com/users/jshlee/events{/privacy}","received_events_url":"https://api.github.com/users/jshlee/received_events","type":"User","site_admin":false},"body":"added GEMSegment in dataFormat\r\nadded GEMSegment builder\r\nadded common muon segment fitting\r\nadded GEMSegment to run in run3_GEM\r\nadded new ME0SegAlgo to use the common muon segment fitting\r\n","created_at":"2016-05-06T16:08:23Z","updated_at":"2016-05-09T09:01:15Z","closed_at":null,"merged_at":null,"merge_commit_sha":"dac28385a19bdfef62302506ebf415ad9b4a0b21","assignee":null,"milestone":{"url":"https://api.github.com/repos/cms-sw/cmssw/milestones/59","html_url":"https://github.com/cms-sw/cmssw/milestones/Next%20CMSSW_8_1_X","labels_url":"https://api.github.com/repos/cms-sw/cmssw/milestones/59/labels","id":1590252,"number":59,"title":"Next CMSSW_8_1_X","description":null,"creator":{"login":"smuzaffar","id":4115138,"avatar_url":"https://avatars.githubusercontent.com/u/4115138?v=3","gravatar_id":"","url":"https://api.github.com/users/smuzaffar","html_url":"https://github.com/smuzaffar","followers_url":"https://api.github.com/users/smuzaffar/followers","following_url":"https://api.github.com/users/smuzaffar/following{/other_user}","gists_url":"https://api.github.com/users/smuzaffar/gists{/gist_id}","starred_url":"https://api.github.com/users/smuzaffar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smuzaffar/subscriptions","organizations_url":"https://api.github.com/users/smuzaffar/orgs","repos_url":"https://api.github.com/users/smuzaffar/repos","events_url":"https://api.github.com/users/smuzaffar/events{/privacy}","received_events_url":"https://api.github.com/users/smuzaffar/received_events","type":"User","site_admin":false},"open_issues":76,"closed_issues":545,"state":"open","created_at":"2016-02-18T09:12:12Z","updated_at":"2016-05-09T08:18:29Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/cms-sw/cmssw/pulls/14400/commits","review_comments_url":"https://api.github.com/repos/cms-sw/cmssw/pulls/14400/comments","review_comment_url":"https://api.github.com/repos/cms-sw/cmssw/pulls/comments{/number}","comments_url":"https://api.github.com/repos/cms-sw/cmssw/issues/14400/comments","statuses_url":"https://api.github.com/repos/cms-sw/cmssw/statuses/f971a0a048c8d32a0a34ca9eafa51ecebbb41be0","head":{"label":"jshlee:GEMSegments-81X","ref":"GEMSegments-81X","sha":"f971a0a048c8d32a0a34ca9eafa51ecebbb41be0","user":{"login":"jshlee","id":5427173,"avatar_url":"https://avatars.githubusercontent.com/u/5427173?v=3","gravatar_id":"","url":"https://api.github.com/users/jshlee","html_url":"https://github.com/jshlee","followers_url":"https://api.github.com/users/jshlee/followers","following_url":"https://api.github.com/users/jshlee/following{/other_user}","gists_url":"https://api.github.com/users/jshlee/gists{/gist_id}","starred_url":"https://api.github.com/users/jshlee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jshlee/subscriptions","organizations_url":"https://api.github.com/users/jshlee/orgs","repos_url":"https://api.github.com/users/jshlee/repos","events_url":"https://api.github.com/users/jshlee/events{/privacy}","received_events_url":"https://api.github.com/users/jshlee/received_events","type":"User","site_admin":false},"repo":{"id":14747568,"name":"cmssw","full_name":"jshlee/cmssw","owner":{"login":"jshlee","id":5427173,"avatar_url":"https://avatars.githubusercontent.com/u/5427173?v=3","gravatar_id":"","url":"https://api.github.com/users/jshlee","html_url":"https://github.com/jshlee","followers_url":"https://api.github.com/users/jshlee/followers","following_url":"https://api.github.com/users/jshlee/following{/other_user}","gists_url":"https://api.github.com/users/jshlee/gists{/gist_id}","starred_url":"https://api.github.com/users/jshlee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jshlee/subscriptions","organizations_url":"https://api.github.com/users/jshlee/orgs","repos_url":"https://api.github.com/users/jshlee/repos","events_url":"https://api.github.com/users/jshlee/events{/privacy}","received_events_url":"https://api.github.com/users/jshlee/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jshlee/cmssw","description":"CMS Offline Software","fork":true,"url":"https://api.github.com/repos/jshlee/cmssw","forks_url":"https://api.github.com/repos/jshlee/cmssw/forks","keys_url":"https://api.github.com/repos/jshlee/cmssw/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jshlee/cmssw/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jshlee/cmssw/teams","hooks_url":"https://api.github.com/repos/jshlee/cmssw/hooks","issue_events_url":"https://api.github.com/repos/jshlee/cmssw/issues/events{/number}","events_url":"https://api.github.com/repos/jshlee/cmssw/events","assignees_url":"https://api.github.com/repos/jshlee/cmssw/assignees{/user}","branches_url":"https://api.github.com/repos/jshlee/cmssw/branches{/branch}","tags_url":"https://api.github.com/repos/jshlee/cmssw/tags","blobs_url":"https://api.github.com/repos/jshlee/cmssw/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jshlee/cmssw/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jshlee/cmssw/git/refs{/sha}","trees_url":"https://api.github.com/repos/jshlee/cmssw/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jshlee/cmssw/statuses/{sha}","languages_url":"https://api.github.com/repos/jshlee/cmssw/languages","stargazers_url":"https://api.github.com/repos/jshlee/cmssw/stargazers","contributors_url":"https://api.github.com/repos/jshlee/cmssw/contributors","subscribers_url":"https://api.github.com/repos/jshlee/cmssw/subscribers","subscription_url":"https://api.github.com/repos/jshlee/cmssw/subscription","commits_url":"https://api.github.com/repos/jshlee/cmssw/commits{/sha}","git_commits_url":"https://api.github.com/repos/jshlee/cmssw/git/commits{/sha}","comments_url":"https://api.github.com/repos/jshlee/cmssw/comments{/number}","issue_comment_url":"https://api.github.com/repos/jshlee/cmssw/issues/comments{/number}","contents_url":"https://api.github.com/repos/jshlee/cmssw/contents/{+path}","compare_url":"https://api.github.com/repos/jshlee/cmssw/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jshlee/cmssw/merges","archive_url":"https://api.github.com/repos/jshlee/cmssw/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jshlee/cmssw/downloads","issues_url":"https://api.github.com/repos/jshlee/cmssw/issues{/number}","pulls_url":"https://api.github.com/repos/jshlee/cmssw/pulls{/number}","milestones_url":"https://api.github.com/repos/jshlee/cmssw/milestones{/number}","notifications_url":"https://api.github.com/repos/jshlee/cmssw/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jshlee/cmssw/labels{/name}","releases_url":"https://api.github.com/repos/jshlee/cmssw/releases{/id}","deployments_url":"https://api.github.com/repos/jshlee/cmssw/deployments","created_at":"2013-11-27T13:19:57Z","updated_at":"2015-04-10T12:14:08Z","pushed_at":"2016-05-07T14:48:25Z","git_url":"git://github.com/jshlee/cmssw.git","ssh_url":"git@github.com:jshlee/cmssw.git","clone_url":"https://github.com/jshlee/cmssw.git","svn_url":"https://github.com/jshlee/cmssw","homepage":"cms-sw.github.io/cmssw","size":870113,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"CMSSW_7_5_X"}},"base":{"label":"cms-sw:CMSSW_8_1_X","ref":"CMSSW_8_1_X","sha":"2c7e0e952f253fff7823aa24505393accdd8ca35","user":{"login":"cms-sw","id":3863500,"avatar_url":"https://avatars.githubusercontent.com/u/3863500?v=3","gravatar_id":"","url":"https://api.github.com/users/cms-sw","html_url":"https://github.com/cms-sw","followers_url":"https://api.github.com/users/cms-sw/followers","following_url":"https://api.github.com/users/cms-sw/following{/other_user}","gists_url":"https://api.github.com/users/cms-sw/gists{/gist_id}","starred_url":"https://api.github.com/users/cms-sw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cms-sw/subscriptions","organizations_url":"https://api.github.com/users/cms-sw/orgs","repos_url":"https://api.github.com/users/cms-sw/repos","events_url":"https://api.github.com/users/cms-sw/events{/privacy}","received_events_url":"https://api.github.com/users/cms-sw/received_events","type":"Organization","site_admin":false},"repo":{"id":10969551,"name":"cmssw","full_name":"cms-sw/cmssw","owner":{"login":"cms-sw","id":3863500,"avatar_url":"https://avatars.githubusercontent.com/u/3863500?v=3","gravatar_id":"","url":"https://api.github.com/users/cms-sw","html_url":"https://github.com/cms-sw","followers_url":"https://api.github.com/users/cms-sw/followers","following_url":"https://api.github.com/users/cms-sw/following{/other_user}","gists_url":"https://api.github.com/users/cms-sw/gists{/gist_id}","starred_url":"https://api.github.com/users/cms-sw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cms-sw/subscriptions","organizations_url":"https://api.github.com/users/cms-sw/orgs","repos_url":"https://api.github.com/users/cms-sw/repos","events_url":"https://api.github.com/users/cms-sw/events{/privacy}","received_events_url":"https://api.github.com/users/cms-sw/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/cms-sw/cmssw","description":"CMS Offline Software","fork":false,"url":"https://api.github.com/repos/cms-sw/cmssw","forks_url":"https://api.github.com/repos/cms-sw/cmssw/forks","keys_url":"https://api.github.com/repos/cms-sw/cmssw/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cms-sw/cmssw/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cms-sw/cmssw/teams","hooks_url":"https://api.github.com/repos/cms-sw/cmssw/hooks","issue_events_url":"https://api.github.com/repos/cms-sw/cmssw/issues/events{/number}","events_url":"https://api.github.com/repos/cms-sw/cmssw/events","assignees_url":"https://api.github.com/repos/cms-sw/cmssw/assignees{/user}","branches_url":"https://api.github.com/repos/cms-sw/cmssw/branches{/branch}","tags_url":"https://api.github.com/repos/cms-sw/cmssw/tags","blobs_url":"https://api.github.com/repos/cms-sw/cmssw/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cms-sw/cmssw/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cms-sw/cmssw/git/refs{/sha}","trees_url":"https://api.github.com/repos/cms-sw/cmssw/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cms-sw/cmssw/statuses/{sha}","languages_url":"https://api.github.com/repos/cms-sw/cmssw/languages","stargazers_url":"https://api.github.com/repos/cms-sw/cmssw/stargazers","contributors_url":"https://api.github.com/repos/cms-sw/cmssw/contributors","subscribers_url":"https://api.github.com/repos/cms-sw/cmssw/subscribers","subscription_url":"https://api.github.com/repos/cms-sw/cmssw/subscription","commits_url":"https://api.github.com/repos/cms-sw/cmssw/commits{/sha}","git_commits_url":"https://api.github.com/repos/cms-sw/cmssw/git/commits{/sha}","comments_url":"https://api.github.com/repos/cms-sw/cmssw/comments{/number}","issue_comment_url":"https://api.github.com/repos/cms-sw/cmssw/issues/comments{/number}","contents_url":"https://api.github.com/repos/cms-sw/cmssw/contents/{+path}","compare_url":"https://api.github.com/repos/cms-sw/cmssw/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cms-sw/cmssw/merges","archive_url":"https://api.github.com/repos/cms-sw/cmssw/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cms-sw/cmssw/downloads","issues_url":"https://api.github.com/repos/cms-sw/cmssw/issues{/number}","pulls_url":"https://api.github.com/repos/cms-sw/cmssw/pulls{/number}","milestones_url":"https://api.github.com/repos/cms-sw/cmssw/milestones{/number}","notifications_url":"https://api.github.com/repos/cms-sw/cmssw/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cms-sw/cmssw/labels{/name}","releases_url":"https://api.github.com/repos/cms-sw/cmssw/releases{/id}","deployments_url":"https://api.github.com/repos/cms-sw/cmssw/deployments","created_at":"2013-06-26T14:09:07Z","updated_at":"2016-05-08T23:32:55Z","pushed_at":"2016-05-09T08:18:10Z","git_url":"git://github.com/cms-sw/cmssw.git","ssh_url":"git@github.com:cms-sw/cmssw.git","clone_url":"https://github.com/cms-sw/cmssw.git","svn_url":"https://github.com/cms-sw/cmssw","homepage":"http://cms-sw.github.io/","size":1076370,"stargazers_count":308,"watchers_count":308,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1810,"mirror_url":null,"open_issues_count":336,"forks":1810,"open_issues":336,"watchers":308,"default_branch":"CMSSW_8_1_X"}},"_links":{"self":{"href":"https://api.github.com/repos/cms-sw/cmssw/pulls/14400"},"html":{"href":"https://github.com/cms-sw/cmssw/pull/14400"},"issue":{"href":"https://api.github.com/repos/cms-sw/cmssw/issues/14400"},"comments":{"href":"https://api.github.com/repos/cms-sw/cmssw/issues/14400/comments"},"review_comments":{"href":"https://api.github.com/repos/cms-sw/cmssw/pulls/14400/comments"},"review_comment":{"href":"https://api.github.com/repos/cms-sw/cmssw/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/cms-sw/cmssw/pulls/14400/commits"},"statuses":{"href":"https://api.github.com/repos/cms-sw/cmssw/statuses/f971a0a048c8d32a0a34ca9eafa51ecebbb41be0"}}}}