Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | List of all members
calib::StopperThreshold Class Reference
Inheritance diagram for calib::StopperThreshold:
art::EDAnalyzer art::EventObserverBase art::Consumer art::EngineCreator

Public Types

using WorkerType = WorkerT< EDAnalyzer >
 
using ModuleType = EDAnalyzer
 

Public Member Functions

 StopperThreshold (fhicl::ParameterSet const &p)
 
virtual ~StopperThreshold ()
 
virtual void analyze (art::Event const &e)
 
virtual void beginRun (art::Run const &)
 
virtual void endRun (art::Run const &)
 
virtual void reconfigure (fhicl::ParameterSet const &p)
 
std::string workerType () const
 
bool modifiesEvent () const
 
void registerProducts (MasterProductRegistry &, ProductDescriptions &, ModuleDescription const &)
 
std::string const & processName () const
 
bool wantAllEvents () const
 
bool wantEvent (Event const &e)
 
fhicl::ParameterSetID selectorConfig () const
 
art::Handle< art::TriggerResultsgetTriggerResults (Event const &e) const
 
template<typename T , BranchType = InEvent>
ProductToken< Tconsumes (InputTag const &)
 
template<typename T , art::BranchType BT>
art::ProductToken< Tconsumes (InputTag const &it)
 
template<typename T , BranchType = InEvent>
void consumesMany ()
 
template<typename Element , BranchType = InEvent>
ViewToken< Element > consumesView (InputTag const &)
 
template<typename T , art::BranchType BT>
art::ViewToken< TconsumesView (InputTag const &it)
 
template<typename T , BranchType = InEvent>
ProductToken< TmayConsume (InputTag const &)
 
template<typename T , art::BranchType BT>
art::ProductToken< TmayConsume (InputTag const &it)
 
template<typename T , BranchType = InEvent>
void mayConsumeMany ()
 
template<typename Element , BranchType = InEvent>
ViewToken< Element > mayConsumeView (InputTag const &)
 
template<typename T , art::BranchType BT>
art::ViewToken< TmayConsumeView (InputTag const &it)
 
base_engine_tcreateEngine (seed_t seed)
 
base_engine_tcreateEngine (seed_t seed, std::string const &kind_of_engine_to_make)
 
base_engine_tcreateEngine (seed_t seed, std::string const &kind_of_engine_to_make, label_t const &engine_label)
 
seed_t get_seed_value (fhicl::ParameterSet const &pset, char const key[]="seed", seed_t const implicit_seed=-1)
 

Static Public Member Functions

static cet::exempt_ptr< Consumernon_module_context ()
 

Protected Member Functions

CurrentProcessingContext const * currentContext () const
 
detail::CachedProducts & cachedProducts ()
 
void validateConsumedProduct (BranchType const bt, ProductInfo const &pi)
 
void prepareForJob (fhicl::ParameterSet const &pset)
 
void showMissingConsumes () const
 

Private Member Functions

void FindTrajectoryPoints (rb::Track const &track, std::set< TVector3, bool(*)(TVector3 const &, TVector3 const &)> &trajPoints)
 
void FillTree (rb::Track const &track, std::set< TVector3, bool(*)(TVector3 const &, TVector3 const &) > const &trajPoints)
 
void FillHist (rb::Track const &track, std::set< TVector3, bool(*)(TVector3 const &, TVector3 const &) > const &trajPoints)
 
void testPath (rb::Track const &track, std::set< TVector3, bool(*)(TVector3 const &, TVector3 const &) > const &trajPoints)
 
int CalculateWall (float x0, float z0, float dx, float dz, float xlow, float xhigh, float zlow, float zhigh)
 

Private Attributes

art::ServiceHandle< geo::GeometryfGeo
 handle to the geometry More...
 
std::string fTrackLabel
 label of module creating the tracks used More...
 
double fMinDistToEdge
 
double fMinDistFromEnd
 minimum distance from end of track to use a point More...
 
double fMaxDistFromEnd
 maximum distance from end of track to use a point More...
 
TH2F * fADCvsYTot [4]
 
TH2F * fADCratevsYTot [4]
 
TH2F * fADCratevsYlongTot [4]
 
TH2 * ftrueShadowVsYTot [4]
 
TH2F * fADCvsWTot [4]
 
TH2F * fADCratevsWTot [4]
 
TH2F * fADCratevsWlongTot [4]
 
TH2F * fLvsWTot [4]
 
TH2 * fLvsWnothreshTot [4]
 
TH2 * ftrueThredVsWTot [4]
 
TH2 * flambdaVsWTot [4]
 
TH2 * fPEVslambdaTot [4]
 
TH2 * fADCratevsLTot [4]
 
TH2 * fPEvsLTot [4]
 
TH2 * fPECorrvsLTot [4]
 
TH1 * fADCrateideal [4]
 
TH1 * hrecopath [4]
 
TH1 * hrecopathTest [4]
 
TH1 * htruepath [4]
 
TH1 * htruepathTest [4]
 
TH1 * hrecow [4]
 
TH1 * htruew [4]
 
TH1 * hrecodx [4]
 
TH1 * hrecody [4]
 
TH1 * hrecodz [4]
 
TH2F * fLvsdxTot [4]
 
TH2F * fLvsdyTot [4]
 
TH2F * fLvsdzTot [4]
 
TH2F * fLvswallsTot [4]
 
TH1F * fpathtest [4]
 
TTree * tInfoTree
 
int tView
 
int tCell
 
int tPlane
 
float tADC
 
float tPE
 
float tPECorr
 
float tW
 
float tTruePath
 
float tPath
 
float tRecodx
 
float tRecody
 
float tRecodz
 
float tWall
 
float tYTot
 
float tPoissonLambda
 
float tTrueMeV
 
float tTrueW
 
int tIsTruePath
 
int tAngleRestr
 
int tLongSample
 
int tLongNear
 
int tIsStopper
 
art::ServiceHandle< geo::LiveGeometryfLivegeo
 
art::ServiceHandle< cheat::BackTrackerfBT
 
bool isstopper
 

Detailed Description

Definition at line 58 of file StopperThreshold_module.cc.

Member Typedef Documentation

Definition at line 39 of file EDAnalyzer.h.

Definition at line 38 of file EDAnalyzer.h.

Constructor & Destructor Documentation

calib::StopperThreshold::StopperThreshold ( fhicl::ParameterSet const &  p)
explicit

Definition at line 170 of file StopperThreshold_module.cc.

References reconfigure().

171  : EDAnalyzer(p)
172 {
173  this->reconfigure(p);
174 }
const char * p
Definition: xmltok.h:285
EDAnalyzer(Table< Config > const &config)
Definition: EDAnalyzer.h:100
virtual void reconfigure(fhicl::ParameterSet const &p)
calib::StopperThreshold::~StopperThreshold ( )
virtual

Definition at line 177 of file StopperThreshold_module.cc.

178 {
179 }

Member Function Documentation

void calib::StopperThreshold::analyze ( art::Event const &  e)
virtual

Implements art::EDAnalyzer.

Definition at line 356 of file StopperThreshold_module.cc.

References FillHist(), FillTree(), FindTrajectoryPoints(), fTrackLabel, art::DataViewImpl::getByLabel(), rb::Prong::Is3D(), ltTVec(), confusionMatrixTree::t, and testPath().

357 {
358 
360  e.getByLabel(fTrackLabel, th);
361 
362  for(size_t t = 0; t < th->size(); ++t){
363  rb::Track const& track = th->at(t);
364  if(!track.Is3D()) continue;
365  std::set<TVector3, bool(*)(TVector3 const&, TVector3 const&)> trajPoints(ltTVec);
366  this->FindTrajectoryPoints(track, trajPoints);
367  if(trajPoints.size() == 0) continue;
368  // look at only stopping muon
369  //if(trajPoints.size() == 0 || !isstopper) continue;
370 
371  this->FillTree(track, trajPoints);
372  this->testPath(track, trajPoints);
373  this->FillHist(track, trajPoints);
374  }
375 
376  return;
377 }
void FillTree(rb::Track const &track, std::set< TVector3, bool(*)(TVector3 const &, TVector3 const &) > const &trajPoints)
void FillHist(rb::Track const &track, std::set< TVector3, bool(*)(TVector3 const &, TVector3 const &) > const &trajPoints)
std::string fTrackLabel
label of module creating the tracks used
void testPath(rb::Track const &track, std::set< TVector3, bool(*)(TVector3 const &, TVector3 const &) > const &trajPoints)
Definition: event.h:19
A rb::Prong with full reconstructed trajectory.
Definition: Track.h:20
void FindTrajectoryPoints(rb::Track const &track, std::set< TVector3, bool(*)(TVector3 const &, TVector3 const &)> &trajPoints)
bool ltTVec(TVector3 const &a, TVector3 const &b)
Float_t e
Definition: plot.C:35
virtual bool Is3D() const
Definition: Prong.h:71
void calib::StopperThreshold::beginRun ( art::Run const &  )
virtual

Reimplemented from art::EDAnalyzer.

Definition at line 182 of file StopperThreshold_module.cc.

References geo::GeometryBase::DetHalfHeight(), geo::GeometryBase::DetHalfWidth(), fADCrateideal, fADCratevsLTot, fADCratevsWlongTot, fADCratevsWTot, fADCratevsYlongTot, fADCratevsYTot, fADCvsWTot, fADCvsYTot, fGeo, flambdaVsWTot, fLvsdxTot, fLvsdyTot, fLvsdzTot, fLvswallsTot, fLvsWnothreshTot, fLvsWTot, fpathtest, fPECorrvsLTot, fPEVslambdaTot, fPEvsLTot, ftrueShadowVsYTot, ftrueThredVsWTot, hrecodx, hrecody, hrecodz, hrecopath, hrecopathTest, hrecow, htruepath, htruepathTest, htruew, MECModelEnuComparisons::i, art::TFileDirectory::make(), std::max(), tADC, tAngleRestr, tCell, tInfoTree, tIsStopper, tIsTruePath, tLongNear, tLongSample, tPath, tPE, tPECorr, tPlane, tPoissonLambda, tRecodx, tRecody, tRecodz, tTrueMeV, tTruePath, tTrueW, tView, tW, tWall, and tYTot.

