593 if(!
ss) {
Log(1,
"EdbScanTracking::TrackSetBT",
594 "Error! set for %s do not found",
idset.
AsString());
return; }
596 int npl =
ss->eIDS.GetSize();
597 if(npl<2) {
Log(1,
"EdbScanTracking::TrackSetBT",
"Warning! npl<2 : %d stop tracking!",npl);
return; }
602 etra.
eCond.
SetSigma0( env.GetValue(
"fedra.track.Sigma0" ,
"3 3 0.005 0.005") );
606 etra.
SetRadLength( env.GetValue(
"fedra.track.RadX0" , 5810.) );
607 etra.
eDoUseMCS = env.GetValue(
"fedra.track.do_use_mcs" , 0 );
609 etra.
eDTmax = env.GetValue(
"fedra.track.DTmax" , 0.07 );
610 etra.
eDRmax = env.GetValue(
"fedra.track.DRmax" , 45. );
611 etra.
eDZGapMax = env.GetValue(
"fedra.track.DZGapMax" , 5000. );
612 etra.
eProbMin = env.GetValue(
"fedra.track.probmin" , 0.001 );
613 bool do_track = env.GetValue(
"fedra.track.do_track" ,
true );
614 bool do_erase = env.GetValue(
"fedra.track.erase" ,
false );
615 bool do_shtag = env.GetValue(
"fedra.track.do_shtag" ,
false );
616 TCut
cut = env.GetValue(
"fedra.readCPcut" ,
"1" );
617 bool do_misalign = env.GetValue(
"fedra.track.do_misalign" , 0 );
618 int npass = env.GetValue(
"fedra.track.npass" , 1 );
619 float misalign_offset = env.GetValue(
"fedra.track.misalign_offset", 500. );
620 bool do_local_corr = env.GetValue(
"fedra.track.do_local_corr" , 1 );
621 bool eDoRealign = env.GetValue(
"fedra.track.do_realign" , 0 );
622 bool do_comb = env.GetValue(
"fedra.track.do_comb" , 0 );
623 eNsegMin = env.GetValue(
"fedra.track.NsegMin" , 2 );
624 float momentum = env.GetValue(
"fedra.track.momentum" , 2. );
627 SetPredictionXY( env.GetValue(
"fedra.track.PredictionCutXY" ,
"0 0. 0. 0. 0.") );
628 SetPredictionZ( env.GetValue(
"fedra.track.PredictionCutZ" ,
"0 0. 0. 0.") );
629 SetPredictionAng( env.GetValue(
"fedra.track.PredictionCutAng" ,
"0 0. 0. 0. 0.") );
631 etra.
InitTrZMap( env.GetValue(
"fedra.track.TrZmap",
"2400 0 120000 2000 0 100000 30" ) );
634 if (ix >= 0 && iy >= 0){
636 int ncellsX = env.GetValue(
"fedra.track.map.NX" , 19);
637 int ncellsY = env.GetValue(
"fedra.track.map.NY" , 19);
639 float xmin = env.GetValue(
"fedra.track.map.xmin" , 0.);
640 float xmax = env.GetValue(
"fedra.track.map.xmax" , 190000.);
641 float ymin = env.GetValue(
"fedra.track.map.ymin" , 0.);
642 float ymax = env.GetValue(
"fedra.track.map.ymax" , 190000.);
644 float overlap_fraction = env.GetValue(
"fedra.track.map.overlapfraction" , 0.);
646 printf(
"EdbScanProc::TrackSetBT ** processing cell %d %d\n", ix , iy);
648 Log(2,
"EdbScanProc::TrackSetBT",
"cell layout, %d x cells from %f to %f, %d y cells from %f to %f",ncellsX,
xmin,
xmax, ncellsY,
ymin,
ymax );
651 cut += Form(
"TMath::Abs(s.eX-%f) < %f && TMath::Abs(s.eY-%f) < %f",
652 emulsioncell->
X(ix),emulsioncell->
Xbin()*(1.+overlap_fraction)/2.,emulsioncell->
Y(iy),emulsioncell->
Ybin()*(1.+overlap_fraction)/2.);
658 int dx[9] = {0,0,1,1,1,0,-1,-1,-1};
659 int dy[9] = {0,1,1,0,-1,-1,-1,0,1};
660 for(
int i=0; i<60; i++) {
661 misalign[i].
ShiftX( dx[i%9] * misalign_offset );
662 misalign[i].
ShiftY( dy[i%9] * misalign_offset );
668 int all_volume_segments=0;
669 for(
int ipass=0; ipass<npass; ipass++) {
670 if(
gEDBDEBUGLEVEL>1) printf(
"\n\n*************** ipass=%d ************\n",ipass);
673 for(
int i=0; i<npl; i++) {
675 if (ix >= 0 && iy >= 0){
685 all_volume_segments += nread;
687 printf(
"skipping plate, %i, nread is zero",
id->ePlate);
695 p.Transform(
plate->GetAffineXY() );
696 p.TransformShr(
plate->Shr() );
697 p.TransformA(
plate->GetAffineTXTY() );
698 p.SetSegmentsPlate(
id->ePlate);
702 for(
int j=0; j<nseg; j++) {
704 plate->CorrectSegLocal(*
s);
713 p.Transform(&misalign[i]);
714 Log(2,
"EdbScanTracking::TrackSetBT",
"apply misalignment of %f",misalign_offset);
726 Log(1,
"EdbScanTracking::TrackSetBT",
"AddPattern with ScanID: %s and %d segments",
id->AsString(),
p.N());
740 int ntr = etra.
Tracks().GetEntriesFast();
742 for(
int i=0; i<ntr; i++) {
751 int cnt_attached_segments=0;
752 TObjArray selectedTracks(ntr);
757 for(
int i=0; i<ntr; i++) {
762 t->SetSegmentsTrack();
764 selectedTracks.Add(
t);
765 cnt_attached_segments +=
t->N();
769 printf(
"\n segments all/attached: %d/%d tracks selected/bad = %d/%d\n",
770 all_volume_segments, cnt_attached_segments, selectedTracks.GetEntriesFast(), cnt_badtrk );
TCut cut
Definition: check_shower.C:6
Definition: EdbCell2.h:151
int InitCell(EdbCell2 &c)
Definition: EdbCell2.h:170
float X(int ix) const
Definition: EdbCell2.h:60
float Ybin() const
Definition: EdbCell2.h:78
float Y(int iy) const
Definition: EdbCell2.h:61
float Xbin() const
Definition: EdbCell2.h:77
Definition: EdbBrick.h:13
int ReadPatCPnopar(EdbPattern &pat, EdbID id, TCut cut="1", bool do_erase=false, bool read_mt=false)
Definition: EdbScanProc.cxx:719
int WriteScanSet(EdbID id, EdbScanSet &ss)
Definition: EdbScanProc.cxx:1467
EdbScanSet * ReadScanSet(EdbID id)
Definition: EdbScanProc.cxx:1521
Definition: EdbScanSet.h:11
void SetPredictionZ(const char *str)
Definition: EdbScanTracking.cxx:962
EdbScanProc * eSproc
Definition: EdbScanTracking.h:102
void SetPredictionXY(const char *str)
Definition: EdbScanTracking.cxx:957
void SetPredictionAng(const char *str)
Definition: EdbScanTracking.cxx:967
void CheckPatternAlignment(EdbPattern &p, EdbPlateP &plate, int nsegmin, EdbAffine2D &acorr)
Definition: EdbScanTracking.cxx:77
void SetMomentum(float p)
Definition: EdbScanTracking.h:66
void FillXYseg(EdbPattern &p)
Definition: EdbScanTracking.cxx:116
void SetRadLength(float x0)
Definition: EdbScanTracking.h:67
float xmin
Definition: emthickness.cpp:61
float ymin
Definition: emthickness.cpp:63
float xmax
Definition: emthickness.cpp:61
float ymax
Definition: emthickness.cpp:63
ss
Definition: energy.C:62
Int_t plate
Definition: merge_Energy_SytematicSources_Electron.C:1
UInt_t id
Definition: tlg2pattern.C:118
EdbSegP * s
Definition: tlg2pattern.C:32