Skip to content

Commit 39e4e4f

Browse files
nigmatkulovGrigory NigmatkulovGrigory Nigmatkulovfisyakplexoos
authored
GMT (#680)
Commit GMT-related classes and macroses. Also, update StarDb/geometry for GMT with the latest alignment. --------- Co-authored-by: Grigory Nigmatkulov <[email protected]> Co-authored-by: Grigory Nigmatkulov <[email protected]> Co-authored-by: Yuri Fisyak <[email protected]> Co-authored-by: Dmitri Smirnov <[email protected]>
1 parent d1e27f6 commit 39e4e4f

40 files changed

+4437
-3
lines changed

StRoot/StAnalysisMaker/StAnalysisMaker.cxx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1141,13 +1141,14 @@ void StAnalysisMaker::summarizeEvent(StEvent *event, Int_t mEventCounter) {
11411141
if (event->numberOfPsds()) {
11421142
LOG_QA << "# PSDs: " << event->numberOfPsds() << endm;
11431143
}
1144-
#ifdef _ST_GMT_HIT_H_
1144+
11451145
if (event->gmtCollection() && event->gmtCollection()->getNumHits()) {
11461146
LOG_QA << "# GMT hits: " << event->gmtCollection()->getNumHits()
1147-
<< " points: " << event->gmtCollection()->getNumPoints()
1147+
<< ", points: " << event->gmtCollection()->getNumPoints()
1148+
<< ", strips: " << event->gmtCollection()->getNumStrips()
11481149
<< endm;
11491150
}
1150-
#endif /* _ST_GMT_HIT_H_ */
1151+
11511152
if (event->rpsCollection()) {
11521153
LOG_QA << "# RPS hits: " << event->rpsCollection()->clusters().size() << endm;
11531154
}

StRoot/StBFChain/BigFullChain.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1429,6 +1429,13 @@ Bfc_st BFC[] = { // standard chains
14291429
, "MTD hit maker",kFALSE},
14301430
{"mtdTrkMask","","","db","StMtdTrackingMaskMaker" ,"StMtdEvtFilterMaker","MTD track masking",kFALSE},
14311431

1432+
// GMT
1433+
{"gmt", "","","gmtDat,gmtClu", "","","Gmt data Chain",kFALSE},
1434+
{"gmtDat", "","","event","StGmtRawMaker","StGmtRawMaker", "GMT Data reader",kFALSE},
1435+
{"gmtClu", "","","gmtutil","StGmtClusterMaker","Spectrum,StGmtClusterMaker","GMT cluster maker",kFALSE},
1436+
{"gmtCosmics", "","","Cosmics,gmt","","", "Save only events with GMT clusters and Cosmic tracks",kFALSE},
1437+
{"gmtClusTree","","","","","", STAR_CHAIN_OBSOLETE,kFALSE},
1438+
14321439
// EPD
14331440
{"epdHit", "", "", "epdDb,event", "StEpdHitMaker", "StEpdHitMaker","EPD hit maker", kFALSE},
14341441

@@ -1964,6 +1971,8 @@ Bfc_st BFC[] = { // standard chains
19641971
, "StSvtPoolEventT,StSvtPoolSvtMatchedTree","Create SvtMatchedTree",kFALSE},
19651972
{"LAna" ,"","","in,detDb,StEvent,tpcDb","StLaserAnalysisMaker"
19661973
, "StLaserAnalysisMaker","Laser data Analysis",kFALSE},
1974+
// GMT
1975+
{"gmtAligner" ,"","","detDb", "StGmtAlignmentMaker","StGmtAlignmentMaker","GMT cluster plotting",kFALSE},
19671976
{"EandBDir","","","in,StEvent,TpcHitMover,nodefault"
19681977
, "StEandBDirMaker","MathMore,Spectrum,StEandBDirMaker", "get E&B direction",kFALSE},
19691978
{"SpinTag" ,"","","" ,"","",STAR_CHAIN_OBSOLETE,kFALSE},

StRoot/StBFChain/StBFChain.cxx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -550,6 +550,11 @@ Int_t StBFChain::Instantiate()
550550
if (GetOption("Cosmics")) mk->SetAttr("Cosmics" ,kTRUE);
551551
mk->PrintAttr();
552552
}
553+
554+
if (maker== "StGmtClusterMaker") {
555+
if (GetOption("gmtCosmics")) mk->SetAttr("gmtCosmics", kTRUE);
556+
}
557+
553558
if (maker=="StKFVertexMaker" && GetOption("laserIT")) mk->SetAttr("laserIT" ,kTRUE);
554559
// Sti(ITTF) end
555560
if (maker=="StGenericVertexMaker") {

StRoot/StEvent/StContainers.cxx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,9 @@
198198
#include "StTrackPidTraits.h"
199199
#include "StV0Vertex.h"
200200
#include "StXiVertex.h"
201+
#include "StGmtHit.h"
202+
#include "StGmtPoint.h"
203+
#include "StGmtStrip.h"
201204

202205
StCollectionImp(BTofHit)
203206
StCollectionImp(BTofRawHit)
@@ -277,3 +280,6 @@ StCollectionImp(TrackNode)
277280
StCollectionImp(TrackPidTraits)
278281
StCollectionImp(V0Vertex)
279282
StCollectionImp(XiVertex)
283+
StCollectionImp(GmtHit)
284+
StCollectionImp(GmtStrip)
285+
StCollectionImp(GmtPoint)

StRoot/StEvent/StContainers.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,9 @@ class StTrackNode;
214214
class StTrackPidTraits;
215215
class StV0Vertex;
216216
class StXiVertex;
217+
class StGmtHit;
218+
class StGmtStrip;
219+
class StGmtPoint;
217220

218221
StCollectionDef(BTofHit)
219222
StCollectionDef(BTofRawHit)
@@ -293,6 +296,9 @@ StCollectionDef(TrackNode)
293296
StCollectionDef(TrackPidTraits)
294297
StCollectionDef(V0Vertex)
295298
StCollectionDef(XiVertex)
299+
StCollectionDef(GmtHit)
300+
StCollectionDef(GmtStrip)
301+
StCollectionDef(GmtPoint)
296302

297303

298304
#endif

StRoot/StEvent/StEvent.cxx

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,7 @@
256256
#include "StTrackNode.h"
257257
#include "StTrack.h"
258258
#include "StFwdTrackCollection.h"
259+
#include "StGmtCollection.h"
259260

260261
#ifndef ST_NO_NAMESPACES
261262
using std::swap;
@@ -908,6 +909,23 @@ StEvent::fgtCollection() const
908909
return fgtCollection;
909910
}
910911

912+
StGmtCollection*
913+
StEvent::gmtCollection()
914+
{
915+
StGmtCollection *gmtCollection = 0;
916+
_lookup(gmtCollection, mContent);
917+
return gmtCollection;
918+
}
919+
920+
const StGmtCollection*
921+
StEvent::gmtCollection() const
922+
{
923+
StGmtCollection *gmtCollection = 0;
924+
_lookup(gmtCollection, mContent);
925+
return gmtCollection;
926+
}
927+
928+
911929
StIstHitCollection*
912930
StEvent::istHitCollection()
913931
{
@@ -1456,6 +1474,12 @@ StEvent::setFgtCollection(StFgtCollection* val)
14561474
_lookupAndSet(val, mContent);
14571475
}
14581476

1477+
void
1478+
StEvent::setGmtCollection(StGmtCollection* val)
1479+
{
1480+
_lookupAndSet(val, mContent);
1481+
}
1482+
14591483
void
14601484
StEvent::setIstHitCollection(StIstHitCollection* val)
14611485
{
@@ -1629,6 +1653,7 @@ void StEvent::statistics()
16291653
cout << "\t# of hits in EMC: " << (emcCollection() ? emcCollection()->barrelPoints().size() : 0) << endl;
16301654
cout << "\t# of hits in EEMC: " << (emcCollection() ? emcCollection()->endcapPoints().size() : 0) << endl;
16311655
cout << "\t# of hits in FGT: " << (fgtCollection() ? fgtCollection()->getNumHits() : 0) << endl;
1656+
cout << "\t# of hits in GMT: " << (gmtCollection() ? gmtCollection()->getNumHits() : 0) << endl;
16321657
cout << "\t# of hits in RICH: " << (richCollection() ? richCollection()->getRichHits().size() : 0) << endl;
16331658
cout << "\t# of PSDs: " << numberOfPsds() << endl;
16341659
}

StRoot/StEvent/StEvent.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,7 @@ class StIstHitCollection;
228228
class StFstEvtCollection;
229229
class StFstHitCollection;
230230
class StFwdTrackCollection;
231+
class StGmtCollection;
231232

232233
class StEvent : public StXRefMain {
233234
public:
@@ -318,6 +319,8 @@ class StEvent : public StXRefMain {
318319
const StTriggerIdCollection* triggerIdCollection() const;
319320
StTriggerData* triggerData();
320321
const StTriggerData* triggerData() const;
322+
StGmtCollection* gmtCollection();
323+
const StGmtCollection* gmtCollection() const;
321324

322325
StSPtrVecTrackDetectorInfo& trackDetectorInfo();
323326
const StSPtrVecTrackDetectorInfo& trackDetectorInfo() const;
@@ -412,6 +415,7 @@ class StEvent : public StXRefMain {
412415
void removePsd(StPsd*);
413416
void addHitCollection(StSPtrVecHit* p, const Char_t *name);
414417
void removeHitCollection(const Char_t *name);
418+
void setGmtCollection(StGmtCollection*);
415419

416420
virtual Bool_t Notify();
417421

StRoot/StEvent/StEventClusteringHints.cxx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,7 @@ StEventClusteringHints::StEventClusteringHints()
202202
setBranch("StRpsCollection", "evt_aux", 7);
203203
setBranch("StFttCollection", "evt_aux", 7);
204204
setBranch("StFstEvtCollection", "evt_aux", 7);
205+
setBranch("StGmtCollection", "evt_aux", 7);
205206
setBranch("StSsdHitCollection", "evt_hits", 8);
206207
setBranch("StSstHitCollection", "evt_hits", 8);
207208
setBranch("StSvtHitCollection", "evt_hits", 8);
@@ -211,6 +212,7 @@ StEventClusteringHints::StEventClusteringHints()
211212
setBranch("StTpcHitCollection", "evt_hits", 8);
212213
setBranch("StFtpcHitCollection", "evt_hits", 8);
213214
setBranch("StRnDHitCollection", "evt_hits", 8);
215+
setBranch("StGmtHitCollection", "evt_hits", 8);
214216
setBranch("StHltEvent", "evt_hlt", 9);
215217
setBranch("StFgtCollection", "evt_fgt", 9);
216218

StRoot/StEvent/StEventTypes.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,8 @@
169169
**************************************************************************/
170170
#ifndef StEventTypes_hh
171171
#define StEventTypes_hh
172+
173+
#include "StContainers.h"
172174

173175
#include "StBbcTriggerDetector.h"
174176
#include "StCalibrationVertex.h"
@@ -330,6 +332,8 @@
330332
#include "StFgtHitCollection.h"
331333
#include "StFgtPoint.h"
332334
#include "StFgtPointCollection.h"
335+
#include "StGmtHit.h"
336+
#include "StGmtCollection.h"
333337
#include "StIstHit.h"
334338
#include "StIstSensorHitCollection.h"
335339
#include "StIstLadderHitCollection.h"

StRoot/StEvent/StGmtCollection.cxx

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
/**
2+
* \class StGmtColection
3+
* \brief Holds collections of GMT data
4+
*
5+
* GMT data collection for StEvent (based on StFgtCollection)
6+
*
7+
* \author K.S. Engle, Jan. 2013
8+
* \author Richard Witt ([email protected]), Jan. 2013
9+
* \author Grigory Nigmatkulov ([email protected]), Dec. 2020
10+
*/
11+
12+
// Load header of the GMT collection
13+
#include "StGmtCollection.h"
14+
15+
//________________
16+
StGmtCollection::StGmtCollection() : StObject() {
17+
// Set the module field for some of the collections
18+
for( int i=0; i<kGmtNumModules; ++i ) {
19+
mStripCollection[i].setModule( i );
20+
mHitCollection[i].setModule( i );
21+
}
22+
}
23+
24+
//________________
25+
StGmtCollection::~StGmtCollection() {
26+
/* empty */
27+
}
28+
29+
//__________
30+
void StGmtCollection::Clear( Option_t *opt ) {
31+
for( int i=0; i<kGmtNumModules; ++i ){
32+
mStripCollection[i].Clear( opt );
33+
mHitCollection[i].Clear( opt );
34+
}
35+
mPointCollection.Clear( opt );
36+
}
37+
38+
//________________
39+
size_t StGmtCollection::getNumStrips() const {
40+
size_t n = 0;
41+
for( const StGmtStripCollection* ptr = &mStripCollection[0];
42+
ptr != &mStripCollection[kGmtNumModules]; ++ptr ) {
43+
n += ptr->getNumStrips();
44+
}
45+
return n;
46+
}
47+
48+
//________________
49+
size_t StGmtCollection::getNumHits() const {
50+
size_t n = 0;
51+
for( const StGmtHitCollection* ptr = &mHitCollection[0];
52+
ptr != &mHitCollection[kGmtNumModules]; ++ptr ) {
53+
n += ptr->getNumHits();
54+
}
55+
return n;
56+
}

0 commit comments

Comments
 (0)