StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StMuEpdUtil.cxx
1 /****************************************************************
2  *
3  * Author: Mike Lisa
4  *
5  *****************************************************************
6  *
7  * Description:
8  * Convert StEpdHitCollection in StEvent to
9  * StMuEpdHitCollection in MuDst
10  *
11  *****************************************************************
12  *
13  * patterned after StMuBTofUtil.cxx
14  *
15  *
16  ****************************************************************/
17 #include "StEvent.h"
18 #include "StTrack.h"
19 #include "StEpdCollection.h"
20 #include "StEpdHit.h"
21 #include "StMuEpdUtil.h"
22 #include "StMuEpdHitCollection.h"
23 
24 ClassImp(StMuEpdUtil)
25 
27 { }
28 
29 StMuEpdUtil::~StMuEpdUtil()
30 { }
31 
32 StMuEpdHitCollection* StMuEpdUtil::getMuEpdHit(StEpdCollection *epdcol)
33 {
34  if(!epdcol) return NULL;
36  fillMuEpdHit(muEpdHit, epdcol);
37  return muEpdHit;
38 }
39 
40 void StMuEpdUtil::fillMuEpdHit(StMuEpdHitCollection* muEpdHit, StEpdCollection* epdcol)
41 {
42  if( !epdcol )return;
43  if(!muEpdHit) return;
44 
45  if( epdcol->hitsPresent() ) {
46  StSPtrVecEpdHit &epdHits = epdcol->epdHits();
47 
48  for(size_t i=0; i < epdHits.size(); i++) {
49  StEpdHit *aHit = epdHits[i];
50  if(!aHit) continue;
51  StMuEpdHit* epdMuHit = new StMuEpdHit(aHit);
52  muEpdHit->push_back(epdMuHit);
53  }
54  }
55  return;
56 }
Stores information for tiles in STAR Event Plane Detector.
Definition: StEpdHit.h:43