{"action":"created","comment":{"url":"https://api.github.com/repos/star-bnl/star-picoDst/pulls/comments/76702474","id":76702474,"diff_hunk":"@@ -0,0 +1,1078 @@\n+#include <bitset>\n+#include <string>\n+#include \"TRegexp.h\"\n+#include \"TChain.h\"\n+#include \"TTree.h\"\n+#include \"TBranch.h\"\n+\n+#include \"StChain/StChain.h\"\n+#include \"StarRoot/THack.h\"\n+#include \"St_base/StMessMgr.h\"\n+\n+#include \"StEvent/StBTofHeader.h\"\n+#include \"StEvent/StDcaGeometry.h\"\n+#include \"StEvent/StEmcCollection.h\"\n+#include \"StEvent/StEmcCluster.h\"\n+#include \"StEvent/StEmcDetector.h\"\n+#include \"StEvent/StEmcModule.h\"\n+#include \"StEvent/StEmcRawHit.h\"\n+\n+#include \"StMuDSTMaker/COMMON/StMuDstMaker.h\"\n+#include \"StMuDSTMaker/COMMON/StMuDst.h\"\n+#include \"StMuDSTMaker/COMMON/StMuEvent.h\"\n+#include \"StMuDSTMaker/COMMON/StMuBTofHit.h\"\n+#include \"StMuDSTMaker/COMMON/StMuTrack.h\"\n+#include \"StMuDSTMaker/COMMON/StMuPrimaryVertex.h\"\n+#include \"StMuDSTMaker/COMMON/StMuMtdHit.h\"\n+#include \"StMuDSTMaker/COMMON/StMuMtdPidTraits.h\"\n+#include \"StMuDSTMaker/COMMON/StMuEmcCollection.h\"\n+#include \"StMuDSTMaker/COMMON/StMuEmcPoint.h\"\n+\n+#include \"StTriggerUtilities/StTriggerSimuMaker.h\"\n+#include \"StTriggerUtilities/Bemc/StBemcTriggerSimu.h\"\n+#include \"StTriggerUtilities/Eemc/StEemcTriggerSimu.h\"\n+#include \"StTriggerUtilities/Emc/StEmcTriggerSimu.h\"\n+\n+#include \"StEmcUtil/geometry/StEmcGeom.h\"\n+#include \"StEmcUtil/others/emcDetectorName.h\"\n+#include \"StEmcUtil/projection/StEmcPosition.h\"\n+#include \"StEmcRawMaker/defines.h\"\n+#include \"StEmcRawMaker/StBemcTables.h\"\n+\n+#include \"tables/St_mtdModuleToQTmap_Table.h\"\n+#include \"tables/St_mtdQTSlewingCorr_Table.h\"\n+#include \"tables/St_mtdQTSlewingCorrPart2_Table.h\"\n+\n+#include \"StPicoEvent/StPicoEvent.h\"\n+#include \"StPicoEvent/StPicoTrack.h\"\n+#include \"StPicoEvent/StPicoEmcTrigger.h\"\n+#include \"StPicoEvent/StPicoMtdTrigger.h\"\n+#include \"StPicoEvent/StPicoBTOWHit.h\"\n+#include \"StPicoEvent/StPicoBTofHit.h\"\n+#include \"StPicoEvent/StPicoMtdHit.h\"\n+#include \"StPicoEvent/StPicoEmcPidTraits.h\"\n+#include \"StPicoEvent/StPicoBTofPidTraits.h\"\n+#include \"StPicoEvent/StPicoMtdPidTraits.h\"\n+#include \"StPicoDstMaker.h\"\n+#include \"StPicoArrays.h\"\n+#include \"StPicoDst.h\"\n+\n+\n+\n+// Set maximum file size to 1.9 GB (Root has a 2GB limit)\n+#define MAXFILESIZE 1900000000\n+\n+//-----------------------------------------------------------------------\n+StPicoDstMaker::StPicoDstMaker(char const* name) : StMaker(name),\n+  mMuDst(nullptr), mEmcCollection(nullptr), mEmcPosition(nullptr),\n+  mEmcGeom{}, mEmcIndex{},\n+  mPicoDst(nullptr), mBField(0),\n+  mIoMode(0), mProdMode(0), mEmcMode(1), mVtxMode(9999),\n+  mInputFileName(), mOutputFileName(), mOutputFile(nullptr),\n+  mRunNumber(0),\n+  mChain(nullptr), mTTree(nullptr), mEventCounter(0), mSplit(99), mCompression(9), mBufferSize(65536 * 4),\n+  mIndex2Primary{}, mMap2Track{},\n+  mModuleToQT{}, mModuleToQTPos{}, mQTtoModule{}, mQTSlewBinEdge{}, mQTSlewCorr{},\n+  mPicoAllArrays{}, mPicoArrays(mPicoAllArrays), mStatusArrays{}\n+{\n+  streamerOff();\n+  createArrays();\n+  mPicoDst = new StPicoDst();\n+\n+  memset(mStatusArrays, (char)1, sizeof(mStatusArrays));\n+}\n+//-----------------------------------------------------------------------\n+StPicoDstMaker::StPicoDstMaker(int mode, char const* fileName, char const* name) : StPicoDstMaker(name)\n+{\n+  mIoMode = mode;\n+\n+  if (mIoMode == ioWrite)\n+  {\n+    TString inputDirFile = fileName;  // input is actually the full name including path\n+    mInputFileName = inputDirFile(inputDirFile.Index(\"st_\"), inputDirFile.Length());\n+    mOutputFileName = mInputFileName;\n+    mOutputFileName.ReplaceAll(\"MuDst.root\", \"picoDst.root\");\n+  }\n+  else if (mIoMode == ioRead)\n+  {\n+    mInputFileName = fileName;\n+  }\n+}\n+//-----------------------------------------------------------------------\n+StPicoDstMaker::~StPicoDstMaker()\n+{\n+  delete mChain;\n+  delete mPicoDst;\n+}\n+//-----------------------------------------------------------------------\n+void StPicoDstMaker::clearIndices()\n+{\n+  for (size_t i = 0; i < nTrk; ++i) mIndex2Primary[i] = -1;\n+  for (size_t i = 0; i < nTrk; ++i) mMap2Track[i] = -1;\n+}\n+//-----------------------------------------------------------------------\n+void StPicoDstMaker::clearArrays()\n+{\n+  for (int i = 0; i < __NALLPICOARRAYS__; ++i)\n+  {\n+    mPicoAllArrays[i]->Clear();\n+    StPicoArrays::picoArrayCounters[i] = 0;\n+  }\n+}\n+//-----------------------------------------------------------------------\n+void StPicoDstMaker::SetStatus(char const* arrType, int status)\n+{\n+  static char const* specNames[] = {\"EventAll\", 0};\n+  static int const specIndex[] = { 0, -1};\n+\n+  if (strncmp(arrType, \"St\", 2) == 0) arrType += 2; //Ignore first \"St\"\n+  for (int i = 0; specNames[i]; ++i)\n+  {\n+    if (strcmp(arrType, specNames[i])) continue;\n+    char* sta = mStatusArrays + specIndex[i];\n+    int   num = specIndex[i + 1] - specIndex[i];\n+    memset(sta, status, num);\n+    LOG_INFO << \"StPicoDstMaker::SetStatus \" << status << \" to \" << specNames[i] << endm;\n+    if (mIoMode == ioRead)\n+      setBranchAddresses(mChain);\n+    return;\n+  }\n+\n+  TRegexp re(arrType, 1);\n+  for (int i = 0; i < __NALLARRAYS__; ++i)\n+  {\n+    Ssiz_t len;\n+    if (re.Index(StPicoArrays::picoArrayNames[i], &len) < 0)   continue;\n+    LOG_INFO << \"StPicoDstMaker::SetStatus \" << status << \" to \" << StPicoArrays::picoArrayNames[i] << endm;\n+    mStatusArrays[i] = status;\n+  }\n+  if (mIoMode == ioRead)\n+    setBranchAddresses(mChain);\n+}\n+//-----------------------------------------------------------------------\n+void StPicoDstMaker::setBranchAddresses(TChain* chain)\n+{\n+  if (!chain) return;\n+  chain->SetBranchStatus(\"*\", 0);\n+  TString ts;\n+  for (int i = 0; i < __NALLPICOARRAYS__; ++i)\n+  {\n+    if (mStatusArrays[i] == 0) continue;\n+    char const* bname = StPicoArrays::picoArrayNames[i];\n+    TBranch* tb = chain->GetBranch(bname);\n+    if (!tb)\n+    {\n+      LOG_WARN << \"setBranchAddress: Branch name \" << bname << \" does not exist!\" << endm;\n+      continue;\n+    }\n+    ts = bname;\n+    ts += \"*\";\n+    chain->SetBranchStatus(ts, 1);\n+    chain->SetBranchAddress(bname, mPicoAllArrays + i);\n+    assert(tb->GetAddress() == (char*)(mPicoAllArrays + i));\n+  }\n+  mTTree = mChain->GetTree();\n+}\n+//-----------------------------------------------------------------------\n+void  StPicoDstMaker::streamerOff()\n+{\n+  StPicoEvent::Class()->IgnoreTObjectStreamer();\n+  StPicoTrack::Class()->IgnoreTObjectStreamer();\n+}\n+//-----------------------------------------------------------------------\n+void StPicoDstMaker::createArrays()\n+{\n+  for (int i = 0; i < __NALLPICOARRAYS__; ++i)\n+  {\n+    mPicoAllArrays[i] = new TClonesArray(StPicoArrays::picoArrayTypes[i], StPicoArrays::picoArraySizes[i]);\n+    StPicoArrays::picoArrayCounters[i] = 0;\n+  }\n+\n+  mPicoDst->set(this);\n+}\n+//-----------------------------------------------------------------------\n+Int_t StPicoDstMaker::Init()\n+{\n+  if (mIoMode == ioRead)\n+  {\n+    openRead();     // if read\n+  }\n+  else if (mIoMode == ioWrite)\n+  {\n+    openWrite();\n+    if (mEmcMode) initEmc();\n+  }\n+  return kStOK;\n+}\n+\n+//-----------------------------------------------------------------------\n+Int_t StPicoDstMaker::InitRun(Int_t const runnumber)\n+{\n+  if (mIoMode == ioWrite)\n+  {\n+    if (!initMtd(runnumber))\n+    {\n+      LOG_ERROR << \" MTD initialization error!!! \" << endm;\n+      return kStErr;\n+    }\n+  }\n+  return kStOK;\n+}\n+\n+//-----------------------------------------------------------------------\n+Bool_t StPicoDstMaker::initMtd(Int_t const runnumber)\n+{\n+  // Dec. 1st is the assumed to the start a new running year\n+  int year = runnumber / 1e6 + 1999;\n+  if ((runnumber % 1000) / 1000 > 334) year += 1;\n+  LOG_INFO << \"Run = \" << runnumber << \" year = \" << year << endm;\n+\n+  // obtain maps from DB\n+  memset(mModuleToQT, -1, sizeof(mModuleToQT));\n+  memset(mModuleToQTPos, -1, sizeof(mModuleToQTPos));\n+  memset(mQTtoModule, -1, sizeof(mQTtoModule));\n+\n+  LOG_INFO << \"Retrieving mtdModuleToQTmap table from database ...\" << endm;\n+  TDataSet* dataset = GetDataBase(\"Geometry/mtd/mtdModuleToQTmap\");\n+  St_mtdModuleToQTmap* mtdModuleToQTmap = static_cast<St_mtdModuleToQTmap*>(dataset->Find(\"mtdModuleToQTmap\"));\n+  if (!mtdModuleToQTmap)\n+  {\n+    LOG_ERROR << \"No mtdModuleToQTmap table found in database\" << endm;\n+    return kStErr;\n+  }\n+  mtdModuleToQTmap_st* mtdModuleToQTtable = static_cast<mtdModuleToQTmap_st*>(mtdModuleToQTmap->GetTable());\n+\n+  for (Int_t i = 0; i < 30; ++i)\n+  {\n+    for (Int_t j = 0; j < 5; ++j)\n+    {\n+      Int_t index = i * 5 + j;\n+      Int_t qt = mtdModuleToQTtable->qtBoardId[index];\n+      Int_t channel = mtdModuleToQTtable->qtChannelId[index];\n+      mModuleToQT[i][j]    = qt;\n+      if (channel < 0)\n+      {\n+        mModuleToQTPos[i][j] = channel;\n+      }\n+      else\n+      {\n+        if (channel % 8 == 1) mModuleToQTPos[i][j] = 1 + channel / 8 * 2;\n+        else             mModuleToQTPos[i][j] = 2 + channel / 8 * 2;\n+      }\n+      if (mModuleToQT[i][j] > 0 && mModuleToQTPos[i][j] > 0)\n+        mQTtoModule[mModuleToQT[i][j] - 1][mModuleToQTPos[i][j] - 1] = j + 1;\n+    }\n+  }\n+\n+  // online slewing correction for QT board\n+  memset(mQTSlewBinEdge, -1, sizeof(mQTSlewBinEdge));\n+  memset(mQTSlewCorr, -1, sizeof(mQTSlewCorr));\n+  LOG_INFO << \"Retrieving mtdQTSlewingCorr table from database ...\" << endm;\n+  dataset = GetDataBase(\"Calibrations/mtd/mtdQTSlewingCorr\");\n+  St_mtdQTSlewingCorr* mtdQTSlewingCorr = static_cast<St_mtdQTSlewingCorr*>(dataset->Find(\"mtdQTSlewingCorr\"));\n+  if (!mtdQTSlewingCorr)\n+  {\n+    LOG_ERROR << \"No mtdQTSlewingCorr table found in database\" << endm;\n+    return kStErr;\n+  }\n+  mtdQTSlewingCorr_st* mtdQTSlewingCorrtable = static_cast<mtdQTSlewingCorr_st*>(mtdQTSlewingCorr->GetTable());\n+  for (int j = 0; j < 4; ++j)\n+  {\n+    for (int i = 0; i < 16; ++i)\n+    {\n+      for (Int_t k = 0; k < 8; ++k)\n+      {\n+        Int_t index = j * 16 * 8 + i * 8 + k;\n+        mQTSlewBinEdge[j][i][k] = (int) mtdQTSlewingCorrtable->slewingBinEdge[index];\n+        mQTSlewCorr[j][i][k] = (int) mtdQTSlewingCorrtable->slewingCorr[index];\n+      }\n+    }\n+  }\n+  if (year >= 2016)\n+  {\n+    dataset = GetDataBase(\"Calibrations/mtd/mtdQTSlewingCorrPart2\");\n+    if (dataset)\n+    {\n+      St_mtdQTSlewingCorrPart2* mtdQTSlewingCorr2 = static_cast<St_mtdQTSlewingCorrPart2*>(dataset->Find(\"mtdQTSlewingCorrPart2\"));\n+      mtdQTSlewingCorrPart2_st* mtdQTSlewingCorrtable2 = static_cast<mtdQTSlewingCorrPart2_st*>(mtdQTSlewingCorr2->GetTable());\n+      for (int j = 0; j < 4; ++j)\n+      {\n+        for (int i = 0; i < 16; ++i)\n+        {\n+          for (Int_t k = 0; k < 8; ++k)\n+          {\n+            Int_t index = j * 16 * 8 + i * 8 + k;\n+            mQTSlewBinEdge[j + 4][i][k] = (int) mtdQTSlewingCorrtable2->slewingBinEdge[index];\n+            mQTSlewCorr[j + 4][i][k] = (int) mtdQTSlewingCorrtable2->slewingCorr[index];\n+          }\n+        }\n+      }\n+    }\n+  }\n+\n+  return kTRUE;\n+}\n+\n+//-----------------------------------------------------------------------\n+Int_t StPicoDstMaker::Finish()\n+{\n+  if (mIoMode == ioRead)\n+  {\n+    closeRead();\n+  }\n+  else if (mIoMode == ioWrite)\n+  {\n+    closeWrite();\n+    if (mEmcMode) finishEmc();\n+  }\n+  return kStOK;\n+}\n+//-----------------------------------------------------------------------\n+Int_t StPicoDstMaker::openRead()\n+{\n+  if (!mChain) mChain = new TChain(\"PicoDst\");\n+\n+  string const dirFile = mInputFileName.Data();\n+  if (dirFile.find(\".list\") != string::npos)\n+  {\n+    ifstream inputStream(dirFile.c_str());\n+\n+    if (!inputStream)\n+    {\n+      LOG_ERROR << \"ERROR: Cannot open list file \" << dirFile << endm;\n+      return kStErr;\n+    }\n+\n+    int nFile = 0;\n+    string file;\n+    while (getline(inputStream, file))\n+    {\n+      if (file.find(\".picoDst.root\") != string::npos)\n+      {\n+        TFile* ftmp = TFile::Open(file.c_str());\n+        if (ftmp && !ftmp->IsZombie() && ftmp->GetNkeys())\n+        {\n+          LOG_INFO << \" Read in picoDst file \" << file << endm;\n+          mChain->Add(file.c_str());\n+          ++nFile;\n+        }\n+\n+        if(ftmp) ftmp->Close();\n+      }\n+    }\n+\n+    LOG_INFO << \" Total \" << nFile << \" files have been read in. \" << endm;\n+  }\n+  else if (dirFile.find(\".picoDst.root\") != string::npos)\n+  {\n+    mChain->Add(dirFile.c_str());\n+  }\n+  else\n+  {\n+    LOG_WARN << \" No good input file to read ... \" << endm;\n+  }\n+\n+  if (mChain)\n+  {\n+    setBranchAddresses(mChain);\n+    mPicoDst->set(this);\n+  }\n+\n+  return kStOK;\n+}\n+//-----------------------------------------------------------------------\n+void StPicoDstMaker::openWrite()\n+{\n+\n+  mOutputFile = new TFile(mOutputFileName.Data(), \"RECREATE\");\n+  LOG_INFO << \" Output file: \" << mOutputFileName.Data() << \" created.\" << endm;\n+  mOutputFile->SetCompressionLevel(mCompression);\n+  int bufsize = mBufferSize;\n+  if (mSplit) bufsize /= 4;\n+  mTTree = new TTree(\"PicoDst\", \"StPicoDst\", mSplit);\n+  mTTree->SetMaxTreeSize(MAXFILESIZE);\n+  mTTree->SetAutoSave(1000000);\n+  for (int i = 0; i < __NALLPICOARRAYS__; ++i)\n+  {\n+    if (mStatusArrays[i] == 0)\n+    {\n+      cout << \" Branch \" << StPicoArrays::picoArrayNames[i] << \" status is OFF! \" << endl;\n+      continue;\n+    }\n+\n+    mTTree->Branch(StPicoArrays::picoArrayNames[i], &mPicoAllArrays[i], bufsize, mSplit);\n+  }\n+}\n+//-----------------------------------------------------------------------\n+void StPicoDstMaker::initEmc()\n+{\n+  mEmcPosition = new StEmcPosition();\n+  for (int i = 0; i < 4; ++i)\n+  {\n+    mEmcGeom[i] = StEmcGeom::getEmcGeom(detname[i].Data());\n+  }\n+}\n+//-----------------------------------------------------------------------\n+void StPicoDstMaker::buildEmcIndex()\n+{\n+  StEmcDetector* mEmcDet = mMuDst->emcCollection()->detector(kBarrelEmcTowerId);\n+  memset(mEmcIndex, 0, sizeof(mEmcIndex));\n+\n+  if (!mEmcDet) return;\n+  for (size_t iMod = 1; iMod <= mEmcDet->numberOfModules(); ++iMod)\n+  {\n+    StSPtrVecEmcRawHit& modHits = mEmcDet->module(iMod)->hits();\n+    for (size_t iHit = 0; iHit < modHits.size(); ++iHit)\n+    {\n+      StEmcRawHit* rawHit = modHits[iHit];\n+      if (!rawHit) continue;\n+      unsigned int softId = rawHit->softId(1);\n+      if (mEmcGeom[0]->checkId(softId) == 0) // OK\n+      {\n+        mEmcIndex[softId - 1] = rawHit;\n+      }\n+\n+    }\n+  }\n+}\n+//-----------------------------------------------------------------------\n+void StPicoDstMaker::finishEmc()\n+{\n+  if (mEmcPosition) delete mEmcPosition;\n+  for (int i = 0; i < 4; ++i)\n+  {\n+    mEmcGeom[i] = 0;\n+  }\n+}\n+//-----------------------------------------------------------------------\n+void StPicoDstMaker::Clear(char const* )\n+{\n+  if (mIoMode == ioRead)\n+    return;\n+  clearArrays();\n+}\n+//_____________________________________________________________________________\n+void StPicoDstMaker::closeRead()\n+{\n+  if (mChain) mChain->Delete();\n+  mChain = 0;\n+}\n+//_____________________________________________________________________________\n+void StPicoDstMaker::closeWrite()\n+{\n+  if (mIoMode == ioWrite)\n+  {\n+    if (mOutputFile)\n+    {\n+      mOutputFile->Write();\n+      mOutputFile->Close();\n+    }\n+  }\n+}\n+//-----------------------------------------------------------------------\n+int StPicoDstMaker::Make()\n+{\n+  int returnStarCode = kStOK;\n+  if (mIoMode == ioWrite)\n+  {\n+    returnStarCode = MakeWrite();\n+  }\n+  else if (mIoMode == ioRead) returnStarCode = MakeRead();\n+  return returnStarCode;\n+}\n+//-----------------------------------------------------------------------\n+Int_t StPicoDstMaker::MakeRead()\n+{\n+  if (!mChain)\n+  {\n+    LOG_WARN << \" No input files ... ! EXIT\" << endm;\n+    return kStWarn;\n+  }\n+  mChain->GetEntry(mEventCounter++);\n+  mPicoDst->set(this);\n+  return kStOK;\n+}\n+//-----------------------------------------------------------------------\n+Int_t StPicoDstMaker::MakeWrite()\n+{\n+  StMuDstMaker* muDstMaker = (StMuDstMaker*)GetMaker(\"MuDst\");\n+  if (!muDstMaker)\n+  {\n+    LOG_WARN << \" No MuDstMaker \" << endm;\n+    return kStWarn;\n+  }\n+  mMuDst = muDstMaker->muDst();\n+  if (!mMuDst)\n+  {\n+    LOG_WARN << \" No MuDst \" << endm;\n+    return kStWarn;\n+  }\n+\n+  StMuEvent* muEvent = mMuDst->event();\n+\n+  if (!muEvent)\n+  {\n+    LOG_WARN << \" No MuEvent \" << endm;\n+    return kStWarn;\n+  }\n+\n+  if (!selectVertex())\n+  {\n+    LOG_INFO << \"Vertex is not valid\" << endm;\n+    return kStOK;\n+  }\n+\n+  if (mEmcMode)\n+  {\n+    mEmcCollection = mMuDst->emcCollection();\n+    if (mEmcCollection) buildEmcIndex();\n+  }\n+\n+  clearIndices();\n+\n+  Int_t refMult = muEvent->refMult();\n+  mBField = muEvent->magneticField();\n+\n+  StThreeVectorF pVtx(0., 0., 0.);\n+  if (mMuDst->primaryVertex()) pVtx = mMuDst->primaryVertex()->position();\n+\n+  LOG_DEBUG << \" eventId = \" << muEvent->eventId() << \" refMult = \" << refMult << \" vtx = \" << pVtx << endm;\n+\n+  fillTracks();\n+  fillEvent();\n+  fillEmcTrigger();\n+  fillMtdTrigger();\n+  fillBTOWHits();\n+  fillBTofHits();\n+  fillMtdHits();\n+\n+  if (Debug()) mPicoDst->printTracks();\n+\n+  mTTree->Fill();\n+  THack::IsTreeWritable(mTTree);\n+\n+  return kStOK;\n+}\n+//-----------------------------------------------------------------------\n+void StPicoDstMaker::fillTracks()\n+{\n+  Int_t nPrimarys = mMuDst->numberOfPrimaryTracks();\n+  for (int i = 0; i < nPrimarys; ++i)\n+  {\n+    StMuTrack* pTrk = (StMuTrack*)mMuDst->primaryTracks(i);\n+    if (!pTrk) continue;\n+    if (pTrk->id() < 0 || pTrk->id() >= 50000)\n+    {\n+      LOG_WARN << \" This primary track has a track id out of the range : \" << pTrk->id() << endm;\n+      continue;\n+    }\n+    mIndex2Primary[pTrk->id()] = i;\n+  }\n+\n+  Int_t nGlobals = mMuDst->numberOfGlobalTracks();\n+  for (int i = 0; i < nGlobals; ++i)\n+  {\n+    StMuTrack* gTrk = (StMuTrack*)mMuDst->globalTracks(i);\n+    if (!gTrk) continue;\n+    if (gTrk->id() < 0 || gTrk->id() >= 50000)\n+    {\n+      LOG_WARN << \" This global track has a track id out of the range : \" << gTrk->id() << endm;\n+      continue;\n+    }\n+    int index = mIndex2Primary[gTrk->id()];\n+    StMuTrack* pTrk = (index >= 0) ? (StMuTrack*)mMuDst->primaryTracks(index) : 0;\n+\n+    int id = -1;\n+    int adc0;\n+    float e[5];\n+    float dist[4];\n+    int nhit[2];\n+    int ntow[3];\n+    if (mEmcMode) getBEMC(gTrk, &id, &adc0, e, dist, nhit, ntow);\n+\n+    if (mProdMode == 4)\n+    {\n+      // save only electron or muon candidates\n+      Double_t nsigmaE = gTrk->nSigmaElectron();\n+      Double_t beta = (gTrk) ? gTrk->btofPidTraits().beta() : -999.;\n+\n+      // running on st_mtd data\n+      Bool_t isTPC = kFALSE, isTOF = kFALSE, isEMC = kFALSE, isMTD = kFALSE;\n+      if (gTrk->index2MtdHit() >= 0) isMTD = kTRUE;\n+      if (nsigmaE >= -3 && nsigmaE <= 3)   isTPC = kTRUE;\n+      if (TMath::Abs(1 / beta - 1) < 0.05) isTOF = kTRUE;\n+      if (gTrk->pt() > 1.5 && id >= 0)   isEMC = kTRUE;\n+\n+      if (!((isTPC && isTOF) ||\n+            (isTPC && isEMC) ||\n+            isMTD)\n+         )\n+        continue;\n+    }\n+\n+    if (gTrk->index2Cov() < 0) continue;\n+    StDcaGeometry* dcaG = mMuDst->covGlobTracks(gTrk->index2Cov());\n+    if (!dcaG)\n+    {\n+      cout << \"No dca Geometry for this track !!! \" << i << endm;\n+      continue;\n+    }\n+\n+    int counter = mPicoArrays[picoTrack]->GetEntries();\n+    new((*(mPicoArrays[picoTrack]))[counter]) StPicoTrack(gTrk, pTrk, mBField, mMuDst->primaryVertex()->position(), *dcaG);\n+\n+    StPicoTrack* picoTrk = (StPicoTrack*)mPicoArrays[picoTrack]->At(counter);\n+    // Fill pid traits\n+    if (id >= 0)\n+    {\n+      Int_t emc_index = mPicoArrays[picoEmcPidTraits]->GetEntries();\n+      new((*(mPicoArrays[picoEmcPidTraits]))[emc_index]) StPicoEmcPidTraits(counter, id, adc0, e, dist, nhit, ntow);\n+      picoTrk->setEmcPidTraitsIndex(emc_index);\n+    }\n+\n+    if (gTrk->tofHit())\n+    {\n+      Int_t btof_index = mPicoArrays[picoBTofPidTraits]->GetEntries();\n+      new((*(mPicoArrays[picoBTofPidTraits]))[btof_index]) StPicoBTofPidTraits(gTrk, pTrk, counter);\n+      picoTrk->setBTofPidTraitsIndex(btof_index);\n+    }\n+\n+    if (gTrk->mtdHit())\n+    {\n+      Int_t mtd_index = mPicoArrays[picoMtdPidTraits]->GetEntries();\n+      new((*(mPicoArrays[picoMtdPidTraits]))[mtd_index]) StPicoMtdPidTraits(gTrk->mtdHit(), &(gTrk->mtdPidTraits()), counter);\n+      picoTrk->setMtdPidTraitsIndex(mtd_index);\n+    }\n+  }\n+}\n+\n+//-----------------------------------------------------------------------\n+bool StPicoDstMaker::getBEMC(StMuTrack* t, int* id, int* adc, float* ene, float* d, int* nep, int* towid)\n+{\n+  *id = -1;\n+  *adc = 0;\n+  for (int i = 0; i < 5; ++i)\n+  {\n+    ene[i] = 0.;\n+  }\n+  for (int i = 0; i < 4; ++i)\n+  {\n+    d[i] = 1.e9;\n+  }\n+  for (int i = 0; i < 2; ++i)\n+  {\n+    nep[i] = 0;\n+  }\n+  for (int i = 0; i < 3; ++i)\n+  {\n+    towid[i] = -1;\n+  }\n+\n+  if (!mEmcCollection)\n+  {\n+    LOG_WARN << \" No Emc Collection for this event \" << endm;\n+    return kFALSE;\n+  }\n+\n+  StThreeVectorD position, momentum;\n+  StThreeVectorD positionBSMDE, momentumBSMDE;\n+  StThreeVectorD positionBSMDP, momentumBSMDP;\n+  Double_t bFld = mBField * kilogauss / tesla; // bFld in Tesla\n+  bool ok       = false;\n+  bool okBSMDE  = false;\n+  bool okBSMDP  = false;\n+  if (mEmcPosition)\n+  {\n+    ok      = mEmcPosition->projTrack(&position, &momentum, t, bFld, mEmcGeom[0]->Radius());\n+    okBSMDE = mEmcPosition->projTrack(&positionBSMDE, &momentumBSMDE, t, bFld, mEmcGeom[2]->Radius());\n+    okBSMDP = mEmcPosition->projTrack(&positionBSMDP, &momentumBSMDP, t, bFld, mEmcGeom[3]->Radius());\n+  }\n+\n+  if (!ok)\n+  {\n+    LOG_WARN << \" Projection failed for this track ... \" << endm;\n+    return kFALSE;\n+  }\n+\n+  if (ok && okBSMDE && okBSMDP)\n+  {\n+\n+    Int_t mod = 0, eta = 0, sub = 0;\n+    StSPtrVecEmcPoint& bEmcPoints = mEmcCollection->barrelPoints();\n+    int index = 0;\n+    float mindist = 1.e9;\n+    mEmcGeom[0]->getBin(positionBSMDP.phi(), positionBSMDE.pseudoRapidity(), mod, eta, sub); //project on SMD plan\n+    for (StSPtrVecEmcPointIterator it = bEmcPoints.begin(); it != bEmcPoints.end(); ++it, ++index)\n+    {\n+      bool associated = false;\n+      StPtrVecEmcCluster& bEmcClusters = (*it)->cluster(kBarrelEmcTowerId);\n+      if (bEmcClusters.size() == 0) continue;\n+      if (bEmcClusters[0] == NULL) continue;\n+      for (StPtrVecEmcClusterIterator cIter = bEmcClusters.begin(); cIter != bEmcClusters.end(); ++cIter)\n+      {\n+        StPtrVecEmcRawHit& bEmcHits = (*cIter)->hit();\n+        for (StPtrVecEmcRawHitIterator hIter = bEmcHits.begin(); hIter != bEmcHits.end(); ++hIter)\n+        {\n+          if (mod == (Int_t)(*hIter)->module() && eta == (Int_t)(*hIter)->eta() && sub == (Int_t)(*hIter)->sub())\n+          {\n+            associated = true;\n+            break;\n+          }\n+        }\n+        if (associated)\n+        {\n+          for (StPtrVecEmcRawHitIterator hitit = bEmcHits.begin(); hitit != bEmcHits.end(); ++hitit)\n+          {\n+            if ((*hitit)->energy() > ene[0]) ene[0] = (*hitit)->energy();\n+            if ((int)(*hitit)->adc() > (*adc)) *adc = (*hitit)->adc();\n+          }\n+        }\n+      }\n+\n+      StPtrVecEmcCluster& smdeClusters = (*it)->cluster(kBarrelSmdEtaStripId);\n+      StPtrVecEmcCluster& smdpClusters = (*it)->cluster(kBarrelSmdPhiStripId);\n+\n+      if (associated)\n+      {\n+        *id = index;\n+        ene[1] = ene[1] + (*it)->energy(); //use point's energy, not tower cluster's energy\n+\n+        float deltaphi = (*it)->position().phi() - positionBSMDP.phi();\n+        if (deltaphi >= TMath::Pi()) deltaphi = deltaphi - TMath::TwoPi();\n+        if (deltaphi < -TMath::Pi()) deltaphi = deltaphi + TMath::TwoPi();\n+\n+        float rsmdp = mEmcGeom[3]->Radius();\n+        float pointz = (*it)->position().z();\n+        float deltaz = pointz - positionBSMDE.z();\n+        if (sqrt(deltaphi * deltaphi * rsmdp * rsmdp + deltaz * deltaz) < mindist)\n+        {\n+          d[1] = deltaphi;\n+          d[0] = deltaz;\n+          if (smdeClusters.size() >= 1) nep[0] = smdeClusters[0]->nHits();\n+          if (smdpClusters.size() >= 1) nep[1] = smdpClusters[0]->nHits();\n+          mindist = sqrt(deltaphi * deltaphi * rsmdp * rsmdp + deltaz * deltaz);\n+        }\n+      }//associated\n+    }\n+\n+  } // end if (ok && okBSMDE && okBSMDP)\n+\n+  //Get BEMC tower energy from matched tower + 2 nearest towers\n+\n+  int towerId = 0;\n+  int localTowerId = -1;\n+  int localId1 = -1;\n+  int localId2 = -1;\n+  double energy1 = 0, energy2 = 0;\n+  double energyTemp = 0;\n+  double dist1 = 1000, dist2 = 1000;\n+  double distTemp = 0;\n+  Float_t etaTemp = 0, phiTemp = 0;\n+\n+  if (mEmcGeom[0]->getId(position.phi(), position.pseudoRapidity(), towerId) == 1) return kTRUE;\n+  for (int ieta = -1; ieta < 2; ++ieta)\n+  {\n+    for (int iphi = -1; iphi < 2; ++iphi)\n+    {\n+      localTowerId++;//loops from 0 to 8\n+      int nextTowerId = mEmcPosition->getNextTowerId(towerId, ieta, iphi);\n+      if (nextTowerId < 1 || nextTowerId > 4800) continue;\n+      StEmcRawHit* emcHit = mEmcIndex[nextTowerId - 1];\n+      if (emcHit == 0) continue;\n+      if (emcHit->energy() < 0.2) continue; // don't include any noise tower\n+      if (ieta == 0 && iphi == 0)\n+      {\n+        mEmcGeom[0]->getEta(nextTowerId, etaTemp);\n+        mEmcGeom[0]->getPhi(nextTowerId, phiTemp);\n+        ene[2] = emcHit->energy();\n+        d[2] = position.pseudoRapidity() - etaTemp;\n+        d[3] = position.phi() - phiTemp;\n+      }\n+      else\n+      {\n+        energyTemp = emcHit->energy();\n+        mEmcGeom[0]->getEta(nextTowerId, etaTemp);\n+        mEmcGeom[0]->getPhi(nextTowerId, phiTemp);\n+        distTemp = sqrt((etaTemp - position.pseudoRapidity()) * (etaTemp - position.pseudoRapidity()) + (phiTemp - position.phi()) * (phiTemp - position.phi()));\n+        if (distTemp < dist1)\n+        {\n+          dist2 = dist1;\n+          dist1 = distTemp;","path":"StPicoDstMaker/StPicoDstMaker.cxx","position":800,"original_position":800,"commit_id":"76ede2a06a538ad07d8848cab42b2000e35a67bb","original_commit_id":"76ede2a06a538ad07d8848cab42b2000e35a67bb","user":{"login":"MustafaMustafa","id":1043083,"avatar_url":"https://avatars.githubusercontent.com/u/1043083?v=3","gravatar_id":"","url":"https://api.github.com/users/MustafaMustafa","html_url":"https://github.com/MustafaMustafa","followers_url":"https://api.github.com/users/MustafaMustafa/followers","following_url":"https://api.github.com/users/MustafaMustafa/following{/other_user}","gists_url":"https://api.github.com/users/MustafaMustafa/gists{/gist_id}","starred_url":"https://api.github.com/users/MustafaMustafa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MustafaMustafa/subscriptions","organizations_url":"https://api.github.com/users/MustafaMustafa/orgs","repos_url":"https://api.github.com/users/MustafaMustafa/repos","events_url":"https://api.github.com/users/MustafaMustafa/events{/privacy}","received_events_url":"https://api.github.com/users/MustafaMustafa/received_events","type":"User","site_admin":false},"body":"I am not sure why you think they are not being used. Lines 817-820, 825-828?","created_at":"2016-08-29T22:48:27Z","updated_at":"2016-08-29T22:48:27Z","html_url":"https://github.com/star-bnl/star-picoDst/pull/3#discussion_r76702474","pull_request_url":"https://api.github.com/repos/star-bnl/star-picoDst/pulls/3","_links":{"self":{"href":"https://api.github.com/repos/star-bnl/star-picoDst/pulls/comments/76702474"},"html":{"href":"https://github.com/star-bnl/star-picoDst/pull/3#discussion_r76702474"},"pull_request":{"href":"https://api.github.com/repos/star-bnl/star-picoDst/pulls/3"}}},"pull_request":{"url":"https://api.github.com/repos/star-bnl/star-picoDst/pulls/3","id":80997883,"html_url":"https://github.com/star-bnl/star-picoDst/pull/3","diff_url":"https://github.com/star-bnl/star-picoDst/pull/3.diff","patch_url":"https://github.com/star-bnl/star-picoDst/pull/3.patch","issue_url":"https://api.github.com/repos/star-bnl/star-picoDst/issues/3","number":3,"state":"open","locked":false,"title":"Squashed commit for picoDst peer review","user":{"login":"plexoos","id":5005079,"avatar_url":"https://avatars.githubusercontent.com/u/5005079?v=3","gravatar_id":"","url":"https://api.github.com/users/plexoos","html_url":"https://github.com/plexoos","followers_url":"https://api.github.com/users/plexoos/followers","following_url":"https://api.github.com/users/plexoos/following{/other_user}","gists_url":"https://api.github.com/users/plexoos/gists{/gist_id}","starred_url":"https://api.github.com/users/plexoos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/plexoos/subscriptions","organizations_url":"https://api.github.com/users/plexoos/orgs","repos_url":"https://api.github.com/users/plexoos/repos","events_url":"https://api.github.com/users/plexoos/events{/privacy}","received_events_url":"https://api.github.com/users/plexoos/received_events","type":"User","site_admin":false},"body":"Include all changes on master branch between the following two commits:\r\n\r\nfirst commit 8c2dbb9780cd3cab09a6617326f151634f1cda63\r\nlast commit 963ca8583babc1cfc405faff323536d1b2cb2fd8","created_at":"2016-08-11T17:33:27Z","updated_at":"2016-08-29T22:48:27Z","closed_at":null,"merged_at":null,"merge_commit_sha":"72e08ccf7c64a5fd6a92365bfbcbb9d373cf34cb","assignee":{"login":"veprbl","id":245573,"avatar_url":"https://avatars.githubusercontent.com/u/245573?v=3","gravatar_id":"","url":"https://api.github.com/users/veprbl","html_url":"https://github.com/veprbl","followers_url":"https://api.github.com/users/veprbl/followers","following_url":"https://api.github.com/users/veprbl/following{/other_user}","gists_url":"https://api.github.com/users/veprbl/gists{/gist_id}","starred_url":"https://api.github.com/users/veprbl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/veprbl/subscriptions","organizations_url":"https://api.github.com/users/veprbl/orgs","repos_url":"https://api.github.com/users/veprbl/repos","events_url":"https://api.github.com/users/veprbl/events{/privacy}","received_events_url":"https://api.github.com/users/veprbl/received_events","type":"User","site_admin":false},"assignees":[{"login":"veprbl","id":245573,"avatar_url":"https://avatars.githubusercontent.com/u/245573?v=3","gravatar_id":"","url":"https://api.github.com/users/veprbl","html_url":"https://github.com/veprbl","followers_url":"https://api.github.com/users/veprbl/followers","following_url":"https://api.github.com/users/veprbl/following{/other_user}","gists_url":"https://api.github.com/users/veprbl/gists{/gist_id}","starred_url":"https://api.github.com/users/veprbl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/veprbl/subscriptions","organizations_url":"https://api.github.com/users/veprbl/orgs","repos_url":"https://api.github.com/users/veprbl/repos","events_url":"https://api.github.com/users/veprbl/events{/privacy}","received_events_url":"https://api.github.com/users/veprbl/received_events","type":"User","site_admin":false},{"login":"MustafaMustafa","id":1043083,"avatar_url":"https://avatars.githubusercontent.com/u/1043083?v=3","gravatar_id":"","url":"https://api.github.com/users/MustafaMustafa","html_url":"https://github.com/MustafaMustafa","followers_url":"https://api.github.com/users/MustafaMustafa/followers","following_url":"https://api.github.com/users/MustafaMustafa/following{/other_user}","gists_url":"https://api.github.com/users/MustafaMustafa/gists{/gist_id}","starred_url":"https://api.github.com/users/MustafaMustafa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MustafaMustafa/subscriptions","organizations_url":"https://api.github.com/users/MustafaMustafa/orgs","repos_url":"https://api.github.com/users/MustafaMustafa/repos","events_url":"https://api.github.com/users/MustafaMustafa/events{/privacy}","received_events_url":"https://api.github.com/users/MustafaMustafa/received_events","type":"User","site_admin":false},{"login":"plexoos","id":5005079,"avatar_url":"https://avatars.githubusercontent.com/u/5005079?v=3","gravatar_id":"","url":"https://api.github.com/users/plexoos","html_url":"https://github.com/plexoos","followers_url":"https://api.github.com/users/plexoos/followers","following_url":"https://api.github.com/users/plexoos/following{/other_user}","gists_url":"https://api.github.com/users/plexoos/gists{/gist_id}","starred_url":"https://api.github.com/users/plexoos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/plexoos/subscriptions","organizations_url":"https://api.github.com/users/plexoos/orgs","repos_url":"https://api.github.com/users/plexoos/repos","events_url":"https://api.github.com/users/plexoos/events{/privacy}","received_events_url":"https://api.github.com/users/plexoos/received_events","type":"User","site_admin":false},{"login":"kkauder","id":5784983,"avatar_url":"https://avatars.githubusercontent.com/u/5784983?v=3","gravatar_id":"","url":"https://api.github.com/users/kkauder","html_url":"https://github.com/kkauder","followers_url":"https://api.github.com/users/kkauder/followers","following_url":"https://api.github.com/users/kkauder/following{/other_user}","gists_url":"https://api.github.com/users/kkauder/gists{/gist_id}","starred_url":"https://api.github.com/users/kkauder/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kkauder/subscriptions","organizations_url":"https://api.github.com/users/kkauder/orgs","repos_url":"https://api.github.com/users/kkauder/repos","events_url":"https://api.github.com/users/kkauder/events{/privacy}","received_events_url":"https://api.github.com/users/kkauder/received_events","type":"User","site_admin":false},{"login":"marrbnl","id":7409629,"avatar_url":"https://avatars.githubusercontent.com/u/7409629?v=3","gravatar_id":"","url":"https://api.github.com/users/marrbnl","html_url":"https://github.com/marrbnl","followers_url":"https://api.github.com/users/marrbnl/followers","following_url":"https://api.github.com/users/marrbnl/following{/other_user}","gists_url":"https://api.github.com/users/marrbnl/gists{/gist_id}","starred_url":"https://api.github.com/users/marrbnl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marrbnl/subscriptions","organizations_url":"https://api.github.com/users/marrbnl/orgs","repos_url":"https://api.github.com/users/marrbnl/repos","events_url":"https://api.github.com/users/marrbnl/events{/privacy}","received_events_url":"https://api.github.com/users/marrbnl/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/star-bnl/star-picoDst/pulls/3/commits","review_comments_url":"https://api.github.com/repos/star-bnl/star-picoDst/pulls/3/comments","review_comment_url":"https://api.github.com/repos/star-bnl/star-picoDst/pulls/comments{/number}","comments_url":"https://api.github.com/repos/star-bnl/star-picoDst/issues/3/comments","statuses_url":"https://api.github.com/repos/star-bnl/star-picoDst/statuses/76ede2a06a538ad07d8848cab42b2000e35a67bb","head":{"label":"star-bnl:master-squashed","ref":"master-squashed","sha":"76ede2a06a538ad07d8848cab42b2000e35a67bb","user":{"login":"star-bnl","id":12086737,"avatar_url":"https://avatars.githubusercontent.com/u/12086737?v=3","gravatar_id":"","url":"https://api.github.com/users/star-bnl","html_url":"https://github.com/star-bnl","followers_url":"https://api.github.com/users/star-bnl/followers","following_url":"https://api.github.com/users/star-bnl/following{/other_user}","gists_url":"https://api.github.com/users/star-bnl/gists{/gist_id}","starred_url":"https://api.github.com/users/star-bnl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/star-bnl/subscriptions","organizations_url":"https://api.github.com/users/star-bnl/orgs","repos_url":"https://api.github.com/users/star-bnl/repos","events_url":"https://api.github.com/users/star-bnl/events{/privacy}","received_events_url":"https://api.github.com/users/star-bnl/received_events","type":"Organization","site_admin":false},"repo":{"id":42205492,"name":"star-picoDst","full_name":"star-bnl/star-picoDst","owner":{"login":"star-bnl","id":12086737,"avatar_url":"https://avatars.githubusercontent.com/u/12086737?v=3","gravatar_id":"","url":"https://api.github.com/users/star-bnl","html_url":"https://github.com/star-bnl","followers_url":"https://api.github.com/users/star-bnl/followers","following_url":"https://api.github.com/users/star-bnl/following{/other_user}","gists_url":"https://api.github.com/users/star-bnl/gists{/gist_id}","starred_url":"https://api.github.com/users/star-bnl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/star-bnl/subscriptions","organizations_url":"https://api.github.com/users/star-bnl/orgs","repos_url":"https://api.github.com/users/star-bnl/repos","events_url":"https://api.github.com/users/star-bnl/events{/privacy}","received_events_url":"https://api.github.com/users/star-bnl/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/star-bnl/star-picoDst","description":"Library with data structures to be saved in ROOT TTree for physics analysis","fork":true,"url":"https://api.github.com/repos/star-bnl/star-picoDst","forks_url":"https://api.github.com/repos/star-bnl/star-picoDst/forks","keys_url":"https://api.github.com/repos/star-bnl/star-picoDst/keys{/key_id}","collaborators_url":"https://api.github.com/repos/star-bnl/star-picoDst/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/star-bnl/star-picoDst/teams","hooks_url":"https://api.github.com/repos/star-bnl/star-picoDst/hooks","issue_events_url":"https://api.github.com/repos/star-bnl/star-picoDst/issues/events{/number}","events_url":"https://api.github.com/repos/star-bnl/star-picoDst/events","assignees_url":"https://api.github.com/repos/star-bnl/star-picoDst/assignees{/user}","branches_url":"https://api.github.com/repos/star-bnl/star-picoDst/branches{/branch}","tags_url":"https://api.github.com/repos/star-bnl/star-picoDst/tags","blobs_url":"https://api.github.com/repos/star-bnl/star-picoDst/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/star-bnl/star-picoDst/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/star-bnl/star-picoDst/git/refs{/sha}","trees_url":"https://api.github.com/repos/star-bnl/star-picoDst/git/trees{/sha}","statuses_url":"https://api.github.com/repos/star-bnl/star-picoDst/statuses/{sha}","languages_url":"https://api.github.com/repos/star-bnl/star-picoDst/languages","stargazers_url":"https://api.github.com/repos/star-bnl/star-picoDst/stargazers","contributors_url":"https://api.github.com/repos/star-bnl/star-picoDst/contributors","subscribers_url":"https://api.github.com/repos/star-bnl/star-picoDst/subscribers","subscription_url":"https://api.github.com/repos/star-bnl/star-picoDst/subscription","commits_url":"https://api.github.com/repos/star-bnl/star-picoDst/commits{/sha}","git_commits_url":"https://api.github.com/repos/star-bnl/star-picoDst/git/commits{/sha}","comments_url":"https://api.github.com/repos/star-bnl/star-picoDst/comments{/number}","issue_comment_url":"https://api.github.com/repos/star-bnl/star-picoDst/issues/comments{/number}","contents_url":"https://api.github.com/repos/star-bnl/star-picoDst/contents/{+path}","compare_url":"https://api.github.com/repos/star-bnl/star-picoDst/compare/{base}...{head}","merges_url":"https://api.github.com/repos/star-bnl/star-picoDst/merges","archive_url":"https://api.github.com/repos/star-bnl/star-picoDst/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/star-bnl/star-picoDst/downloads","issues_url":"https://api.github.com/repos/star-bnl/star-picoDst/issues{/number}","pulls_url":"https://api.github.com/repos/star-bnl/star-picoDst/pulls{/number}","milestones_url":"https://api.github.com/repos/star-bnl/star-picoDst/milestones{/number}","notifications_url":"https://api.github.com/repos/star-bnl/star-picoDst/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/star-bnl/star-picoDst/labels{/name}","releases_url":"https://api.github.com/repos/star-bnl/star-picoDst/releases{/id}","deployments_url":"https://api.github.com/repos/star-bnl/star-picoDst/deployments","created_at":"2015-09-09T21:20:48Z","updated_at":"2016-08-11T16:41:36Z","pushed_at":"2016-08-29T17:56:22Z","git_url":"git://github.com/star-bnl/star-picoDst.git","ssh_url":"git@github.com:star-bnl/star-picoDst.git","clone_url":"https://github.com/star-bnl/star-picoDst.git","svn_url":"https://github.com/star-bnl/star-picoDst","homepage":"","size":263,"stargazers_count":1,"watchers_count":1,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":1,"default_branch":"master"}},"base":{"label":"star-bnl:cvs-peer-review","ref":"cvs-peer-review","sha":"79a157b6b66522ff9197ac2250bc6533260044f1","user":{"login":"star-bnl","id":12086737,"avatar_url":"https://avatars.githubusercontent.com/u/12086737?v=3","gravatar_id":"","url":"https://api.github.com/users/star-bnl","html_url":"https://github.com/star-bnl","followers_url":"https://api.github.com/users/star-bnl/followers","following_url":"https://api.github.com/users/star-bnl/following{/other_user}","gists_url":"https://api.github.com/users/star-bnl/gists{/gist_id}","starred_url":"https://api.github.com/users/star-bnl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/star-bnl/subscriptions","organizations_url":"https://api.github.com/users/star-bnl/orgs","repos_url":"https://api.github.com/users/star-bnl/repos","events_url":"https://api.github.com/users/star-bnl/events{/privacy}","received_events_url":"https://api.github.com/users/star-bnl/received_events","type":"Organization","site_admin":false},"repo":{"id":42205492,"name":"star-picoDst","full_name":"star-bnl/star-picoDst","owner":{"login":"star-bnl","id":12086737,"avatar_url":"https://avatars.githubusercontent.com/u/12086737?v=3","gravatar_id":"","url":"https://api.github.com/users/star-bnl","html_url":"https://github.com/star-bnl","followers_url":"https://api.github.com/users/star-bnl/followers","following_url":"https://api.github.com/users/star-bnl/following{/other_user}","gists_url":"https://api.github.com/users/star-bnl/gists{/gist_id}","starred_url":"https://api.github.com/users/star-bnl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/star-bnl/subscriptions","organizations_url":"https://api.github.com/users/star-bnl/orgs","repos_url":"https://api.github.com/users/star-bnl/repos","events_url":"https://api.github.com/users/star-bnl/events{/privacy}","received_events_url":"https://api.github.com/users/star-bnl/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/star-bnl/star-picoDst","description":"Library with data structures to be saved in ROOT TTree for physics analysis","fork":true,"url":"https://api.github.com/repos/star-bnl/star-picoDst","forks_url":"https://api.github.com/repos/star-bnl/star-picoDst/forks","keys_url":"https://api.github.com/repos/star-bnl/star-picoDst/keys{/key_id}","collaborators_url":"https://api.github.com/repos/star-bnl/star-picoDst/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/star-bnl/star-picoDst/teams","hooks_url":"https://api.github.com/repos/star-bnl/star-picoDst/hooks","issue_events_url":"https://api.github.com/repos/star-bnl/star-picoDst/issues/events{/number}","events_url":"https://api.github.com/repos/star-bnl/star-picoDst/events","assignees_url":"https://api.github.com/repos/star-bnl/star-picoDst/assignees{/user}","branches_url":"https://api.github.com/repos/star-bnl/star-picoDst/branches{/branch}","tags_url":"https://api.github.com/repos/star-bnl/star-picoDst/tags","blobs_url":"https://api.github.com/repos/star-bnl/star-picoDst/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/star-bnl/star-picoDst/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/star-bnl/star-picoDst/git/refs{/sha}","trees_url":"https://api.github.com/repos/star-bnl/star-picoDst/git/trees{/sha}","statuses_url":"https://api.github.com/repos/star-bnl/star-picoDst/statuses/{sha}","languages_url":"https://api.github.com/repos/star-bnl/star-picoDst/languages","stargazers_url":"https://api.github.com/repos/star-bnl/star-picoDst/stargazers","contributors_url":"https://api.github.com/repos/star-bnl/star-picoDst/contributors","subscribers_url":"https://api.github.com/repos/star-bnl/star-picoDst/subscribers","subscription_url":"https://api.github.com/repos/star-bnl/star-picoDst/subscription","commits_url":"https://api.github.com/repos/star-bnl/star-picoDst/commits{/sha}","git_commits_url":"https://api.github.com/repos/star-bnl/star-picoDst/git/commits{/sha}","comments_url":"https://api.github.com/repos/star-bnl/star-picoDst/comments{/number}","issue_comment_url":"https://api.github.com/repos/star-bnl/star-picoDst/issues/comments{/number}","contents_url":"https://api.github.com/repos/star-bnl/star-picoDst/contents/{+path}","compare_url":"https://api.github.com/repos/star-bnl/star-picoDst/compare/{base}...{head}","merges_url":"https://api.github.com/repos/star-bnl/star-picoDst/merges","archive_url":"https://api.github.com/repos/star-bnl/star-picoDst/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/star-bnl/star-picoDst/downloads","issues_url":"https://api.github.com/repos/star-bnl/star-picoDst/issues{/number}","pulls_url":"https://api.github.com/repos/star-bnl/star-picoDst/pulls{/number}","milestones_url":"https://api.github.com/repos/star-bnl/star-picoDst/milestones{/number}","notifications_url":"https://api.github.com/repos/star-bnl/star-picoDst/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/star-bnl/star-picoDst/labels{/name}","releases_url":"https://api.github.com/repos/star-bnl/star-picoDst/releases{/id}","deployments_url":"https://api.github.com/repos/star-bnl/star-picoDst/deployments","created_at":"2015-09-09T21:20:48Z","updated_at":"2016-08-11T16:41:36Z","pushed_at":"2016-08-29T17:56:22Z","git_url":"git://github.com/star-bnl/star-picoDst.git","ssh_url":"git@github.com:star-bnl/star-picoDst.git","clone_url":"https://github.com/star-bnl/star-picoDst.git","svn_url":"https://github.com/star-bnl/star-picoDst","homepage":"","size":263,"stargazers_count":1,"watchers_count":1,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/star-bnl/star-picoDst/pulls/3"},"html":{"href":"https://github.com/star-bnl/star-picoDst/pull/3"},"issue":{"href":"https://api.github.com/repos/star-bnl/star-picoDst/issues/3"},"comments":{"href":"https://api.github.com/repos/star-bnl/star-picoDst/issues/3/comments"},"review_comments":{"href":"https://api.github.com/repos/star-bnl/star-picoDst/pulls/3/comments"},"review_comment":{"href":"https://api.github.com/repos/star-bnl/star-picoDst/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/star-bnl/star-picoDst/pulls/3/commits"},"statuses":{"href":"https://api.github.com/repos/star-bnl/star-picoDst/statuses/76ede2a06a538ad07d8848cab42b2000e35a67bb"}}}}
{"actor":{"display_login":"MustafaMustafa"}}