436 art::ServiceHandle<geo::Geometry> geo;
437 auto const clockData = art::ServiceHandle<detinfo::DetectorClocksService const>()->DataForJob();
438 auto const detProp = art::ServiceHandle<detinfo::DetectorPropertiesService const>()->DataForJob(clockData);
442 double xyz1[3] = {0.};
443 double xyz2[3] = {0.};
444 double xyzl[3] = {0.};
446 geo->Plane(0).LocalToWorld(xyzl, xyz1);
447 geo->Plane(1).LocalToWorld(xyzl, xyz2);
451 double pitch = xyz2[0] - xyz1[0];
460 double driftvelocity=
detProp.DriftVelocity()/1000.;
461 double integral = 0.;
465 art::ServiceHandle<util::LArFFT> fft;
466 int signalSize = fft->FFTSize();
467 std::vector<double> ramp(signalSize);
472 std::vector<double> bipolar(signalSize);
482 for(
int i = 0; i < signalSize; i++) {
494 for(
int i = 0; i < signalSize; ++i){
523 mf::LogInfo(
"SignalShapingServiceSBND") <<
" using try-2 hard-coded field shapes " ;
525 const int nbincPlane = 16;
526 double cPlaneResponse[nbincPlane] = {
527 0, 0, 0, 0.02620087336, 0.02620087336,
528 0.04366812227, 0.1310043668, 0.1659388646, 0.1397379913, 0.3711790393,
529 0.06550218341, 0.0480349345, -0.01310043668, -0.004366812227, 0,
533 for(
int i = 1; i < nbincPlane; ++i){
538 for(
int i = 0; i < nbincPlane; ++i){
544 const int nbinuPlane = 228;
549 double uPlaneResponse[nbinuPlane] = {
550 0, 0.0001881008778, 0.0003762017556, 0.0005643026334, 0.0007524035112,
551 0.000940504389, 0.001128605267, 0.001316706145, 0.001504807022, 0.0016929079,
552 0.001881008778, 0.002069109656, 0.002257210534, 0.002445311411, 0.002633412289,
553 0.002821513167, 0.003009614045, 0.003197714923, 0.0033858158, 0.003573916678,
554 0.003762017556, 0.003950118434, 0.004138219312, 0.004326320189, 0.004514421067,
555 0.004702521945, 0.004890622823, 0.005078723701, 0.005266824579, 0.005454925456,
556 0.005643026334, 0.005831127212, 0.00601922809, 0.006207328968, 0.006395429845,
557 0.006583530723, 0.006771631601, 0.006959732479, 0.007147833357, 0.007335934234,
558 0.007524035112, 0.00771213599, 0.007900236868, 0.008088337746, 0.008276438623,
559 0.008464539501, 0.008652640379, 0.008840741257, 0.009028842135, 0.009216943012,
560 0.00940504389, 0.009593144768, 0.009781245646, 0.009969346524, 0.0101574474,
561 0.01053554828, 0.01053364916, 0.01072175003, 0.01090985091, 0.01109795179,
562 0.01128605267, 0.01147415355, 0.01166225442, 0.0118503553, 0.01203845618,
563 0.01222655706, 0.01241465794, 0.01260275881, 0.01279085969, 0.01297896057,
564 0.01316706145, 0.01335516232, 0.0135432632, 0.01373136408, 0.01391946496,
565 0.01410756584, 0.01429566671, 0.01448376759, 0.01467186847, 0.01485996935,
566 0.01504807022, 0.0152361711, 0.01542427198, 0.01561237286, 0.01580047374,
567 0.01598857461, 0.01617667549, 0.01636477637, 0.01655287725, 0.01674097812,
568 0.016929079, 0.01711717988, 0.01730528076, 0.01749338164, 0.01768148251,
569 0.01786958339, 0.01805768427, 0.01824578515, 0.01843388602, 0.0186219869,
570 0.01881008778, 0.01899818866, 0.01918628954, 0.01937439041, 0.01956249129,
571 0.01975059217, 0.01993869305, 0.02012679393, 0.0203148948, 0.02050299568,
572 0.02069109656, 0.02087919744, 0.02106729831, 0.02125539919, 0.02144350007,
573 0.02163160095, 0.02181970183, 0.0220078027, 0.02219590358, 0.02238400446,
574 0.02257210534, 0.02302354744, 0.02347498955, 0.02392643166, 0.02437787376,
575 0.02482931587, 0.02528075798, 0.02573220008, 0.02618364219, 0.0266350843,
576 0.0270865264, 0.02753796851, 0.02798941062, 0.02844085272, 0.02889229483,
577 0.02934373694, 0.02979517904, 0.03024662115, 0.03069806326, 0.03114950536,
578 0.03160094747, 0.0321652501, 0.03272955274, 0.03329385537, 0.033858158,
579 0.03442246064, 0.03498676327, 0.0355510659, 0.03611536854, 0.03667967117,
580 0.03724397381, 0.03780827644, 0.03837257907, 0.03893688171, 0.03950118434,
581 0.04006548697, 0.04062978961, 0.04119409224, 0.04175839487, 0.04232269751,
582 0.04288700014, 0.0435641633, 0.04424132646, 0.04491848962, 0.04559565278,
583 0.04627281594, 0.0469499791, 0.04762714226, 0.04830430542, 0.04898146858,
584 0.04965863174, 0.0503357949, 0.05101295806, 0.05169012122, 0.05236728438,
585 0.05304444754, 0.0537216107, 0.05439877386, 0.05507593702, 0.05575310018,
586 0.05643026334, 0.0572579072, 0.05808555107, 0.05891319493, 0.05974083879,
587 0.06056848265, 0.06139612652, 0.06222377038, 0.06305141424, 0.0638790581,
588 0.06470670196, 0.06553434583, 0.06636198969, 0.06718963355, 0.06801727741,
589 0.06884492128, 0.06967256514, 0.070500209, 0.07132785286, 0.07215549673,
590 0.07298314059, 0.07305838094, 0.07313362129, 0.07320886164, 0.07328410199,
591 0.07335934234, 0.07524035112, 0.07524035112, 0.07524035112, 0.07524035112,
592 0.07524035112, 0.07524035112, 0.07524035112, 0.07565835307, 0.06688031211,
593 -1.508982036, -1.401197605, -1.293413174, -0.5748502994, -0.3233532934,
594 -0.2694610778, -0.2694610778, -0.1796407186, -0.1437125749, -0.03592814371,
598 for(
int i = 0; i < nbinuPlane; ++i){
603 const int nbinvPlane = 20;
604 double vPlaneResponse[nbinvPlane] = {
605 0, 0, 0.01090909091, 0.01090909091, 0.01090909091,
606 0.02181818182, 0.03272727273, 0.7636363636, 2.018181818, 2.04,
607 1.090909091, -1.03861518, -1.757656458, -1.757656458, -1.118508655,
608 -0.2396804261, -0.07989347537, -0.007989347537, 0, 0
611 for (
int i = 0; i < nbinvPlane; ++i) {
619 mf::LogInfo(
"SignalShapingServiceSBND") <<
" using the old field shape " ;
622 double integral = 0.;
623 for(
int i = 1; i < nbinc; ++i){
628 for(
int i = 0; i < nbinc; ++i){
635 for(
int i = 0; i < nbini; ++i){
640 for(
int i = 0; i < nbini; ++i){
std::vector< double > fColFieldResponse
double fIndUFieldRespAmp
amplitude of response to field in U plane
TF1 * fIndVFieldFunc
Parameterized induction field shape function for V plane.
int fNFieldBins
number of bins for field response
TF1 * fColFieldFunc
Parameterized collection field shape function.
bool fUseSimpleFieldShape
Flag that turns on new field response shapes.
bool fUseFunctionFieldShape
Flag that allows to use a parameterized field response instead of the hardcoded version.
TF1 * fIndUFieldFunc
Parameterized induction field shape function for U plane.
bool fUseHistogramFieldShape
Flag that truns on field response shaped from histograms.
TH1 const * fFieldResponseHist[3]
Histogram used to hold the field response, hardcoded for the time being.
double fColFieldRespAmp
amplitude of response to field
double fIndVFieldRespAmp
amplitude of response to field in V plane
std::vector< double > fIndVFieldResponse
double sampling_rate(DetectorClocksData const &data)
Returns the period of the TPC readout electronics clock.
std::vector< double > fIndUFieldResponse