183 {
185 
186  // Info Tree
187  tInfoTree = tfs->make<TTree>("InfoTree","Shadow and Threshold variables");
188  tInfoTree->Branch("tView",&tView,"tView/I");
189  tInfoTree->Branch("tCell",&tCell,"tCell/I");
190  tInfoTree->Branch("tPlane",&tPlane,"tPlane/I");
191  tInfoTree->Branch("tADC",&tADC,"tADC/F");
192  tInfoTree->Branch("tPE",&tPE,"tPE/F");
193  tInfoTree->Branch("tPECorr",&tPECorr,"tPECorr/F");
194  tInfoTree->Branch("tW",&tW,"tW/F");
195  tInfoTree->Branch("tTruePath",&tTruePath,"tTruePath/F");
196  tInfoTree->Branch("tPath",&tPath,"tPath/F");
197  tInfoTree->Branch("tRecodx",&tRecodx,"tRecodx/F");
198  tInfoTree->Branch("tRecody",&tRecody,"tRecody/F");
199  tInfoTree->Branch("tRecodz",&tRecodz,"tRecodz/F");
200  tInfoTree->Branch("tWall",&tWall,"tWall/F");
201  tInfoTree->Branch("tYTot",&tYTot,"tYTot/F");
202  tInfoTree->Branch("tPoissonLambda",&tPoissonLambda,"tPoissonLambda/F");
203  tInfoTree->Branch("tTrueMeV",&tTrueMeV,"tTrueMeV/F");
204  tInfoTree->Branch("tTrueW",&tTrueW,"tTrueW/F");
205  tInfoTree->Branch("tIsTruePath",&tIsTruePath,"tIsTruePath/I");
206  tInfoTree->Branch("tAngleRestr",&tAngleRestr,"tAngleRestr/I");
207  tInfoTree->Branch("tLongSample",&tLongSample,"tLongSample/I");
208  tInfoTree->Branch("tLongNear",&tLongNear,"tLongNear/I");
209  tInfoTree->Branch("tIsStopper",&tIsStopper,"tIsStopper/I");
210 
211  //unsigned int planeInView = *(fGeo->GetPlanesByView(geo::kX).begin());
212  //double xCells = fGeo->Plane(planeInView)->Ncells();
213  //planeInView = *(fGeo->GetPlanesByView(geo::kY).begin());
214  //double yCells = fGeo->Plane(planeInView)->Ncells();
215  //double maxCells = std::max(yCells, xCells);
216  //int modules = maxCells/32.;
217  int nADCbin = 1000;
218  int maxADC = 1000;
219  float maxADCrate = 200.0;
220 
221  double detHalfWidth = std::max(fGeo->DetHalfWidth(), fGeo->DetHalfHeight());
222  int wBins = detHalfWidth/5; // 10 cm/bin
223 
224  TString sview[4] = {"Xall","Yall","Xmip","Ymip"};
225  TString name = "";
226  for(int i = 0; i < 4; ++i){
227 
228  fADCvsYTot[i] = tfs->make<TH2F>(sview[i]+"ADCvsYTot",";Y ;ADC",
229  wBins,-detHalfWidth,detHalfWidth,nADCbin,0,maxADC);
230 
231  fADCratevsYTot[i] = tfs->make<TH2F>(sview[i]+"ADCratevsYTot",";Y ;ADC/Path",
232  wBins,-detHalfWidth,detHalfWidth,nADCbin,0,maxADCrate);
233 
234  fADCratevsYlongTot[i] = tfs->make<TH2F>(sview[i]+"ADCratevsYlongTot",";Y ;ADC/Path",
235  wBins,-detHalfWidth,detHalfWidth,nADCbin,0,maxADCrate);
236 
237  fADCvsWTot[i] = tfs->make<TH2F>(sview[i]+"ADCvsWTot",";W ;ADC",
238  wBins,-detHalfWidth,detHalfWidth,nADCbin,0,maxADC);
239 
240  fADCratevsWTot[i] = tfs->make<TH2F>(sview[i]+"ADCratevsWTot",";W ;ADC/Path",
241  wBins,-detHalfWidth,detHalfWidth,nADCbin,0,maxADCrate);
242 
243  fADCratevsWlongTot[i] = tfs->make<TH2F>(sview[i]+"ADCratevsWlongTot",";W ;ADC/Path",
244  wBins,-detHalfWidth,detHalfWidth,nADCbin,0,maxADCrate);
245 
246  fLvsWTot[i] = tfs->make<TH2F>(sview[i]+"LvsWTot",";W ;Path",
247  wBins,-detHalfWidth,detHalfWidth,nADCbin,0,20);
248 
249  fLvsdxTot[i] = tfs->make<TH2F>(sview[i]+"LvsdxTot",";DirX ;Path",
250  wBins,-1,1,nADCbin,0,20);
251 
252  fLvsdyTot[i] = tfs->make<TH2F>(sview[i]+"LvsdyTot",";DirY ;Path",
253  wBins,-1,1,nADCbin,0,20);
254 
255  fLvsdzTot[i] = tfs->make<TH2F>(sview[i]+"LvsdzTot",";DirZ ;Path",
256  wBins,-1,1,nADCbin,0,20);
257 
258  fLvswallsTot[i] = tfs->make<TH2F>(sview[i]+"LvswallsTot",";walls ;Path",
259  5,-0.5,4.5,nADCbin,0,20);
260 
261  fLvsWnothreshTot[i] = tfs->make<TH2F>(sview[i]+"LvsWnothreshTot",";W ;Path",
262  wBins,-detHalfWidth,detHalfWidth,nADCbin,0,20);
263 
264  ftrueThredVsWTot[i] = tfs->make<TH2F>(sview[i]+"trueThredVsWTot", ";W ;Threshold Correction",
265  wBins, -detHalfWidth, detHalfWidth, nADCbin, 0, 5);
266 
267  ftrueShadowVsYTot[i] = tfs->make<TH2F>(sview[i]+"trueShadowVsYTot", ";Y ;Shadow Correction",
268  wBins, -detHalfWidth, detHalfWidth, nADCbin, 0, 5);
269 
270  flambdaVsWTot[i] = tfs->make<TH2F>(sview[i]+"lambdavsWTot",";W;lambda",
271  wBins,-detHalfWidth,detHalfWidth,nADCbin,0,maxADC);
272 
273  fPEVslambdaTot[i] = tfs->make<TH2F>(sview[i]+"PEvslambdaTot",";Lambda;ADC",
274  nADCbin,0,maxADC,nADCbin,0,maxADC);
275 
276  fADCratevsLTot[i] = tfs->make<TH2F>(sview[i]+"ADCratevsLTot",";Path ;ADC/Path",
277  wBins,0,20.0,nADCbin,0,maxADCrate);
278  //new
279  fPEvsLTot[i] = tfs->make<TH2F>(sview[i]+"PEvsLTot",";Path ;PE/Path",
280  wBins,0,20.0,nADCbin,0,maxADC);
281  //new
282  fPECorrvsLTot[i] = tfs->make<TH2F>(sview[i]+"PECorrvsLTot",";Path ;PECorr/Path",
283  wBins,0,20.0,nADCbin,0,maxADC);
284 
285  fADCrateideal[i] = tfs->make<TH1F>(sview[i]+"ADCrateideal",";ADC/Path",
286  nADCbin,0,maxADCrate);
287 
288  htruepath[i] = tfs->make<TH1F>(sview[i]+"truepath",";Path",
289  nADCbin,0,20);
290  //tmp
291  htruepathTest[i] = tfs->make<TH1F>(sview[i]+"truepathTest",";Path",
292  nADCbin,0,20);
293 
294  hrecopath[i] = tfs->make<TH1F>(sview[i]+"recopath",";Path",
295  nADCbin,0,20);
296  //tmp
297  hrecopathTest[i] = tfs->make<TH1F>(sview[i]+"recopathTest",";Path",
298  nADCbin,0,20);
299 
300  fpathtest[i] = tfs->make<TH1F>(sview[i]+"testpath",";Path",
301  nADCbin,0,20);
302 
303  htruew[i] = tfs->make<TH1F>(sview[i]+"truew",";W",
304  wBins,-detHalfWidth,detHalfWidth);
305 
306  hrecow[i] = tfs->make<TH1F>(sview[i]+"recow",";W",
307  wBins,-detHalfWidth,detHalfWidth);
308 
309  hrecodx[i] = tfs->make<TH1F>(sview[i]+"recodx",";DirX",
310  210,-1.05,1.05);
311 
312  hrecody[i] = tfs->make<TH1F>(sview[i]+"recody",";DirY",
313  210,-1.05,1.05);
314  hrecodz[i] = tfs->make<TH1F>(sview[i]+"recodz",";DirZ",
315  210,-1.05,1.05);
316  /*
317  for(int ii = 0; ii<modules;ii++){
318  name = std::to_string(ii);
319 
320  fADCvsYmod[i][ii] = tfs->make<TH2F>(sview[i]+"ADCvsYmod"+name,";Y;ADC",
321  wBins,-detHalfWidth,detHalfWidth,nADCbin,0,maxADC);
322 
323  fADCratevsYmod[i][ii] = tfs->make<TH2F>(sview[i]+"ADCratevsYmod"+name,";Y;ADC/Path",
324  wBins,-detHalfWidth,detHalfWidth,nADCbin,0,maxADCrate);
325 
326  fADCvsWmod[i][ii] = tfs->make<TH2F>(sview[i]+"ADCvsWmod"+name,";W;ADC",
327  wBins,-detHalfWidth,detHalfWidth,nADCbin,0,maxADC);
328 
329  fADCratevsWmod[i][ii] = tfs->make<TH2F>(sview[i]+"ADCratevsWmod"+name,";W;ADC/Path",
330  wBins,-detHalfWidth,detHalfWidth,nADCbin,0,maxADCrate);
331 
332  fLvsWmod[i][ii] = tfs->make<TH2F>(sview[i]+"LvsWmod"+name,";W;Path",
333  wBins,-detHalfWidth,detHalfWidth,nADCbin,0,20);
334  }
335  */
336  }// end loop to make histograms
337 
338  return;
339 }
T max(const caf::Proxy< T > &a, T b)
const XML_Char * name
Definition: expat.h:151
double DetHalfHeight() const
T * make(ARGS...args) const
double DetHalfWidth() const
art::ServiceHandle< geo::Geometry > fGeo
handle to the geometry
detail::CachedProducts& art::EventObserverBase::cachedProducts ( )
inlineprotectedinherited

Definition at line 79 of file EventObserverBase.h.

References art::EventObserverBase::selectors_.

80  {
81  return selectors_;
82  }
detail::CachedProducts selectors_
int calib::StopperThreshold::CalculateWall ( float  x0,
float  z0,
float  dx,
float  dz,
float  xlow,
float  xhigh,
float  zlow,
float  zhigh 
)
private

Definition at line 1018 of file StopperThreshold_module.cc.

References DEFINE_ART_MODULE(), and canMan::sign().

Referenced by FillHist(), and FillTree().

