26 #include "Utilities/AssociationUtil.h" 27 #include "Utilities/func/MathUtil.h" 77 fMUvertex ( pset.
get< double > (
"MUvertexRegionCutOff" ) ),
81 fPIvertex ( pset.
get< double > (
"PIvertexRegionCutOff" ) ),
85 fPRvertex ( pset.
get< double > (
"PRvertexRegionCutOff" ) )
124 std::unique_ptr< std::vector<rb::Energy> > trackECol_1 (
new std::vector<rb::Energy>);
126 std::unique_ptr< std::vector<rb::Energy> > trackECol_2 (
new std::vector<rb::Energy>);
132 for(
size_t islice = 0; islice < slicecol->size(); ++islice){
139 const std::vector< art::Ptr<rb::Track> > sliceTracks_1 = sliceToTracks_1.at(islice);
142 const std::vector< art::Ptr<rb::Track> > sliceTracks_2 = sliceToTracks_2.at(islice);
153 if( !(sliceTracks_1.empty()) ) {
154 for(
unsigned int itrack = 0; itrack < sliceTracks_1.size(); ++itrack) {
162 trackECol_1->push_back(trackE);
165 util::CreateAssn(*
this, evt, *(trackECol_1.get()), sliceTracks_1[itrack], *(trackAssoc_1.get()),
177 if( !(sliceTracks_2.empty()) ) {
178 for(
unsigned int itrack = 0; itrack < sliceTracks_2.size(); ++itrack) {
181 std::vector< art::Ptr< rb::FitSum > > fitsums;
182 if(fitsumFMP.isValid()) fitsums = fitsumFMP.at(itrack);
183 if(fitsums.size() == 0)
continue;
189 double mipHigh = 0.0;
193 if(fitsums[0]->PDG() == 13) {
199 else if(fitsums[0]->PDG() == 211) {
205 else if(fitsums[0]->PDG() == 2212) {
214 <<
" not currently supported!\n\n\n";
220 &mipHigh, &mipLow, &mip, &vertex)));
221 trackECol_2->push_back(trackE);
224 util::CreateAssn(*
this, evt, *(trackECol_2.get()), sliceTracks_2[itrack], *(trackAssoc_2.get()),
static bool CreateAssn(art::EDProducer const &prod, art::Event &evt, std::vector< T > &a, art::Ptr< U > b, art::Assns< T, U > &assn, size_t indx=UINT_MAX, std::string const &instance=std::string())
Create a 1 to 1 association between a new product and one already in the event.
Energy estimators for CC events.
std::string fTrackModuleLabel_1
Label for the first tracking module (and also the instance label for the energy objects) ...
double fMUmipLow
low mip value for muon tracks
double fPImipLow
low mip value for pion tracks
DEFINE_ART_MODULE(TestTMapFile)
TrackOverlapECalc(fhicl::ParameterSet const &pset)
void produce(art::Event &evt)
ProductID put(std::unique_ptr< PROD > &&product)
murem::TrackCleanUpAlg * fTrackCleanUpAlg
Track Clean Up Algorithm Object.
void beginRun(art::Run &run)
double fPRmipLow
low mip value for proton tracks
double fPImipHigh
high mip value for pion tracks
double fMUmip
mip value for muon tracks
double fMUmipHigh
high mip value for muon tracks
double fPIvertex
dE/dx cut off value for determining the vertex region for pion tracks
double fPImip
mip value for pion tracks
A container for energy information.
bool getByLabel(std::string const &label, std::string const &productInstanceName, Handle< PROD > &result) const
double fMUvertex
dE/dx cut off value for determining the vertex region for muon tracks
virtual ~TrackOverlapECalc()
double fPRmipHigh
high mip value for proton tracks
double fPRmip
mip value for proton tracks
bool IsNoise() const
Is the noise flag set?
float ExtraEOnTrackInGeV(const rb::Track &track, const rb::Cluster &slice, double *mipRangeHigh=NULL, double *mipRangeLow=NULL, double *mipValue=NULL, double *vertexRegionDeDxCutOff=NULL)
double fPRvertex
dE/dx cut off value for determining the vertex region for proton tracks
std::string fSlicerModuleLabel
Label for the slicing module.
Encapsulate the geometry of one entire detector (near, far, ndos)
std::string fTrackModuleLabel_2
Label for the second tracking module (and also the instance label for the energy objects) ...
fhicl::ParameterSet fTrackCleanUpAlgPSet
Parameter Set to configure the TrackCleanUpAlg object.