]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - ITS/AliITSTrigger.cxx
Default momentun can be set via AliExternalTrackParameter::SetMostProbablePt(value)
[u/mrichter/AliRoot.git] / ITS / AliITSTrigger.cxx
index b169993cde4bf738fffc278035cd92880941ca88..0cf52d3c922e82fb2d1f2f384f07c59776ba020c 100644 (file)
 
 /* $Id$ */
 
+#include <TClonesArray.h>
 
 #include "AliLog.h"
 #include "AliRun.h"
 #include "AliRunLoader.h"
+#include "AliTriggerInput.h"
 
 #include "AliITSTrigger.h"
+#include "AliITSdigitSPD.h"
+#include "AliITSgeom.h"
+#include "AliITSLoader.h"
 
 //______________________________________________________________________
 ClassImp(AliITSTrigger)
 ////////////////////////////////////////////////////////////////////////
-//
-// Version 1
-// Modified by D. Elia, C. Jorgensen
-// March 2006
-//
-// Version 0
-// Written by J. Conrad, E. Lopez Torres 
-// October 2005
-//
-// AliITSTrigger: implementation of the SPD Fast-OR based triggers.
-//
+//                                                                    //
+// Version 1                                                          //
+// Modified by D. Elia, C. Jorgensen                                  //
+// March 2006                                                         //
+//                                                                    //
+// Version 0                                                          //
+// Written by J. Conrad, E. Lopez Torres                              //
+// October 2005                                                       //
+//                                                                    //
+// AliITSTrigger: implementation of the SPD Fast-OR based triggers.   //
+//                                                                    //
 ////////////////////////////////////////////////////////////////////////
 
 //______________________________________________________________________
 AliITSTrigger::AliITSTrigger()
-  : AliTriggerDetector()
-{
-   SetName("ITS");
-   CreateInputs();
+  : AliTriggerDetector(),
+fGlobalFOThreshold(1),
+fHighMultFOThreshold(150){
+
+  //standard constructor
+  SetName("ITS");
+  CreateInputs();
 
-   // set parameters to define trigger condition thresholds
-   fGlobalFOThreshold = 1;
-   fHighMultFOThreshold = 100; 
+  // set parameters to define trigger condition thresholds
+  //fGlobalFOThreshold = 1;
+  //fHighMultFOThreshold = 150; 
 }
 
 //______________________________________________________________________
@@ -75,6 +83,7 @@ void AliITSTrigger::Trigger()
   AliITSgeom* geom = loader->GetITSgeom();
   loader->LoadDigits("READ");
   TTree *treeD = loader->TreeD();
+  if (!treeD) return;
 
   TObjArray *digDet = 0;
   digDet = new TObjArray(3);
@@ -109,7 +118,7 @@ void AliITSTrigger::MultiplicityTriggers(TObjArray* digDet, TTree* treeD, AliITS
   Int_t ndigitsInChip[5];
 
   // loop over modules (ladders)
-  for (Int_t moduleIndex=startSPD; moduleIndex<lastSPD; moduleIndex++) {
+  for (Int_t moduleIndex=startSPD; moduleIndex<lastSPD+1; moduleIndex++) {
     treeD->GetEvent(moduleIndex);
     TClonesArray* digits = (TClonesArray*) (digDet->At(0)); // SPD only.
     
@@ -165,7 +174,7 @@ void AliITSTrigger::GeometryTriggers()
 //   //   Int_t iFOperchip[ntotal];   // not used
 //   Int_t iFOperChipinStave[20][40][2];
   
-//   for (Int_t m=startSPD;m<lastSPD;m++) {
+//   for (Int_t m=startSPD;m<lastSPD+1;m++) {
 //     iFOperladder[m] = 0;
 //   }
 
@@ -184,7 +193,7 @@ void AliITSTrigger::GeometryTriggers()
 //   Int_t checkStave = 0;
   
 //   // loop over modules
-//   for (Int_t moduleIndex=startSPD; moduleIndex<lastSPD; moduleIndex++) {
+//   for (Int_t moduleIndex=startSPD; moduleIndex<lastSPD+1; moduleIndex++) {
 //     treeD->GetEvent(moduleIndex);
 //     TClonesArray* digits = (TClonesArray*) (digDet->At(0)); // SPD only.