1020 {
1021  int fwalls = -5;
1022  float lambda[4] = {0.0};
1023  float otherview[4] = {0.0};
1024  float sign[4] = {0.0};
1025  if(dx == 0){
1026  if((x0 - xlow)*(x0 - xhigh) < 0){
1027  fwalls = 1;
1028  }
1029  else if((x0 - xlow)*(x0 - xhigh) == 0){
1030  fwalls = 4;
1031  }
1032  else{
1033  fwalls = 0;
1034  }
1035  }//end if dx==0
1036  else if(dz == 0){
1037  if((z0 - zlow)*(z0 - zhigh) < 0){
1038  fwalls = 2;
1039  }
1040  else if((z0 - zlow)*(z0 - zhigh) == 0){
1041  fwalls = 4;
1042  }
1043  else {
1044  fwalls = 0;
1045  }
1046 
1047  }//end else if
1048  else{
1049  lambda[0] = (xlow - x0)/dx;
1050  lambda[1] = (xhigh - x0)/dx;
1051  lambda[2] = (zlow - z0)/dz;
1052  lambda[3] = (zhigh - z0)/dz;
1053  otherview[0] = lambda[0]*dz + z0;
1054  otherview[1] = lambda[1]*dz + z0;
1055  otherview[2] = lambda[2]*dx + x0;
1056  otherview[3] = lambda[3]*dx + x0;
1057  sign[0] = (otherview[0] - zlow)*(otherview[0] - zhigh);
1058  sign[1] = (otherview[1] - zlow)*(otherview[1] - zhigh);
1059  sign[2] = (otherview[2] - xlow)*(otherview[2] - xhigh);
1060  sign[3] = (otherview[3] - xlow)*(otherview[3] - xhigh);
1061 
1062  if((sign[0] > 0) && (sign[1] > 0) &&
1063  (sign[2] > 0) && (sign[3] > 0)){
1064  fwalls = 0;
1065  }
1066  else if((sign[0] == 0) || (sign[1] == 0) || (sign[2] == 0) || (sign[3] == 0)){
1067  fwalls = 4;
1068  }
1069  else if((sign[0] < 0) && (sign[1] < 0)){
1070  fwalls = 1;
1071  }
1072  else if((sign[2] < 0) && (sign[3] < 0)){
1073  fwalls = 2;
1074  }
1075  else {
1076  fwalls = 3;
1077  }
1078 
1079  }//end else
1080 
1081  return fwalls;
1082 }
double dx[NP][NC]
double dz[NP][NC]
def sign(x)
Definition: canMan.py:197
template<typename T , BranchType = InEvent>
ProductToken<T> art::Consumer::consumes ( InputTag const &  )
inherited
template<typename T , art::BranchType BT>
art::ProductToken<T> art::Consumer::consumes ( InputTag const &  it)
inherited

Definition at line 146 of file Consumer.h.

References art::InputTag::instance(), PandAna.reco_validation.prod5_pid_validation::invalid, art::InputTag::label(), art::InputTag::process(), and T.

147 {
148  if (!moduleContext_)
149  return ProductToken<T>::invalid();
150 
151  consumables_[BT].emplace_back(ConsumableType::Product,
152  TypeID{typeid(T)},
153  it.label(),
154  it.instance(),
155  it.process());
156  return ProductToken<T>{it};
157 }
set< int >::iterator it
static ProductToken< T > invalid()
Definition: ProductToken.h:47
ConsumableProducts consumables_
Definition: Consumer.h:137
double T
Definition: Xdiff_gwt.C:5
bool moduleContext_
Definition: Consumer.h:135
template<typename T , art::BranchType BT>
void art::Consumer::consumesMany ( )
inherited

Definition at line 161 of file Consumer.h.

References T.

162 {
163  if (!moduleContext_)
164  return;
165 
166  consumables_[BT].emplace_back(ConsumableType::Many, TypeID{typeid(T)});
167 }
ConsumableProducts consumables_
Definition: Consumer.h:137
double T
Definition: Xdiff_gwt.C:5
bool moduleContext_
Definition: Consumer.h:135
template<typename Element , BranchType = InEvent>
ViewToken<Element> art::Consumer::consumesView ( InputTag const &  )
inherited
template<typename T , art::BranchType BT>
art::ViewToken<T> art::Consumer::consumesView ( InputTag const &  it)
inherited

Definition at line 171 of file Consumer.h.

References art::InputTag::instance(), PandAna.reco_validation.prod5_pid_validation::invalid, art::InputTag::label(), art::InputTag::process(), and T.

172 {
173  if (!moduleContext_)
174  return ViewToken<T>::invalid();
175 
176  consumables_[BT].emplace_back(ConsumableType::ViewElement,
177  TypeID{typeid(T)},
178  it.label(),
179  it.instance(),
180  it.process());
181  return ViewToken<T>{it};
182 }
set< int >::iterator it
static ViewToken< Element > invalid()
Definition: ProductToken.h:75
ConsumableProducts consumables_
Definition: Consumer.h:137
double T
Definition: Xdiff_gwt.C:5
bool moduleContext_
Definition: Consumer.h:135
base_engine_t& art::EngineCreator::createEngine ( seed_t  seed)
inherited
base_engine_t& art::EngineCreator::createEngine ( seed_t  seed,
std::string const &  kind_of_engine_to_make 
)
inherited
base_engine_t& art::EngineCreator::createEngine ( seed_t  seed,
std::string const &  kind_of_engine_to_make,
label_t const &  engine_label 
)
inherited
CurrentProcessingContext const* art::EDAnalyzer::currentContext ( ) const
protectedinherited
void calib::StopperThreshold::endRun ( art::Run const &  )
virtual

Reimplemented from art::EDAnalyzer.

Definition at line 341 of file StopperThreshold_module.cc.

342 {
343 }
void calib::StopperThreshold::FillHist ( rb::Track const &  track,
std::set< TVector3, bool(*)(TVector3 const &, TVector3 const &) > const &  trajPoints 
)
private

Definition at line 406 of file StopperThreshold_module.cc.

References abs(), rawdata::RawDigit::ADC(), rb::Cluster::AllCells(), plot_validation_datamc::c, CalculateWall(), rb::CellHit::Cell(), geo::PlaneGeo::Cell(), rb::Cluster::Cell(), geo::GeometryBase::DetHalfHeight(), geo::GeometryBase::DetHalfWidth(), dx, dy, dz, energy, fADCrateideal, fADCratevsLTot, fADCratevsWlongTot, fADCratevsWTot, fADCratevsYlongTot, fADCratevsYTot, fADCvsWTot, fADCvsYTot, fBT, fGeo, Fill(), calib::FindZBoundaries(), flambdaVsWTot, fLvsdxTot, fLvsdyTot, fLvsdzTot, fLvswallsTot, fLvsWTot, fPECorrvsLTot, fPEVslambdaTot, fPEvsLTot, ftrueShadowVsYTot, ftrueThredVsWTot, geo::CellGeo::HalfD(), cheat::BackTracker::HaveTruthInfo(), cheat::BackTracker::HitsToParticle(), cheat::BackTracker::HitToPhotonSignal(), cheat::BackTracker::HitToTrackIDE(), hrecodx, hrecody, hrecodz, hrecopath, hrecopathTest, hrecow, htruepath, htruepathTest, htruew, makeTrainCVSamples::int, rb::RecoHit::IsCalibrated(), isstopper, geo::kX, geo::kY, calib::MakeZBoundaryMap(), std::max(), getGoodRuns4SAM::n, rb::Cluster::NCell(), rb::Track::NTrajectoryPoints(), cheat::BackTracker::ParticleToFLSHit(), submit_concat_project::parts, calib::PathLengthInCell(), python.hepunit::pc, rb::CellHit::PE(), rb::RecoHit::PECorr(), rb::CellHit::Plane(), geo::GeometryBase::Plane(), rb::Cluster::RecoHit(), rh, std::sqrt(), std::swap(), rb::Track::Trajectory(), rb::Track::TrajectoryPoint(), Unit(), rb::CellHit::View(), rb::RecoHit::X(), rb::RecoHit::Y(), and rb::RecoHit::Z().

Referenced by analyze().

