Skip to content

Commit 4e8672a

Browse files
shahor02sawenzel
authored andcommitted
Added TPCITS matching, moved ITS reco format classes to DataFormats/Detectors
Added TPC-ITS matching class Detectors/GlobalTracking/MatchTPCITS with its output track DataFormats/Reconstruction/TrackTPCITS Moved ITSMFT common cluster format definition to DataFormats/Detectors/ITSMFT/common Renamed ITS CookerTrack format definition to TrackITS in DataFormats/Detectors/ITSMFT/ITS Moved ClusterTopology and TopologyDictionary format definitions to DataFormats/Detectors/ITSMFT/common Eliminated dependence of DataFormatsTPC on TPCBase by moving Defs.h and Constants.h to DataFormatsTPC Applied clang-format to modified classes
1 parent 19a858f commit 4e8672a

83 files changed

Lines changed: 2446 additions & 512 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

DataFormats/Detectors/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@
22

33
add_subdirectory (Common)
44
add_subdirectory (TPC)
5+
add_subdirectory (ITSMFT)
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# **************************************************************************
2+
# * Copyright(c) 1998-2014, ALICE Experiment at CERN, All rights reserved. *
3+
# * *
4+
# * Author: The ALICE Off-line Project. *
5+
# * Contributors are mentioned in the code where appropriate. *
6+
# * *
7+
# * Permission to use, copy, modify and distribute this software and its *
8+
# * documentation strictly for non-commercial purposes is hereby granted *
9+
# * without fee, provided that the above copyright notice appears in all *
10+
# * copies and that both the copyright notice and this permission notice *
11+
# * appear in the supporting documentation. The authors make no claims *
12+
# * about the suitability of this software for any purpose. It is *
13+
# * provided "as is" without express or implied warranty. *
14+
# **************************************************************************
15+
16+
# Libraries
17+
add_subdirectory(common)
18+
add_subdirectory(ITS)
19+
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
set(MODULE_NAME "DataFormatsITS")
2+
3+
O2_SETUP(NAME ${MODULE_NAME})
4+
5+
set(SRCS
6+
src/TrackITS.cxx
7+
)
8+
set(HEADERS
9+
include/${MODULE_NAME}/TrackITS.h
10+
)
11+
12+
Set(LINKDEF src/DataFormatsITSLinkDef.h)
13+
Set(LIBRARY_NAME ${MODULE_NAME})
14+
Set(BUCKET_NAME data_format_its_bucket)
15+
O2_GENERATE_LIBRARY()
16+

Detectors/ITSMFT/ITS/reconstruction/include/ITSReconstruction/CookedTrack.h renamed to DataFormats/Detectors/ITSMFT/ITS/include/DataFormatsITS/TrackITS.h

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@
88
// granted to it by virtue of its status as an Intergovernmental Organization
99
// or submit itself to any jurisdiction.
1010

11-
/// \file CookedTrack.h
12-
/// \brief Definition of the ITS cooked track
11+
/// \file TrackITS.h
12+
/// \brief Definition of the ITS track
1313
/// \author iouri.belikov@cern.ch
1414

15-
#ifndef ALICEO2_ITS_COOKEDTRACK_H
16-
#define ALICEO2_ITS_COOKEDTRACK_H
15+
#ifndef ALICEO2_ITS_TRACKITS_H
16+
#define ALICEO2_ITS_TRACKITS_H
1717

1818
#include <vector>
1919

@@ -28,18 +28,18 @@ class Cluster;
2828

