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 28 commits into
base: main
Choose a base branch
from
Open

GMT #680

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
591afa9
StarDb added
Apr 8, 2024
7b302dd
Addressing stylish comments
May 22, 2024
0a15563
Revert changes due to the inheritance issue
nigmatkulov May 22, 2024
875a7e4
Fixing EventT
nigmatkulov May 22, 2024
20dffdf
Moving from the ROOT to C++ type declaration
nigmatkulov May 22, 2024
b1fb23b
Update missing parts
nigmatkulov May 22, 2024
6ad10c0
Commenting out unused histo
nigmatkulov May 22, 2024
be2bf1c
Stylish modifications
nigmatkulov May 22, 2024
b8ebc77
Fix typo
nigmatkulov May 22, 2024
48a7271
Make preprocessor directive to hide code parts
nigmatkulov May 23, 2024
6728fed
Trying to clean up more
nigmatkulov May 29, 2024
65d159b
Some updates regardsing the requests
nigmatkulov Nov 27, 2024
8604b50
Update of char -> const char conversion
nigmatkulov Nov 27, 2024
0c37f47
Reshuffling function definition and remove unused variable
nigmatkulov Nov 27, 2024
f4fe3b0
Remoing unused variables from StGmtRawMaker
nigmatkulov Nov 27, 2024
03408dd
Remove unused variables
nigmatkulov Nov 27, 2024
7355aec
Merge branch 'main' into GMT
nigmatkulov Nov 27, 2024
ca072bb
More cleanup of StGmtGeom.cxx
nigmatkulov Nov 27, 2024
f28e751
Check
nigmatkulov Nov 27, 2024
bd8f38f
Fix of weird warning error
nigmatkulov Nov 27, 2024
4cb6ace
Additional fix
nigmatkulov Nov 27, 2024
79cd54e
Add fix of the dummy error
nigmatkulov Nov 27, 2024
856924a
Set initial parameter values for static functions
nigmatkulov Nov 28, 2024
57656c6
Dummy fix fixed
nigmatkulov Nov 28, 2024
496e025
Add missed initial value for the argumetn
nigmatkulov Nov 28, 2024
649d54e
return function put into the braces
nigmatkulov Nov 28, 2024
d23c8cb
Another minor fix
nigmatkulov Nov 28, 2024
379b8d4
Merge branch 'main' into GMT
fisyak Dec 26, 2024
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 @@ -1429,6 +1429,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 @@ -1833,6 +1840,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 @@ -1964,6 +1975,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