408 {
409  float minZ = trajPoints.begin()->Z();
410  float maxZ = trajPoints.rbegin()->Z();
411  float cellHalfDepth = fGeo->Plane(0)->Cell(0)->HalfD();
412  if(maxZ < minZ) std::swap(minZ, maxZ);
413 
414  //std::vector<EPathQuality> quals;
415  //const std::vector<double> paths = BestPathEstimates(track.OfflineChans(),track.PlaneDirMap(), quals);
416  //if(track.NCell() != paths.size() || track.NCell() != quals.size()) return;
417  //if(track.NCell() != paths.size()) continue;
418 
419  minZ -= cellHalfDepth;
420  maxZ += cellHalfDepth;
421  float xi = trajPoints.begin()->X();
422  float yi = trajPoints.begin()->Y();
423  float zi = trajPoints.begin()->Z();
424  float xf = trajPoints.rbegin()->X();
425  float yf = trajPoints.rbegin()->Y();
426  float zf = trajPoints.rbegin()->Z();
427  float dr = sqrt((xi-xf)*(xi-xf)+(yi-yf)*(yi-yf)+(zi-zf)*(zi-zf));
428  if(dr == 0) return;
429  float dx = (xf-xi)/dr;
430  float dy = (yf-yi)/dr;
431  float dz = (zf-zi)/dr;
432  double xyz[3]= {0.};
433  unsigned int ntp = track.NTrajectoryPoints();
434  std::pair<uint32_t, uint32_t> pc;
435  TVector3 point;
436  std::set<double> planeZBounds;
437  calib::FindZBoundaries(planeZBounds);
438  auto boundaryMap = calib::MakeZBoundaryMap(planeZBounds, track.Trajectory());
439  if(boundaryMap.size() < 1) return;
440  for(size_t c = 0; c < track.NCell(); ++c){
441  const art::Ptr<rb::CellHit> ch = track.Cell(c);
442 
443  float fpoissonlambda = 0.0;
444  float ftruemev = 0.0;
445  float ftruepath = -10.0;
446  float ftruew = -9999.0;
447  // Check PCHit code later (needs update)
448  if (fBT->HaveTruthInfo()){
449  // count poissonlambda using photonsignal
450  const std::vector<sim::PhotonSignal> pes = fBT->HitToPhotonSignal(track.Cell(c));
451  for(sim::PhotonSignal pe: pes){
452  fpoissonlambda += pe.PoissonLambda();
453  }
454 
455  // count truemev using fls??
456  const std::vector<cheat::TrackIDE> ides = fBT->HitToTrackIDE(track.Cell(c));
457  for(size_t n = 0; n < ides.size(); ++n)
458  ftruemev += ides[n].energy*1000;
459 
460  // calculate true path length and W using fls
461  const std::vector<const sim::Particle*> parts = fBT->HitsToParticle(track.AllCells());
462  if(!parts.empty()){
463  // front() is to select the particle which contributes the most to the reco track.
464  auto particle = parts.front();
465  std::vector<sim::FLSHit> flsHits = fBT->ParticleToFLSHit(particle->TrackId(), particle->PdgCode());
466  for(auto fls : flsHits){
467  if(fls.GetPlaneID() == track.Cell(c)->Plane() &&
468  fls.GetCellID() == track.Cell(c)->Cell() ){
469  ftruepath = fls.GetTotalPathLength();
470  ftruew = fls.GetZAverage();
471  break;
472  }
473  }
474  }
475  } //end HaveTruthInfo
476  if((ftruemev == 0.0) || (fpoissonlambda == 0.0)) continue;
477  //if(ftruepath == 0 || ftruew == 0 || ftruemev == 0.0 || fpoissonlambda == 0.0) continue;
478 
479  // tricell condition
480  /*
481  if(c == 0 || c == track.NCell()-1) continue;
482  const art::Ptr<rb::CellHit> chm1 = track.Cell(c-1);
483  const art::Ptr<rb::CellHit> chp1 = track.Cell(c+1);
484  if(chm1->Plane() != ch->Plane() ||
485  chp1->Plane() != ch->Plane() ||
486  chm1->Cell() != ch->Cell()-1 ||
487  chp1->Cell() != ch->Cell()+1) continue;
488  */
489  fGeo->Plane(ch->Plane())->Cell(ch->Cell())->GetCenter(xyz);
490  double detHalfWidth = std::max(fGeo->DetHalfWidth(), fGeo->DetHalfHeight());
491  // to find the direction of segment_i
492  TVector3 vtp0;
493  TVector3 vtp1;
494  // if cell is near the edge of a traj point
495  if(track.TrajectoryPoint(0).Z() < track.TrajectoryPoint(ntp-1).Z()){
496  if(track.TrajectoryPoint(0).Z() >= xyz[2]){
497  vtp0 = track.TrajectoryPoint(0);
498  vtp1 = track.TrajectoryPoint(1);
499  }
500  else if(track.TrajectoryPoint(ntp-1).Z() <= xyz[2]){
501  vtp0 = track.TrajectoryPoint(ntp-2);
502  vtp1 = track.TrajectoryPoint(ntp-1);
503  }
504  else{
505  for(unsigned int tp=0;tp<ntp;tp++){
506  if(track.TrajectoryPoint(tp).Z() > xyz[2]){
507  vtp0 = track.TrajectoryPoint(tp-1);
508  vtp1 = track.TrajectoryPoint(tp);
509  break;
510  }
511  }
512  }
513  }
514  else{// inverse of the previous case
515  if(track.TrajectoryPoint(0).Z() <= xyz[2]){
516  vtp0 = track.TrajectoryPoint(0);
517  vtp1 = track.TrajectoryPoint(1);
518  }
519  else if(track.TrajectoryPoint(ntp-1).Z() >= xyz[2]){
520  vtp0 = track.TrajectoryPoint(ntp-2);
521  vtp1 = track.TrajectoryPoint(ntp-1);
522  }
523  else{
524  for(unsigned int tp=0;tp<ntp;tp++){
525  if(track.TrajectoryPoint(tp).Z() < xyz[2]){
526  vtp0 = track.TrajectoryPoint(tp-1);
527  vtp1 = track.TrajectoryPoint(tp);
528  break;
529  }
530  }
531  }
532  }
533  TVector3 vdir;
534  vdir = (vtp1 - vtp0).Unit();
535  //auto const vdir = DirectionAtPlane(track.PlaneDirMap(),ch->Plane());
536  float cellwidth = fGeo->Plane(ch->Plane())->Cell(ch->Cell())->HalfW();
537  pc.first = ch->Plane();
538  pc.second = ch->Cell();
539  const rb::RecoHit rh = track.RecoHit(track.Cell(c));
540  point = TVector3(rh.X(), rh.Y(), rh.Z());
541 
542  // whether the track pass tricells.
543  /*
544  if(ch->View() == geo::kX && vdir.Z() != 0.0){
545  double xlow = xyz[0] - cellwidth - vtp0.X();
546  double xhigh = xyz[0] + cellwidth - vtp0.X();
547  double zlow = (xyz[2] - cellHalfDepth - vtp0.Z())*vdir.X()/vdir.Z();
548  double zhigh = (xyz[2] + cellHalfDepth - vtp0.Z())*vdir.X()/vdir.Z();
549  if(zlow > xlow || zlow > xhigh || zhigh < xlow || zhigh < xhigh) continue;
550  }
551  else if(ch->View() == geo::kY && vdir.Z() != 0.0){
552  double ylow = xyz[1] - cellwidth - vtp0.Y();
553  double yhigh = xyz[1] + cellwidth - vtp0.Y();
554  double zlow = (xyz[2] - cellHalfDepth - vtp0.Z())*vdir.Y()/vdir.Z();
555  double zhigh = (xyz[2] + cellHalfDepth - vtp0.Z())*vdir.Y()/vdir.Z();
556  if(zlow > ylow || zlow > yhigh || zhigh < ylow || zhigh < yhigh) continue;
557  }
558  */
559  double fadc = ch->ADC();
560  double fpe = ch->PE();
561 
562  double fpecorr = -5.0;
563  if(rh.IsCalibrated()){
564  fpecorr = rh.PECorr();
565  }
566 
567  double fw = 0.0;
568  int fwall = 0;
569  double fpath = calib::PathLengthInCell(boundaryMap,point,pc);
570  if((ch->View() == geo::kX) && (vdir.X() != 0 || vdir.Z() != 0)){
571 
572  fwall = (int)CalculateWall(rh.X(), rh.Z(), vdir.X(), vdir.Z(),
573  (xyz[0]-cellwidth), (xyz[0]+cellwidth), (xyz[2]-cellHalfDepth), (xyz[2]+cellHalfDepth));
574 
575  if(vdir.Z() != 0.0){
576  fw = (xyz[2]-vtp0.Z())*vdir.Y()/vdir.Z() + vtp0.Y();
577  }
578  else{
579  fw = (xyz[2]-zi)*dy/dz + yi;
580  }
581  }//end if ch->View
582 
583  if((ch->View() == geo::kY) && (vdir.Y() != 0 || vdir.Z() != 0)){
584 
585  fwall = (int)CalculateWall(rh.Y(), rh.Z(), vdir.Y(), vdir.Z(),
586  (xyz[1]-cellwidth), (xyz[1]+cellwidth), (xyz[2]-cellHalfDepth), (xyz[2]+cellHalfDepth));
587 
588  if(vdir.Z() != 0.0){
589  fw = (xyz[2]-vtp0.Z())*vdir.X()/vdir.Z() + vtp0.X();
590  }
591  else{
592  fw = (xyz[2]-zi)*dx/dz + xi;
593  }
594  }//end if ch->View
595 
596  if((fpath < 1.0) || (fpath > 25.0) || (abs(fw) > detHalfWidth) ) continue;
597 
598  double ftempy = 0.0;
599  //int imodulew = 99;
600  //int imoduley = 99;
601  if(ch->View() == geo::kX){
602  ftempy = fw;
603  //imodulew = (int)ch->Cell()/32.0;
604  //imoduley = imodulew;
605  //imoduley = (int)(fw + detHalfWidth)*(fXADC_W.size())/(2.0*detHalfWidth);
606  }
607  else if(ch->View() == geo::kY){
608  ftempy = xyz[1];
609  //imodulew = (int)ch->Cell()/32.0;
610  //imoduley = (int)(fw + detHalfWidth)*12/(2.0*detHalfWidth);
611  }
612 
613  //if(imodulew > 11 || imoduley > 11) continue;
614 
615  float fpathverylong[2] = {6.0,4.5};
616  float fpathlong[2] = {6.0,4.5};
617  int iview = (int)ch->View();
618  fADCvsWTot[iview]->Fill(fw,fadc);
619  fADCratevsWTot[iview]->Fill(fw,fadc/fpath);
620  fADCratevsLTot[iview]->Fill(fpath,fadc/fpath);
621  fPEvsLTot[iview]->Fill(fpath,fpe/fpath);
622  fPECorrvsLTot[iview]->Fill(fpath,fpecorr/fpath);
623  fLvsWTot[iview]->Fill(fw,fpath);
624  fLvsdxTot[iview]->Fill(vdir.X(),fpath);
625  fLvsdyTot[iview]->Fill(vdir.Y(),fpath);
626  fLvsdzTot[iview]->Fill(vdir.Z(),fpath);
627  fLvswallsTot[iview]->Fill(fwall,fpath);
628  hrecodx[iview]->Fill(vdir.X());
629  hrecody[iview]->Fill(vdir.Y());
630  hrecodz[iview]->Fill(vdir.Z());
631  fADCvsYTot[iview]->Fill(ftempy,fadc);
632  fADCratevsYTot[iview]->Fill(ftempy,fadc/fpath);
633  ftrueThredVsWTot[iview]->Fill(fw,fadc/fpoissonlambda);
634  ftrueShadowVsYTot[iview]->Fill(ftempy,ftruemev/(1.78*fpath));
635  fPEVslambdaTot[iview]-> Fill(fpoissonlambda,fadc);
636  flambdaVsWTot[iview]-> Fill(fw,fpoissonlambda);
637 
638  if(ftruepath > 0){
639  htruepath[iview]->Fill(ftruepath);
640  hrecopath[iview]->Fill(fpath);
641  //std::cout<<"ftruepath: "<<ftruepath<<", fpath: "<<fpath<<std::endl;
642 
643  if(((ftruepath > 3.7) && (ftruepath <= 3.9)) //||
644  //((fpath > 3.7) && (fpath <= 3.9))
645  ){
646  htruepathTest[iview]->Fill(ftruepath);
647  hrecopathTest[iview]->Fill(fpath);
648  //std::cout<<"FILLED !!"<<std::endl;
649  //std::cout<<"xi,yi,zi: "<<xi<<", "<<yi<<", "<<zi<<" xf,yf,zf: "<<xf<<", "<<yf<<", "<<zf<<std::endl;
650  }
651 
652  }
653 
654  //angle restricted sample
655  if( (abs(vdir.Y()) < 0.5) && (ftruew > -1000)){
656  htruew[iview]->Fill(ftruew);
657  hrecow[iview]->Fill(fw);
658  }
659 
660  // long sample
661  if( fpath > fpathverylong[iview]){
662  fADCratevsYlongTot[iview]->Fill(ftempy,fadc/fpath); //THIS is used for shadow corr
663  fADCratevsWlongTot[iview]->Fill(fw,fadc/fpath); //this is for threshold corr
664  }
665  // long and near sample
666  if( (fw > 550.0) && (fpath > fpathlong[iview])){
667  fADCrateideal[iview]-> Fill(fadc/fpath); // DEBUGIN
668  }
669 
670  /*
671  fADCvsWmod[iview][imodulew] ->Fill(fw,fadc);
672  fADCratevsWmod[iview][imodulew] ->Fill(fw,fadc/fpath);
673  fLvsWmod[iview][imodulew] ->Fill(fw,fpath);
674  fADCvsYmod[iview][imoduley] ->Fill(ftempy,fadc);
675  fADCratevsYmod[iview][imoduley] ->Fill(ftempy,fadc/fpath);
676  */
677 
678  // MIP region histograms only
679  if(isstopper && xyz[2] > minZ && xyz[2] < maxZ){
680  fADCvsWTot[iview+2]->Fill(fw,fadc);
681  fADCratevsWTot[iview+2]->Fill(fw,fadc/fpath);
682  fADCratevsLTot[iview+2]->Fill(fpath,fadc/fpath);
683  fLvsWTot[iview+2]->Fill(fw,fpath);
684  fLvsdxTot[iview+2]->Fill(vdir.X(),fpath);
685  fLvsdyTot[iview+2]->Fill(vdir.Y(),fpath);
686  fLvsdzTot[iview+2]->Fill(vdir.Z(),fpath);
687  hrecodx[iview+2]->Fill(vdir.X());
688  hrecody[iview+2]->Fill(vdir.Y());
689  hrecodz[iview+2]->Fill(vdir.Z());
690  fLvswallsTot[iview+2]->Fill(fwall,fpath);
691  fADCvsYTot[iview+2]->Fill(ftempy,fadc);
692  fADCratevsYTot[iview+2]->Fill(ftempy,fadc/fpath);
693  ftrueThredVsWTot[iview+2]->Fill(fw,fadc/fpoissonlambda);
694  ftrueShadowVsYTot[iview+2]-> Fill(ftempy,ftruemev/(1.78*fpath));
695  fPEVslambdaTot[iview+2]-> Fill(fpoissonlambda,fadc);
696  flambdaVsWTot[iview+2]-> Fill(fw,fpoissonlambda);
697 
698  if(ftruepath > 0){
699  htruepath[iview+2]->Fill(ftruepath);
700  hrecopath[iview+2]->Fill(fpath);
701  //std::cout<<"ftruepath: "<<ftruepath<<", fpath: "<<fpath<<std::endl;
702 
703  if(((ftruepath > 3.7) && (ftruepath <= 3.9)) //||
704  //((fpath > 3.7) && (fpath <= 3.9))
705  ){
706  htruepathTest[iview]->Fill(ftruepath);
707  hrecopathTest[iview]->Fill(fpath);
708  //std::cout<<"FILLED stoppers!!"<<std::endl;
709  //std::cout<<"xi,yi,zi: "<<xi<<", "<<yi<<", "<<zi<<" xf,yf,zf: "<<xf<<", "<<yf<<", "<<zf<<std::endl;
710  }
711 
712  }
713 
714  if(abs(vdir.Y()) < 0.5 && (ftruew > -1000.0)){
715  htruew[iview+2]->Fill(ftruew);
716  hrecow[iview+2]->Fill(fw);
717  }
718 
719  if(fpath > fpathverylong[iview]){
720  fADCratevsYlongTot[iview+2]->Fill(ftempy,fadc/fpath);
721  fADCratevsWlongTot[iview+2]->Fill(fw,fadc/fpath);
722  }
723 
724  if((fw > 550.0) && (fpath > fpathlong[iview])){
725  fADCrateideal[iview+2] -> Fill(fadc/fpath);
726  }
727  /*
728  fADCvsWmod[iview+2][imodulew] ->Fill(fw,fadc);
729  fADCratevsWmod[iview+2][imodulew]->Fill(fw,fadc/fpath);
730  fLvsWmod[iview+2][imodulew] ->Fill(fw,fpath);
731  fADCvsYmod[iview+2][imoduley] ->Fill(ftempy,fadc);
732  fADCratevsYmod[iview+2][imoduley]->Fill(ftempy,fadc/fpath);
733  */
734  }//end isstopper
735 
736  } // loop over on-track cells
737 
738  return;
739 }
T max(const caf::Proxy< T > &a, T b)
double HalfD() const
Definition: CellGeo.cxx:205
TH2 * rh
Definition: drawXsec.C:5
zBoundMap MakeZBoundaryMap(std::set< double > const &planeZBounds, std::vector< TVector3 > const &trajectory)
Return a map of the z position of each trajectory point on a track to the bounding positions of where...
Definition: CalibUtil.cxx:354
std::vector< TrackIDE > HitToTrackIDE(const rb::CellHit &hit, bool useBirksE=false) const
Convenience function. HitsToTrackIDE but for a single hit.
unsigned short Plane() const
Definition: CellHit.h:39
geo::View_t View() const
Definition: CellHit.h:41
const CellGeo * Cell(int icell) const
Definition: PlaneGeo.h:48
T sqrt(T number)
Definition: d0nt_math.hpp:156
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...
Vertical planes which measure X.
Definition: PlaneGeo.h:28
float Z() const
Definition: RecoHit.h:38
Definition: event.h:19
void abs(TH1 *hist)
const PlaneGeo * Plane(unsigned int i) const
Horizontal planes which measure Y.
Definition: PlaneGeo.h:29
Calibrated quantities relying on position in the orthogonal view. To generate a rb::CellHit from a rb...
Definition: RecoHit.h:19
void swap(art::HLTGlobalStatus &lhs, art::HLTGlobalStatus &rhs)
unsigned short Cell() const
Definition: CellHit.h:40
double dy[NP][NC]
double dx[NP][NC]
double dz[NP][NC]
correl_yv Fill(-(dy[iP-1][iC-1]), hyv->GetBinContent(iP, iC))
double energy
Definition: plottest35.C:25
float PE() const
Definition: CellHit.h:42
bool IsCalibrated() const
You MUST check here before accessing PECorr, MIP or GeV.
Definition: RecoHit.cxx:35
double DetHalfHeight() const
TVector3 Unit() const
const std::vector< sim::PhotonSignal > HitToPhotonSignal(const art::Ptr< rb::CellHit > &hit) const
Returns the PhotonSignals contributing the signal in the specified hit.
double DetHalfWidth() const
int16_t ADC(uint32_t i) const
Definition: RawDigit.cxx:58
float X() const
Definition: RecoHit.h:36
bool HaveTruthInfo() const
Is this a file with truth info in? (Is BackTracker going to be any use to you?)
Definition: BackTracker.h:133
art::ServiceHandle< cheat::BackTracker > fBT
float Y() const
Definition: RecoHit.h:37
float PECorr() const
Definition: RecoHit.cxx:47
void FindZBoundaries(std::set< double > &planeZBounds)
Find the boundaries in the z direction of planes in the detector.
Definition: CalibUtil.cxx:332
art::ServiceHandle< geo::Geometry > fGeo
handle to the geometry
std::vector< const sim::Particle * > HitsToParticle(const std::vector< const rb::CellHit * > &hits) const
Returns vector of sim::Particle objects contributing to the given collection of hits.
int CalculateWall(float x0, float z0, float dx, float dz, float xlow, float xhigh, float zlow, float zhigh)
float PathLengthInCell(zBoundMap const &zBounds, TVector3 const &recoHitLoc, std::pair< uint32_t, uint32_t > const &pc)
Return the path length of a track in the cell in question.
Definition: CalibUtil.cxx:498
void calib::StopperThreshold::FillTree ( rb::Track const &  track,
std::set< TVector3, bool(*)(TVector3 const &, TVector3 const &) > const &  trajPoints 
)
private

