1 #include "BFieldDistortionSystematics.hxx" 2 #include "ND280AnalysisUtils.hxx" 3 #include "EventBoxTracker.hxx" 4 #include "VersioningUtils.hxx" 28 std::cout <<
"BFieldDistortionSystematics::Apply(): " << box->
nRelevantRecObjects << std::endl;
34 std::cout <<
"itrk = " << itrk << std::endl;
47 if (!tpcTrack)
continue;
52 std::cout<<
" mom "<<mom<<std::endl;
55 if (versionUtils::prod6_systematics){
57 if (refmom == 99999 || !TMath::Finite(refmom))
continue;
60 if (refmom < 0 || !TMath::Finite(refmom))
continue;
63 if (mom < 0 || !TMath::Finite(mom))
continue;
66 if (mom > gmom || refmom > gmom)
continue;
72 std::cout <<
" p0 = " << track->
Momentum << std::endl;
76 if(ntpcs>0) track->
Momentum += delta/(ntpcs);
79 std::cout <<
"p = " << track->
Momentum <<
" delta "<<delta<<
" ntpcs "<<ntpcs<<
" var "<<toy.Variations[0]<< std::endl;
111 if (det == SubDetId::kFGD1 || det == SubDetId::kFGD){
112 IDs[ngroups++] = EventBoxTracker::kTracksWithTPCInFGD1FV;
114 if (det == SubDetId::kFGD2 || det == SubDetId::kFGD){
115 IDs[ngroups++] = EventBoxTracker::kTracksWithTPCInFGD2FV;
117 if (det == SubDetId::kP0D){
118 IDs[ngroups++] = EventBoxTracker::kTracksWithTPCInP0DFV;
Int_t _index
The index of this systematic (needed by SystematicsManager);.
const AnaTrackB * GetOriginalTrack() const
Return a casted version of the original AnaParticleB associated.
Int_t GetRelevantRecObjectGroups(const SelectionBase &sel, Int_t *IDs) const
Get the TrackGroup IDs array for this systematic.
Float_t * Variations
the vector of Variations, one for each of the systematic parameters
SystBoxB * GetSystBox(const AnaEventC &event, Int_t isel=0, Int_t ibranch=0) const
Get the SystBox corresponding to a selection, branch and event.
PDFEnum _PDF
The PDF use for the systematic parameter scan.
Float_t _mean_error
the mean error of the systematic source
Float_t Momentum
The reconstructed momentum of the particle, at the start position.
virtual void Apply(const ToyExperiment &toy, AnaEventC &event)
Apply the systematic.
virtual bool UndoSystematic(AnaEventC &event)
Undo the systematic variations done by ApplyVariation. This is faster tha reseting the full Spill...
BFieldDistortionSystematics()
Representation of a global track.
Representation of a TPC segment of a global track.
ToyVariations * GetToyVariations(UInt_t index) const
returns the variations for a given systematic (index)
UInt_t GetNBranches() const
Return the number of branches.
Int_t nRelevantRecObjects
----—— Relevant rec objects and true objects for each systematic ------------—— ...
AnaParticleB * GetSegmentWithMostNodesInClosestTpc(const AnaTrackB &track)
Combined function to address NuMu selection needs as efficiently as possible - gets the TPC segment w...
SubDetId_h GetDetectorFV(Int_t ibranch=0) const
Get the detector in which the Fiducial Volume is defined.
bool GetSigmaValueForBin(Int_t index, Float_t &sigma)
Get only mean or sigma.
Float_t RefitMomentum
Reconstructed momentum with the empirical distortion corrections.