Skip to content

Commit 43d22cb

Browse files
committed
Merge remote-tracking branch 'origin/main' into SL25y
2 parents ca8747c + f4d4b69 commit 43d22cb

File tree

5 files changed

+161
-28
lines changed

5 files changed

+161
-28
lines changed

StRoot/StEvent/StTrackTopologyMap.cxx

Lines changed: 89 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -82,14 +82,14 @@
8282
* 50 18 TPC row=43
8383
* 51 19 TPC row=44
8484
* 52 20 TPC row=45
85-
* 53 21 Mwpc
85+
* 53 21 Mwpc / TPC prompt hit
8686
* 54 22 CTB
8787
* 55 23 ToF
8888
* 56 24 RICH
8989
* 57 25 Barrel EMC/SMD
9090
* 58 26 Endcap EMC/SMD
91-
* 59 27
92-
* 60 28
91+
* 59 27 Post-crossing track
92+
* 60 28 Central-membrane crossing track
9393
* 61 29 HFT Format (case 3) - TPC tracks
9494
* 62 30 turn around flag (flags that track spirals back)
9595
* 63 31 FTPC Format (flags TOC or FTPC)
@@ -318,6 +318,86 @@ StTrackTopologyMap::hasHitInSsdLayer(unsigned int layer) const
318318
}
319319
}
320320