Definition at line 742 of file StopperThreshold_module.cc.

References abs(), rawdata::RawDigit::ADC(), rb::Cluster::AllCells(), plot_validation_datamc::c, CalculateWall(), rb::CellHit::Cell(), geo::PlaneGeo::Cell(), rb::Cluster::Cell(), geo::GeometryBase::DetHalfHeight(), geo::GeometryBase::DetHalfWidth(), dx, dy, dz, energy, fBT, fGeo, calib::FindZBoundaries(), geo::CellGeo::HalfD(), cheat::BackTracker::HaveTruthInfo(), cheat::BackTracker::HitsToParticle(), cheat::BackTracker::HitToPhotonSignal(), cheat::BackTracker::HitToTrackIDE(), makeTrainCVSamples::int, rb::RecoHit::IsCalibrated(), isstopper, geo::kX, geo::kY, calib::MakeZBoundaryMap(), std::max(), getGoodRuns4SAM::n, rb::Cluster::NCell(), rb::Track::NTrajectoryPoints(), cheat::BackTracker::ParticleToFLSHit(), submit_concat_project::parts, calib::PathLengthInCell(), python.hepunit::pc, rb::CellHit::PE(), rb::RecoHit::PECorr(), rb::CellHit::Plane(), geo::GeometryBase::Plane(), rb::Cluster::RecoHit(), rh, std::sqrt(), std::swap(), tADC, tAngleRestr, tCell, tInfoTree, tIsStopper, tIsTruePath, tLongNear, tLongSample, tPath, tPE, tPECorr, tPlane, tPoissonLambda, rb::Track::Trajectory(), rb::Track::TrajectoryPoint(), tRecodx, tRecody, tRecodz, tTrueMeV, tTruePath, tTrueW, tView, tW, tWall, tYTot, Unit(), rb::CellHit::View(), rb::RecoHit::X(), rb::RecoHit::Y(), and rb::RecoHit::Z().

Referenced by analyze().