2929
namespace ITS
3030
{
31-
class CookedTrack : public o2::track::TrackParCov
31+
class TrackITS : public o2::track::TrackParCov
3232
{
3333
using Cluster = o2::ITSMFT::Cluster;
3434

3535
public:
3636
using o2::track::TrackParCov::TrackParCov; // inherit base constructors
3737
static constexpr int MaxClusters = 7;
3838

39-
CookedTrack() = default;
40-
CookedTrack(const CookedTrack& t) = default;
41-
CookedTrack& operator=(const CookedTrack& tr) = default;
42-
~CookedTrack() = default;
39+
TrackITS() = default;
40+
TrackITS(const TrackITS& t) = default;
41+
TrackITS& operator=(const TrackITS& tr) = default;
42+
~TrackITS() = default;
4343

4444
// These functions must be provided
4545
Bool_t propagate(Float_t alpha, Float_t x, Float_t bz);
@@ -49,7 +49,7 @@ class CookedTrack : public o2::track::TrackParCov
4949
float getChi2() const { return mChi2; }
5050
Int_t getNumberOfClusters() const { return mNClusters; }
5151
Int_t getClusterIndex(Int_t i) const { return mIndex[i]; }
52-
bool operator<(const CookedTrack& o) const;
52+
bool operator<(const TrackITS& o) const;
5353
void getImpactParams(Float_t x, Float_t y, Float_t z, Float_t bz, Float_t ip[2]) const;
5454
// Bool_t getPhiZat(Float_t r,Float_t &phi,Float_t &z) const;
5555

@@ -59,10 +59,11 @@ class CookedTrack : public o2::track::TrackParCov
5959

6060
std::uint32_t getROFrame() const { return mROFrame; }
6161
void setROFrame(std::uint32_t f) { mROFrame = f; }
62-
Bool_t isBetter(const CookedTrack& best, Float_t maxChi2) const;
62+
Bool_t isBetter(const TrackITS& best, Float_t maxChi2) const;
6363

6464
o2::track::TrackParCov& getParamOut() { return mParamOut; }
6565
const o2::track::TrackParCov& getParamOut() const { return mParamOut; }
66+
6667
private:
6768
short mNClusters = 0;
6869
float mMass = 0.14; ///< Assumed mass for this track
@@ -71,8 +72,8 @@ class CookedTrack : public o2::track::TrackParCov
7172
o2::track::TrackParCov mParamOut; // parameter at largest radius
7273
std::array<Int_t, MaxClusters> mIndex; ///< Indices of associated clusters
7374

74-
ClassDef(CookedTrack, 2)
75+
ClassDef(TrackITS, 2)
7576
};
7677
}
7778
}
78-
#endif /* ALICEO2_ITS_COOKEDTRACK_H */
79+
#endif /* ALICEO2_ITS_TRACKITS_H */
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
// Copyright CERN and copyright holders of ALICE O2. This software is
2+
// distributed under the terms of the GNU General Public License v3 (GPL
3+
// Version 3), copied verbatim in the file "COPYING".
4+
//
5+
// See http://alice-o2.web.cern.ch/license for full licensing information.
6+
//
7+
// In applying this license CERN does not waive the privileges and immunities
8+
// granted to it by virtue of its status as an Intergovernmental Organization
9+
// or submit itself to any jurisdiction.
10+
11+
#ifdef __CLING__
12+
13+
#pragma link off all globals;
14+
#pragma link off all classes;
15+
#pragma link off all functions;
16+
#pragma link C++ class o2::ITS::TrackITS + ;
17+
18+
#endif

Detectors/ITSMFT/ITS/reconstruction/src/CookedTrack.cxx renamed to DataFormats/Detectors/ITSMFT/ITS/src/TrackITS.cxx

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,24 +8,24 @@
88
// granted to it by virtue of its status as an Intergovernmental Organization
99
// or submit itself to any jurisdiction.
1010

11-
/// \file CookedTrack.cxx
11+
/// \file TrackITS.cxx
1212
/// \brief Implementation of the ITS cooked track
1313
/// \author iouri.belikov@cern.ch
1414

1515
#include <TMath.h>
1616

1717
#include "CommonConstants/MathConstants.h"
18-
#include "ITSMFTReconstruction/Cluster.h"
19-
#include "ITSReconstruction/CookedTrack.h"
18+
#include "DataFormatsITSMFT/Cluster.h"
19+
#include "DataFormatsITS/TrackITS.h"
2020

21-
ClassImp(o2::ITS::CookedTrack)
21+
ClassImp(o2::ITS::TrackITS)
2222

2323
using namespace o2::ITSMFT;
2424
using namespace o2::ITS;
2525
using namespace o2::constants::math;
2626
using namespace o2::track;
2727

28-
bool CookedTrack::operator<(const CookedTrack& o) const
28+
bool TrackITS::operator<(const TrackITS& o) const
2929
{
3030
//-----------------------------------------------------------------
3131
// This function compares tracks according to the their curvature
@@ -38,7 +38,7 @@ bool CookedTrack::operator<(const CookedTrack& o) const
3838
return (c > co);
3939
}
4040

