32 : mParamAtClusters(track.mParamAtClusters),
33 mCurrentParam(nullptr),
35 mConnected(track.mConnected),
36 mRemovable(track.mRemovable)
50 auto itParam = mParamAtClusters.begin();
51 for (; itParam != mParamAtClusters.end(); ++itParam) {
52 if (cluster.
getZ() >= itParam->getZ()) {
58 mParamAtClusters.emplace(itParam);
60 itParam->setZ(cluster.
getZ());
61 itParam->setClusterPtr(&cluster);
74 if (cluster ==
nullptr) {
75 LOG(error) <<
"The TrackParam must be associated with a cluster --> not added";
80 auto itParam = mParamAtClusters.begin();
81 for (; itParam != mParamAtClusters.end(); ++itParam) {
82 if (cluster->
getZ() >= itParam->getZ()) {
88 mParamAtClusters.emplace(itParam,
param);
97 int chMin = 2 * stMin;
98 int chMax = 2 * stMax + 1;
99 int nClustersInCommon(0);
101 for (
const auto& param1 : *
this) {
103 int ch1 = param1.getClusterPtr()->getChamberId();
104 if (ch1 < chMin || ch1 > chMax) {
108 for (
const auto& param2 : track) {
110 int ch2 = param2.getClusterPtr()->getChamberId();
111 if (ch2 < chMin || ch2 > chMax) {
115 if (param1.getClusterPtr()->uid == param2.getClusterPtr()->uid) {
122 return nClustersInCommon;
132 return ((nCl1 > nCl2) || ((nCl1 == nCl2) && (this->
first().getTrackChi2() < track.
first().
getTrackChi2())));
142 int nClusters[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
143 for (
auto&
param : *
this) {
146 int nChFiredInSt4 = (
nClusters[6] > 0) ? 1 : 0;
150 int nChFiredInSt5 = (
nClusters[8] > 0) ? 1 : 0;
154 int nChFiredInSt45 = nChFiredInSt4 + nChFiredInSt5;
156 bool removable[10] = {
false,
false,
false,
false,
false,
false,
false,
false,
false,
false};
159 for (
int iCh = 0; iCh < 6; iCh += 2) {
160 if (
nClusters[iCh] +
nClusters[iCh + 1] > 1 || (requestedStationMask & (1 << (iCh / 2))) == 0) {
167 if (nChFiredInSt45 == 4) {
169 }
else if (nChFiredInSt45 == 3) {
170 if (nChFiredInSt4 == 2 && request2ChInSameSt45) {
176 if (nChFiredInSt5 == 2 && request2ChInSameSt45) {
183 for (
int iCh = 6; iCh < 10; ++iCh) {
189 for (
auto&
param : *
this) {
199 *mCurrentParam =
param;
201 mCurrentParam = std::make_unique<TrackParam>(
param);
203 mCurrentParam->setClusterPtr(
nullptr);
204 mCurrentChamber = chamber;
211 if (!mCurrentParam) {
212 mCurrentParam = std::make_unique<TrackParam>();
214 return *mCurrentParam;
221 mParamAtClusters.front().print();
222 cout <<
"\tcurrent chamber = " << mCurrentChamber + 1 <<
" ; clusters = {";
223 for (
const auto&
param : *
this) {
224 cout <<
param.getClusterPtr()->getIdAsString() <<
", ";
Definition of the MCH track for internal use.
track parameters for internal use
Double_t getTrackChi2() const
return the chi2 of the track when the associated cluster was attached
TrackParam & createParamAtCluster(const Cluster &cluster)
void tagRemovableClusters(uint8_t requestedStationMask, bool request2ChInSameSt45)
bool isBetter(const Track &track) const
int getNClusters() const
Return the number of attached clusters.
int getNClustersInCommon(const Track &track, int stMin=0, int stMax=4) const
const TrackParam & first() const
Return a reference to the track parameters at first cluster.
void removable(bool removable=true)
set the flag telling if this track should be deleted
TrackParam & getCurrentParam()
void setCurrentParam(const TrackParam ¶m, int chamber)
void addParamAtCluster(const TrackParam ¶m)
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
Defining DataPointCompositeObject explicitly as copiable.
cluster minimal structure
double getZ() const
Return the cluster position along z as double.
LOG(info)<< "Compressed in "<< sw.CpuTime()<< " s"