Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
edbca18
Skeleton for matching
chiarazampolli Jun 28, 2018
b879a03
Adding classes for TOF matching
chiarazampolli Jun 28, 2018
5c0c6c0
Further progress on TOF matching
chiarazampolli Jul 2, 2018
83025f2
Further changes for TOF matching
chiarazampolli Jul 3, 2018
e57db0f
Taking the TPC track after the outwards propagation
chiarazampolli Jul 6, 2018
7030ac1
fix for compilation
Jul 7, 2018
451fedc
Propagate the TrackTPC corresponding to the track to match
chiarazampolli Jul 10, 2018
1c83784
Getter and Setter of the value of the number of sigma to cut for the …
chiarazampolli Jul 10, 2018
c832464
Use TPCITS track for TOF matching
chiarazampolli Sep 7, 2018
89e7011
Fixes for matching (clusters that are loaded, filling of inxed cache...)
chiarazampolli Sep 11, 2018
08ee6d4
Load geometry for DPL processing
chiarazampolli Sep 14, 2018
d3238a2
Load geometry if it is not there
chiarazampolli Sep 14, 2018
a7c5be5
Temporary push during debugging for DPL
chiarazampolli Sep 14, 2018
a4bcee3
Change readout window for DPL (and remove printout)
chiarazampolli Oct 1, 2018
7a66c29
TOF digitizer switch to vector of vectors for digits (#5)
noferini Oct 2, 2018
b4be371
Progress on matching
chiarazampolli Oct 3, 2018
a8c1cb6
timestamp removed from TOF digits and other fixes (#6)
noferini Oct 3, 2018
e4d19c6
Important changes in digitizer output and matching
chiarazampolli Oct 9, 2018
00785c8
More changes for TOF matching - including macros to run and check it
chiarazampolli Oct 15, 2018
fbb6393
Tof rec (#8)
noferini Oct 16, 2018
3ed62ff
Removing macro with wrong name
chiarazampolli Oct 16, 2018
f646a46
Further steps in TOF matching.
chiarazampolli Oct 16, 2018
16f0993
Fixing a few bugs.
chiarazampolli Oct 30, 2018
ba2cf6f
One more bug fix, and a lot more.
chiarazampolli Nov 10, 2018
7c2a2fb
Polishing TOF matching code.
chiarazampolli Nov 13, 2018
89facef
Applying style
chiarazampolli Nov 26, 2018
d7c26a5
Some replies to comments to the PR implemented
chiarazampolli Nov 26, 2018
db47a36
Fix for compilation on mac
chiarazampolli Nov 27, 2018
4c27d56
Another fix for mac compilation - of course they are incremental fixe…
chiarazampolli Nov 27, 2018
5ceab1d
Making the tan of the width of a sector a constant
chiarazampolli Nov 27, 2018
ebc5d7e
Following suggestion during PR - don't calculate sector, phi, r every…
chiarazampolli Nov 27, 2018
9e3b9d7
fixes for build/o2checkcode/o2
chiarazampolli Dec 5, 2018
054984f
One more fix for the o2checkcode
chiarazampolli Dec 5, 2018
9292840
Updating debug printout
chiarazampolli Dec 6, 2018
dc41dbc
git-clang-format change
chiarazampolli Dec 7, 2018
985afd1
Addressing comments in PR1486
chiarazampolli Dec 11, 2018
a666497
Leftover fixed
chiarazampolli Dec 11, 2018
8f6f7a0
git-clang-format changes
chiarazampolli Dec 11, 2018
963d38b
git-clang-format - again
chiarazampolli Dec 11, 2018
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
51 changes: 39 additions & 12 deletions DataFormats/Detectors/TOF/include/DataFormatsTOF/Cluster.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@

#include "ReconstructionDataFormats/BaseCluster.h"
#include <boost/serialization/base_object.hpp> // for base_object
#include <TMath.h>
#include <cstdlib>

namespace o2
{
Expand All @@ -27,6 +29,9 @@ namespace tof

class Cluster : public o2::BaseCluster<float>
{
static constexpr float RadiusOutOfRange = 9999; // used to check if the radius was already calculated or not
static constexpr float PhiOutOfRange = 9999; // used to check if phi was already calculated or not

public:
enum { kMain = 0x3FFFF,
kUpLeft = 0x40000, // 2^18, 19th bit
Expand All @@ -40,23 +45,44 @@ class Cluster : public o2::BaseCluster<float>

Cluster() = default;

Cluster(std::int16_t sensid, float x, float y, float z, float sy2, float sz2, float syz, float timeRaw, float time, float tot, int L0L1latency, int deltaBC);
Cluster(std::int16_t sensid, float x, float y, float z, float sy2, float sz2, float syz, double timeRaw, double time, float tot, int L0L1latency, int deltaBC);

~Cluster() = default;

float getTimeRaw() const { return mTimeRaw; } // Cluster ToF getter
void setTimeRaw(float timeRaw) { mTimeRaw = timeRaw; } // Cluster ToF setter
float getTime() const { return mTime; } // Cluster ToF getter
void setTime(float time) { mTime = time; } // Cluster ToF setter
void setBaseData(std::int16_t sensid, float x, float y, float z, float sy2, float sz2, float syz);

double getTimeRaw() const { return mTimeRaw; } // Cluster ToF getter
void setTimeRaw(double timeRaw) { mTimeRaw = timeRaw; } // Cluster ToF setter
double getTime() const { return mTime; } // Cluster ToF getter
void setTime(double time) { mTime = time; } // Cluster ToF setter
float getTot() const { return mTot; } // Cluster Charge getter
void setTot(int tot) { mTot = tot; } // Cluster ToT setter
int getL0L1Latency() const { return mL0L1Latency; }; // L0L1 latency
void setL0L1Latency(int value) { mL0L1Latency = value; }; // L0-L1 latency
int getDeltaBC() const { return mDeltaBC; }; // deltaBC
void setDeltaBC(int value) { mDeltaBC = value; }; // deltaBC
//float getZ() const {return mZ;} // Cluster Z - already in the definition of the cluster
float getR() const { return mR; } // Cluster Radius
float getPhi() const { return mPhi; } // Cluster Phi
float getR()
{
if (mR == RadiusOutOfRange) {
mR = TMath::Sqrt(getX() * getX() + getY() * getY() + getZ() * getZ());
}
return mR;
} // Cluster Radius
float getPhi()
{
if (mPhi == PhiOutOfRange) {
mPhi = TMath::ATan2(getY(), getX());
}
return mPhi;
} // Cluster Phi
int getSector()
{
if (mSector == -1) {
mSector = (TMath::ATan2(-getY(), -getX()) + TMath::Pi()) * TMath::RadToDeg() * 0.05;
}
return mSector;
} // Cluster Sector

int getContributingChannels() const { return mContributingChannels; }
void setContributingChannels(int contributingChannels) { mContributingChannels = contributingChannels; }
Expand Down Expand Up @@ -104,14 +130,15 @@ class Cluster : public o2::BaseCluster<float>
private:
friend class boost::serialization::access;

float mTimeRaw; // raw TOF time // CZ: in AliRoot it is a double
float mTime; // calibrated TOF time // CZ: in AliRoot it is a double
double mTimeRaw; // raw TOF time // CZ: in AliRoot it is a double
double mTime; // calibrated TOF time // CZ: in AliRoot it is a double
float mTot; // Time-Over-threshold // CZ: in AliRoot it is a double
int mL0L1Latency; // L0L1 latency // CZ: is it different per cluster? Checking one ESD file, it seems that it is always the same (see: /alice/data/2017/LHC17n/000280235/pass1/17000280235019.100/AliESDs.root)
int mDeltaBC; // DeltaBC --> can it be a char or short? // CZ: is it different per cluster? Checking one ESD file, it seems that it can vary (see: /alice/data/2017/LHC17n/000280235/pass1/17000280235019.100/AliESDs.root)
//float mZ; //! z-coordinate // CZ: to be verified if it is the same in the BaseCluster class
float mR; //! radius
float mPhi; //! phi coordinate
float mR = RadiusOutOfRange; //! radius
float mPhi = PhiOutOfRange; //! phi coordinate
int mSector = -1; //! sector number
int mContributingChannels; // index of the channels that contributed to the cluster; to be read like this:
// channel & 0x3FFFF -> first 18 bits to store the main channel
// channel & bit19 (0x40000) -> alsoUPLEFT
Expand All @@ -126,7 +153,7 @@ class Cluster : public o2::BaseCluster<float>
ClassDefNV(Cluster, 1);
};

std::ostream& operator<<(std::ostream& os, const Cluster& c);
std::ostream& operator<<(std::ostream& os, Cluster& c);
} // namespace TOF
} // namespace o2
#endif
17 changes: 14 additions & 3 deletions DataFormats/Detectors/TOF/src/Cluster.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
#include "DataFormatsTOF/Cluster.h"
#include "FairLogger.h"

#include <TMath.h>
#include <TString.h>

#include <cstdlib>
Expand All @@ -23,14 +22,26 @@ using namespace o2::tof;

ClassImp(o2::tof::Cluster);

Cluster::Cluster(std::int16_t sensid, float x, float y, float z, float sy2, float sz2, float syz, float timeRaw, float time, float tot, int L0L1Latency, int deltaBC) : o2::BaseCluster<float>(sensid, x, y, z, sy2, sz2, syz), mTimeRaw(timeRaw), mTime(time), mTot(tot), mL0L1Latency(L0L1Latency), mDeltaBC(deltaBC), mContributingChannels(0)
Cluster::Cluster(std::int16_t sensid, float x, float y, float z, float sy2, float sz2, float syz, double timeRaw, double time, float tot, int L0L1Latency, int deltaBC) : o2::BaseCluster<float>(sensid, x, y, z, sy2, sz2, syz), mTimeRaw(timeRaw), mTime(time), mTot(tot), mL0L1Latency(L0L1Latency), mDeltaBC(deltaBC), mContributingChannels(0)
{

// caching R and phi
mR = TMath::Sqrt(x * x + y * y);
mPhi = TMath::ATan2(y, x);
mSector = (TMath::ATan2(-getY(), -getX()) + TMath::Pi()) * TMath::RadToDeg() * 0.05;
}
//______________________________________________________________________
void Cluster::setBaseData(std::int16_t sensid, float x, float y, float z, float sy2, float sz2, float syz)
{
setSensorID(sensid);
setXYZ(x, y, z);
setErrors(sy2, sz2, syz);

// caching R and phi
mR = TMath::Sqrt(x * x + y * y);
mPhi = TMath::ATan2(y, x);
mSector = (TMath::ATan2(-getY(), -getX()) + TMath::Pi()) * TMath::RadToDeg() * 0.05;
}
//______________________________________________________________________
int Cluster::getNumOfContributingChannels() const
{
Expand Down Expand Up @@ -63,7 +74,7 @@ int Cluster::getNumOfContributingChannels() const
}

//______________________________________________________________________
std::ostream& operator<<(std::ostream& os, const Cluster& c)
std::ostream& operator<<(std::ostream& os, Cluster& c)
{
os << (o2::BaseCluster<float>&)c;
os << " TOF cluster: raw time = " << std::scientific << c.getTimeRaw() << ", time = " << std::scientific << c.getTime() << ", Tot = " << std::scientific << c.getTot() << ", L0L1Latency = " << c.getL0L1Latency() << ", deltaBC = " << c.getDeltaBC() << ", R = " << c.getR() << ", mPhi = " << c.getPhi() << ", ContributingChannels = " << c.getNumOfContributingChannels() << "\n";
Expand Down
2 changes: 2 additions & 0 deletions DataFormats/Reconstruction/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,15 @@ set(SRCS
src/BaseCluster.cxx
src/TrackTPCITS.cxx
src/Vertex.cxx
src/MatchInfoTOF.cxx
)

Set(HEADERS
include/${MODULE_NAME}/Track.h
include/${MODULE_NAME}/BaseCluster.h
include/${MODULE_NAME}/TrackTPCITS.h
include/${MODULE_NAME}/Vertex.h
include/${MODULE_NAME}/MatchInfoTOF.h
)

Set(LINKDEF src/ReconstructionDataFormatsLinkDef.h)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
// Copyright CERN and copyright holders of ALICE O2. This software is
// distributed under the terms of the GNU General Public License v3 (GPL
// Version 3), copied verbatim in the file "COPYING".
//
// See http://alice-o2.web.cern.ch/license for full licensing information.
//
// In applying this license CERN does not waive the privileges and immunities
// granted to it by virtue of its status as an Intergovernmental Organization
// or submit itself to any jurisdiction.

/// \file MatchInfoTOF.h
/// \brief Class to store the output of the matching to TOF

#ifndef ALICEO2_MATCHINFOTOF_H
#define ALICEO2_MATCHINFOTOF_H

namespace o2
{
namespace dataformats
{
class MatchInfoTOF
{
public:
MatchInfoTOF(int indexTOFCl, float chi2) : mTOFClIndex(indexTOFCl), mChi2(chi2){};
MatchInfoTOF() = default;
void setTOFClIndex(int index) { mTOFClIndex = index; }
int getTOFClIndex() const { return mTOFClIndex; }

void setChi2(int chi2) { mChi2 = chi2; }
float getChi2() const { return mChi2; }

private:
int mTOFClIndex; // index of the TOF cluster used for the matching
float mChi2; // chi2 of the pair track-TOFcluster

// ClassDefNV(MatchInfoTOF, 1);
};
}
}
#endif
18 changes: 18 additions & 0 deletions DataFormats/Reconstruction/src/MatchInfoTOF.cxx
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// Copyright CERN and copyright holders of ALICE O2. This software is
// distributed under the terms of the GNU General Public License v3 (GPL
// Version 3), copied verbatim in the file "COPYING".
//
// See http://alice-o2.web.cern.ch/license for full licensing information.
//
// In applying this license CERN does not waive the privileges and immunities
// granted to it by virtue of its status as an Intergovernmental Organization
// or submit itself to any jurisdiction.

/// \file MatchInfoTOF.cxx
/// \brief Class to store the output of the matching to TOF

#include "ReconstructionDataFormats/MatchInfoTOF.h"

using namespace o2::dataformats;

//ClassImp(o2::dataformats::MatchInfoTOF);
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
#pragma link C++ class o2::track::TrackParCov + ;
#pragma link C++ class o2::BaseCluster < float > +;
#pragma link C++ class o2::dataformats::TrackTPCITS + ;
#pragma link C++ class o2::dataformats::MatchInfoTOF + ;

#pragma link C++ class o2::dataformats::Vertex < int > +;
#pragma link C++ class o2::dataformats::Vertex < o2::dataformats::TimeStamp < int >> +;
Expand Down
1 change: 1 addition & 0 deletions DataFormats/simulation/src/SimulationDataLinkDef.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
#pragma link C++ struct o2::dataformats::MCTruthHeaderElement + ;
#pragma link C++ class o2::dataformats::MCTruthContainer < long > +;
#pragma link C++ class o2::dataformats::MCTruthContainer < o2::MCCompLabel > +;
#pragma link C++ class std::vector < o2::dataformats::MCTruthContainer < o2::MCCompLabel >> +;
#pragma link C++ class std::vector < o2::MCCompLabel > +;
#pragma link C++ class std::vector < o2::dataformats::MCTruthHeaderElement > +;

Expand Down
2 changes: 2 additions & 0 deletions Detectors/GlobalTracking/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,12 @@ O2_SETUP(NAME ${MODULE_NAME})

set(SRCS
src/MatchTPCITS.cxx
src/MatchTOF.cxx
)

set(HEADERS
include/${MODULE_NAME}/MatchTPCITS.h
include/${MODULE_NAME}/MatchTOF.h
)

set(LINKDEF src/GlobalTrackingLinkDef.h)
Expand Down
Loading