Skip to content

Commit

Permalink
Merge pull request #1210 from NamithaChitrazee/pbar2m
Browse files Browse the repository at this point in the history
Agnostic helix finder and correction of the charged pion lifetime
  • Loading branch information
kutschke authored May 6, 2024
2 parents f6fe4b1 + d99670e commit 7eeafee
Show file tree
Hide file tree
Showing 33 changed files with 3,816 additions and 585 deletions.
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 {
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;
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

0 comments on commit 7eeafee

Please sign in to comment.