Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GMT #680

Open
wants to merge 11 commits into
base: main
Choose a base branch
from
Open

GMT #680

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions StRoot/StAnalysisMaker/StAnalysisMaker.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -1141,13 +1141,14 @@ void StAnalysisMaker::summarizeEvent(StEvent *event, Int_t mEventCounter) {
if (event->numberOfPsds()) {
LOG_QA << "# PSDs: " << event->numberOfPsds() << endm;
}
#ifdef _ST_GMT_HIT_H_

if (event->gmtCollection() && event->gmtCollection()->getNumHits()) {
LOG_QA << "# GMT hits: " << event->gmtCollection()->getNumHits()
<< " points: " << event->gmtCollection()->getNumPoints()
<< ", points: " << event->gmtCollection()->getNumPoints()
<< ", strips: " << event->gmtCollection()->getNumStrips()
<< endm;
}
#endif /* _ST_GMT_HIT_H_ */

if (event->rpsCollection()) {
LOG_QA << "# RPS hits: " << event->rpsCollection()->clusters().size() << endm;
}
Expand Down
13 changes: 13 additions & 0 deletions StRoot/StBFChain/BigFullChain.h
Original file line number Diff line number Diff line change
Expand Up @@ -1381,6 +1381,13 @@ Bfc_st BFC[] = { // standard chains
, "MTD hit maker",kFALSE},
{"mtdTrkMask","","","db","StMtdTrackingMaskMaker" ,"StMtdEvtFilterMaker","MTD track masking",kFALSE},

// GMT
{"gmt" ,"","","gmtDat,gmtClu" ,"","","Gmt data Chain",kFALSE},
{"gmtDat" ,"","","event","StGmtRawMaker","StGmtRawMaker", "GMT Data reader",kFALSE},
{"gmtClu" ,"","","gmtutil","StGmtClusterMaker","Spectrum,StGmtClusterMaker","GMT cluster maker",kFALSE},
{"gmtCosmics" ,"","","Cosmics,gmt","","", "Save only events with GMT clusters and Cosmic tracks",kFALSE},
{"gmtClusTree","","","","","", "WARNING *** Option is OBSOLETE ***",kFALSE},

// EPD
{"epdHit", "", "", "epdDb,event", "StEpdHitMaker", "StEpdHitMaker","EPD hit maker", kFALSE},

Expand Down Expand Up @@ -1782,6 +1789,10 @@ Bfc_st BFC[] = { // standard chains
{"mtdCalib" ,"","","db", "StMtdCalibMaker","StMtdCalibMaker","MTD calibration",kFALSE},
{"mtdEvtFilt" ,"","","db", "StMtdEvtFilterMaker","StMtdEvtFilterMaker","MTD event filter" ,kFALSE},

// GMT
{"gmtMatch" ,"","","", "","","WARNING *** Option is OBSOLETE ***",kFALSE},
{"gmtPlotter" ,"","","", "","","WARNING *** Option is OBSOLETE ***",kFALSE},

{"FindVtxSeed" ,"FindVtxSeed" ,"","globT,MuDSTDeps,picoDst","StVertexSeedMaker"
, "StPass0CalibMaker", "Performs vertex seed finding",kFALSE},
{"FindEvtVtxSeed","FindEvtVtxSeed","","MuDSTDeps,picoDst","StEvtVtxSeedMaker"
Expand Down Expand Up @@ -1913,6 +1924,8 @@ Bfc_st BFC[] = { // standard chains
, "StSvtPoolEventT,StSvtPoolSvtMatchedTree","Create SvtMatchedTree",kFALSE},
{"LAna" ,"","","in,detDb,StEvent,tpcDb","StLaserAnalysisMaker"
, "StLaserAnalysisMaker","Laser data Analysis",kFALSE},
// GMT
{"gmtAligner" ,"","","detDb", "StGmtAligner","StGmtAligner","GMT cluster plotting",kFALSE},
{"EandBDir","","","in,StEvent,TpcHitMover,nodefault"
, "StEandBDirMaker","MathMore,Spectrum,StEandBDirMaker", "get E&B direction",kFALSE},
{"SpinTag" ,"","","" ,"","",STAR_CHAIN_OBSOLETE,kFALSE},
Expand Down
5 changes: 5 additions & 0 deletions StRoot/StBFChain/StBFChain.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -550,6 +550,11 @@ Int_t StBFChain::Instantiate()
if (GetOption("Cosmics")) mk->SetAttr("Cosmics" ,kTRUE);
mk->PrintAttr();
}

if (maker== "StGmtClusterMaker") {
if (GetOption("gmtCosmics")) mk->SetAttr("gmtCosmics", kTRUE);
}

if (maker=="StKFVertexMaker" && GetOption("laserIT")) mk->SetAttr("laserIT" ,kTRUE);
// Sti(ITTF) end
if (maker=="StGenericVertexMaker") {
Expand Down
6 changes: 6 additions & 0 deletions StRoot/StEvent/StContainers.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,9 @@
#include "StTrackPidTraits.h"
#include "StV0Vertex.h"
#include "StXiVertex.h"
#include "StGmtHit.h"
#include "StGmtPoint.h"
#include "StGmtStrip.h"

StCollectionImp(BTofHit)
StCollectionImp(BTofRawHit)
Expand Down Expand Up @@ -277,3 +280,6 @@ StCollectionImp(TrackNode)
StCollectionImp(TrackPidTraits)
StCollectionImp(V0Vertex)
StCollectionImp(XiVertex)
StCollectionImp(GmtHit)
StCollectionImp(GmtStrip)
StCollectionImp(GmtPoint)
6 changes: 6 additions & 0 deletions StRoot/StEvent/StContainers.h
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,9 @@ class StTrackNode;
class StTrackPidTraits;
class StV0Vertex;
class StXiVertex;
class StGmtHit;
class StGmtStrip;
class StGmtPoint;

StCollectionDef(BTofHit)
StCollectionDef(BTofRawHit)
Expand Down Expand Up @@ -293,6 +296,9 @@ StCollectionDef(TrackNode)
StCollectionDef(TrackPidTraits)
StCollectionDef(V0Vertex)
StCollectionDef(XiVertex)
StCollectionDef(GmtHit)
StCollectionDef(GmtStrip)
StCollectionDef(GmtPoint)


#endif
25 changes: 25 additions & 0 deletions StRoot/StEvent/StEvent.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,7 @@
#include "StTrackNode.h"
#include "StTrack.h"
#include "StFwdTrackCollection.h"
#include "StGmtCollection.h"

#ifndef ST_NO_NAMESPACES
using std::swap;
Expand Down Expand Up @@ -908,6 +909,23 @@ StEvent::fgtCollection() const
return fgtCollection;
}

StGmtCollection*
StEvent::gmtCollection()
{
StGmtCollection *gmtCollection = 0;
_lookup(gmtCollection, mContent);
return gmtCollection;
}

const StGmtCollection*
StEvent::gmtCollection() const
{
StGmtCollection *gmtCollection = 0;
_lookup(gmtCollection, mContent);
return gmtCollection;
}


StIstHitCollection*
StEvent::istHitCollection()
{
Expand Down Expand Up @@ -1456,6 +1474,12 @@ StEvent::setFgtCollection(StFgtCollection* val)
_lookupAndSet(val, mContent);
}

void
StEvent::setGmtCollection(StGmtCollection* val)
{
_lookupAndSet(val, mContent);
}

void
StEvent::setIstHitCollection(StIstHitCollection* val)
{
Expand Down Expand Up @@ -1629,6 +1653,7 @@ void StEvent::statistics()
cout << "\t# of hits in EMC: " << (emcCollection() ? emcCollection()->barrelPoints().size() : 0) << endl;
cout << "\t# of hits in EEMC: " << (emcCollection() ? emcCollection()->endcapPoints().size() : 0) << endl;
cout << "\t# of hits in FGT: " << (fgtCollection() ? fgtCollection()->getNumHits() : 0) << endl;
cout << "\t# of hits in GMT: " << (gmtCollection() ? gmtCollection()->getNumHits() : 0) << endl;
cout << "\t# of hits in RICH: " << (richCollection() ? richCollection()->getRichHits().size() : 0) << endl;
cout << "\t# of PSDs: " << numberOfPsds() << endl;
}
Expand Down
4 changes: 4 additions & 0 deletions StRoot/StEvent/StEvent.h
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,7 @@ class StIstHitCollection;
class StFstEvtCollection;
class StFstHitCollection;
class StFwdTrackCollection;
class StGmtCollection;

class StEvent : public StXRefMain {
public:
Expand Down Expand Up @@ -318,6 +319,8 @@ class StEvent : public StXRefMain {
const StTriggerIdCollection* triggerIdCollection() const;
StTriggerData* triggerData();
const StTriggerData* triggerData() const;
StGmtCollection* gmtCollection();
const StGmtCollection* gmtCollection() const;

StSPtrVecTrackDetectorInfo& trackDetectorInfo();
const StSPtrVecTrackDetectorInfo& trackDetectorInfo() const;
Expand Down Expand Up @@ -412,6 +415,7 @@ class StEvent : public StXRefMain {
void removePsd(StPsd*);
void addHitCollection(StSPtrVecHit* p, const Char_t *name);
void removeHitCollection(const Char_t *name);
void setGmtCollection(StGmtCollection*);

virtual Bool_t Notify();

Expand Down
2 changes: 2 additions & 0 deletions StRoot/StEvent/StEventClusteringHints.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,7 @@ StEventClusteringHints::StEventClusteringHints()
setBranch("StRpsCollection", "evt_aux", 7);
setBranch("StFttCollection", "evt_aux", 7);
setBranch("StFstEvtCollection", "evt_aux", 7);
setBranch("StGmtCollection", "evt_aux", 7);
setBranch("StSsdHitCollection", "evt_hits", 8);
setBranch("StSstHitCollection", "evt_hits", 8);
setBranch("StSvtHitCollection", "evt_hits", 8);
Expand All @@ -211,6 +212,7 @@ StEventClusteringHints::StEventClusteringHints()
setBranch("StTpcHitCollection", "evt_hits", 8);
setBranch("StFtpcHitCollection", "evt_hits", 8);
setBranch("StRnDHitCollection", "evt_hits", 8);
setBranch("StGmtHitCollection", "evt_hits", 8);
setBranch("StHltEvent", "evt_hlt", 9);
setBranch("StFgtCollection", "evt_fgt", 9);

Expand Down
4 changes: 4 additions & 0 deletions StRoot/StEvent/StEventTypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,8 @@
**************************************************************************/
#ifndef StEventTypes_hh
#define StEventTypes_hh

#include "StContainers.h"

#include "StBbcTriggerDetector.h"
#include "StCalibrationVertex.h"
Expand Down Expand Up @@ -330,6 +332,8 @@
#include "StFgtHitCollection.h"
#include "StFgtPoint.h"
#include "StFgtPointCollection.h"
#include "StGmtHit.h"
#include "StGmtCollection.h"
#include "StIstHit.h"
#include "StIstSensorHitCollection.h"
#include "StIstLadderHitCollection.h"
Expand Down
58 changes: 58 additions & 0 deletions StRoot/StEvent/StGmtCollection.cxx
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
/**
* \class StGmtColection
* \brief Holds collections of GMT data
*
* GMT data collection for StEvent (based on StFgtCollection)
*
* \author K.S. Engle, Jan. 2013
* \author Richard Witt ([email protected]), Jan. 2013
* \author Grigory Nigmatkulov ([email protected]), Dec. 2020
*/

// Load header of the GMT collection
#include "StGmtCollection.h"

ClassImp(StGmtCollection)

//________________
StGmtCollection::StGmtCollection() : StObject() {
// Set the module field for some of the collections
for( int i=0; i<kGmtNumModules; ++i ) {
mStripCollection[i].setModule( i );
mHitCollection[i].setModule( i );
}
}

//________________
StGmtCollection::~StGmtCollection() {
/* empty */
}

//__________
void StGmtCollection::Clear( Option_t *opt ) {
for( int i=0; i<kGmtNumModules; ++i ){
mStripCollection[i].Clear( opt );
mHitCollection[i].Clear( opt );
}
mPointCollection.Clear( opt );
}

//________________
size_t StGmtCollection::getNumStrips() const {
size_t n = 0;
for( const StGmtStripCollection* ptr = &mStripCollection[0];
ptr != &mStripCollection[kGmtNumModules]; ++ptr ) {
n += ptr->getNumStrips();
}
return n;
}

//________________
size_t StGmtCollection::getNumHits() const {
size_t n = 0;
for( const StGmtHitCollection* ptr = &mHitCollection[0];
ptr != &mHitCollection[kGmtNumModules]; ++ptr ) {
n += ptr->getNumHits();
}
return n;
}
90 changes: 90 additions & 0 deletions StRoot/StEvent/StGmtCollection.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
/**
* \class StGmtCollection
* \brief Holds collections of GMT data
*
* GMT data collection for StEvent (based on StFgtCollection)
*
* \author K.S. Engle, Jan. 2013
* \author Richard Witt ([email protected]), Jan. 2013
* \author Grigory Nigmatkulov ([email protected]), Dec. 2020
*/

#ifndef StGmtCollection_hh
#define StGmtCollection_hh

// StRoot headers
#include "StObject.h"
#include "StGmtStripCollection.h"
#include "StGmtHitCollection.h"
#include "StGmtPointCollection.h"
#include "StEnumerations.h"

//________________
class StGmtCollection : public StObject {
public:
/// Constructor
StGmtCollection();
// StGmtCollection( const StGmtCollection& other ); ---> use default
// StGmtCollection& operator=( const StGmtCollection& other ); ---> use default

/// Destructor
~StGmtCollection();

/// Number of modules
size_t getNumModules() const { return kGmtNumModules; }
/// Number total number of strips
size_t getNumStrips() const;
/// Number of strips in the i-th module
size_t getNumStrips( unsigned short moduleIdx) const
{ return (moduleIdx < kGmtNumModules ? mStripCollection[moduleIdx].getNumStrips() : 0 ); }
/// Number total number of hits
size_t getNumHits() const;
/// Number of hits in the i-th module
size_t getNumHits( unsigned short moduleIdx ) const
{ return (moduleIdx < kGmtNumModules ? mHitCollection[moduleIdx].getNumHits() : 0 ); }
/// Number of points
size_t getNumPoints() const
{ return mPointCollection.getNumPoints(); }

// note: ownership of all pointers is retained by the containers.
// Do not delete any pointers received from this class.

/// Pointer to the GMT strip collection in the i-th module
StGmtStripCollection* getStripCollection( unsigned short moduleIdx )
{ return (moduleIdx < kGmtNumModules ? &mStripCollection[moduleIdx] : 0 ); }
/// Pointer to the GMT strip collection in the i-th module
const StGmtStripCollection* getStripCollection( unsigned short moduleIdx ) const
{ return (moduleIdx < kGmtNumModules ? &mStripCollection[moduleIdx] : 0 ); }

/// Pointer to the GMT hit collection in the i-th module
StGmtHitCollection* getHitCollection( unsigned short moduleIdx )
{ return (moduleIdx < kGmtNumModules ? &mHitCollection[moduleIdx] : 0 ); }
/// Pointer to the GMT hit collection in the i-th module
const StGmtHitCollection* getHitCollection( unsigned short moduleIdx ) const
{ return (moduleIdx < kGmtNumModules ? &mHitCollection[moduleIdx] : 0 ); }

/// Pointer to the GMT point collection
StGmtPointCollection* getPointCollection() { return &mPointCollection; }
/// Pointer to the GMT point collection
const StGmtPointCollection* getPointCollection() const { return &mPointCollection; }

/// Clear method
void Clear( Option_t *opts = "" );

protected:

/// Friend class of the StMuDSTMaker
friend class StMuDstMaker;

/// GMT strip collections for all modules
StGmtStripCollection mStripCollection[kGmtNumModules];
/// GMT hit collections for all modules
StGmtHitCollection mHitCollection[kGmtNumModules];
/// GMT point collection
StGmtPointCollection mPointCollection;

private:
ClassDef(StGmtCollection,1)
};

#endif // #define StGmtCollection_hh
Loading
Loading