Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Agnostic helix finder and correction of the charged pion lifetime #1210

Merged
merged 79 commits into from
May 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
79 commits
Select commit Hold shift + click to select a range
340b866
filter based on the PID of the helix
NamithaChitrazee Aug 20, 2023
23c68d3
Update prolog.fcl
NamithaChitrazee Aug 20, 2023
4239a11
added average hit times for both readout sides of a CRV coincidence c…
ehrlich-uva Sep 8, 2023
7c37ef7
fcl file for extracted position in EventDisplay
ehrlich-uva Sep 8, 2023
e18faa2
changes related to CRV coincidence finder: remove std::pairs, replace…
ehrlich-uva Sep 10, 2023
787c321
bug fixes
ehrlich-uva Sep 10, 2023
5561b6b
reconstruct CRV hit position based on readout times at both counter ends
ehrlich-uva Sep 17, 2023
0699253
comment about fiberSignalSpeed
ehrlich-uva Sep 17, 2023
db36f13
Merge branch 'pbar2m' into pbar2m3
NamithaChitrazee Sep 24, 2023
2c379aa
Merge pull request #11 from NamithaChitrazee/pbar2m3
NamithaChitrazee Sep 24, 2023
393ec80
Fix config bug
brownd1978 Sep 20, 2023
945813e
putting in framework to filter out bad TCs for Ethan to work on
matthewstortini Nov 1, 2023
69dfe24
fix charges pion lifetime
Nov 3, 2023
ae54f21
add more columns to 1-like-per object printout
Nov 3, 2023
0be99c5
extend generator_tool to return its process code
Nov 3, 2023
235da9d
fit charged pion lifetime
Nov 3, 2023
b953053
merging offline p051, fix tabs and whitespaces
Nov 26, 2023
bdb7ecc
fix indentation
gianipez Nov 27, 2023
071f641
starting point for Hussein
Nov 29, 2023
e2f976a
bug fix
Nov 29, 2023
dc4a23a
fix compilation in prof mode
Nov 29, 2023
d98351f
Merge remote-tracking branch 'origin/main' into merge_051
Nov 29, 2023
a673c96
Merge branch 'main' into merge_051
NamithaChitrazee Jan 9, 2024
5ee711e
small changes
Jan 14, 2024
0ebcd55
Merge branch 'pbar2m' into merge_051
NamithaChitrazee Jan 23, 2024
bec3987
Merge pull request #13 from NamithaChitrazee/merge_051
NamithaChitrazee Jan 23, 2024
39a7a61
added the option to run filters without filtering
Feb 5, 2024
13b447c
update comments
Feb 18, 2024
a57ad67
generate pi+ --> enu
Feb 18, 2024
697c370
generate pi+ --> enu
Feb 18, 2024
5d924f2
Merge pull request #14 from NamithaChitrazee/merge_051
NamithaChitrazee Feb 19, 2024
5afcf2a
adding HelixFinder to CalPatRec
matthewstortini Feb 28, 2024
365bbc8
fixing format issues in fcl
matthewstortini Feb 28, 2024
02062be
Add TZClusterSelection in TZClusterFinder
Feb 29, 2024
7467f3f
Removed the CosmicFilter module unused
Mar 5, 2024
d5015fa
removed the prolog_trigger
Mar 5, 2024
b49e324
Merge branch 'Mu2e:main' into pbar2m
NamithaChitrazee Mar 5, 2024
f9516b4
fixed the default value
gianipez Mar 7, 2024
304fa7f
changing default fcl param
matthewstortini Mar 7, 2024
802b0c5
added multiplicity option to filters
ethanmar Mar 7, 2024
59277ed
Merge branch 'main' into pbar2m
pavel1murat Mar 8, 2024
c622f75
fixed param value
gianipez Mar 8, 2024
5e53cc0
added the option to not check the z propagation direction
ethanmar Mar 28, 2024
612500e
addressing PR comments
matthewstortini Apr 1, 2024
1e5d479
fixing small error
matthewstortini Apr 1, 2024
b7a261b
fixing one missed comment from Dave
matthewstortini Apr 2, 2024
52a86d7
fixing one missed comment from Dave again
matthewstortini Apr 2, 2024
bde3c55
Addressing the PR comments
NamithaChitrazee Apr 2, 2024
c3cbf76
Update HitData_t.hh
NamithaChitrazee Apr 2, 2024
a92287f
Merge branch 'main' into pbar2m
gianipez Apr 2, 2024
c5f656a
Remove EventGenerator/src/ParticleGunMu_tool.cc
NamithaChitrazee Apr 2, 2024
86d06b7
Remove EventGenerator/src/EventGeneratorMu_module.cc
NamithaChitrazee Apr 2, 2024
ebc9f7a
Remove EventGenerator/src/StoppedPiENuGenerator_tool.cc
NamithaChitrazee Apr 2, 2024
08fc1ae
addreass comments by Dave: remove commented out lines, hide CalPatRec…
Apr 2, 2024
3a42755
cleanup
Apr 2, 2024
673869c
Removed the PhiZSeedFinder module for the time being
Apr 4, 2024
40c45d5
Revert Event Generator changes
Apr 4, 2024
26b1b2b
Revert Event Generator changes
Apr 4, 2024
6cda914
small fix
NamithaChitrazee Apr 4, 2024
b926632
Revert of TZClusterFinder
Apr 4, 2024
143b331
as requested
Apr 4, 2024
4eb209a
one minor prolog change and aesthetic changes
matthewstortini Apr 4, 2024
3978b11
Fix DeltaFinderAlg.hh and DeltaFinderAlg.cc, the parameter maximumTim…
Apr 5, 2024
c4b32e9
Add TZClusterFilter as independent module separated from TZClusterFinder
Apr 5, 2024
4ccb9b7
Add XYZVectorF to TZClusterFilter
Apr 8, 2024
6973850
save locally
Apr 9, 2024
53ca285
saving my local changes
Apr 14, 2024
9fd3069
catch invalid time range
Apr 17, 2024
6c47133
remove confusing proton
Apr 23, 2024
d5c2154
Merge branch 'main' into pbar2m
NamithaChitrazee Apr 23, 2024
94b1775
remove files added by mistake
Apr 23, 2024
cc22fe1
revert some changes
Apr 24, 2024
492fca6
revert some changes 2
NamithaChitrazee Apr 24, 2024
cf56377
revert some changes 3
NamithaChitrazee Apr 24, 2024
8897edf
revert some changes 4
NamithaChitrazee Apr 24, 2024
bf54ad6
revert some changes 5
NamithaChitrazee Apr 24, 2024
7c6fc89
revert some changes 6
NamithaChitrazee Apr 24, 2024
a6be539
Merge remote-tracking branch 'mu2e/main' into pbar2m
gianipez Apr 30, 2024
d99670e
removed white spaces
gianipez Apr 30, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
86 changes: 72 additions & 14 deletions CalPatRec/fcl/prolog.fcl
Original file line number Diff line number Diff line change
Expand Up @@ -362,9 +362,7 @@ CalPatRec : { @table::CalPatRec
pickupProtonHits : 1 # the third step of proton finding

timeBin : 40 # ns, prev: 50 (use 40 with makePH.maxDS=5)
minHitTime : 350. # ns
minimumTime : 400. # ns
maximumTime : 1750. # ns
maximumTime : 1750. # ns, used
maxDeltaEDep : 0.004 # max allowed delta eDep
maxSeedEDep : 0.005 # max allowed seed eDep
minProtonSeedEDep : 0.003 # min allowed proton seed eDep
Expand Down Expand Up @@ -564,7 +562,6 @@ CalPatRec : { @table::CalPatRec
debugLevel : 0
printFrequency : 1000
runDisplay : 0
saveProtCand : 0
useCCs : 1
recoverCCs : 1
chCollLabel : "FlagBkgHits"
Expand All @@ -585,16 +582,7 @@ CalPatRec : { @table::CalPatRec
minCaloEnergy : 50.0
caloDtMax : 30.0
caloTimeOffset : @local::TrackCaloMatching.DtOffset
doComptonClean : 0
maxIntersectSig : 5.0
maxApproachSigma : 5.0
maxAppSigmaTrans : 5.0
comptonThresh : 8
doIsoClean : 0
isoRad : 100.0
doPhiClean : 0
phiCleanPhi : 45.0
phiCleanThresh : 5
doRefine : 0

diagPlugin : { tool_type : "TZClusterFinderDiag"
mcTruth : 1
Expand All @@ -603,6 +591,57 @@ CalPatRec : { @table::CalPatRec
}
}

AgnosticHelixFinder : {
module_type : AgnosticHelixFinder
diagLevel : 0
debug : 0
runDisplay : 0
chCollLabel : "FlagBkgHits"
tcCollLabel : "TZClusterFinder"
ccCollLabel : "CaloClusterMaker"
findMultipleHelices : true # whether or not to allow more than 1 helix per tc
useStoppingTarget : true
intenseEventThresh : 30
intenseClusterThresh : 60
doIsolationFlag : true
isoRad : 150.0
isoMinHitsNear : 2
doAverageFlag : true
minDistCut : 20.0
minTripletSeedZ : 0.0
minTripletDz : 50.0
maxTripletDz : 500.0
minTripletDist : 50.0
minTripletArea : 1.0e4
maxSeedCircleResidual : 2.0
minSeedCircleHits : 7
maxDphiDz : 0.008
maxZWindow : 700.0
minLineSegmentHits : 3
segMultiplier : 3.0
maxSegmentChi2 : 2.0
max2PiAmbigResidual : 2.0
maxPhiZResidual : 2.0
minFinalSeedHits : 7
maxCircleRecoverSigma : 3.0
maxLineRecoverSigma : 3.0
caloClusterSigma : 30.0
minNHelixComboHits : 8
minNHelixStrawHits : 12
minHelixPerpMomentum : 40.0
maxHelixPerpMomentum : 140.0
minHelixMomentum : 60.0
maxHelixMomentum : 400.0
chi2LineSaveThresh : 5.0
debugPdgID : 11
debugMomentum : 100.0
debugDirection : "down"
debugStrawHitThresh : 12
debugScatterThresh : 3.0
mcUtils : { @table::TrkReco.McUtils }
diagPlugin : { tool_type : "AgnosticHelixFinderDiag" }
}

PhiClusterFinder : { module_type : PhiClusterFinder
ComboHitCollection : "makePH"
#TimeClusterCollection : "TimeClusterFinderDmu"
Expand Down Expand Up @@ -637,6 +676,25 @@ CalPatRec : { @table::CalPatRec
#------------------------------------------------------------------------------
# new modules
#------------------------------------------------------------------------------

# TZClusterFilter module
TZClusterFilter : {
module_type : TZClusterFilter
diagLevel : 0
runDisplay : 0
chCollLabel : "FlagBkgHits" # same as TZClusterFinder
tcCollLabel : "TZClusterFinder"
minSHsInCluster : 15
minCHsInCluster : 10
nPairs : 1
minCHsInCubes : 2
maxDeltaRInStn : 100
maxDeltaRBtwStns : 120
maxDeltaPhiInStn : 0.4
maxDeltaPhiBtwStns : 0.6
thirdStation : true
}

CalTimePeakFinder : { module_type:CalTimePeakFinder
diagLevel : 0
debugLevel : 0
Expand Down
36 changes: 36 additions & 0 deletions CalPatRec/inc/AgnosticHelixFinder_types.hh
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
#ifndef CalPatRec_AgnosticHelixFinder_types_hh
#define CalPatRec_AgnosticHelixFinder_types_hh

#include "fhiclcpp/types/Atom.h"

namespace mu2e {

namespace AgnosticHelixFinderTypes {

struct Config {
fhicl::Atom<std::string> tool_type{fhicl::Name("tool_type"), fhicl::Comment("tool type: AgnosticHelixFinderDiag")};
};

struct tcInfo {
int nHelices;
int nComboHits;
int nStrawHits;
float time;
};

struct lineSegmentInfo {
float chi2dof;
float maxHitGap;
};

struct diagInfo {
float moduleTime;
int nHelices;
int nTimeClusters;
std::vector<tcInfo> timeClusterData;
std::vector<lineSegmentInfo> lineSegmentData;
};

} // namespace AgnosticHelixFinderTypes
} // namespace mu2e
#endif
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef DeltaFinder_enums_hh
#define DeltaFinder_enums_hh
#ifndef CalPatRec_inc__enums_hh
#define CalPatRec_inc__enums_hh

#include "Offline/DataProducts/inc/StrawId.hh"

Expand Down
19 changes: 19 additions & 0 deletions CalPatRec/inc/ChannelID.hh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#ifndef __CalPatRec_inc_ChannelID_hh__
#define __CalPatRec_inc_ChannelID_hh__

namespace CalPatRec {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need this structure? Its content is identical to StrawId, and all of the functionality ( station, plane, face, panel) is available through accessor functions in StrawId. Having multiple structures represent ingthe same data is confusing and exposes the code to errors.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is an internal for the algorithm helper class which returns hit indices ordered in Z. This functionality is not provided by the StrawId class.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what functionality is not provided by StrawId?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

at the time when the code has been developed, the StrawId interface was not providing an ordering of the faces in assending global Z. As you already mentioned, it might be a good idea to integrate this functionality into the StrawId class

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will start an issue and assign it for resolution after this PR

struct ChannelID {
int Station;
int Plane;
int Face;
int Panel;

static void orderID (ChannelID* X, ChannelID* Ordered);
static void deOrderID(ChannelID* X, ChannelID* Ordered);

static void testOrderID ();
static void testdeOrderID();
};
}

#endif
7 changes: 0 additions & 7 deletions CalPatRec/inc/DeltaCandidate.hh
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ namespace mu2e {
int fFirstStation;
int fLastStation;
DeltaSeed* fSeed [kNStations];
// float fT0Min [kNStations]; // acceptable hit times (no need to account for the drift time!)
// float fT0Max [kNStations];
XYZVectorF CofM;
float fNx; //
float fNy; //
Expand Down Expand Up @@ -58,17 +56,12 @@ namespace mu2e {
int Mask () const { return fMask ; }
int NSeeds () const { return fNSeeds; }
int nHits () const { return fNHits; }
// int NHitsMcP () const { return fNHitsMcP; }
int nStrawHits () const { return fNStrawHits; }
DeltaSeed* Seed (int I) const { return fSeed[I]; }
bool StationUsed (int I) const { return (fSeed[I] != NULL); }
// float T0Min (int I) const { return fT0Min[I]; }
// float T0Max (int I) const { return fT0Max[I]; }
// float Time (int I) const { return (fT0Max[I]+fT0Min[I])/2.; }
int LastStation () const { return fLastStation ; }
int FirstStation () const { return fFirstStation; }
float EDep () const { return fSumEDep/fNStrawHits; }
// float FBest () const { return float(fNHitsMcP)/fNHits; }
double Xc () const { return CofM.x(); }
double Yc () const { return CofM.y(); }
double Rho () const { return CofM.Rho(); }
Expand Down
4 changes: 1 addition & 3 deletions CalPatRec/inc/DeltaFinderAlg.hh
Original file line number Diff line number Diff line change
Expand Up @@ -43,15 +43,13 @@ namespace mu2e {
fhicl::Atom<int> mergePC {Name("mergePC" ), Comment("1: merge proton candidates" ) };
fhicl::Atom<int> pickupProtonHits {Name("pickupProtonHits" ), Comment("1: pickup single proton hits") };
fhicl::Atom<float> timeBin {Name("timeBin" ), Comment("time bin for storing hits" ) };
fhicl::Atom<float> minHitTime {Name("minHitTime" ), Comment("min hit time" ) };
fhicl::Atom<float> maxDeltaEDep {Name("maxDeltaEDep" ), Comment("max delta candidate eDep" ) };
fhicl::Atom<float> maxSeedEDep {Name("maxSeedEDep" ), Comment("max seed eDep" ) };
fhicl::Atom<float> minProtonSeedEDep {Name("minProtonSeedEDep" ), Comment("min proton seed eDep" ) };
fhicl::Atom<float> minProtonHitEDep {Name("minProtonHitEDep" ), Comment("min proton hit eDep" ) };
fhicl::Atom<int> minNSeeds {Name("minNSeeds" ), Comment("min N seeds in a delta cand" ) };
fhicl::Atom<int> minDeltaNHits {Name("minDeltaNHits" ), Comment("min N combo hits in a delta") };
fhicl::Atom<float> maxEleHitEnergy {Name("maxEleHitEnergy" ), Comment("max electron hit energy" ) };
fhicl::Atom<float> minimumTime {Name("minimumTime" ), Comment("minimum time" ) };
fhicl::Atom<float> maximumTime {Name("maximumTime" ), Comment("maximum time" ) };
fhicl::Atom<float> maxHitSeedDt {Name("maxHitSeedDt" ), Comment("max DT(hit-seed)" ) };
fhicl::Atom<float> maxChi2Seed {Name("maxChi2Seed" ), Comment("max seed chi2 (stereo)" ) };
Expand Down Expand Up @@ -92,7 +90,7 @@ namespace mu2e {
int _minNSeeds; // min number of seeds in the delta electron cluster
int _minDeltaNHits; // min number of hits of a delta candidate
float _maxEleHitEnergy; //
float _minT;
// float _minT;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove commented lines

float _maxT;
float _maxHitSeedDt; //
float _maxChi2Seed; //
Expand Down
10 changes: 2 additions & 8 deletions CalPatRec/inc/DeltaFinder_structures.hh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
#ifndef CalPatRec_DeltaFinder_structures_hh
#define CalPatRec_DeltaFinder_structures_hh

#include "Offline/CalPatRec/inc/DeltaFinder_enums.hh"
#include "Offline/CalPatRec/inc/CalPatRec_enums.hh"
#include "Offline/CalPatRec/inc/ChannelID.hh"
#include "Offline/CalPatRec/inc/HitData_t.hh"

namespace mu2e {
Expand All @@ -23,13 +24,6 @@ namespace mu2e {
float fErr; // uncertainty, defines the window
int fPanelID; // if can predict the panel, -1 otherwise
};

struct ChannelID {
int Station;
int Plane;
int Face;
int Panel;
};
//-----------------------------------------------------------------------------
// intersection of the two hit wires
//-----------------------------------------------------------------------------
Expand Down
Loading