3#include "BmnEventHeader.h"
82 gPathSiProfConfig +=
"/parameters/profilometer/XMLConfigs/";
88 cout <<
" Current SiProf Configuration : Run8"
95 cout <<
" Current SiProf Configuration : Run9"
109 Fatal(
"BmnSiProfHitMaker::LoadDetectorConfiguration()",
" !!! Current configuration is not set !!! ");
116 cout <<
"=================== BmnSiProfHitMaker::Init() started ====================" << endl;
118 FairRootManager* ioman = FairRootManager::Instance();
122 cout <<
"BmnSiProfHitMaker::Init(): branch " <<
fInputDigitsBranchName <<
" not found! Task will be deactivated"
132 cout <<
" Strip matching information exists!\n";
134 cout <<
" Strip matching information doesn`t exist!\n";
150 fField = FairRunAna::Instance()->GetField();
152 Fatal(
"Init",
"No Magnetic Field found");
159 cout <<
"=================== BmnSiProfHitMaker::Init() finished ===================" << endl;
185 cout <<
"=================== BmnSiProfHitMaker::Exec() started ====================" << endl;
187 fField = FairRunAna::Instance()->GetField();
190 cout <<
" BmnSiProfHitMaker::Exec(), Number of BmnSiProfDigits = " <<
fBmnSiProfDigitsArray->GetEntriesFast()
196 cout <<
"=================== BmnSiProfHitMaker::Exec() finished ===================" << endl;
212 Int_t AddedDigits = 0;
213 Int_t AddedStripDigitMatches = 0;
220 module = station->GetModule(digit->GetModule());
228 AddedStripDigitMatches++;
233 cout <<
" Processed strip digits : " << AddedDigits <<
"\n";
235 cout <<
" Added strip digit matches : " << AddedStripDigitMatches <<
"\n";
241 Int_t NCalculatedPoints =
StationSet->CountNProcessedPointsInDetector();
243 cout <<
" Calculated points : " << NCalculatedPoints <<
"\n";
245 cout <<
"BmnSiProfHitMaker: " << NCalculatedPoints <<
" hits\n";
247 Int_t clear_matched_points_cnt = 0;
249 for (
Int_t iStation = 0; iStation <
StationSet->GetNStations(); ++iStation) {
253 module = station->GetModule(iModule);
255 Int_t NIntersectionPointsInModule =
module->GetNIntersectionPoints();
257 for (
Int_t iPoint = 0; iPoint < NIntersectionPointsInModule; ++iPoint) {
259 Double_t sigL =
module->GetIntersectionPoint_LowerLayerSripTotalSignal(iPoint);
260 Double_t sigU =
module->GetIntersectionPoint_UpperLayerSripTotalSignal(iPoint);
262 Double_t x =
module->GetIntersectionPointX(iPoint);
263 Double_t y =
module->GetIntersectionPointY(iPoint);
264 Double_t z =
module->GetZPositionRegistered();
266 Double_t x_err =
module->GetIntersectionPointXError(iPoint);
267 Double_t y_err =
module->GetIntersectionPointYError(iPoint);
274 x = -point_transformed.
X();
275 y = point_transformed.
Y();
276 z = point_transformed.
Z();
279 Int_t RefMCIndex = 0;
284 Int_t most_probably_index = -1;
289 clear_matched_points_cnt++;
290 for (
Int_t ilink = 0; ilink < n_links; ilink++) {
291 Int_t index =
match.GetLink(ilink).GetIndex();
293 if (weight > max_weight) {
295 most_probably_index = index;
299 RefMCIndex = most_probably_index;
324 cout <<
" glob(x:y:z) = ( " << x <<
" : " << y <<
" : " << z <<
"\n";
325 cout <<
" hit(x:y:z) = ( " << hit->GetX() <<
" : " << hit->GetY() <<
" : " << hit->GetZ() <<
"\n";
340 cout <<
" N clear matches with MC-points = " << clear_matched_points_cnt <<
"\n";
366 printf(
"Work time of BmnSiProfHitMaker: %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)
TString fInputPointsBranchName
TClonesArray * fBmnEvQuality
TString fInputDigitsBranchName
virtual InitStatus Init()
TString fOutputHitMatchesBranchName
BmnSiProfTransform * GlobalModTransfSet
TClonesArray * fBmnSiProfHitMatchesArray
Output array of SiProf Hit Matches.
TClonesArray * fBmnSiProfDigitMatchesArray
TClonesArray * fBmnSiProfDigitsArray
virtual void Exec(Option_t *opt)
virtual ~BmnSiProfHitMaker()
void LoadDetectorConfiguration()
TString fBmnEvQualityBranchName
BmnSiProfConfiguration::SiProf_CONFIG fCurrentConfig
virtual void OnlineWrite(const std::unique_ptr< TTree > &resultTree)
Write task resul to tree.
TString fOutputHitsBranchName
BmnSiProfStationSet * StationSet
TString fInputDigitMatchesBranchName
TClonesArray * fBmnSiProfHitsArray
Output array of SiProf Hits.
void SetClusterSizeInLowerLayer(Int_t csize)
void SetStripTotalSignalInLowerLayer(Double_t sig)
void SetStripPositionInUpperLayer(Double_t spos)
void SetStripPositionInLowerLayer(Double_t spos)
void SetStripTotalSignalInUpperLayer(Double_t sig)
void SetClusterSizeInUpperLayer(Int_t csize)
Bool_t SetStripSignalInLayer(Int_t layer_num, Int_t strip_num, Double_t signal)
Double_t GetIntersectionPoint_LowerLayerSripPosition(Int_t indx)
Bool_t SetStripMatchInLayer(Int_t layer_num, Int_t strip_num, BmnMatch strip_match)
Int_t GetIntersectionPoint_UpperLayerClusterSize(Int_t indx)
Double_t GetIntersectionPoint_UpperLayerSripPosition(Int_t indx)
BmnMatch GetIntersectionPointMatch(Int_t indx)
Int_t GetIntersectionPoint_LowerLayerClusterSize(Int_t indx)
Double_t GetStripSignal()
PositionVector3D< Cartesian3D< T >, DefaultCoordinateSystemTag > Point
void Start(Bool_t reset=kTRUE)