41-
void CookedTrack::getImpactParams(Float_t x, Float_t y, Float_t z, Float_t bz, Float_t ip[2]) const
41+
void TrackITS::getImpactParams(Float_t x, Float_t y, Float_t z, Float_t bz, Float_t ip[2]) const
4242
{
4343
//------------------------------------------------------------------
4444
// This function calculates the transverse and longitudinal impact parameters
@@ -70,7 +70,7 @@ void CookedTrack::getImpactParams(Float_t x, Float_t y, Float_t z, Float_t bz, F
7070
ip[1] = getZ() + getTgl() / rp4 * TMath::ASin(f2 * r1 - f1 * r2) - z;
7171
}
7272

73-
void CookedTrack::resetClusters()
73+
void TrackITS::resetClusters()
7474
{
7575
//------------------------------------------------------------------
7676
// Reset the array of attached clusters.
@@ -79,7 +79,7 @@ void CookedTrack::resetClusters()
7979
mNClusters = 0;
8080
}
8181

82-
void CookedTrack::setClusterIndex(Int_t l, Int_t i)
82+
void TrackITS::setClusterIndex(Int_t l, Int_t i)
8383
{
8484
//--------------------------------------------------------------------
8585
// Set the cluster index
@@ -88,15 +88,15 @@ void CookedTrack::setClusterIndex(Int_t l, Int_t i)
8888
mIndex[mNClusters++] = idx;
8989
}
9090

91-
void CookedTrack::setExternalClusterIndex(Int_t layer, Int_t idx)
91+
void TrackITS::setExternalClusterIndex(Int_t layer, Int_t idx)
9292
{
9393
//--------------------------------------------------------------------
9494
// Set the cluster index within an external cluster array
9595
//--------------------------------------------------------------------
9696
mIndex[layer] = idx;
9797
}
9898

99-
Bool_t CookedTrack::propagate(Float_t alpha, Float_t x, Float_t bz)
99+
Bool_t TrackITS::propagate(Float_t alpha, Float_t x, Float_t bz)
100100
{
101101
if (rotate(alpha))
102102
if (propagateTo(x, bz))
@@ -105,7 +105,7 @@ Bool_t CookedTrack::propagate(Float_t alpha, Float_t x, Float_t bz)
105105
return kFALSE;
106106
}
107107

108-
Bool_t CookedTrack::update(const Cluster& c, Float_t chi2, Int_t idx)
108+
Bool_t TrackITS::update(const Cluster& c, Float_t chi2, Int_t idx)
109109
{
110110
//--------------------------------------------------------------------
111111
// Update track params
@@ -120,7 +120,7 @@ Bool_t CookedTrack::update(const Cluster& c, Float_t chi2, Int_t idx)
120120
}
121121

122122
/*
123-
Bool_t CookedTrack::getPhiZat(Float_t r, Float_t &phi, Float_t &z) const
123+
Bool_t TrackITS::getPhiZat(Float_t r, Float_t &phi, Float_t &z) const
124124
{
125125
//------------------------------------------------------------------
126126
// This function returns the global cylindrical (phi,z) of the track
@@ -153,7 +153,7 @@ Bool_t CookedTrack::getPhiZat(Float_t r, Float_t &phi, Float_t &z) const
153153
}
154154
*/
155155

156-
Bool_t CookedTrack::isBetter(const CookedTrack& best, Float_t maxChi2) const
156+
Bool_t TrackITS::isBetter(const TrackITS& best, Float_t maxChi2) const
157157
{
158158
Int_t ncl = getNumberOfClusters();
159159
Int_t nclb = best.getNumberOfClusters();
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
set(MODULE_NAME "DataFormatsITSMFT")
2+
3+
O2_SETUP(NAME ${MODULE_NAME})
4+
5+
set(SRCS
6+
src/Cluster.cxx
7+
src/ClusterTopology.cxx
8+
src/TopologyDictionary.cxx
9+
)
10+
11+
Set(HEADERS
12+
include/${MODULE_NAME}/Cluster.h
13+
include/${MODULE_NAME}/ClusterTopology.h
14+
include/${MODULE_NAME}/TopologyDictionary.h
15+
)
16+
17+
Set(LINKDEF src/ITSMFTDataFormatsLinkDef.h)
18+
Set(LIBRARY_NAME ${MODULE_NAME})
19+
set(BUCKET_NAME data_format_itsmft_bucket)
20+
21+
O2_GENERATE_LIBRARY()
22+
23+

Detectors/ITSMFT/common/reconstruction/include/ITSMFTReconstruction/Cluster.h renamed to DataFormats/Detectors/ITSMFT/common/include/DataFormatsITSMFT/Cluster.h

File renamed without changes.

Detectors/ITSMFT/common/reconstruction/include/ITSMFTReconstruction/ClusterTopology.h renamed to DataFormats/Detectors/ITSMFT/common/include/DataFormatsITSMFT/ClusterTopology.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
#include <array>
2727
#include <iostream>
2828
#include <string>
29-
#include "ITSMFTReconstruction/Cluster.h"
29+
#include "DataFormatsITSMFT/Cluster.h"
3030

3131
namespace o2
3232
{

Detectors/ITSMFT/common/reconstruction/include/ITSMFTReconstruction/TopologyDictionary.h renamed to DataFormats/Detectors/ITSMFT/common/include/DataFormatsITSMFT/TopologyDictionary.h

File renamed without changes.

0 commit comments

Comments
 (0)