3#include "BmnEventHeader.h"
82 gPathSiBTConfig +=
"/parameters/SiBT/XMLConfigs/";
88 cout <<
" Current SiBT Configuration : Run8"
95 cout <<
" Current SiBT Configuration : Run9"
109 Fatal(
"BmnSiBTHitMaker::LoadDetectorConfiguration()",
" !!! Current configuration is not set !!! ");
117 cout <<
"=================== BmnSiBTHitMaker::Init() started ====================" << endl;
119 FairRootManager* ioman = FairRootManager::Instance();
123 cout <<
"BmnSiBTHitMaker::Init(): branch " <<
fInputDigitsBranchName <<
" not found! Task will be deactivated"
133 cout <<
" Strip matching information exists!\n";
135 cout <<
" Strip matching information doesn`t exist!\n";
151 fField = FairRunAna::Instance()->GetField();
153 Fatal(
"Init",
"No Magnetic Field found");
160 cout <<
"=================== BmnSiBTHitMaker::Init() finished ===================" << endl;
187 cout <<
"=================== BmnSiBTHitMaker::Exec() started ====================" << endl;
189 fField = FairRunAna::Instance()->GetField();
192 cout <<
" BmnSiBTHitMaker::Exec(), Number of BmnSiBTDigits = " <<
fBmnSiBTDigitsArray->GetEntriesFast() <<
"\n";
197 cout <<
"=================== BmnSiBTHitMaker::Exec() finished ===================" << endl;
214 Int_t AddedDigits = 0;
215 Int_t AddedStripDigitMatches = 0;
222 module = station->GetModule(digit->GetModule());
230 AddedStripDigitMatches++;
235 cout <<
" Processed strip digits : " << AddedDigits <<
"\n";
237 cout <<
" Added strip digit matches : " << AddedStripDigitMatches <<
"\n";
243 Int_t NCalculatedPoints =
StationSet->CountNProcessedPointsInDetector();
245 cout <<
" Calculated points : " << NCalculatedPoints <<
"\n";
247 cout <<
"BmnSiBTHitMaker: " << NCalculatedPoints <<
" hits\n";
249 Int_t clear_matched_points_cnt = 0;
251 for (
Int_t iStation = 0; iStation <
StationSet->GetNStations(); ++iStation) {
255 module = station->GetModule(iModule);
257 Int_t NIntersectionPointsInModule =
module->GetNIntersectionPoints();
259 for (
Int_t iPoint = 0; iPoint < NIntersectionPointsInModule; ++iPoint) {
261 Double_t sigL =
module->GetIntersectionPoint_LowerLayerSripTotalSignal(iPoint);
262 Double_t sigU =
module->GetIntersectionPoint_UpperLayerSripTotalSignal(iPoint);
264 Double_t x =
module->GetIntersectionPointX(iPoint);
265 Double_t y =
module->GetIntersectionPointY(iPoint);
266 Double_t z =
module->GetZPositionRegistered();
268 Double_t x_err =
module->GetIntersectionPointXError(iPoint);
269 Double_t y_err =
module->GetIntersectionPointYError(iPoint);
276 x = -point_transformed.
X();
277 y = point_transformed.
Y();
278 z = point_transformed.
Z();
281 Int_t RefMCIndex = 0;
286 Int_t most_probably_index = -1;
291 clear_matched_points_cnt++;
292 for (
Int_t ilink = 0; ilink < n_links; ilink++) {
293 Int_t index =
match.GetLink(ilink).GetIndex();
295 if (weight > max_weight) {
297 most_probably_index = index;
301 RefMCIndex = most_probably_index;
317 double k = 2.01370805;
350 cout <<
" glob(x:y:z) = ( " << x <<
" : " << y <<
" : " << z <<
"\n";
351 cout <<
" hit(x:y:z) = ( " << hit->GetX() <<
" : " << hit->GetY() <<
" : " << hit->GetZ() <<
"\n";
366 cout <<
" N clear matches with MC-points = " << clear_matched_points_cnt <<
"\n";
392 printf(
"Work time of BmnSiBTHitMaker: %4.2f sec.\n",
workTime);
void Fatal(const char *location, const char *msgfmt,...)
R__EXTERN TSystem * gSystem
void SetModule(Int_t mod)
void SetStation(Short_t st)
TClonesArray * fBmnSiBTHitsArray
Output array of SiBT Hits.
TString fBmnEvQualityBranchName
BmnSiBTConfiguration::SiBT_CONFIG fCurrentConfig
TClonesArray * fBmnSiBTDigitMatchesArray
BmnSiBTStationSet * StationSet
TString fInputPointsBranchName
TClonesArray * fBmnSiBTHitMatchesArray
Output array of SiBT Hit Matches.
TString fInputDigitMatchesBranchName
TClonesArray * fBmnSiBTDigitsArray
BmnSiBTTransform * GlobalModTransfSet
virtual InitStatus Init()
TString fOutputHitMatchesBranchName
virtual void Exec(Option_t *opt)
virtual ~BmnSiBTHitMaker()
TString fInputDigitsBranchName
TClonesArray * fBmnEvQuality
virtual void OnlineWrite(const std::unique_ptr< TTree > &resultTree)
Write task resul to tree.
void LoadDetectorConfiguration()
TString fOutputHitsBranchName
void SetStripTotalSignalInLowerLayer(Double_t sig)
void SetStripTotalSignalInUpperLayer(Double_t sig)
void SetClusterSizeInLowerLayer(Int_t csize)
void SetStripPositionInUpperLayer(Double_t spos)
void SetStripPositionInLowerLayer(Double_t spos)
void SetClusterSizeInUpperLayer(Int_t csize)
Double_t GetIntersectionPoint_LowerLayerSripPosition(Int_t indx)
Bool_t SetStripMatchInLayer(Int_t layer_num, Int_t strip_num, BmnMatch strip_match)
Bool_t SetStripSignalInLayer(Int_t layer_num, Int_t strip_num, Double_t signal)
Int_t GetIntersectionPoint_UpperLayerClusterSize(Int_t indx)
Int_t GetIntersectionPoint_LowerLayerClusterSize(Int_t indx)
BmnMatch GetIntersectionPointMatch(Int_t indx)
Double_t GetIntersectionPoint_UpperLayerSripPosition(Int_t indx)
Double_t GetStripSignal()
PositionVector3D< Cartesian3D< T >, DefaultCoordinateSystemTag > Point
void Start(Bool_t reset=kTRUE)