744 {
745  float minZ = trajPoints.begin()->Z();
746  float maxZ = trajPoints.rbegin()->Z();
747  float cellHalfDepth = fGeo->Plane(0)->Cell(0)->HalfD();
748  if(maxZ < minZ) std::swap(minZ, maxZ);
749 
750  minZ -= cellHalfDepth;
751  maxZ += cellHalfDepth;
752  float xi = trajPoints.begin()->X();
753  float yi = trajPoints.begin()->Y();
754  float zi = trajPoints.begin()->Z();
755  float xf = trajPoints.rbegin()->X();
756  float yf = trajPoints.rbegin()->Y();
757  float zf = trajPoints.rbegin()->Z();
758  float dr = sqrt((xi-xf)*(xi-xf)+(yi-yf)*(yi-yf)+(zi-zf)*(zi-zf));
759  if(dr == 0) return;
760  float dx = (xf-xi)/dr;
761  float dy = (yf-yi)/dr;
762  float dz = (zf-zi)/dr;
763  double xyz[3]= {0.};
764  unsigned int ntp = track.NTrajectoryPoints();
765  std::pair<uint32_t, uint32_t> pc;
766  TVector3 point;
767  std::set<double> planeZBounds;
768  calib::FindZBoundaries(planeZBounds);
769  auto boundaryMap = calib::MakeZBoundaryMap(planeZBounds, track.Trajectory());
770  if(boundaryMap.size() < 1) return;
771 
772  // Loop over all selected cells in track
773  for(size_t c = 0; c < track.NCell(); ++c){
774 
775  //Define pointer to a given cell
776  const art::Ptr<rb::CellHit> ch = track.Cell(c);
777 
778  float fpoissonlambda = 0.0;
779  float ftruemev = 0.0;
780  float ftruepath = -10.0;
781  float ftruew = -9999.0;
782  // Check PCHit code later (needs update)
783  if (fBT->HaveTruthInfo()){
784  // count poissonlambda using photonsignal
785  const std::vector<sim::PhotonSignal> pes = fBT->HitToPhotonSignal(track.Cell(c));
786  for(sim::PhotonSignal pe: pes){
787  fpoissonlambda += pe.PoissonLambda();
788  }
789 
790  // count truemev using fls??
791  const std::vector<cheat::TrackIDE> ides = fBT->HitToTrackIDE(track.Cell(c));
792  for(size_t n = 0; n < ides.size(); ++n)
793  ftruemev += ides[n].energy*1000;
794 
795  // calculate true path length and W using fls
796  const std::vector<const sim::Particle*> parts = fBT->HitsToParticle(track.AllCells());
797  if(!parts.empty()){
798  // front() is to select the particle which contributes the most to the reco track.
799  auto particle = parts.front();
800  std::vector<sim::FLSHit> flsHits = fBT->ParticleToFLSHit(particle->TrackId(), particle->PdgCode());
801  for(auto fls : flsHits){
802  if(fls.GetPlaneID() == track.Cell(c)->Plane() &&
803  fls.GetCellID() == track.Cell(c)->Cell() ){
804  ftruepath = fls.GetTotalPathLength();
805  ftruew = fls.GetZAverage();
806  break;
807  }
808  }
809  }
810  }
811  if((ftruemev == 0.0) || (fpoissonlambda == 0.0)) continue;
812 
813  fGeo->Plane(ch->Plane())->Cell(ch->Cell())->GetCenter(xyz);
814  double detHalfWidth = std::max(fGeo->DetHalfWidth(), fGeo->DetHalfHeight());
815  // to find the direction of segment_i
816  TVector3 vtp0;
817  TVector3 vtp1;
818  // if cell is near the edge of a traj point
819  if(track.TrajectoryPoint(0).Z() < track.TrajectoryPoint(ntp-1).Z()){
820  if(track.TrajectoryPoint(0).Z() >= xyz[2]){
821  vtp0 = track.TrajectoryPoint(0);
822  vtp1 = track.TrajectoryPoint(1);
823  }
824  else if(track.TrajectoryPoint(ntp-1).Z() <= xyz[2]){
825  vtp0 = track.TrajectoryPoint(ntp-2);
826  vtp1 = track.TrajectoryPoint(ntp-1);
827  }
828  else{
829  for(unsigned int tp=0;tp<ntp;tp++){
830  if(track.TrajectoryPoint(tp).Z() > xyz[2]){
831  vtp0 = track.TrajectoryPoint(tp-1);
832  vtp1 = track.TrajectoryPoint(tp);
833  break;
834  }
835  }
836  }
837  }
838  else{// inverse of the previous case
839  if(track.TrajectoryPoint(0).Z() <= xyz[2]){
840  vtp0 = track.TrajectoryPoint(0);
841  vtp1 = track.TrajectoryPoint(1);
842  }
843  else if(track.TrajectoryPoint(ntp-1).Z() >= xyz[2]){
844  vtp0 = track.TrajectoryPoint(ntp-2);
845  vtp1 = track.TrajectoryPoint(ntp-1);
846  }
847  else{
848  for(unsigned int tp=0;tp<ntp;tp++){
849  if(track.TrajectoryPoint(tp).Z() < xyz[2]){
850  vtp0 = track.TrajectoryPoint(tp-1);
851  vtp1 = track.TrajectoryPoint(tp);
852  break;
853  }
854  }
855  }
856  }
857  TVector3 vdir;
858  vdir = (vtp1 - vtp0).Unit();
859 
860  float cellwidth = fGeo->Plane(ch->Plane())->Cell(ch->Cell())->HalfW();
861  pc.first = ch->Plane();
862  pc.second = ch->Cell();
863  const rb::RecoHit rh = track.RecoHit(track.Cell(c));
864  point = TVector3(rh.X(), rh.Y(), rh.Z());
865 
866  double fadc = ch->ADC();
867  double fpe = ch->PE();
868 
869  double fpecorr = -5.0;
870  if(rh.IsCalibrated()){
871  fpecorr = rh.PECorr();
872  }
873 
874  double fw = 0.0;
875  int fwall = 0;
876  double fpath = calib::PathLengthInCell(boundaryMap,point,pc);
877  if((ch->View() == geo::kX) && (vdir.X() != 0 || vdir.Z() != 0)){
878 
879  fwall = (int)CalculateWall(rh.X(), rh.Z(), vdir.X(), vdir.Z(),
880  (xyz[0]-cellwidth), (xyz[0]+cellwidth), (xyz[2]-cellHalfDepth), (xyz[2]+cellHalfDepth));
881 
882  if(vdir.Z() != 0.0){
883  fw = (xyz[2]-vtp0.Z())*vdir.Y()/vdir.Z() + vtp0.Y();
884  }
885  else{
886  fw = (xyz[2]-zi)*dy/dz + yi;
887  }
888  }//end if ch->View
889 
890  if((ch->View() == geo::kY) && (vdir.Y() != 0 || vdir.Z() != 0)){
891 
892  fwall = (int)CalculateWall(rh.Y(), rh.Z(), vdir.Y(), vdir.Z(),
893  (xyz[1]-cellwidth), (xyz[1]+cellwidth), (xyz[2]-cellHalfDepth), (xyz[2]+cellHalfDepth));
894 
895  if(vdir.Z() != 0.0){
896  fw = (xyz[2]-vtp0.Z())*vdir.X()/vdir.Z() + vtp0.X();
897  }
898  else{
899  fw = (xyz[2]-zi)*dx/dz + xi;
900  }
901  }//end if ch->View
902 
903  if((fpath < 1.0) || (fpath > 25.0) || (abs(fw) > detHalfWidth) ) continue;
904 
905  double ftempy = 0.0;
906 
907  if(ch->View() == geo::kX){
908  ftempy = fw;
909  }
910  else if(ch->View() == geo::kY){
911  ftempy = xyz[1];
912  }
913 
914  float fpathverylong[2] = {6.0,4.5};
915  float fpathlong[2] = {6.0,4.5};
916  int iview = (int)ch->View();
917  int icell = (int)ch->Cell();
918  int iplane = (int)ch->Plane();
919 
920  tView = iview;
921  tCell = icell;
922  tPlane = iplane;
923  tADC = fadc;
924  tPE = fpe;
925  tPECorr = fpecorr;
926  tW = fw;
927  tTruePath = ftruepath;
928  tPath = fpath;
929  tRecodx = vdir.X();
930  tRecody = vdir.Y();
931  tRecodz = vdir.Z();
932  tWall = fwall;
933  tYTot = ftempy;
934  tPoissonLambda = fpoissonlambda;
935  tTrueMeV = ftruemev;
936  tTrueW = ftruew;
937 
938  bool istruepath = false;
939  if(ftruepath > 0){
940  istruepath = true;
941  }
942  tIsTruePath = istruepath;
943 
944  bool isanglerestr = false;
945  //angle restricted sample
946  if( (abs(vdir.Y()) < 0.5) && (ftruew > -1000)){
947  isanglerestr = true;
948  }
949  tAngleRestr = isanglerestr;
950 
951  // long sample
952  bool islong = false;
953  if( fpath > fpathverylong[iview]){
954  islong = true;
955  }
956  tLongSample = islong;
957 
958  bool islongnear = false;
959  // long and near sample
960  if( (fw > 550.0) && (fpath > fpathlong[iview])){
961  islongnear = true;
962  }
963  tLongNear = islongnear;
964 
965  bool isMIPstopper = false;
966  // MIP region histograms only
967  if(isstopper && xyz[2] > minZ && xyz[2] < maxZ){
968  isMIPstopper = true;
969  }//end isstopper
970  tIsStopper = isMIPstopper;
971 
972  // Filling info tree
973  tInfoTree->Fill();
974  //std::cout<<"Tree Info FILLED!!"<<std::endl;
975 
976  } // loop over on-track cells
977 
978  return;
979 }
T max(const caf::Proxy< T > &a, T b)
double HalfD() const
Definition: CellGeo.cxx:205
TH2 * rh
Definition: drawXsec.C:5
zBoundMap MakeZBoundaryMap(std::set< double > const &planeZBounds, std::vector< TVector3 > const &trajectory)
Return a map of the z position of each trajectory point on a track to the bounding positions of where...
Definition: CalibUtil.cxx:354
std::vector< TrackIDE > HitToTrackIDE(const rb::CellHit &hit, bool useBirksE=false) const
Convenience function. HitsToTrackIDE but for a single hit.
unsigned short Plane() const
Definition: CellHit.h:39
geo::View_t View() const
Definition: CellHit.h:41
const CellGeo * Cell(int icell) const
Definition: PlaneGeo.h:48
T sqrt(T number)
Definition: d0nt_math.hpp:156
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...
Vertical planes which measure X.
Definition: PlaneGeo.h:28
float Z() const
Definition: RecoHit.h:38
Definition: event.h:19
void abs(TH1 *hist)
const PlaneGeo * Plane(unsigned int i) const
Horizontal planes which measure Y.
Definition: PlaneGeo.h:29
Calibrated quantities relying on position in the orthogonal view. To generate a rb::CellHit from a rb...
Definition: RecoHit.h:19
void swap(art::HLTGlobalStatus &lhs, art::HLTGlobalStatus &rhs)
unsigned short Cell() const
Definition: CellHit.h:40
double dy[NP][NC]
double dx[NP][NC]
double dz[NP][NC]
double energy
Definition: plottest35.C:25
float PE() const
Definition: CellHit.h:42
bool IsCalibrated() const
You MUST check here before accessing PECorr, MIP or GeV.
Definition: RecoHit.cxx:35
double DetHalfHeight() const
TVector3 Unit() const
const std::vector< sim::PhotonSignal > HitToPhotonSignal(const art::Ptr< rb::CellHit > &hit) const
Returns the PhotonSignals contributing the signal in the specified hit.
double DetHalfWidth() const
int16_t ADC(uint32_t i) const
Definition: RawDigit.cxx:58
float X() const
Definition: RecoHit.h:36
bool HaveTruthInfo() const
Is this a file with truth info in? (Is BackTracker going to be any use to you?)
Definition: BackTracker.h:133
art::ServiceHandle< cheat::BackTracker > fBT
float Y() const
Definition: RecoHit.h:37
float PECorr() const
Definition: RecoHit.cxx:47
void FindZBoundaries(std::set< double > &planeZBounds)
Find the boundaries in the z direction of planes in the detector.
Definition: CalibUtil.cxx:332
art::ServiceHandle< geo::Geometry > fGeo
handle to the geometry
std::vector< const sim::Particle * > HitsToParticle(const std::vector< const rb::CellHit * > &hits) const
Returns vector of sim::Particle objects contributing to the given collection of hits.
int CalculateWall(float x0, float z0, float dx, float dz, float xlow, float xhigh, float zlow, float zhigh)
float PathLengthInCell(zBoundMap const &zBounds, TVector3 const &recoHitLoc, std::pair< uint32_t, uint32_t > const &pc)
Return the path length of a track in the cell in question.
Definition: CalibUtil.cxx:498
void calib::StopperThreshold::FindTrajectoryPoints ( rb::Track const &  track,
std::set< TVector3, bool(*)(TVector3 const &, TVector3 const &)> &  trajPoints 
)
private

Definition at line 380 of file StopperThreshold_module.cc.

References geo::LiveGeometry::DistToEdgeXY(), geo::LiveGeometry::DistToEdgeZ(), fLivegeo, fMaxDistFromEnd, fMinDistFromEnd, fMinDistToEdge, isstopper, Mag(), rb::Track::NTrajectoryPoints(), rb::Track::Stop(), and rb::Track::TrajectoryPoint().

Referenced by analyze().

