Project
Loading...
Searching...
No Matches
TracksToRecords.h
Go to the documentation of this file.
1// Copyright 2019-2020 CERN and copyright holders of ALICE O2.
2// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
3// All rights not expressly granted are reserved.
4//
5// This software is distributed under the terms of the GNU General Public
6// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
7//
8// In applying this license CERN does not waive the privileges and immunities
9// granted to it by virtue of its status as an Intergovernmental Organization
10// or submit itself to any jurisdiction.
11
15
16#ifndef ALICEO2_MFT_TRACKS_TO_RECORDS_H
17#define ALICEO2_MFT_TRACKS_TO_RECORDS_H
18
19#include <vector>
20#include <gsl/gsl>
21
22#include <TTree.h>
23#include <TChain.h>
24
35#include "MFTBase/GeometryTGeo.h"
36
38
39namespace o2
40{
41namespace mft
42{
43
45{
46 public:
49
51 ~TracksToRecords() override;
52
54 void init() override;
55
56 // simple setters
57
59 void setRunNumber(const int value) { mRunNumber = value; }
60 void setBz(const float bz) { mBz = bz; }
62 void setWithControl(const bool choice) { mWithControl = choice; }
64 void setWithConstraintsRecWriter(const bool choice) { mWithConstraintsRecWriter = choice; }
65
68
70 void processRecoTracks();
71
73 void processROFs(TChain* mfttrackChain, TChain* mftclusterChain);
74
77
79 void startRecordWriter();
80
82 void endRecordWriter();
83
86
89
90 protected:
92 float mBz;
99 std::vector<double> mGlobalDerivatives;
100 std::vector<double> mLocalDerivatives;
106 long mNEntriesAutoSave = 10000;
111 std::vector<o2::BaseCluster<double>> mMFTClustersLocal;
112 std::vector<o2::BaseCluster<double>> mMFTClustersGlobal;
114
115 // access these data from CTFs provided uptream by the workflow
116
117 gsl::span<const o2::mft::TrackMFT> mMFTTracks;
118 gsl::span<const o2::itsmft::ROFRecord> mMFTTracksROF;
119 gsl::span<const int> mMFTTrackClusIdx;
120 gsl::span<const o2::itsmft::CompClusterExt> mMFTClusters;
121 gsl::span<const o2::itsmft::ROFRecord> mMFTClustersROF;
122 gsl::span<const unsigned char> mMFTClusterPatterns;
123 gsl::span<const unsigned char>::iterator mPattIt;
124
125 protected:
127 bool setLocalDerivative(Int_t index, Double_t value);
128
130 bool setGlobalDerivative(Int_t index, Double_t value);
131
134
137
139 bool setLocalEquationX();
140
142 bool setLocalEquationY();
143
145 bool setLocalEquationZ();
146
148};
149
150} // namespace mft
151} // namespace o2
152
153#endif
Compute the local and global derivatives at an alignment point (track position, cluster position)
Definition of the ITSMFT compact cluster.
Definition of the ClusterTopology class.
Abstract base class for the standalone alignment of MFT.
Definition of the ITSMFT ROFrame (trigger) record.
Class to store the data of single track processing.
Class dedicated to write MillePedeRecords to output file for FWDALIGN.
Container of a single alignment point and methods to fill it.
bool setGlobalDerivative(Int_t index, Double_t value)
set array of global derivatives
void processRecoTracks()
use valid tracks (and associated clusters) from the workflow to build Mille records
void setWithControl(const bool choice)
o2::fwdalign::MilleRecordWriter * mRecordWriter
utility that handles the writing of the data records to a ROOT file
void startConstraintsRecWriter()
init the utility needed to write constraints records
o2::mft::AlignPointHelper * mAlignPoint
Alignment point helper.
o2::fwdalign::MilleRecordWriter * mConstraintsRecWriter
utility that handles the writing of the constraints records
gsl::span< const int > mMFTTrackClusIdx
void setWithConstraintsRecWriter(const bool choice)
std::vector< double > mGlobalDerivatives
vector of global derivatives {dDeltaX, dDeltaY, dDeltaRz, dDeltaZ}
long mNEntriesAutoSave
number of entries needed to call AutoSave for the output TTrees
void printProcessTrackSummary()
print a summary status of what happened in processRecoTracks() or processROFs()
bool mWithConstraintsRecWriter
boolean to be set to true if one wants to also write constaints records
bool setLocalEquationY()
set the 2nd component of the local equation vector for a given alignment point
float mBz
magnetic field status
int mCounterSkippedTracks
count how many tracks did not met the cut on the min. nb of clusters
int mNumberOfTrackChainROFs
number of ROFs in the track chain
gsl::span< const o2::mft::TrackMFT > mMFTTracks
void processTimeFrame(o2::framework::ProcessingContext &ctx)
access mft tracks and clusters in the timeframe provided by the workflow
void processROFs(TChain *mfttrackChain, TChain *mftclusterChain)
use mft tracks and clusters provided by ROOT files accessed via TChain to build Mille records
bool resetLocalDerivative()
reset the array of the Local derivative
int mMinNumberClusterCut
Minimum number of clusters in the track to be used for alignment.
void setRunNumber(const int value)
std::vector< o2::BaseCluster< double > > mMFTClustersGlobal
MFT clusters in global coordinate system.
bool mWithControl
boolean to set the use of the control tree
void endConstraintsRecWriter()
end the utility used to write constraints records
int mCounterUsedTracks
count how many tracks were used to make Mille records
ClassDefOverride(TracksToRecords, 0)
gsl::span< constunsignedchar >::iterator mPattIt
std::vector< o2::BaseCluster< double > > mMFTClustersLocal
MFT clusters in local coordinate system.
void setClusterDictionary(const o2::itsmft::TopologyDictionary *d)
bool setLocalEquationZ()
set the last component of the local equation vector for a given alignment point
gsl::span< const unsigned char > mMFTClusterPatterns
int mNumberTFs
number of timeframes processed
gsl::span< const o2::itsmft::ROFRecord > mMFTClustersROF
void setBz(const float bz)
gsl::span< const o2::itsmft::CompClusterExt > mMFTClusters
int mNumberOfClusterChainROFs
number of ROFs in the cluster chain
double mWeightRecord
the weight given to a single Mille record in Millepede algorithm
const o2::itsmft::TopologyDictionary * mDictionary
cluster patterns dictionary
void init() override
init Millipede and AlignPointHelper
bool resetGlocalDerivative()
reset the array of the Global derivative
void endRecordWriter()
end the utility used to write data records and its control tree
void setNEntriesAutoSave(const int value)
void setMinNumberClusterCut(const int value)
gsl::span< const o2::itsmft::ROFRecord > mMFTTracksROF
o2::fwdalign::MillePede2 * mMillepede
Millepede2 implementation copied from AliROOT.
~TracksToRecords() override
destructor
void startRecordWriter()
init the utility needed to write data records and its control tree
int mCounterLocalEquationFailed
count how many times we failed to set a local equation
o2::mft::AlignPointControl mPointControl
AlignPointControl handles the control tree.
bool setLocalEquationX()
set the first component of the local equation vector for a given alignment point
bool setLocalDerivative(Int_t index, Double_t value)
set array of local derivatives
std::vector< double > mLocalDerivatives
vector of local derivatives {dX0, dTx, dY0, dTz}
GLuint index
Definition glcorearb.h:781
GLsizei const GLfloat * value
Definition glcorearb.h:819
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...