1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
7 * Permission to use, copy, modify and distribute this software and its *
8 * documentation strictly for non-commercial purposes is hereby granted *
9 * without fee, provided that the above copyright notice appears in all *
10 * copies and that both the copyright notice and this permission notice *
11 * appear in the supporting documentation. The authors make no claims *
12 * about the suitability of this software for any purpose. It is *
13 * provided "as is" without express or implied warranty. *
14 **************************************************************************/
18 //_________________________________________________________________________
19 // Utility Class for Neural Network fit
21 // currently uses 5 input neurons
22 // network configured via TMultiLayerPerceptron
24 //*-- Author: Paola La Rocca (Catania)
27 #include "AliCaloNeuralFit.h"
31 Double_t AliCaloNeuralFit::Value
32 (int index, Double_t in0, Double_t in1, Double_t in2, Double_t in3, Double_t in4)
35 // Compute the neural network answer,
36 // given the input values (taken from the signal TGraph)
47 return Neuron0x93bc708();
49 return Neuron0x93be5d0();
55 Double_t AliCaloNeuralFit::Neuron0x8ceb770() const
59 // Just return activation value externally setted.
65 Double_t AliCaloNeuralFit::Neuron0x8ceb900() const
69 // Just return activation value externally setted.
75 Double_t AliCaloNeuralFit::Neuron0x8cebad8() const
79 // Just return activation value externally setted.
85 Double_t AliCaloNeuralFit::Neuron0x8cebcb0() const
89 // Just return activation value externally setted.
95 Double_t AliCaloNeuralFit::Neuron0x93bc518() const
99 // Just return activation value externally setted.
105 Double_t AliCaloNeuralFit::Input0x93bc838() const
108 // Hidden/Output neuron
109 // Compute the activation from linear combination of
110 // all neurons going into this, each one times its synaptic weight
112 Double_t input = -0.097207;
113 input += Synapse0x93bc9e8();
114 input += Synapse0x93bca10();
115 input += Synapse0x93bca38();
116 input += Synapse0x93bca60();
117 input += Synapse0x93bca88();
121 Double_t AliCaloNeuralFit::Neuron0x93bc838() const
124 // Hidden/Output neuron
125 // Return computed activation
127 Double_t input = Input0x93bc838();
128 return (tanh(input) * 1)+0;
131 Double_t AliCaloNeuralFit::Input0x93bcab0() const
134 // Hidden/Output neuron
135 // Compute the activation from linear combination of
136 // all neurons going into this, each one times its synaptic weight
138 Double_t input = 0.0466086;
139 input += Synapse0x93bcca8();
140 input += Synapse0x93bccd0();
141 input += Synapse0x93bccf8();
142 input += Synapse0x93bcd20();
143 input += Synapse0x93bcd48();
147 Double_t AliCaloNeuralFit::Neuron0x93bcab0() const
150 // Hidden/Output neuron
151 // Return computed activation
153 Double_t input = Input0x93bcab0();
154 return (tanh(input) * 1)+0;
157 Double_t AliCaloNeuralFit::Input0x93bcd70() const
160 // Hidden/Output neuron
161 // Compute the activation from linear combination of
162 // all neurons going into this, each one times its synaptic weight
164 Double_t input = 0.617042;
165 input += Synapse0x93bcf68();
166 input += Synapse0x93bcf90();
167 input += Synapse0x93bcfb8();
168 input += Synapse0x93bcfe0();
169 input += Synapse0x93bd008();
173 Double_t AliCaloNeuralFit::Neuron0x93bcd70() const
176 // Hidden/Output neuron
177 // Return computed activation
179 Double_t input = Input0x93bcd70();
180 return (tanh(input) * 1)+0;
183 Double_t AliCaloNeuralFit::Input0x93bd030() const
186 // Hidden/Output neuron
187 // Compute the activation from linear combination of
188 // all neurons going into this, each one times its synaptic weight
190 Double_t input = -0.519529;
191 input += Synapse0x93bd228();
192 input += Synapse0x93bd250();
193 input += Synapse0x93bd300();
194 input += Synapse0x93bd328();
195 input += Synapse0x93bd350();
199 Double_t AliCaloNeuralFit::Neuron0x93bd030() const
202 // Hidden/Output neuron
203 // Return computed activation
205 Double_t input = Input0x93bd030();
206 return (tanh(input) * 1)+0;
209 Double_t AliCaloNeuralFit::Input0x93bd378() const
212 // Hidden/Output neuron
213 // Compute the activation from linear combination of
214 // all neurons going into this, each one times its synaptic weight
216 Double_t input = -0.405186;
217 input += Synapse0x93bd528();
218 input += Synapse0x93bd550();
219 input += Synapse0x93bd578();
220 input += Synapse0x93bd5a0();
221 input += Synapse0x93bd5c8();
225 Double_t AliCaloNeuralFit::Neuron0x93bd378() const
228 // Hidden/Output neuron
229 // Return computed activation
231 Double_t input = Input0x93bd378();
232 return (tanh(input) * 1)+0;
235 Double_t AliCaloNeuralFit::Input0x93bd5f0() const
238 // Hidden/Output neuron
239 // Compute the activation from linear combination of
240 // all neurons going into this, each one times its synaptic weight
242 Double_t input = -0.253465;
243 input += Synapse0x93bd7e8();
244 input += Synapse0x93bd810();
245 input += Synapse0x93bd838();
246 input += Synapse0x93bd860();
247 input += Synapse0x93bd888();
251 Double_t AliCaloNeuralFit::Neuron0x93bd5f0() const
254 // Hidden/Output neuron
255 // Return computed activation
257 Double_t input = Input0x93bd5f0();
258 return (tanh(input) * 1)+0;
261 Double_t AliCaloNeuralFit::Input0x93bd8b0() const
264 // Hidden/Output neuron
265 // Compute the activation from linear combination of
266 // all neurons going into this, each one times its synaptic weight
268 Double_t input = 0.0340672;
269 input += Synapse0x93bdaa8();
270 input += Synapse0x93bdad0();
271 input += Synapse0x93bdaf8();
272 input += Synapse0x8ce7098();
273 input += Synapse0x8ce70c0();
277 Double_t AliCaloNeuralFit::Neuron0x93bd8b0() const
280 // Hidden/Output neuron
281 // Return computed activation
283 Double_t input = Input0x93bd8b0();
284 return (tanh(input) * 1)+0;
287 Double_t AliCaloNeuralFit::Input0x93bdc28() const
290 // Hidden/Output neuron
291 // Compute the activation from linear combination of
292 // all neurons going into this, each one times its synaptic weight
294 Double_t input = 0.231599;
295 input += Synapse0x93bde20();
296 input += Synapse0x93bde48();
297 input += Synapse0x93bde70();
298 input += Synapse0x93bde98();
299 input += Synapse0x93bdec0();
303 Double_t AliCaloNeuralFit::Neuron0x93bdc28() const
306 // Hidden/Output neuron
307 // Return computed activation
309 Double_t input = Input0x93bdc28();
310 return (tanh(input) * 1)+0;
313 Double_t AliCaloNeuralFit::Input0x93bdee8() const
316 // Hidden/Output neuron
317 // Compute the activation from linear combination of
318 // all neurons going into this, each one times its synaptic weight
320 Double_t input = 0.56831;
321 input += Synapse0x93be0e0();
322 input += Synapse0x93be108();
323 input += Synapse0x93be130();
324 input += Synapse0x93be158();
325 input += Synapse0x93be180();
329 Double_t AliCaloNeuralFit::Neuron0x93bdee8() const
332 // Hidden/Output neuron
333 // Return computed activation
335 Double_t input = Input0x93bdee8();
336 return (tanh(input) * 1)+0;
339 Double_t AliCaloNeuralFit::Input0x93be1a8() const
342 // Hidden/Output neuron
343 // Compute the activation from linear combination of
344 // all neurons going into this, each one times its synaptic weight
346 Double_t input = 0.223889;
347 input += Synapse0x93be3a0();
348 input += Synapse0x93be3c8();
349 input += Synapse0x93be3f0();
350 input += Synapse0x93be418();
351 input += Synapse0x93be440();
355 Double_t AliCaloNeuralFit::Neuron0x93be1a8() const
358 // Hidden/Output neuron
359 // Return computed activation
361 Double_t input = Input0x93be1a8();
362 return (tanh(input) * 1)+0;
365 Double_t AliCaloNeuralFit::Input0x93bc708() const
368 // Hidden/Output neuron
369 // Compute the activation from linear combination of
370 // all neurons going into this, each one times its synaptic weight
372 Double_t input = 0.565736;
373 input += Synapse0x93bd2c0();
374 input += Synapse0x93be468();
375 input += Synapse0x93be490();
376 input += Synapse0x93be4b8();
377 input += Synapse0x93be4e0();
378 input += Synapse0x93be508();
379 input += Synapse0x93be530();
380 input += Synapse0x93be558();
381 input += Synapse0x93be580();
382 input += Synapse0x93be5a8();
386 Double_t AliCaloNeuralFit::Neuron0x93bc708() const
389 // Hidden/Output neuron
390 // Return computed activation
392 Double_t input = Input0x93bc708();
393 return (input * 1)+0;
396 Double_t AliCaloNeuralFit::Input0x93be5d0() const
399 // Hidden/Output neuron
400 // Compute the activation from linear combination of
401 // all neurons going into this, each one times its synaptic weight
403 Double_t input = 0.311772;
404 input += Synapse0x93be7d0();
405 input += Synapse0x93be7f8();
406 input += Synapse0x93be820();
407 input += Synapse0x93be848();
408 input += Synapse0x93be870();
409 input += Synapse0x934a7c8();
410 input += Synapse0x93605e0();
411 input += Synapse0x9360608();
412 input += Synapse0x8ce6fe8();
413 input += Synapse0x8ce7010();
417 Double_t AliCaloNeuralFit::Neuron0x93be5d0() const
420 // Hidden/Output neuron
421 // Return computed activation
423 Double_t input = Input0x93be5d0();
424 return (input * 1)+0;
427 Double_t AliCaloNeuralFit::Synapse0x93bc9e8() const
430 // Synaptic connection
431 // Multiplies input times synaptic weight
433 return (Neuron0x8ceb770()*-0.173079);
436 Double_t AliCaloNeuralFit::Synapse0x93bca10() const
439 // Synaptic connection
440 // Multiplies input times synaptic weight
442 return (Neuron0x8ceb900()*-0.356515);
445 Double_t AliCaloNeuralFit::Synapse0x93bca38() const
448 // Synaptic connection
449 // Multiplies input times synaptic weight
451 return (Neuron0x8cebad8()*0.116333);
454 Double_t AliCaloNeuralFit::Synapse0x93bca60() const
457 // Synaptic connection
458 // Multiplies input times synaptic weight
460 return (Neuron0x8cebcb0()*-0.0647334);
463 Double_t AliCaloNeuralFit::Synapse0x93bca88() const
466 // Synaptic connection
467 // Multiplies input times synaptic weight
469 return (Neuron0x93bc518()*0.135181);
472 Double_t AliCaloNeuralFit::Synapse0x93bcca8() const
475 // Synaptic connection
476 // Multiplies input times synaptic weight
478 return (Neuron0x8ceb770()*-0.00703734);
481 Double_t AliCaloNeuralFit::Synapse0x93bccd0() const
484 // Synaptic connection
485 // Multiplies input times synaptic weight
487 return (Neuron0x8ceb900()*1.04245);
490 Double_t AliCaloNeuralFit::Synapse0x93bccf8() const
493 // Synaptic connection
494 // Multiplies input times synaptic weight
496 return (Neuron0x8cebad8()*0.70812);
499 Double_t AliCaloNeuralFit::Synapse0x93bcd20() const
502 // Synaptic connection
503 // Multiplies input times synaptic weight
505 return (Neuron0x8cebcb0()*-0.486738);
508 Double_t AliCaloNeuralFit::Synapse0x93bcd48() const
511 // Synaptic connection
512 // Multiplies input times synaptic weight
514 return (Neuron0x93bc518()*-0.623982);
517 Double_t AliCaloNeuralFit::Synapse0x93bcf68() const
520 // Synaptic connection
521 // Multiplies input times synaptic weight
523 return (Neuron0x8ceb770()*0.0557636);
526 Double_t AliCaloNeuralFit::Synapse0x93bcf90() const
529 // Synaptic connection
530 // Multiplies input times synaptic weight
532 return (Neuron0x8ceb900()*0.503374);
535 Double_t AliCaloNeuralFit::Synapse0x93bcfb8() const
538 // Synaptic connection
539 // Multiplies input times synaptic weight
541 return (Neuron0x8cebad8()*-0.0500216);
544 Double_t AliCaloNeuralFit::Synapse0x93bcfe0() const
547 // Synaptic connection
548 // Multiplies input times synaptic weight
550 return (Neuron0x8cebcb0()*0.0561266);
553 Double_t AliCaloNeuralFit::Synapse0x93bd008() const
556 // Synaptic connection
557 // Multiplies input times synaptic weight
559 return (Neuron0x93bc518()*-0.403885);
562 Double_t AliCaloNeuralFit::Synapse0x93bd228() const
565 // Synaptic connection
566 // Multiplies input times synaptic weight
568 return (Neuron0x8ceb770()*-0.0649038);
571 Double_t AliCaloNeuralFit::Synapse0x93bd250() const
574 // Synaptic connection
575 // Multiplies input times synaptic weight
577 return (Neuron0x8ceb900()*-0.164437);
580 Double_t AliCaloNeuralFit::Synapse0x93bd300() const
583 // Synaptic connection
584 // Multiplies input times synaptic weight
586 return (Neuron0x8cebad8()*-0.657412);
589 Double_t AliCaloNeuralFit::Synapse0x93bd328() const
592 // Synaptic connection
593 // Multiplies input times synaptic weight
595 return (Neuron0x8cebcb0()*0.175571);
598 Double_t AliCaloNeuralFit::Synapse0x93bd350() const
601 // Synaptic connection
602 // Multiplies input times synaptic weight
604 return (Neuron0x93bc518()*0.588896);
607 Double_t AliCaloNeuralFit::Synapse0x93bd528() const
610 // Synaptic connection
611 // Multiplies input times synaptic weight
613 return (Neuron0x8ceb770()*-0.00361627);
616 Double_t AliCaloNeuralFit::Synapse0x93bd550() const
619 // Synaptic connection
620 // Multiplies input times synaptic weight
622 return (Neuron0x8ceb900()*0.398821);
625 Double_t AliCaloNeuralFit::Synapse0x93bd578() const
628 // Synaptic connection
629 // Multiplies input times synaptic weight
631 return (Neuron0x8cebad8()*0.38779);
634 Double_t AliCaloNeuralFit::Synapse0x93bd5a0() const
637 // Synaptic connection
638 // Multiplies input times synaptic weight
640 return (Neuron0x8cebcb0()*0.341009);
643 Double_t AliCaloNeuralFit::Synapse0x93bd5c8() const
646 // Synaptic connection
647 // Multiplies input times synaptic weight
649 return (Neuron0x93bc518()*0.290214);
652 Double_t AliCaloNeuralFit::Synapse0x93bd7e8() const
655 // Synaptic connection
656 // Multiplies input times synaptic weight
658 return (Neuron0x8ceb770()*-0.238609);
661 Double_t AliCaloNeuralFit::Synapse0x93bd810() const
664 // Synaptic connection
665 // Multiplies input times synaptic weight
667 return (Neuron0x8ceb900()*-0.193207);
670 Double_t AliCaloNeuralFit::Synapse0x93bd838() const
673 // Synaptic connection
674 // Multiplies input times synaptic weight
676 return (Neuron0x8cebad8()*0.304672);
679 Double_t AliCaloNeuralFit::Synapse0x93bd860() const
682 // Synaptic connection
683 // Multiplies input times synaptic weight
685 return (Neuron0x8cebcb0()*-0.327625);
688 Double_t AliCaloNeuralFit::Synapse0x93bd888() const
691 // Synaptic connection
692 // Multiplies input times synaptic weight
694 return (Neuron0x93bc518()*-0.268996);
697 Double_t AliCaloNeuralFit::Synapse0x93bdaa8() const
700 // Synaptic connection
701 // Multiplies input times synaptic weight
703 return (Neuron0x8ceb770()*0.725989);
706 Double_t AliCaloNeuralFit::Synapse0x93bdad0() const
709 // Synaptic connection
710 // Multiplies input times synaptic weight
712 return (Neuron0x8ceb900()*-0.217538);
715 Double_t AliCaloNeuralFit::Synapse0x93bdaf8() const
718 // Synaptic connection
719 // Multiplies input times synaptic weight
721 return (Neuron0x8cebad8()*-0.603975);
724 Double_t AliCaloNeuralFit::Synapse0x8ce7098() const
727 // Synaptic connection
728 // Multiplies input times synaptic weight
730 return (Neuron0x8cebcb0()*0.175658);
733 Double_t AliCaloNeuralFit::Synapse0x8ce70c0() const
736 // Synaptic connection
737 // Multiplies input times synaptic weight
739 return (Neuron0x93bc518()*-0.262399);
742 Double_t AliCaloNeuralFit::Synapse0x93bde20() const
745 // Synaptic connection
746 // Multiplies input times synaptic weight
748 return (Neuron0x8ceb770()*-1.08242);
751 Double_t AliCaloNeuralFit::Synapse0x93bde48() const
754 // Synaptic connection
755 // Multiplies input times synaptic weight
757 return (Neuron0x8ceb900()*0.41456);
760 Double_t AliCaloNeuralFit::Synapse0x93bde70() const
763 // Synaptic connection
764 // Multiplies input times synaptic weight
766 return (Neuron0x8cebad8()*0.117809);
769 Double_t AliCaloNeuralFit::Synapse0x93bde98() const
772 // Synaptic connection
773 // Multiplies input times synaptic weight
775 return (Neuron0x8cebcb0()*0.514938);
778 Double_t AliCaloNeuralFit::Synapse0x93bdec0() const
781 // Synaptic connection
782 // Multiplies input times synaptic weight
784 return (Neuron0x93bc518()*-0.193678);
787 Double_t AliCaloNeuralFit::Synapse0x93be0e0() const
790 // Synaptic connection
791 // Multiplies input times synaptic weight
793 return (Neuron0x8ceb770()*0.580561);
796 Double_t AliCaloNeuralFit::Synapse0x93be108() const
799 // Synaptic connection
800 // Multiplies input times synaptic weight
802 return (Neuron0x8ceb900()*0.610453);
805 Double_t AliCaloNeuralFit::Synapse0x93be130() const
808 // Synaptic connection
809 // Multiplies input times synaptic weight
811 return (Neuron0x8cebad8()*0.4977);
814 Double_t AliCaloNeuralFit::Synapse0x93be158() const
817 // Synaptic connection
818 // Multiplies input times synaptic weight
820 return (Neuron0x8cebcb0()*-0.328315);
823 Double_t AliCaloNeuralFit::Synapse0x93be180() const
826 // Synaptic connection
827 // Multiplies input times synaptic weight
829 return (Neuron0x93bc518()*-0.729094);
832 Double_t AliCaloNeuralFit::Synapse0x93be3a0() const
835 // Synaptic connection
836 // Multiplies input times synaptic weight
838 return (Neuron0x8ceb770()*0.172817);
841 Double_t AliCaloNeuralFit::Synapse0x93be3c8() const
844 // Synaptic connection
845 // Multiplies input times synaptic weight
847 return (Neuron0x8ceb900()*0.288833);
850 Double_t AliCaloNeuralFit::Synapse0x93be3f0() const
853 // Synaptic connection
854 // Multiplies input times synaptic weight
856 return (Neuron0x8cebad8()*0.0242409);
859 Double_t AliCaloNeuralFit::Synapse0x93be418() const
862 // Synaptic connection
863 // Multiplies input times synaptic weight
865 return (Neuron0x8cebcb0()*0.273568);
868 Double_t AliCaloNeuralFit::Synapse0x93be440() const
871 // Synaptic connection
872 // Multiplies input times synaptic weight
874 return (Neuron0x93bc518()*0.261816);
877 Double_t AliCaloNeuralFit::Synapse0x93bd2c0() const
880 // Synaptic connection
881 // Multiplies input times synaptic weight
883 return (Neuron0x93bc838()*-0.332154);
886 Double_t AliCaloNeuralFit::Synapse0x93be468() const
889 // Synaptic connection
890 // Multiplies input times synaptic weight
892 return (Neuron0x93bcab0()*0.175458);
895 Double_t AliCaloNeuralFit::Synapse0x93be490() const
898 // Synaptic connection
899 // Multiplies input times synaptic weight
901 return (Neuron0x93bcd70()*0.211775);
904 Double_t AliCaloNeuralFit::Synapse0x93be4b8() const
907 // Synaptic connection
908 // Multiplies input times synaptic weight
910 return (Neuron0x93bd030()*0.335443);
913 Double_t AliCaloNeuralFit::Synapse0x93be4e0() const
916 // Synaptic connection
917 // Multiplies input times synaptic weight
919 return (Neuron0x93bd378()*0.341079);
922 Double_t AliCaloNeuralFit::Synapse0x93be508() const
925 // Synaptic connection
926 // Multiplies input times synaptic weight
928 return (Neuron0x93bd5f0()*-0.324381);
931 Double_t AliCaloNeuralFit::Synapse0x93be530() const
934 // Synaptic connection
935 // Multiplies input times synaptic weight
937 return (Neuron0x93bd8b0()*0.135666);
940 Double_t AliCaloNeuralFit::Synapse0x93be558() const
943 // Synaptic connection
944 // Multiplies input times synaptic weight
946 return (Neuron0x93bdc28()*-0.0213577);
949 Double_t AliCaloNeuralFit::Synapse0x93be580() const
952 // Synaptic connection
953 // Multiplies input times synaptic weight
955 return (Neuron0x93bdee8()*-0.598335);
958 Double_t AliCaloNeuralFit::Synapse0x93be5a8() const
961 // Synaptic connection
962 // Multiplies input times synaptic weight
964 return (Neuron0x93be1a8()*0.636813);
967 Double_t AliCaloNeuralFit::Synapse0x93be7d0() const
970 // Synaptic connection
971 // Multiplies input times synaptic weight
973 return (Neuron0x93bc838()*0.173357);
976 Double_t AliCaloNeuralFit::Synapse0x93be7f8() const
979 // Synaptic connection
980 // Multiplies input times synaptic weight
982 return (Neuron0x93bcab0()*-0.971616);
985 Double_t AliCaloNeuralFit::Synapse0x93be820() const
988 // Synaptic connection
989 // Multiplies input times synaptic weight
991 return (Neuron0x93bcd70()*-0.38099);
994 Double_t AliCaloNeuralFit::Synapse0x93be848() const
997 // Synaptic connection
998 // Multiplies input times synaptic weight
1000 return (Neuron0x93bd030()*0.351755);
1003 Double_t AliCaloNeuralFit::Synapse0x93be870() const
1006 // Synaptic connection
1007 // Multiplies input times synaptic weight
1009 return (Neuron0x93bd378()*0.106307);
1012 Double_t AliCaloNeuralFit::Synapse0x934a7c8() const
1015 // Synaptic connection
1016 // Multiplies input times synaptic weight
1018 return (Neuron0x93bd5f0()*0.118656);
1021 Double_t AliCaloNeuralFit::Synapse0x93605e0() const
1024 // Synaptic connection
1025 // Multiplies input times synaptic weight
1027 return (Neuron0x93bd8b0()*-0.447119);
1030 Double_t AliCaloNeuralFit::Synapse0x9360608() const
1033 // Synaptic connection
1034 // Multiplies input times synaptic weight
1036 return (Neuron0x93bdc28()*0.677259);
1039 Double_t AliCaloNeuralFit::Synapse0x8ce6fe8() const
1042 // Synaptic connection
1043 // Multiplies input times synaptic weight
1045 return (Neuron0x93bdee8()*-0.246138);
1048 Double_t AliCaloNeuralFit::Synapse0x8ce7010() const
1051 // Synaptic connection
1052 // Multiplies input times synaptic weight
1054 return (Neuron0x93be1a8()*-0.117442);