321+
bool
322+
StTrackTopologyMap::hasHitInMwpc() const
323+
{
324+
if(ftpcFormat())
325+
return false;
326+
else {
327+
return bit(53);
328+
}
329+
}
330+
331+
bool
332+
StTrackTopologyMap::hasHitInCtb() const
333+
{
334+
if(ftpcFormat())
335+
return false;
336+
else {
337+
return bit(54);
338+
}
339+
}
340+
341+
bool
342+
StTrackTopologyMap::hasHitInTof() const
343+
{
344+
if(ftpcFormat())
345+
return false;
346+
else {
347+
return bit(55);
348+
}
349+
}
350+
351+
bool
352+
StTrackTopologyMap::hasHitInRich() const
353+
{
354+
if(ftpcFormat())
355+
return false;
356+
else {
357+
return bit(56);
358+
}
359+
}
360+
361+
bool
362+
StTrackTopologyMap::hasHitInBemc() const
363+
{
364+
if(ftpcFormat())
365+
return false;
366+
else {
367+
return bit(57);
368+
}
369+
}
370+
371+
bool
372+
StTrackTopologyMap::hasHitInEemc() const
373+
{
374+
if(ftpcFormat())
375+
return false;
376+
else {
377+
return bit(58);
378+
}
379+
}
380+
381+
bool
382+
StTrackTopologyMap::postXTrack() const
383+
{
384+
if(ftpcFormat())
385+
return false;
386+
else {
387+
return bit(59);
388+
}
389+
}
390+
391+
bool
392+
StTrackTopologyMap::membraneCrossingTrack() const
393+
{
394+
if(ftpcFormat())
395+
return false;
396+
else {
397+
return bit(60);
398+
}
399+
}
400+
321401
bool
322402
StTrackTopologyMap::hasHitInRow(StDetectorId id, unsigned int row) const
323403
{
@@ -389,28 +469,28 @@ StTrackTopologyMap::numberOfHits(StDetectorId id) const
389469
break;
390470
case kMwpcWestId:
391471
case kMwpcEastId:
392-
if (bit(53)) n++;
472+
if (hasHitInMwpc()) n++;
393473
break;
394474
case kCtbId:
395-
if (bit(54)) n++;
475+
if (hasHitInCtb()) n++;
396476
break;
397477
case kTofId:
398-
if (bit(55)) n++;
478+
if (hasHitInTof()) n++;
399479
break;
400480
case kRichId:
401-
if (bit(56)) n++;
481+
if (hasHitInRich()) n++;
402482
break;
403483
case kBarrelEmcTowerId:
404484
case kBarrelEmcPreShowerId:
405485
case kBarrelSmdEtaStripId:
406486
case kBarrelSmdPhiStripId:
407-
if (bit(57)) n++;
487+
if (hasHitInBemc()) n++;
408488
break;
409489
case kEndcapEmcTowerId:
410490
case kEndcapEmcPreShowerId:
411491
case kEndcapSmdUStripId:
412492
case kEndcapSmdVStripId:
413-
if (bit(58)) n++;
493+
if (hasHitInEemc()) n++;
414494
break;
415495
default:
416496
n = 0;

StRoot/StEvent/StTrackTopologyMap.h

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,15 @@ class StTrackTopologyMap : public StObject {
8787
bool hasHitInIstLayer(unsigned int) const; // first layer = 1
8888
bool hasHitInSsdLayer(unsigned int) const; // first layer = 1
8989
bool hasHitInSstLayer(unsigned int) const;
90+
bool hasHitInMwpc() const;
91+
bool hasHitInTpcPrompt() const;
92+
bool hasHitInCtb() const;
93+
bool hasHitInTof() const;
94+
bool hasHitInRich() const;
95+
bool hasHitInBemc() const;
96+
bool hasHitInEemc() const;
97+
bool postXTrack() const;
98+
bool membraneCrossingTrack() const;
9099

91100
bool trackTpcOnly() const;
92101
bool trackSvtOnly() const;
@@ -121,4 +130,9 @@ inline bool StTrackTopologyMap::hasHitInSstLayer(unsigned int val) const
121130
return hasHitInSsdLayer(val);
122131
}
123132

133+
inline bool StTrackTopologyMap::hasHitInTpcPrompt() const
134+
{
135+
return hasHitInMwpc();
136+
}
137+
124138
#endif

StRoot/StEventUtilities/StuFixTopoMap.cxx

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,15 @@
3535
* map[1] Bit number Quantity
3636
* ------ ---------- --------
3737
* 0-20 TPC, remaining 21 padrows
38-
* 21 Track extrapolates to MWC (no=0, yes=1)
38+
* 21 Track extrapolates to MWC (no=0, yes=1) (or has prompt hits)
3939
* 22 Track extrapolates to CTB (no=0, yes=1)
4040
* 23 Track extrapolates to TOF (no=0, yes=1)
4141
* 24 Track extrapolates to RCH (no=0, yes=1)
4242
* 25 Track extrapolates to EMCB (no=0, yes=1)
4343
* 26 Track extrapolates to EMCEC (no=0, yes=1)
44-
* 27-29 reserved for future use
44+
* 27 Track post-crossing (no=0, yes=1)
45+
* 28 Track crosses TPC central membrane (no=0, yes=1)
46+
* 29 reserved for future use
4547
* 30 Turn around flag, some elements used >1
4648
* 31 Format interpreter; (SVT/SSD/TPC=0,FTPC=1)
4749
*
@@ -68,7 +70,8 @@
6870
* 24 Track extrapolates to RCH (no=0, yes=1)
6971
* 25 Track extrapolates to EMCB (no=0, yes=1)
7072
* 26 Track extrapolates to EMCEC (no=0, yes=1)
71-
* 27-28 reserved for future use
73+
* 27 Track post-crossing (no=0, yes=1)
74+
* 28 Track crosses TPC central membrane (no=0, yes=1)
7275
* 29 HFT flag (HFT=1, SVT/SSD=0)
7376
* 30 Turn around flag, some elements used >1
7477
* 31 Format interpreter; (SVT/SSD/TPC=0,FTPC=1)
@@ -142,6 +145,18 @@ bool StuFixTopoMap(StTrack* track)
142145
}
143146
else {
144147

148+
// Tracks with hits on other detectors
149+
if (track->isPromptTrack()) word2 |= 1U<<21; // Prompt hit is an MWPC hit
150+
if (track->isCtbMatched()) word2 |= 1U<<22;
151+
if (track->isToFMatched() ||
152+
track->isBToFMatched()) word2 |= 1U<<23;
153+
if (track->isBemcMatched()) word2 |= 1U<<25;
154+
if (track->isEemcMatched()) word2 |= 1U<<26;
155+
156+
// Tracks with helpful pile-up rejection flags
157+
if (track->isPostXTrack()) word2 |= 1U<<27;
158+
if (track->isMembraneCrossingTrack()) word2 |= 1U<<28;
159+
145160
// ???
146161
if (info->numberOfReferencedPoints(kPxlId) ||
147162
info->numberOfReferencedPoints(kSstId) ||

StRoot/StiMaker/StiStEventFiller.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1343,8 +1343,8 @@ void StiStEventFiller::fillTrack(StTrack* gTrack, StiKalmanTrack* track,StTrackD
13431343
fillGeometry(gTrack, track, true ); // outer geometry
13441344
fillFitTraits(gTrack, track);
13451345
gTrack->setDetectorInfo(detInfo);
1346-
StuFixTopoMap(gTrack);
13471346
fillFlags(gTrack);
1347+
StuFixTopoMap(gTrack);
13481348
if (!track->isPrimary()) fillDca(gTrack,track);
13491349
return;
13501350
}

mgr/RootCint.pl

Lines changed: 39 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,7 @@
223223
if ( index($IncDirName,$h_dir) == -1 && $h_dir ne $DirName){
224224
# print "=> Adding $h_dir to [$IncDirname]\n";
225225
$IncDirName .= "-I$h_dir ";
226+
#$IncDirName .= "-I$ENV{STAR}/$h_dir -I$h_dir ";
226227
}
227228

228229
if ($class) {
@@ -388,7 +389,7 @@
388389

389390
for my $class (@classes) { #loop over classes
390391
next if ! $class;
391-
my $h = $class_hfile{$class}; #print "Class: $class h: $h written: $class_written{$class} \n";
392+
my $h = $class_hfile{$class}; # print "Class: $class h: $h written: $class_written{$class} \n";
392393
foreach my $ext ((".h",".hh")){ #search for a few
393394
if (!$h) { #No .h for class
394395
my $hfile = $DirName . "/" . $class . $ext; #print "1 hfile = $hfile\n";
@@ -406,7 +407,7 @@
406407

407408
my $hh = " " . basename($h) . " "; #print "hh = $hh\n";
408409
if ($h_files !~ /$hh/ ) {$h_files .= $hh;}
409-
}#end loop over classes
410+
} #end loop over classes
410411

411412
my @h_files = split ' ', $h_files;
412413
my $h_filesC = "";
@@ -422,26 +423,49 @@
422423
if ($h_files) {
423424
$h_files .= " " . "LinkDef.h";
424425

425-
426-
# $CPPFLAGS .= " -I" . $DirName;
427-
# my $cmd = "rootcint -f $Cint_cxx -c -DROOT_CINT -D__ROOT__ -I. $CPPFLAGS $h_files";
428-
429426
$CPPFLAGS = " -I" . $DirName . " " . $IncDirName . $CPPFLAGS;
430427

431428
my $cmd;
432-
#foreach (keys %ENV){
433-
# print "DEBUG ".$_." ".$ENV{$_}."\n";
434-
#}
435429

436-
#if ( defined($ENV{ROOTCINT_CPPFLAGS}) ){
437-
# $cmd = "rootcint -f $Cint_cxx -c -D__NO_STRANGE_MUDST__ -DROOT_CINT -D__ROOT__ $CPPFLAGS $h_files";
438-
# print "cmd (+extra) = ",$cmd,"\n";
430+
# one more loop to add -I$STAR
431+
#my($STAR)=$ENV{STAR};
432+
my(@minusi)=split(" ",$CPPFLAGS);
433+
my($newf,$el)="";
434+
my($cwd)=$ENV{PWD};
435+
436+
# Ideally, this should have returned teh shell path but it
437+
# expands it ... So, we will have an issue, as if it expands
438+
# /star/nfs4/ as /direct/star+nfs4/, making path link tricks
439+
# and code relocation will not work. We will need to re-compile.
440+
#print "-- $cwd\n";
441+
442+
# This should work for both when we are in $STAR or
443+
# compiling private code which will also have the
444+
# same issue if dictionaries are rebuilt ...
445+
#if ( $cwd eq $STAR){
446+
foreach $el ( @minusi ){
447+
#print "--> $el\n";
448+
if ( $el =~ m/(-I)(.*)/ ){
449+
$el = $2;
450+
if ( -d "$cwd/$el"){
451+
$newf .= "-I$cwd/$el -I$el ";
452+
} else {
453+
$newf .= "-I$el ";
454+
}
455+
} else {
456+
$newf .= $el. " ";
457+
}
458+
}
459+
chomp($newf); $CPPFLAGS = $newf;
460+
#print "-- would substitute with $newf\n";
439461
#} else {
440-
$cmd = "rootcint -f $Cint_cxx -c -DROOT_CINT -D__ROOT__ $CPPFLAGS $h_files";
441-
print "cmd (normal)= ",$cmd,"\n";
442-
# die;
462+
# # print "-- not the same directory $cwd $STAR\n";
443463
#}
444464

465+
$cmd = "rootcint -f $Cint_cxx -c -DROOT_CINT -D__ROOT__ $CPPFLAGS $h_files";
466+
# print "DEBUG $CPPFLAGS\n";
467+
print "cmd (normal)= ",$cmd,"\n";
468+
445469

446470
my $flag = `$cmd`; if ($?) {exit 2;}
447471
}

0 commit comments

Comments
 (0)