382 {
383  // For stopping muons
384  if(fLivegeo->DistToEdgeXY(track.Stop()) > fMinDistToEdge &&
385  fLivegeo->DistToEdgeZ (track.Stop()) > fMinDistToEdge ){ //checks for 50 cm
386  isstopper = true;
387  double totalDist = 0.;
388  for(size_t tp = track.NTrajectoryPoints()-1; tp > 1; --tp){
389  totalDist += (track.TrajectoryPoint(tp) - track.TrajectoryPoint(tp - 1)).Mag();
390  if(totalDist > fMinDistFromEnd && totalDist < fMaxDistFromEnd)
391  trajPoints.insert(track.TrajectoryPoint(tp));
392  if(totalDist > fMaxDistFromEnd) break;
393  }
394  }
395  else{
396  isstopper = false;
397  for(size_t itp = track.NTrajectoryPoints() - 1; itp > 1; --itp){
398  trajPoints.insert(track.TrajectoryPoint(itp));
399  }
400  }// end loop over track trajectorypoints
401 
402  return;
403 }
double DistToEdgeXY(TVector3 vertex)
Definition: event.h:19
art::ServiceHandle< geo::LiveGeometry > fLivegeo
double DistToEdgeZ(TVector3 vertex)
double fMaxDistFromEnd
maximum distance from end of track to use a point
float Mag() const
double fMinDistFromEnd
minimum distance from end of track to use a point
seed_t art::EngineCreator::get_seed_value ( fhicl::ParameterSet const &  pset,
char const  key[] = "seed",
seed_t const  implicit_seed = -1 
)
inherited
art::Handle<art::TriggerResults> art::EventObserverBase::getTriggerResults ( Event const &  e) const
inlineinherited

Definition at line 61 of file EventObserverBase.h.

References art::detail::CachedProducts::getOneTriggerResults(), and art::EventObserverBase::selectors_.

62  {
64  }
detail::CachedProducts selectors_
art::Handle< art::TriggerResults > getOneTriggerResults(Event const &) const
Float_t e
Definition: plot.C:35
template<typename T , BranchType = InEvent>
ProductToken<T> art::Consumer::mayConsume ( InputTag const &  )
inherited
template<typename T , art::BranchType BT>
art::ProductToken<T> art::Consumer::mayConsume ( InputTag const &  it)
inherited

Definition at line 189 of file Consumer.h.

References art::InputTag::instance(), PandAna.reco_validation.prod5_pid_validation::invalid, art::InputTag::label(), art::InputTag::process(), and T.

190 {
191  if (!moduleContext_)
192  return ProductToken<T>::invalid();
193 
194  consumables_[BT].emplace_back(ConsumableType::Product,
195  TypeID{typeid(T)},
196  it.label(),
197  it.instance(),
198  it.process());
199  return ProductToken<T>{it};
200 }
set< int >::iterator it
static ProductToken< T > invalid()
Definition: ProductToken.h:47
ConsumableProducts consumables_
Definition: Consumer.h:137
double T
Definition: Xdiff_gwt.C:5
bool moduleContext_
Definition: Consumer.h:135
template<typename T , art::BranchType BT>
void art::Consumer::mayConsumeMany ( )
inherited

Definition at line 204 of file Consumer.h.

References T.

205 {
206  if (!moduleContext_)
207  return;
208 
209  consumables_[BT].emplace_back(ConsumableType::Many, TypeID{typeid(T)});
210 }
ConsumableProducts consumables_
Definition: Consumer.h:137
double T
Definition: Xdiff_gwt.C:5
bool moduleContext_
Definition: Consumer.h:135
template<typename Element , BranchType = InEvent>
ViewToken<Element> art::Consumer::mayConsumeView ( InputTag const &  )
inherited
template<typename T , art::BranchType BT>
art::ViewToken<T> art::Consumer::mayConsumeView ( InputTag const &  it)
inherited

Definition at line 214 of file Consumer.h.

References art::InputTag::instance(), PandAna.reco_validation.prod5_pid_validation::invalid, art::InputTag::label(), art::InputTag::process(), and T.

215 {
216  if (!moduleContext_)
217  return ViewToken<T>::invalid();
218 
219  consumables_[BT].emplace_back(ConsumableType::ViewElement,
220  TypeID{typeid(T)},
221  it.label(),
222  it.instance(),
223  it.process());
224  return ViewToken<T>{it};
225 }
set< int >::iterator it
static ViewToken< Element > invalid()
Definition: ProductToken.h:75
ConsumableProducts consumables_
Definition: Consumer.h:137
double T
Definition: Xdiff_gwt.C:5
bool moduleContext_
Definition: Consumer.h:135
bool art::EventObserverBase::modifiesEvent ( ) const
inlineinherited

Definition at line 25 of file EventObserverBase.h.

26  {
27  return false;
28  }
static cet::exempt_ptr<Consumer> art::Consumer::non_module_context ( )
staticinherited
void art::Consumer::prepareForJob ( fhicl::ParameterSet const &  pset)
protectedinherited
std::string const& art::EventObserverBase::processName ( ) const
inlineinherited
void calib::StopperThreshold::reconfigure ( fhicl::ParameterSet const &  p)
virtual

Definition at line 345 of file StopperThreshold_module.cc.

References fMaxDistFromEnd, fMinDistFromEnd, fMinDistToEdge, fTrackLabel, fhicl::ParameterSet::get(), and string.

Referenced by StopperThreshold().

346 {
347  fTrackLabel = p.get< std::string >("TrackLabel" );
348  fMinDistToEdge = p.get< double >("MinDistToEdge" ); //50.0
349  fMinDistFromEnd = p.get< double >("MinDistFromEnd" ); //100.0
350  fMaxDistFromEnd = p.get< double >("MaxDistFromEnd" ); //200.0
351 
352  return;
353 }
std::string fTrackLabel
label of module creating the tracks used
const char * p
Definition: xmltok.h:285
double fMaxDistFromEnd
maximum distance from end of track to use a point
double fMinDistFromEnd
minimum distance from end of track to use a point
enum BeamMode string
void art::EventObserverBase::registerProducts ( MasterProductRegistry ,
ProductDescriptions ,
ModuleDescription const &   
)
inlineinherited

Definition at line 33 of file EventObserverBase.h.

References string.

36  {}
fhicl::ParameterSetID art::EventObserverBase::selectorConfig ( ) const
inlineinherited

Definition at line 56 of file EventObserverBase.h.

References art::EventObserverBase::selector_config_id_.

57  {
58  return selector_config_id_;
59  }
fhicl::ParameterSetID selector_config_id_
void art::Consumer::showMissingConsumes ( ) const
protectedinherited

Referenced by art::RootOutput::endJob().

void calib::StopperThreshold::testPath ( rb::Track const &  track,
std::set< TVector3, bool(*)(TVector3 const &, TVector3 const &) > const &  trajPoints 
)
private

Definition at line 982 of file StopperThreshold_module.cc.

References plot_validation_datamc::c, rb::CellHit::Cell(), geo::PlaneGeo::Cell(), rb::Cluster::Cell(), fGeo, calib::FindZBoundaries(), fpathtest, geo::CellGeo::HalfD(), makeTrainCVSamples::int, isstopper, calib::MakeZBoundaryMap(), rb::Cluster::NCell(), calib::PathLengthInCell(), python.hepunit::pc, rb::CellHit::Plane(), geo::GeometryBase::Plane(), rb::Cluster::RecoHit(), rh, std::swap(), rb::Track::Trajectory(), rb::CellHit::View(), rb::RecoHit::X(), rb::RecoHit::Y(), and rb::RecoHit::Z().

Referenced by analyze().

984 {
985  float minZ = trajPoints.begin()->Z();
986  float maxZ = trajPoints.rbegin()->Z();
987  float cellHalfDepth = fGeo->Plane(0)->Cell(0)->HalfD();
988  if(maxZ < minZ) std::swap(minZ, maxZ);
989  minZ -= cellHalfDepth;
990  maxZ += cellHalfDepth;
991 
992  std::pair<uint32_t, uint32_t> pc;
993  TVector3 point;
994  std::set<double> planeZBounds;
995  calib::FindZBoundaries(planeZBounds);
996  auto boundaryMap = calib::MakeZBoundaryMap(planeZBounds, track.Trajectory());
997  if(boundaryMap.size() < 1) return;
998  for(size_t c = 0; c < track.NCell(); ++c){
999  const art::Ptr<rb::CellHit> ch = track.Cell(c);
1000  pc.first = ch->Plane();
1001  pc.second = ch->Cell();
1002  const rb::RecoHit rh = track.RecoHit(track.Cell(c));
1003  point = TVector3(rh.X(), rh.Y(), rh.Z());
1004  double fpath = calib::PathLengthInCell(boundaryMap,point,pc);
1005  int iview = (int)ch->View();
1006  fpathtest[iview]->Fill(fpath);
1007  double xyz[3]= {0.};
1008  fGeo->Plane(ch->Plane())->Cell(ch->Cell())->GetCenter(xyz);
1009  if(isstopper && xyz[2] > minZ && xyz[2] < maxZ)
1010  fpathtest[iview+2]->Fill(fpath);
1011 
1012  } // loop over on-track cells
1013 
1014  return;
1015 }
double HalfD() const
Definition: CellGeo.cxx:205
TH2 * rh
Definition: drawXsec.C:5
zBoundMap MakeZBoundaryMap(std::set< double > const &planeZBounds, std::vector< TVector3 > const &trajectory)
Return a map of the z position of each trajectory point on a track to the bounding positions of where...
Definition: CalibUtil.cxx:354
unsigned short Plane() const
Definition: CellHit.h:39
geo::View_t View() const
Definition: CellHit.h:41
const CellGeo * Cell(int icell) const
Definition: PlaneGeo.h:48
float Z() const
Definition: RecoHit.h:38
Definition: event.h:19
const PlaneGeo * Plane(unsigned int i) const
Calibrated quantities relying on position in the orthogonal view. To generate a rb::CellHit from a rb...
Definition: RecoHit.h:19
void swap(art::HLTGlobalStatus &lhs, art::HLTGlobalStatus &rhs)
unsigned short Cell() const
Definition: CellHit.h:40
float X() const
Definition: RecoHit.h:36
float Y() const
Definition: RecoHit.h:37
void FindZBoundaries(std::set< double > &planeZBounds)
Find the boundaries in the z direction of planes in the detector.
Definition: CalibUtil.cxx:332
art::ServiceHandle< geo::Geometry > fGeo
handle to the geometry
float PathLengthInCell(zBoundMap const &zBounds, TVector3 const &recoHitLoc, std::pair< uint32_t, uint32_t > const &pc)
Return the path length of a track in the cell in question.
Definition: CalibUtil.cxx:498
void art::Consumer::validateConsumedProduct ( BranchType const  bt,
ProductInfo const &  pi 
)
protectedinherited
bool art::EventObserverBase::wantAllEvents ( ) const
inlineinherited

Definition at line 46 of file EventObserverBase.h.

References art::EventObserverBase::wantAllEvents_.

Referenced by art::RootOutput::RootOutput().

47  {
48  return wantAllEvents_;
49  }
bool art::EventObserverBase::wantEvent ( Event const &  e)
inlineinherited

