/[PAMELA software]/calo/flight/CaloPreSampler/src/CaloPreSampler.cpp
ViewVC logotype

Diff of /calo/flight/CaloPreSampler/src/CaloPreSampler.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.12 by pam-fi, Tue Feb 24 09:18:05 2009 UTC revision 1.16 by mocchiut, Mon Dec 14 14:31:55 2009 UTC
# Line 36  CaloPreSampler::CaloPreSampler(PamLevel2 Line 36  CaloPreSampler::CaloPreSampler(PamLevel2
36    sel = true;    sel = true;
37    cont = false;    cont = false;
38    emulate18 = true;    emulate18 = true;
39      usepl18x = false;
40    simulation = false;    simulation = false;
41    withtrk = true;    withtrk = true;
42    rigdefault = 50.;    rigdefault = 50.;
43    nox = false;    nox = false;
44    noy = false;    noy = false;
45    forcecalo = false;    forcecalo = false;
46      forcefitmode = -1;
47    memset(mask,0,2*22*sizeof(Int_t));    memset(mask,0,2*22*sizeof(Int_t));
48    //    //
49    Clear();    Clear();
# Line 71  CaloPreSampler::CaloPreSampler(PamLevel2 Line 73  CaloPreSampler::CaloPreSampler(PamLevel2
73    //    //
74  }  }
75    
76    CaloTrkVar* CaloPreSampler::GetCaloTrack(Int_t t){
77      this->Process();
78      if ( t < 0 ) return pcalo->GetCaloStoredTrack(t);
79      if ( L2->GetTrack(t) ){
80        return pcalo->GetCaloStoredTrack(L2->GetTrack(t)->GetTrkTrack()->GetSeqNo());
81      };
82      return NULL;
83    }
84    
85  void CaloPreSampler::SetNoWpreSampler(Int_t n){  void CaloPreSampler::SetNoWpreSampler(Int_t n){
86    if ( NC+n < 23 ){    if ( NC+n < 23 ){
87      N = n;      N = n;
# Line 153  void CaloPreSampler::Process(){ Line 164  void CaloPreSampler::Process(){
164    // Clear structures used to communicate with fortran    // Clear structures used to communicate with fortran
165    //    //
166    event->ClearStructs();//ELENA    event->ClearStructs();//ELENA
167      if ( forcefitmode > 0 ){
168        if ( forcefitmode != 1000 && forcefitmode != 1001 && forcefitmode != 1002 ){
169          printf(" ERROR! forcefitmode=%i \n Use forcefitmode = 1000 for fit mode 0, 1001 fit mode 1, 1002 fit mode 3\n",forcefitmode);
170          forcefitmode = -1;
171        } else {
172          event->clevel2->fmode[0] = forcefitmode;
173          event->clevel2->fmode[1] = forcefitmode;
174        };
175      };
176    //    //
177    Bool_t newentry = false;    Bool_t newentry = false;
178    //    //
179    if ( L2->IsORB() ){    if ( L2->IsORB() ){
180        if ( debug ) printf(" I am here, we have orbital infos \n");
181      if ( L2->GetOrbitalInfo()->pkt_num != PKT || L2->GetOrbitalInfo()->OBT != OBT || L2->GetOrbitalInfo()->absTime != atime || sel != ssel ){      if ( L2->GetOrbitalInfo()->pkt_num != PKT || L2->GetOrbitalInfo()->OBT != OBT || L2->GetOrbitalInfo()->absTime != atime || sel != ssel ){
182        newentry = true;        newentry = true;
183        OBT = L2->GetOrbitalInfo()->OBT;        OBT = L2->GetOrbitalInfo()->OBT;
# Line 215  void CaloPreSampler::Process(){ Line 236  void CaloPreSampler::Process(){
236      //      //
237      mip = L2->GetCaloLevel1()->DecodeEstrip(i,view,plane,strip);      mip = L2->GetCaloLevel1()->DecodeEstrip(i,view,plane,strip);
238      //      //
239        if ( !usepl18x && view==0 && plane==18 ) mip = 0.;
240        //
241      // Mask x or y view if nox and/or noy are true (default false)      // Mask x or y view if nox and/or noy are true (default false)
242      //      //
243      if ( mask[view][plane] ) mip = 0.;      if ( mask[view][plane] ) mip = 0.;

Legend:
Removed from v.1.12  
changed lines
  Added in v.1.16

  ViewVC Help
Powered by ViewVC 1.1.23