{"action":"created","issue":{"url":"https://api.github.com/repos/GRIFFINCollaboration/GRSISort/issues/355","labels_url":"https://api.github.com/repos/GRIFFINCollaboration/GRSISort/issues/355/labels{/name}","comments_url":"https://api.github.com/repos/GRIFFINCollaboration/GRSISort/issues/355/comments","events_url":"https://api.github.com/repos/GRIFFINCollaboration/GRSISort/issues/355/events","html_url":"https://github.com/GRIFFINCollaboration/GRSISort/issues/355","id":85617119,"number":355,"title":"Dealing with PPG in GRIFFIN","user":{"login":"r3dunlop","id":5428160,"avatar_url":"https://avatars.githubusercontent.com/u/5428160?v=3","gravatar_id":"","url":"https://api.github.com/users/r3dunlop","html_url":"https://github.com/r3dunlop","followers_url":"https://api.github.com/users/r3dunlop/followers","following_url":"https://api.github.com/users/r3dunlop/following{/other_user}","gists_url":"https://api.github.com/users/r3dunlop/gists{/gist_id}","starred_url":"https://api.github.com/users/r3dunlop/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/r3dunlop/subscriptions","organizations_url":"https://api.github.com/users/r3dunlop/orgs","repos_url":"https://api.github.com/users/r3dunlop/repos","events_url":"https://api.github.com/users/r3dunlop/events{/privacy}","received_events_url":"https://api.github.com/users/r3dunlop/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/GRIFFINCollaboration/GRSISort/labels/enhancement","name":"enhancement","color":"84b6eb"},{"url":"https://api.github.com/repos/GRIFFINCollaboration/GRSISort/labels/Griffin","name":"Griffin","color":"eb6420"},{"url":"https://api.github.com/repos/GRIFFINCollaboration/GRSISort/labels/question","name":"question","color":"cc317c"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/GRIFFINCollaboration/GRSISort/milestones/4","html_url":"https://github.com/GRIFFINCollaboration/GRSISort/milestones/Lean%20GRSI","labels_url":"https://api.github.com/repos/GRIFFINCollaboration/GRSISort/milestones/4/labels","id":1099426,"number":4,"title":"Lean GRSI","description":"Increase the performance of GRSISort writing as outlined in #312","creator":{"login":"r3dunlop","id":5428160,"avatar_url":"https://avatars.githubusercontent.com/u/5428160?v=3","gravatar_id":"","url":"https://api.github.com/users/r3dunlop","html_url":"https://github.com/r3dunlop","followers_url":"https://api.github.com/users/r3dunlop/followers","following_url":"https://api.github.com/users/r3dunlop/following{/other_user}","gists_url":"https://api.github.com/users/r3dunlop/gists{/gist_id}","starred_url":"https://api.github.com/users/r3dunlop/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/r3dunlop/subscriptions","organizations_url":"https://api.github.com/users/r3dunlop/orgs","repos_url":"https://api.github.com/users/r3dunlop/repos","events_url":"https://api.github.com/users/r3dunlop/events{/privacy}","received_events_url":"https://api.github.com/users/r3dunlop/received_events","type":"User","site_admin":false},"open_issues":5,"closed_issues":6,"state":"open","created_at":"2015-05-07T01:03:39Z","updated_at":"2015-07-15T01:31:51Z","due_on":"2015-06-30T04:00:00Z","closed_at":null},"comments":12,"created_at":"2015-06-05T19:41:47Z","updated_at":"2015-08-06T00:36:05Z","closed_at":null,"body":"@VinzenzBildstein and I were discussing how to best handle the PPG in GRIFFIN. After some deliberation we decided that perhaps the best thing to do is to discard the PPG at the fragment->analysis step. Instead of writing the PPG to every hit (which would be the proper thing to do), we would instead use this step to determine the length of time of the different components of the cycle. This would be written to the Run info for that run, and could be modified by hand if needed. This could in fact lead to scripts that allow us to analyse how our PPG is behaving, and find even more precise cycle times. Having the PPG in TGriffin will not work if our rates get high enough to cause our analysis tree entries to become very large.\r\n\r\nWe would then be able to figure out what stage of a cycle we are in by checking the hit timestamp % cycle length against the run info. This would of course assume that the length of every cycle is the same, but if they are not, we have bigger fish to fry. I waned to check this over with @pcbend because I know you've thought about this a bunch and I was wondering if you can think of a problem with this method. I think we have to come up with a new method from what we currently have, and this seems like the best option to me."},"comment":{"url":"https://api.github.com/repos/GRIFFINCollaboration/GRSISort/issues/comments/128193900","html_url":"https://github.com/GRIFFINCollaboration/GRSISort/issues/355#issuecomment-128193900","issue_url":"https://api.github.com/repos/GRIFFINCollaboration/GRSISort/issues/355","id":128193900,"user":{"login":"r3dunlop","id":5428160,"avatar_url":"https://avatars.githubusercontent.com/u/5428160?v=3","gravatar_id":"","url":"https://api.github.com/users/r3dunlop","html_url":"https://github.com/r3dunlop","followers_url":"https://api.github.com/users/r3dunlop/followers","following_url":"https://api.github.com/users/r3dunlop/following{/other_user}","gists_url":"https://api.github.com/users/r3dunlop/gists{/gist_id}","starred_url":"https://api.github.com/users/r3dunlop/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/r3dunlop/subscriptions","organizations_url":"https://api.github.com/users/r3dunlop/orgs","repos_url":"https://api.github.com/users/r3dunlop/repos","events_url":"https://api.github.com/users/r3dunlop/events{/privacy}","received_events_url":"https://api.github.com/users/r3dunlop/received_events","type":"User","site_admin":false},"created_at":"2015-08-06T00:36:05Z","updated_at":"2015-08-06T00:36:05Z","body":"It would be trivial in an analysis script.\r\n```c++\r\nTGriffin *grif;\r\nTPPG *ppg;\r\n//Set up branches like usual.....\r\nTree->SetBranchAddress.....\r\n\r\nfor(int i =0; i < Tree->GetEntries();++i){\r\n  Tree->GetEntry(i);\r\n  cycletime = grif->GetHit(i)->GetTime() - ppg->GetTime();\r\n  //do stuff with cycle time\r\n  gammaCyc->Fill(grif->GetHit(i)->GetEnergy(), cycletime);\r\n}\r\n```\r\nIn a draw command I think it would be very similar\r\n`Tree->Draw(\"griffin_hits.GetTime() - ppg.GetTime()\")` or something? I always mess up the cross branch draw commands.\r\n"}}