27 #include "DAQChannelMap/DAQChannelMap.h" 35 #include "TLorentzVector.h" 55 Chit(
unsigned short p,
unsigned short c, uint32_t
t, int16_t
a,
int ssid,
int tsid,
int rnsid,
int trid) :
66 trueHit(
unsigned short p,
unsigned short c,
double t,
bool f,
double e,
int _pdg) :
182 n_RNSlice = tfs->
make<TH1I>(
"n_RNSlice",
"number of remove noise slice",1000,-0.5,999.5);
183 n_SpaceSlice = tfs->
make<TH1I>(
"n_SpaceSlice",
"number of space slice",100,-0.5,99.5);
244 std::vector<Chit> chits;
245 std::vector<trueHit> thits;
283 thits.emplace_back(flshits[
h].GetPlaneID(),flshits[
h].GetCellID(),
t1_truth,
false,flshits[
h].GetTotalEnergyLoss(),
pdg);
289 if (
t0_truth > flshits[
h].GetEntryT() ) {
295 else if (
t1_truth < flshits[
h].GetExitT() ) {
315 for (
auto hit_ptr = hits.begin(); hit_ptr!=hits.end();++hit_ptr){
316 chits.emplace_back(hit_ptr->Plane().val, hit_ptr->Cell().val,
317 hit_ptr->TDC().val, hit_ptr->ADC().val,
332 for (
auto hit_ptr = hits.begin(); hit_ptr!=hits.end();++hit_ptr){
333 for (
auto chit_ptr= chits.begin(); chit_ptr!=chits.end();++chit_ptr ) {
334 if (chit_ptr->rnsliceid)
continue;
335 if (chit_ptr->plane == hit_ptr->Plane().val &&
336 chit_ptr->cell == hit_ptr->Cell().val &&
337 chit_ptr->tdc == hit_ptr->TDC().val) {
338 chit_ptr->rnsliceid =
i+1;
350 for (
unsigned i=0;
i!=hit_lists->size(); ++
i) {
352 for (
auto hit_ptr = hits.begin(); hit_ptr!=hits.end();++hit_ptr){
353 for (
auto chit_ptr= chits.begin(); chit_ptr!=chits.end();++chit_ptr ) {
354 if (chit_ptr->ssliceid > 0)
continue;
355 if (chit_ptr->plane == hit_ptr->Plane().val &&
356 chit_ptr->cell == hit_ptr->Cell().val &&
357 chit_ptr->tdc == hit_ptr->TDC().val) {
358 chit_ptr->ssliceid =
i+1;
400 for (
auto const& chit : chits) {
411 for (
auto true_hit_ptr= thits.begin(); true_hit_ptr != thits.end(); ++true_hit_ptr) {
412 if (true_hit_ptr->plane ==
Plane && true_hit_ptr->cell==
Cell) {
414 if (
std::max(
TDC,uint32_t(true_hit_ptr->texit / 15.625))
415 -
std::min(
TDC,uint32_t(true_hit_ptr->texit / 15.625)) <70 ) {
421 true_hit_ptr->found =
true;
422 if (true_hit_ptr->P_D_G == 42) {
433 for (
auto const& true_hit: thits) {
T max(const caf::Proxy< T > &a, T b)
HitList get(unsigned group) const
back track the reconstruction to the simulation
void analyze(const art::Event &evt)
std::string RNSlice_ModuleLabel
double Py(const int i=0) const
Chit(unsigned short p, unsigned short c, uint32_t t, int16_t a, int ssid, int tsid, int rnsid, int trid)
trueHit(unsigned short p, unsigned short c, double t, bool f, double e, int _pdg)
void reconfigure(fhicl::ParameterSet const &pset)
const sim::ParticleNavigator & ParticleNavigator() const
Get a reference to the ParticleNavigator.
std::string SpaceSlice_ModuleLabel
std::vector< DAQHit > HitList
std::vector< sim::FLSHit > ParticleToFLSHit(const int &trackID) const
All the FLSHits that were created by the track id trackID, sorted from most to least light...
list_type::const_iterator const_iterator
double Px(const int i=0) const
DEFINE_ART_MODULE(TestTMapFile)
std::string fFLSHitListLabel
std::string OnlineTracker_InstanceLabel
correl_yv Fill(-(dy[iP-1][iC-1]), hyv->GetBinContent(iP, iC))
T get(std::string const &key) const
std::string RNSlice_InstanceLabel
std::string TimeSlice_InstanceLabel
SuperDDTEva(fhicl::ParameterSet const &pset)
unsigned n_groups() const
EventNumber_t event() const
T * make(ARGS...args) const
bool getByLabel(std::string const &label, std::string const &productInstanceName, Handle< PROD > &result) const
double Pz(const int i=0) const
std::string SpaceSlice_InstanceLabel
T min(const caf::Proxy< T > &a, T b)
std::string OnlineTracker_ModuleLabel
std::string TimeSlice_ModuleLabel