Definition at line 51 of file EventObserverBase.h.

References art::EventObserverBase::selectors_, and art::detail::CachedProducts::wantEvent().

52  {
53  return selectors_.wantEvent(e);
54  }
detail::CachedProducts selectors_
Float_t e
Definition: plot.C:35
bool wantEvent(Event const &)
std::string art::EDAnalyzer::workerType ( ) const
inlineinherited

Definition at line 109 of file EDAnalyzer.h.

References art::EDAnalyzer::currentContext().

110  {
111  return "WorkerT<EDAnalyzer>";
112  }

Member Data Documentation

TH1* calib::StopperThreshold::fADCrateideal[4]
private

Definition at line 110 of file StopperThreshold_module.cc.

Referenced by beginRun(), and FillHist().

TH2* calib::StopperThreshold::fADCratevsLTot[4]
private

Definition at line 107 of file StopperThreshold_module.cc.

Referenced by beginRun(), and FillHist().

TH2F* calib::StopperThreshold::fADCratevsWlongTot[4]
private

Definition at line 98 of file StopperThreshold_module.cc.

Referenced by beginRun(), and FillHist().

TH2F* calib::StopperThreshold::fADCratevsWTot[4]
private

Definition at line 97 of file StopperThreshold_module.cc.

Referenced by beginRun(), and FillHist().

TH2F* calib::StopperThreshold::fADCratevsYlongTot[4]
private

Definition at line 90 of file StopperThreshold_module.cc.

Referenced by beginRun(), and FillHist().

TH2F* calib::StopperThreshold::fADCratevsYTot[4]
private

Definition at line 89 of file StopperThreshold_module.cc.

Referenced by beginRun(), and FillHist().

TH2F* calib::StopperThreshold::fADCvsWTot[4]
private

Definition at line 96 of file StopperThreshold_module.cc.

Referenced by beginRun(), and FillHist().

TH2F* calib::StopperThreshold::fADCvsYTot[4]
private

Definition at line 88 of file StopperThreshold_module.cc.

Referenced by beginRun(), and FillHist().

art::ServiceHandle<cheat::BackTracker> calib::StopperThreshold::fBT
private

Definition at line 154 of file StopperThreshold_module.cc.

Referenced by FillHist(), and FillTree().

art::ServiceHandle<geo::Geometry> calib::StopperThreshold::fGeo
private

handle to the geometry

Definition at line 79 of file StopperThreshold_module.cc.

Referenced by beginRun(), FillHist(), FillTree(), and testPath().

TH2* calib::StopperThreshold::flambdaVsWTot[4]
private

Definition at line 105 of file StopperThreshold_module.cc.

Referenced by beginRun(), and FillHist().

art::ServiceHandle<geo::LiveGeometry> calib::StopperThreshold::fLivegeo
private

Definition at line 153 of file StopperThreshold_module.cc.

Referenced by FindTrajectoryPoints().

TH2F* calib::StopperThreshold::fLvsdxTot[4]
private

Definition at line 122 of file StopperThreshold_module.cc.

Referenced by beginRun(), and FillHist().

TH2F* calib::StopperThreshold::fLvsdyTot[4]
private

Definition at line 123 of file StopperThreshold_module.cc.

Referenced by beginRun(), and FillHist().

TH2F* calib::StopperThreshold::fLvsdzTot[4]
private

Definition at line 124 of file StopperThreshold_module.cc.

Referenced by beginRun(), and FillHist().

TH2F* calib::StopperThreshold::fLvswallsTot[4]
private

Definition at line 125 of file StopperThreshold_module.cc.

Referenced by beginRun(), and FillHist().

TH2* calib::StopperThreshold::fLvsWnothreshTot[4]
private

Definition at line 100 of file StopperThreshold_module.cc.

Referenced by beginRun().

TH2F* calib::StopperThreshold::fLvsWTot[4]
private

Definition at line 99 of file StopperThreshold_module.cc.

Referenced by beginRun(), and FillHist().

double calib::StopperThreshold::fMaxDistFromEnd
private

maximum distance from end of track to use a point

Definition at line 84 of file StopperThreshold_module.cc.

Referenced by FindTrajectoryPoints(), and reconfigure().

double calib::StopperThreshold::fMinDistFromEnd
private

minimum distance from end of track to use a point

Definition at line 83 of file StopperThreshold_module.cc.

Referenced by FindTrajectoryPoints(), and reconfigure().

double calib::StopperThreshold::fMinDistToEdge
private

Definition at line 82 of file StopperThreshold_module.cc.

Referenced by FindTrajectoryPoints(), and reconfigure().

TH1F* calib::StopperThreshold::fpathtest[4]
private

Definition at line 126 of file StopperThreshold_module.cc.

Referenced by beginRun(), and testPath().

TH2* calib::StopperThreshold::fPECorrvsLTot[4]
private

Definition at line 109 of file StopperThreshold_module.cc.

Referenced by beginRun(), and FillHist().

TH2* calib::StopperThreshold::fPEVslambdaTot[4]
private

Definition at line 106 of file StopperThreshold_module.cc.

Referenced by beginRun(), and FillHist().

TH2* calib::StopperThreshold::fPEvsLTot[4]
private

Definition at line 108 of file StopperThreshold_module.cc.

Referenced by beginRun(), and FillHist().

std::string calib::StopperThreshold::fTrackLabel
private

label of module creating the tracks used

Definition at line 81 of file StopperThreshold_module.cc.

Referenced by analyze(), and reconfigure().

TH2* calib::StopperThreshold::ftrueShadowVsYTot[4]
private

Definition at line 93 of file StopperThreshold_module.cc.

Referenced by beginRun(), and FillHist().

TH2* calib::StopperThreshold::ftrueThredVsWTot[4]
private

Definition at line 104 of file StopperThreshold_module.cc.

Referenced by beginRun(), and FillHist().

TH1* calib::StopperThreshold::hrecodx[4]
private

Definition at line 117 of file StopperThreshold_module.cc.

Referenced by beginRun(), and FillHist().

TH1* calib::StopperThreshold::hrecody[4]
private

Definition at line 118 of file StopperThreshold_module.cc.

Referenced by beginRun(), and FillHist().

TH1* calib::StopperThreshold::hrecodz[4]
private

Definition at line 119 of file StopperThreshold_module.cc.

Referenced by beginRun(), and FillHist().

TH1* calib::StopperThreshold::hrecopath[4]
private

Definition at line 111 of file StopperThreshold_module.cc.

Referenced by beginRun(), and FillHist().

TH1* calib::StopperThreshold::hrecopathTest[4]
private

Definition at line 112 of file StopperThreshold_module.cc.

Referenced by beginRun(), and FillHist().

TH1* calib::StopperThreshold::hrecow[4]
private

Definition at line 115 of file StopperThreshold_module.cc.

Referenced by beginRun(), and FillHist().

TH1* calib::StopperThreshold::htruepath[4]
private

Definition at line 113 of file StopperThreshold_module.cc.

Referenced by beginRun(), and FillHist().

TH1* calib::StopperThreshold::htruepathTest[4]
private

Definition at line 114 of file StopperThreshold_module.cc.

Referenced by beginRun(), and FillHist().

TH1* calib::StopperThreshold::htruew[4]
private

Definition at line 116 of file StopperThreshold_module.cc.

Referenced by beginRun(), and FillHist().

bool calib::StopperThreshold::isstopper
private

Definition at line 155 of file StopperThreshold_module.cc.

Referenced by FillHist(), FillTree(), FindTrajectoryPoints(), and testPath().

float calib::StopperThreshold::tADC
private

Definition at line 133 of file StopperThreshold_module.cc.

Referenced by beginRun(), and FillTree().

int calib::StopperThreshold::tAngleRestr
private

Definition at line 148 of file StopperThreshold_module.cc.

Referenced by beginRun(), and FillTree().

int calib::StopperThreshold::tCell
private

Definition at line 131 of file StopperThreshold_module.cc.

Referenced by beginRun(), and FillTree().

TTree* calib::StopperThreshold::tInfoTree
private

Definition at line 129 of file StopperThreshold_module.cc.

Referenced by beginRun(), and FillTree().

int calib::StopperThreshold::tIsStopper
private

Definition at line 151 of file StopperThreshold_module.cc.

Referenced by beginRun(), and FillTree().

int calib::StopperThreshold::tIsTruePath
private

Definition at line 147 of file StopperThreshold_module.cc.

Referenced by beginRun(), and FillTree().

int calib::StopperThreshold::tLongNear
private

Definition at line 150 of file StopperThreshold_module.cc.

Referenced by beginRun(), and FillTree().

int calib::StopperThreshold::tLongSample
private

Definition at line 149 of file StopperThreshold_module.cc.

Referenced by beginRun(), and FillTree().

float calib::StopperThreshold::tPath
private

Definition at line 138 of file StopperThreshold_module.cc.

Referenced by beginRun(), and FillTree().

float calib::StopperThreshold::tPE
private

Definition at line 134 of file StopperThreshold_module.cc.

Referenced by beginRun(), and FillTree().

float calib::StopperThreshold::tPECorr
private

Definition at line 135 of file StopperThreshold_module.cc.

Referenced by beginRun(), and FillTree().

int calib::StopperThreshold::tPlane
private

Definition at line 132 of file StopperThreshold_module.cc.

Referenced by beginRun(), and FillTree().

float calib::StopperThreshold::tPoissonLambda
private

Definition at line 144 of file StopperThreshold_module.cc.

Referenced by beginRun(), and FillTree().

float calib::StopperThreshold::tRecodx
private

Definition at line 139 of file StopperThreshold_module.cc.

Referenced by beginRun(), and FillTree().

float calib::StopperThreshold::tRecody
private

Definition at line 140 of file StopperThreshold_module.cc.

Referenced by beginRun(), and FillTree().

float calib::StopperThreshold::tRecodz
private

Definition at line 141 of file StopperThreshold_module.cc.

Referenced by beginRun(), and FillTree().

float calib::StopperThreshold::tTrueMeV
private

Definition at line 145 of file StopperThreshold_module.cc.

Referenced by beginRun(), and FillTree().

float calib::StopperThreshold::tTruePath
private

Definition at line 137 of file StopperThreshold_module.cc.

Referenced by beginRun(), and FillTree().

float calib::StopperThreshold::tTrueW
private

Definition at line 146 of file StopperThreshold_module.cc.

Referenced by beginRun(), and FillTree().

int calib::StopperThreshold::tView
private

Definition at line 130 of file StopperThreshold_module.cc.

Referenced by beginRun(), and FillTree().

float calib::StopperThreshold::tW
private

Definition at line 136 of file StopperThreshold_module.cc.

Referenced by beginRun(), and FillTree().

float calib::StopperThreshold::tWall
private

Definition at line 142 of file StopperThreshold_module.cc.

Referenced by beginRun(), and FillTree().

float calib::StopperThreshold::tYTot
private

Definition at line 143 of file StopperThreshold_module.cc.

Referenced by beginRun(), and FillTree().


The documentation for this class was generated from the following file: